Semi-supervised Linear Regression

Machine Learning
Introduced by
Chapelle, O.; Scholkopf, B.; Zien, A. (seminal synthesis); Zhou & Li (co-training formulation)
Year
2005–2006
Type
Semi-supervised regression model
Family
Machine learning

What does it do?

Semi-supervised linear regression fits a linear model on a small labeled dataset and then uses a larger pool of unlabeled observations in an attempt to refine the coefficient estimates.

It generates pseudo-labels for the unlabeled points and refits the model. For plain unregularized least squares with hard pseudo-labels, refitting leaves the coefficients unchanged, so any gain depends on the penalty or weighting scheme chosen. No general improvement over a supervised linear model fitted to the same labels is guaranteed, and when the unlabeled data come from a different distribution the result can be worse. It should therefore always be checked against that baseline.

The intuition behind the method

Labeled data are often expensive to collect, through experiments, surveys or expert annotation, while unlabeled observations of the same features may be plentiful. The method first fits a linear model on the labeled rows and uses it to predict tentative targets for the unlabeled rows. It then refits the coefficients on the combined data, possibly with a penalty or with weights on the pseudo-labeled rows. Unlabeled rows influence the fit only through the model's own predictions, so early errors can persist. An important consequence: with ordinary least squares and unweighted hard pseudo-labels, the initial labeled-only solution is already a fixed point of the refit, so the unlabeled rows change nothing. Iteration becomes meaningful only when the objective includes a ridge penalty, a down-weighting of pseudo-labeled rows, or a similar modification.

History

Semi-supervised learning as a broad field was surveyed by Chapelle, Scholkopf and Zien in their 2006 MIT Press volume, which covers generative, low-density separation, graph-based and two-step approaches. Zhou and Li (IJCAI 2005) proposed co-training for semi-supervised regression, a different strategy from the self-training procedure described here. No specific originator of the linear pseudo-labeling procedure on this page is established.

When to use it

