- Introduced by
- MacKay, D. J. C.
- Year
- 1992
- Type
- Bayesian active learning
- Family
- Machine learning
What does it do?
Active Learning Gaussian Process (GP-AL) pairs a Gaussian process model with an active learning loop: the GP's posterior uncertainty is used to choose which unlabeled points to label next.
Each query is aimed at the region where the model is least certain, so the labeling budget is spent where it is expected to be most informative. The approach is most relevant when labels are scarce or expensive and the input space is low-to-moderate dimensional.
The intuition behind the method
A Gaussian process predicts a mean and an uncertainty for every input, including inputs that have not been labeled. Active learning uses that uncertainty to decide what to label. Instead of labeling points at random, the algorithm scores all unlabeled candidates and asks an oracle, such as a human annotator or an experiment, to label the one the GP is least sure about. The GP is then refit with the new label, its uncertainty map changes, and the cycle repeats until the labeling budget is spent. Because the GP posterior is updated exactly for regression with a Gaussian likelihood, each new label is incorporated without an approximation step.
History
MacKay (1992) introduced information-based objective functions for selecting training data within a Bayesian learning framework. These criteria measure the expected informativeness of candidate measurements, and the paper notes that all of them rest on the assumption that the hypothesis space is correct, which may be their main weakness. That paper does not discuss Gaussian processes. The combination used here, a GP posterior supplying the uncertainty and an acquisition function choosing the next point to label, builds on this idea and is used in later active learning and Bayesian optimization work. Gaussian processes suit this setting because their regression posterior is available in closed form.
When to use it
Choose GP-AL when labels are scarce or costly to obtain, for example in laboratory experiments, clinical studies, or industrial testing, and when calibrated uncertainty is needed alongside predictions. It suits continuous input spaces of low-to-moderate dimension, where a smooth or moderately nonlinear response is plausible, and datasets that are small to moderate in size. Do not choose it when the input space is high-dimensional, since GP kernels become hard to specify and fit there; when the dataset is already large, since exact GP inference scales cubically with the number of labeled points; or when labeling is cheap enough that random sampling is adequate. Inputs that are mixed or categorical need a kernel designed for them, and standard continuous-input kernels are not a direct fit.
Limitations and considerations
- Exact GP inference costs O(n^3) in the number of labeled points, so large labeled sets require sparse or inducing-point approximations.
- Performance depends on the input dimension: as the number of input features grows, the kernel must cover a larger space with the same labeled points and uncertainty estimates become less informative.
- Maximum-variance selection depends on the labeled input locations rather than on the labels, so it can keep sampling sparse regions of the input space even where the response is already well determined.
- The method assumes the oracle can label any queried point promptly and without error; noisy or delayed labels are not handled by the basic loop described here.
- Kernel choice and hyperparameters strongly affect the uncertainty map; a misspecified kernel gives miscalibrated variances and therefore weaker queries.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- The GP posterior variance drives the query choice directly, so the selection rule follows from the model rather than from a separately tuned heuristic.
- Because each query targets the largest predictive variance, the labeled set tends to cover poorly explored regions of the input space, which can reduce the number of labels needed for a given fit.
- The kernel is an explicit place to encode prior beliefs about smoothness and length-scale, which the uncertainty estimates then inherit.
- The predictive variances come with the predictions and can be used as confidence intervals in downstream decisions.
- Each query has a stated reason: the candidate's predictive variance under the current model, which can be inspected at each round.
Applications
- Drug discovery and materials science, where each experiment is costly and the mapping from inputs to outcomes is unknown.
- Medical imaging annotation, where the most uncertain cases can be prioritized for expert review.
- Robotics and autonomous systems that learn control or model parameters from a limited number of trials.
- Environmental monitoring, where candidate sensor locations with the highest predictive uncertainty are chosen for measurement.
- Hyperparameter optimization (Bayesian optimization), where a GP models the objective surface and the acquisition function selects the next configuration to evaluate.
How it works
How it works
Start with a small initial labeled set, chosen to cover the input region of interest (for example with a space-filling design), and specify a GP kernel (for example squared exponential or Matern) and a noise model. The kernel encodes assumptions about the smoothness and length-scale of the function being learned, so these choices directly shape the uncertainty estimates used in the first query. This is a procedural step with no formula.
Fit the GP to the current labeled set. Kernel hyperparameters and the noise variance are typically set by maximizing the marginal likelihood (or by cross-validation). They may be re-estimated after each query or only occasionally. Re-estimation changes the length-scales and therefore the acquisition scores, and with very few labels the estimates can be unstable. The model returns a posterior predictive distribution for every point, including all unlabeled candidates, consisting of a predictive mean and a predictive variance.
Formula
p(f^* | X, y, x^*) = \mathcal{N}(\mu^*, \sigma^{*2})Score each unlabeled point with an acquisition function. The formula in the mechanics section uses maximum predictive variance; entropy or expected improvement are common alternatives. The highest-scoring point is selected. Under maximum-variance selection with fixed kernel hyperparameters, the score depends on the input locations and the labeled inputs, not on the observed labels. If hyperparameters are re-estimated, the labels influence the scores indirectly through the fitted length-scales and noise level.
Formula
x^* = \arg\max_{x \in \mathcal{U}} \sigma^2(x)Send the selected input to the oracle (a human annotator, an experiment, or an automated sensor), obtain its label, and add the input-label pair to the labeled set. This is a procedural step with no formula.
Refit the GP with the new observation included. The posterior mean and variance change near the new point and can change elsewhere, so the next round of candidate scores reflects what has already been learned.
Repeat the acquisition, query, and update steps until the labeling budget is exhausted, the compute allowance is used, or a chosen accuracy target is reached. Practical heuristics include stopping when the maximum predictive variance over the pool falls below a chosen threshold, or when predictions change little between rounds. These rules should be validated against held-out labels, since the variance is only reliable if the kernel is well specified. The final GP is then used to predict on new inputs, and its predictive variances indicate where those predictions are less reliable.
Common pitfalls
- Using a default kernel without checking whether the response is smooth at the length-scale the kernel implies; a misspecified smoothness assumption distorts both the uncertainty estimates and the query order.
- Choosing an initial labeled set concentrated in a narrow region, which leads the first fitted GP to be confident in the wrong places and delays exploration of the rest of the input space.
- Skipping normalization of inputs and outputs. GPs are sensitive to scale, and unnormalized data can make the covariance matrix numerically unstable.
- Reading the acquisition score as an absolute measure of how important a point is. Scores are only meaningful as a ranking among the candidates in the current unlabeled pool, and they change after every update.
- Applying the basic GP-AL loop to a large dataset without a sparse GP approximation, which makes the repeated refits prohibitively slow.
Frequently asked questions
How does GP-AL differ from standard Gaussian process regression?
Standard GP regression fits whatever labeled data is provided. GP-AL adds an outer loop that chooses which unlabeled points to label next, guided by the GP's predictive uncertainty, so the model is refit as the labeled set grows with informative points.
What acquisition function should I use?
Maximum predictive variance is the simplest choice and suits pure exploration of the input space. Expected improvement or entropy-based criteria can be preferable when there is a specific target value or classification boundary to locate.
How many initial labeled points do I need to start?
The initial set should be small but spread over the input region of interest, for example with a space-filling design, so that the first fit gives uncertainty estimates that are not confined to one area. The right size depends on the dimension and the noise level and should be checked against the model's behavior rather than fixed in advance.
Does the method work for classification tasks?
Yes, using GP classification with a probit or logistic link function. Posterior inference is then approximate, for example with a Laplace approximation or expectation propagation, which makes it more involved than the regression case.
When should I prefer random forests or neural networks over GP-AL?
When the dataset is large or the input space is high-dimensional, because exact GP cost and kernel specification become limiting. Other model families are then often considered, although they usually provide less principled uncertainty than a GP.
Related methods
Sources
MacKay, D. J. C. (1992). Information-based objective functions for active data selection. Neural Computation, 4(4), 590–604.
Open DOI referenceSettles, B. (2012). Active Learning. Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool.
Open publication reference