- Introduced by
- Various (Breiman bagging + semi-supervised extensions, 1990s–2000s)
- Year
- 2000s
- Type
- Semi-supervised ensemble (bagging variant)
- Family
- Machine learning
What does it do?
Semi-supervised Bagging extends the classical bagging ensemble to settings where labeled training examples are scarce but unlabeled data are plentiful.
Base learners trained on the labeled data assign pseudo-labels to unlabeled examples, and the enlarged set is used to grow a bagged ensemble whose aggregated prediction aims to be more stable than a single model trained on the limited labeled set alone.
The intuition behind the method
Bagging reduces variance by training many models on different bootstrap samples and aggregating their outputs. Semi-supervised Bagging adds unlabeled data to this process: an initial ensemble fitted to a small labeled set predicts labels for unlabeled points, the confidently predicted points are added to the training pool, and new bootstrap samples are drawn from the enlarged pool. Because each bootstrap sample contains a different mix of labeled and pseudo-labeled points, a single incorrect pseudo-label has limited influence on the vote. A systematic error shared by most ensemble members, however, is not averaged away, so the method depends on the pseudo-labels being mostly correct. This is why the acceptance filter matters.
History
Bagging (bootstrap aggregating) is a variance-reduction procedure for unstable learners. Semi-supervised bagging is best understood as an extension of bagging to unlabeled data rather than as a method with a single identified origin. Li and Zhou (2005) describe SETRED, a self-training method with an editing step, which is related to pseudo-labeling.
When to use it
Use Semi-supervised Bagging when labeled data are expensive or scarce — for example, annotations requiring expert review — but large pools of unlabeled observations exist. It is appropriate for both classification and regression on tabular or feature-vector data where semi-supervised learning is applicable. Do not use it when the labeled set is already large enough to train the base learner well (plain bagging suffices), when unlabeled data are drawn from a distribution different from the labeled data (distribution mismatch violates the key assumption), or when pseudo-label quality is persistently low — confidence filtering will reject most unlabeled points and provide little benefit.
Limitations and considerations
- Assumes labeled and unlabeled examples come from the same distribution; any shift between them is inherited by the pseudo-labels.
- The gain from pseudo-labels depends on the standard semi-supervised assumption that nearby points in feature space tend to share a label, or that classes are separated by regions of low data density. When this fails, pseudo-labels propagate errors into the training pool. The smoothness assumption is hard to verify directly and is best judged from held-out performance.
- Pseudo-labels come from an initial ensemble fitted only to the labeled set, so its systematic errors can be reinforced when the bagged ensemble is trained on the augmented pool (a form of confirmation bias).
- The outcome depends on the confidence criterion and the number of base learners, which interact and have to be tuned together.
- The vote over many resampled learners does not yield a single model with interpretable coefficients, which can make results harder to explain to a non-specialist audience.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Uses unlabeled observations that would otherwise be discarded, so the labeled set does not have to grow to improve the model.
- Bootstrap resampling means that pseudo-label errors which differ across samples are diluted in the vote rather than passed through a single model.
- The confidence criterion gives direct control over how many unlabeled points enter training: a stricter filter trades coverage for label quality.
- Base learners are fitted independently on each bootstrap sample, so training can be parallelized without changes to the procedure.
- Any classifier or regressor can serve as the base learner, so the same scheme can wrap a tree ensemble or another model class.
Applications
- Classification settings where expert labels are costly but feature vectors, such as clinical or laboratory measurements, are cheap to collect.
- Tabular or feature-vector problems in which labeling must fit within a fixed annotation budget.
- Regression settings where target values are expensive to measure but input features are readily available.
How it works
How it works
A base ensemble is trained on the available labeled examples. The labeled set may be small, so the initial ensemble will be weaker than a fully supervised one, but it supplies the pseudo-labels used in the next step.
The initial ensemble predicts class labels (or regression values) for each unlabeled example. Only predictions that pass a confidence criterion are kept, which limits how many noisy labels enter the training pool. Common criteria are a minimum averaged posterior probability for the predicted class or a maximum disagreement among ensemble members. The threshold is not fixed by the method; the user chooses it, as described in the FAQ.
Accepted pseudo-labeled examples are merged with the original labeled set to form an expanded training pool. This is the step at which unlabeled data enter the model; all later steps operate on the enlarged pool.
Bootstrap samples are drawn with replacement from the augmented pool, as in standard bagging. Because each sample contains a different subset of labeled and pseudo-labeled points, the base learners are expected to differ from one another, which is what allows bagging to reduce variance.
A base learner (commonly a decision tree, though any classifier or regressor can be used) is fitted separately to each bootstrap sample. Because the fits do not depend on one another, they can be run in parallel.
The base learners vote on each test example: majority vote for classification, mean output for regression. Pseudo-labeling errors that differ across bootstrap samples tend to be diluted in the aggregate, but errors shared by most members are not removed by voting.
Formula
\hat{y} = \text{mode/mean of } B \text{ base learners}Common pitfalls
- A confidence threshold set too permissively lets noisy pseudo-labels into the pool, which can leave the model worse than a supervised-only bagged ensemble trained on the same labeled data.
- Unlabeled data drawn from a different source than the labeled data produce systematically wrong pseudo-labels for the labeled distribution; compare the two sets for shift before pooling them.
- Accuracy measured on the augmented training pool overstates performance; evaluate on a purely labeled held-out set.
- Pseudo-labels are only as reliable as the initial ensemble that produced them. A systematic error in that ensemble is carried into the augmented pool, and the held-out check described in inPractice is needed to detect it.
Frequently asked questions
How is Semi-supervised Bagging different from plain self-training?
Plain self-training uses one model that repeatedly pseudo-labels its own data and is retrained on the result. Semi-supervised Bagging trains an ensemble on bootstrap samples, so pseudo-label acceptance can be judged from the ensemble's averaged posterior or its disagreement across members, and the vote dampens errors that differ between members. Implementations differ in which acceptance measure they use; the averaged posterior and the disagreement among members are two common options.
How should I set the confidence threshold?
Choose it by cross-validation on the labeled data, and treat it as a trade-off: a stricter threshold gives cleaner pseudo-labels but fewer unlabeled points. If too few unlabeled points pass, relax it gradually and check whether held-out accuracy falls.
How many base learners are needed?
The same guidance as standard bagging applies: increase the number of base learners until performance on a held-out labeled validation set stops improving. More learners reduce variance but increase computation.
Can I use this with neural networks as base learners?
It is possible but less common, because each bootstrap sample requires a full training run. Shallow or quickly fitted models are the usual choice; if neural networks are used, the training cost is multiplied across all members.
What if my unlabeled set is much larger than my labeled set?
This is the case in which the method is most useful. Use strict confidence filtering so that noisy pseudo-labels do not dominate the bootstrap samples, and consider giving labeled examples more weight during resampling so that their influence is preserved.
Related methods
Sources
Bennett, K. P., & Demiriz, A. (1999). Semi-supervised support vector machines. Advances in Neural Information Processing Systems, 11. MIT Press.
Open publication referenceLi, M., & Zhou, Z.-H. (2005). SETRED: Self-training with editing. In Proceedings of the 9th Pacific-Asia Conference on Knowledge Discovery and Data Mining (PAKDD), LNAI 3518, pp. 611–621. Springer.
Open DOI reference