Use semi-supervised linear regression when labeled observations are scarce and costly to obtain, while a large pool of unlabeled rows with the same features and the same underlying relationship is available, for example in biomedical studies where assay results exist for only part of the collected samples. The potential gain is largest when labeled data form a small share of the total, and it depends on the unlabeled rows genuinely coming from the same distribution as the labeled rows. Do not use it when the labeled and unlabeled sets come from different populations (covariate shift), when the main goal is unbiased, interpretable coefficient estimates (pseudo-labels can pull coefficients toward the model's own predictions), or when the labeled sample is already large enough for reliable supervised estimation. In those cases standard linear or ridge regression is the simpler choice.

Limitations and considerations

  • If the unlabeled data distribution differs from the labeled set (covariate shift), pseudo-labels introduce bias and the model can degrade below the supervised baseline.
  • Error propagation is a real risk: early mis-predictions become training labels in later iterations, potentially amplifying mistakes.
  • Convergence is not guaranteed without regularization; the iterative procedure may oscillate.
  • Does not eliminate the need for a representative, unbiased labeled set — a biased labeled sample produces biased pseudo-labels at scale.
  • Gains vanish when the labeled set is already moderately large, making the added complexity unjustifiable.

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

Strengths

  • Improves coefficient estimates and predictive accuracy when labeled data are limited but unlabeled data are plentiful.
  • Inherits the interpretability of linear regression: coefficients retain their direction and approximate magnitude.
  • Compatible with regularization (ridge, lasso) to prevent over-reliance on uncertain pseudo-labels.
  • Can be implemented with standard linear algebra tools and iterative refinement without specialized libraries.
  • Has a built-in reference point: the supervised-only model fitted on the same labels. When the assumptions hold, the semi-supervised fit should beat this model on a held-out labeled test set; if it does not, that is evidence that the assumptions fail.

Applications

  • Biomedical research where full assay results exist for only a subset of collected samples.
  • Environmental modeling using sparse sensor measurements supplemented by satellite or simulation data.
  • Economics and social science when administrative records provide features but outcome labels require expensive surveys.
  • Natural language processing regression tasks (e.g., sentiment scoring) with few annotated documents.
  • Remote sensing regression (e.g., crop yield estimation) where ground-truth measurements cover a small geographic fraction.

How it works

How it works

1

The dataset is partitioned into a small labeled set (X_L, y_L) with observed target values and a larger unlabeled set X_U for which the response is unknown. The final model depends heavily on the labeled set being representative of the full distribution.

2

A linear model is fitted exclusively on the labeled portion, by ordinary least squares as in the formula shown or with a ridge penalty. This gives initial coefficient estimates that may be noisy if the labeled set is small, but they provide a starting point for pseudo-labeling.

Formula
\hat{\beta} = (X_L^\top X_L)^{-1} X_L^\top y_L
3

The initial model predicts a target value for every unlabeled observation; these predictions are the pseudo-labels. The procedure formalised here uses the point predictions directly (hard pseudo-labels). Other choices exist: soft assignment, which down-weights pseudo-labels judged uncertain, and co-training, in which two models label data for each other. Co-training is a different strategy from the one given in the mechanics.

Formula
\hat{y}_U = X_U \hat{\beta}
4

The labeled and pseudo-labeled rows are combined and the model is refitted, typically by minimizing a penalized, weighted least-squares objective on the combined data, in which the pseudo-labeled rows may receive a weight below one. The refit and pseudo-labeling steps are repeated for a fixed number of iterations or until the change in coefficients falls below a tolerance. Without a penalty or weighting, and with hard pseudo-labels from the current fit, the labeled-only OLS solution does not change under refitting, so the iteration is then trivial. A penalty such as ridge is commonly used to limit reinforcement of early mistakes; its effect on stability and convergence should be checked empirically. The penalty strength and the pseudo-label weight are tuning parameters and are best chosen by cross-validation on the labeled data only.

Formula
\hat{\beta}^{(t+1)} = \arg\min_{\beta} \; \|y_L - X_L\beta\|^2 + w\,\|\hat{y}_U^{(t)} - X_U\beta\|^2 + \lambda\|\beta\|^2, \quad \hat{y}_U^{(t)} = X_U\hat{\beta}^{(t)}
5

The final model is the coefficient vector at the last iteration, with the penalty and weight settings chosen as above. It is evaluated on a held-out labeled test set. Because unlabeled data can hurt performance if its distribution differs from the labeled set, a final diagnostic compares the semi-supervised model against a purely supervised baseline.

Common pitfalls

  • Using unlabeled data from a different time period, site, or population without verifying distributional alignment.
  • Skipping the supervised-only baseline comparison, making it impossible to detect when semi-supervised training hurts.
  • Applying many iterations without regularization, causing the model to overfit its own pseudo-labels.
  • Reporting only in-sample R-squared without an independent labeled test set evaluation.
  • Treating pseudo-labels as equivalent to true labels when computing standard errors or confidence intervals.

Frequently asked questions

Will semi-supervised linear regression always outperform standard linear regression?

No. If the unlabeled data come from a different distribution than the labeled set, the pseudo-labels introduce systematic bias and the semi-supervised model can perform worse. With unregularized least squares and hard pseudo-labels it gives the same coefficients as the supervised fit. Always compare against a supervised-only baseline on a held-out labeled test set.

How many labeled examples are needed for the method to be worthwhile?

The potential benefit is greatest when labeled data are a small share of the dataset. With a moderately large labeled set the gains shrink, and standard supervised linear or ridge regression is simpler and may be equally accurate. No universal cut-off exists; judge it by comparison with the supervised baseline.

Should I use hard or soft pseudo-labels?

The procedure described on this page uses the point predictions directly (hard assignment). Weighting pseudo-labels by a confidence measure is one way to limit the influence of uncertain predictions in early iterations, and it also changes the objective so that iteration is non-trivial. It is not established that it is more robust, so compare both variants on the held-out labeled test set if the choice matters.

Can I use this with regularized variants like ridge or lasso?

Yes. Regularization is commonly used to limit the reinforcement of early pseudo-label errors, and with a penalty the iteration is no longer a no-op. Its effect on stability and convergence is not guaranteed, so check it on the held-out labeled test set and choose the penalty strength by cross-validation on labeled data.

How do I detect if unlabeled data are harming the model?

Track held-out labeled-set MSE (or R-squared) after each iteration alongside the supervised-only baseline. If semi-supervised performance drops below the baseline or the gap widens over iterations, stop and revert to standard linear regression; this suggests distributional mismatch or error propagation.

Related methods

Sources

  1. Chapelle, O., Scholkopf, B., & Zien, A. (Eds.). (2006). Semi-Supervised Learning. MIT Press.

    ISBN: 978-0-262-03358-9
  2. Zhou, Z.-H., & Li, M. (2005). Semi-supervised regression with co-training. Proceedings of the 19th International Joint Conference on Artificial Intelligence (IJCAI), 908–913.

    Open publication reference