Semi-supervised Stacking Ensemble

Machine Learning
Introduced by
Combines Wolpert (1992) stacking with semi-supervised learning principles
Year
2000s–2010s
Type
Ensemble (stacked generalization with unlabeled data augmentation)
Family
Machine learning

What does it do?

Semi-supervised Stacking Ensemble applies stacked generalization (Wolpert, 1992) to data in which only some examples carry labels.

Base learners trained on the labeled examples pseudo-label the unlabeled ones, the base learners are retrained on the expanded set, and their out-of-fold predictions feed a meta-learner that combines them. The result is a two-tier ensemble that uses unlabeled feature vectors as well as labeled ones.

The intuition behind the method

Classical stacking trains a meta-learner on the predictions of diverse base models but discards any unlabeled examples. This variant keeps them: the current base models assign labels to unlabeled examples where they are confident, those examples join the training set, and the base models are retrained. The meta-features then come from models that have seen more data, which may make them more informative, although the procedure depends heavily on the quality of the first-round labels.

History

Stacked generalization was formalized by Wolpert (1992), who described combining several models through a learned meta-learner. Semi-supervised learning, the use of unlabeled data to improve supervised models, is covered in the 2006 MIT Press volume edited by Chapelle, Schölkopf and Zien. The combined approach does not have a well-established originator or first-use date.

When to use it

Choose semi-supervised stacking for a classification or regression task where labeled examples are few, unlabeled feature vectors are plentiful and labeling is costly, as in some medical imaging, NLP or remote sensing projects. It needs several base learners from clearly different model families, and it assumes the unlabeled examples come from the same distribution as the labeled ones. Do not use it when the unlabeled pool is small, since there is little to gain over standard stacking, or when the labeled set is already large enough that pseudo-labels add little. Avoid it when distribution shift between labeled and unlabeled data is suspected, because pseudo-label errors will then carry into later iterations.

Limitations and considerations

  • Pseudo-label errors feed back into the next round; if the first-round base models are weak, wrong labels can reduce accuracy rather than raise it.
  • Several interacting settings (number of iterations, confidence cutoff, number of folds and the set of base learners) must be tuned together.
  • Each iteration retrains every base learner across all folds, so runtime grows with the number of base learners, folds and iterations.
  • The pseudo-labeling step assumes the unlabeled examples follow the labeled distribution; under covariate shift the pseudo-labels are systematically biased.
  • The output is hard to trace: a prediction depends on two stacked tiers and on pseudo-labels chosen over several rounds.

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

Strengths

  • Adds unlabeled feature vectors to training without new annotation, which matters when labeling is the bottleneck.
  • Keeps the diversity-based benefit of classical stacking: base models that err in different ways give the meta-learner complementary inputs.
  • Any supervised learner can serve as base model or meta-learner, so the same framework can use tree ensembles, kernel methods or neural networks.
  • The confidence cutoff gives direct control over which pseudo-labels enter training, so label noise can be limited at each iteration.
  • Out-of-fold meta-features prevent the meta-learner from being trained on predictions made for labeled examples by models that were fitted on those same examples.

Applications

  • Settings like medical image classification, where annotated scans are scarce and unannotated scans are plentiful.
  • Settings like text classification (sentiment or topic), where large unlabeled corpora sit alongside small labeled sets.
  • Settings like land-cover classification from satellite imagery, where abundant images have few ground-truth labels.
  • Settings like fraud detection, where confirmed cases are rare relative to unreviewed transactions.
  • Settings like protein function prediction, where experimentally verified examples are limited.

How it works

How it works

1

Base learners are first trained on the labeled subset and predict class probabilities for the unlabeled examples. An unlabeled example receives a pseudo-label only when its highest predicted class probability clears a confidence cutoff; examples below the cutoff stay unlabeled and are not used for training in that iteration.

2

Diverse base learners are retrained on the truly labeled and pseudo-labeled examples together, using k-fold cross-validation so that predictions are not made by models that were fitted on the same examples. Diversity across algorithm family, regularization strength or feature subsets matters: a set of near-identical models gives the meta-learner little new information.

3

Out-of-fold predictions from each base learner on the labeled examples are collected into a meta-feature matrix. Each row corresponds to a labeled training example; each column is the prediction of one base model made on a fold that did not contain that example, so the meta-learner does not see predictions from models that were fitted on the same example.

4

The meta-learner is trained on the meta-feature matrix against the true labels only. Commonly used choices include logistic regression, a shallow neural network or a tree model. It learns how to weight the base-learner outputs, which can correct systematic biases in individual models.

5

Steps 1 to 4 repeat for a set number of iterations or until few new examples pass the confidence cutoff. The cutoff may be lowered in later passes to admit more unlabeled data, but a lower cutoff also admits more wrong pseudo-labels, which then train the next round of base models.

Common pitfalls

  • Setting the cutoff low in early iterations lets noisy pseudo-labels dominate the training set for the base learners.
  • Using only one or two highly correlated base learners gives the meta-learner nearly redundant inputs, so the stack may not beat a single model.
  • Generating meta-features without cross-validation lets base models predict examples they were trained on, inflating meta-learner training.
  • Reporting accuracy on pseudo-labeled examples instead of a held-out set of true labels gives optimistic estimates.
  • Running many iterations after the pseudo-label set has stopped changing adds compute and can lock in confident but wrong labels.

Frequently asked questions

How do I choose the confidence cutoff for pseudo-labeling?

Start with a high cutoff on the leading class probability, so that only confident predictions become pseudo-labels. Relax it in later iterations only while accuracy on held-out true labels keeps improving, and stop relaxing it once that accuracy drops. No universal value applies; the suitable cutoff depends on how well calibrated the base models' probabilities are.

Which base learners should I use?

Diversity is the key principle: models that differ in bias-variance profile and in the feature relationships they capture give the second tier the most distinct meta-features. One illustrative combination is gradient-boosted trees (e.g., XGBoost), an SVM with a radial kernel and a neural network. This is an example, not an established standard for this method, so choose the set whose errors differ most on your validation data.

How is this different from standard stacking?

Standard stacking uses only labeled data throughout. Semi-supervised stacking adds a pseudo-labeling loop that iteratively expands the effective training set with high-confidence unlabeled examples, so it is most useful when labeled data is scarce and unlabeled data is abundant.

Can it handle regression as well as classification?

Yes, but the selection rule must change. Confidence cutoffs on class probabilities do not apply to continuous outputs, so one option is to pseudo-label only examples on which the base models agree closely, that is, whose predictions have low variance across models. The meta-learner then combines continuous outputs. This rule is a design choice, not an established standard for this method.

What is the risk of pseudo-label errors?

If the first-round base models are inaccurate, their confident predictions may still be wrong, and the next round of base models is trained on those wrong labels, so the errors are reinforced. This is a self-training-type loop, unlike graph-based label propagation, which spreads labels over a similarity graph. The main safeguards are a high initial cutoff, monitoring accuracy on a held-out labeled validation set across iterations, and stopping when that accuracy stops improving.

Related methods

Sources

  1. Wolpert, D. H. (1992). Stacked generalization. Neural Networks, 5(2), 241–259.

    Open DOI reference
  2. Chapelle, O., Schölkopf, B., & Zien, A. (Eds.). (2006). Semi-Supervised Learning. MIT Press.

    ISBN: 978-0-262-03358-9