Active Learning Linear Regression

Machine Learning
Introduced by
Cohn, D. A.; Ghahramani, Z.; Jordan, M. I.
Year
1996
Type
Active learning / iterative supervised learning
Family
Machine learning

What does it do?

Active Learning Linear Regression is an iterative approach that pairs an ordinary linear regression model with a query strategy, which selects the unlabeled points whose labels are expected to be most informative.

Labeling effort is directed to the inputs where the current model's predictions are most uncertain. The query principle derives from the optimal data selection work of Cohn, Ghahramani, and Jordan (1996), who report empirically that such selection sharply decreases the number of training examples a learner needs, for the statistical learners they studied, including locally weighted regression. The ordinary least squares variant described here adapts that principle and is not the algorithm of their paper.

The intuition behind the method

Labels are often expensive to obtain, for example through laboratory measurements, clinical assays, or expert annotation. Rather than labeling a random sample of the pool, an active learner fits a linear regression on the small labeled set it has, finds the unlabeled inputs where its predictions are least certain, asks an oracle to label the chosen input, and refits. The cycle repeats until the labeling budget is spent or a stopping criterion is met. Because the model is linear, uncertainty is largest in regions that the labeled data covers poorly, such as the edges of the input range and areas far from existing labels.

History

Cohn, Ghahramani, and Jordan (1996) reviewed how statistically optimal data selection had been used with feedforward neural networks, and showed how the same principles can select data for two statistically based learners, mixtures of Gaussians and locally weighted regression, where the techniques are efficient and accurate. The query rule used on this page applies the same principle to global ordinary least squares; it is an adaptation rather than the algorithm studied in that paper. The approach also connects to the classical optimal experimental design literature. Settles (2012) later surveyed the broader active learning field, in which query-by-uncertainty methods such as this one are a central family.

When to use it

Choose this method when the relationship between predictors and a continuous outcome is approximately linear, labels are scarce or costly (for example wet-lab experiments, clinical assays, or expert annotation), and a large pool of unlabeled candidate inputs is available. It suits low-to-moderate dimensional design problems in which the aim is to estimate a linear response surface with few measurements. Avoid it when the true relationship is strongly nonlinear (consider active Gaussian process regression or other nonlinear variants instead), when labels are cheap enough that passive sampling is adequate, or when the unlabeled pool is too small for selection to matter. Bayesian linear regression is a closely related option when a probabilistic treatment of uncertainty is preferred.

Limitations and considerations

  • Reduces the need for labels by directing queries to the inputs the current model is least certain about. Cohn et al. report a sharp reduction in the training examples needed for the statistical learners they studied, including locally weighted regression; the gains reported there are for those learners, and the benefit for this OLS variant depends on the problem.
  • Connects to the optimal experimental design literature, so the query rule has a clear statistical interpretation as a reduction of prediction uncertainty.
  • Simple and interpretable: the underlying model is ordinary linear regression with transparent coefficients.
  • Computationally light for linear models, because the predictive variance is available in closed form from the current fit and can be updated as points are added.
  • Well suited to low-to-moderate dimensional problems where the relationship is genuinely close to linear.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Reduces labeling effort by directing queries to the inputs the current model is least certain about; Cohn et al. report this kind of reduction empirically for related regression learners.
  • Connects to the optimal experimental design literature, so the query rule has a clear statistical interpretation as a reduction of prediction uncertainty.
  • Simple and interpretable: the underlying model is ordinary linear regression with transparent coefficients.
  • Computationally light for linear models, because the predictive variance is available in closed form from the current fit and can be updated as points are added.
  • Well suited to low-to-moderate dimensional problems where the relationship is genuinely close to linear.

Applications

  • Experimental design where each measurement is costly, such as selecting which compounds or material samples to test next when a linear response surface is being estimated.
  • Sensor placement, where measurement locations are chosen to estimate a roughly linear spatial trend with few instruments.
  • Industrial process studies in which a continuous output is mapped with a limited number of experimental runs.

How it works

How it works

1

The algorithm starts with a small labeled seed set and a larger pool of unlabeled inputs. The seed set is usually drawn at random and should cover the input region, since the labeled design matrix must be non-singular for the query rule to be defined. The FAQ gives a sizing rule: p + 1 points is the minimum for an ordinary least squares fit with p predictors plus an intercept, and at least 2p points is often used as a heuristic for a stable initial variance estimate. For small p, a seed of roughly 5 to 20 points is a common heuristic starting point, not a fixed standard; the right size depends on p, the noise level, and the accuracy required.

2

A linear regression model is fitted to the current labeled set by ordinary least squares. The estimated coefficient vector beta-hat defines the current prediction surface across all inputs.

Formula
\hat{\beta} = (X^\top X)^{-1} X^\top y
3

For each unlabeled point x, the criterion is the predictive variance of the fitted regression at x, written sigma^2(x) in the formula. For ordinary least squares this equals s^2 (1 + x^T (X^T X)^{-1} x), where X is the labeled design matrix including an intercept column and s^2 is the residual noise variance estimated from the current fit. The term x^T (X^T X)^{-1} x is the leverage of x, which grows for inputs far from the labeled data. The point with the largest predictive variance is selected for labeling. This is a pointwise prediction-variance criterion, which is more closely related to G- and I-optimal design (which concern prediction variance) than to D-optimal or A-optimal design. D-optimal and A-optimal criteria act on the information matrix as a whole, so they are not equivalent to this rule.

Formula
x^* = \arg\max_{x \in \mathcal{U}} \sigma^2(x)
4

The selected point is sent to an oracle, such as a human annotator, a laboratory instrument, or an automated measurement system, which returns the true continuous response for that input. This labeling step is usually the main cost and time bottleneck.

5

The newly labeled point is added to the labeled set and the regression is refitted on the enlarged set. The query, label, and refit cycle continues until the labeling budget is exhausted or a stopping criterion, such as a minimum variance threshold, is met.

Common pitfalls

  • Starting with a seed set that is too small or unrepresentative, so that early queries are driven by a poorly fitted model.
  • Ignoring model misspecification. If the data are nonlinear, the variance criterion will systematically favour points that do not improve the fit where it matters.
  • Treating the final model as if it had been fitted on a passive random sample. Actively selected labels are not independent and identically distributed draws, so standard ordinary least squares standard-error formulas can be invalid.
  • Confusing predictive variance with residual variance. The query criterion is the variance of the prediction at a candidate input, not the residual variance of the training data.

Frequently asked questions

How is active learning different from ordinary linear regression?

Ordinary linear regression is fitted on a labeled dataset that has already been collected, typically passively. Active learning linear regression adds a query loop: after each fit, the model selects the unlabeled point with the largest predictive variance, requests its label, and refits, repeating until the labeling budget is spent.

What query strategy does the method use?

The strategy selects the point with the largest predictive variance under the current fit. This pointwise criterion is related to G- and I-optimal design, which concern prediction variance. It is not the same as D-optimal or A-optimal design, which optimize the information matrix as a whole.

Can I use this with regularized regression (Ridge, Lasso)?

Ridge regression has its own predictive variance expression, but it differs from the ordinary least squares expression used in the query rule above, so the query criterion would need to be re-derived rather than reused. For Lasso the variance expression is less straightforward, so practitioners often use bootstrap-based uncertainty estimates or switch to a Bayesian linear regression formulation.

Does active sampling bias the standard errors of the regression coefficients?

It can. Because the labeled sample is not drawn independently from the population, standard ordinary least squares standard-error formulas may not hold. Corrections such as inverse-probability-weighted estimators, or evaluating the model on a randomly drawn holdout set, are commonly considered.

How many seed points do I need to start?

p + 1 labeled points is the minimum needed for an ordinary least squares fit with p predictors plus an intercept, since the design matrix must have full column rank. A seed set of at least 2p points is often used as a heuristic for a stable initial variance estimate; this is a rule of thumb, not a fixed requirement. The seed set is usually drawn at random and should cover the input region so that the labeled design matrix is not singular.

Related methods

Sources

  1. Settles, B. (2012). Active Learning. Synthesis Lectures on Artificial Intelligence and Machine Learning, 6(1), 1–114. Morgan & Claypool.

    Open DOI reference
  2. Cohn, D. A., Ghahramani, Z., & Jordan, M. I. (1996). Active learning with statistical models. Journal of Artificial Intelligence Research, 4, 129–145.

    Open DOI reference