Robust Bagging

Machine Learning
Introduced by
Breiman, L. (bagging); robust variants developed by various authors in 2000s
Year
1996–2000s
Type
Ensemble (robust bootstrap aggregating)
Family
Machine learning

What does it do?

Robust Bagging modifies the Bootstrap Aggregating (Bagging) framework so that outliers, mislabelled instances, or heavy-tailed noise are intended to have less influence on the ensemble.

It does this by using robust loss functions or splitting criteria in the base learners, by aggregating predictions with a median or trimmed mean, or by both. The name covers a family of modifications rather than one fixed algorithm, and the robust modifications described here are generic techniques applied within bagging rather than one standard algorithm.

The intuition behind the method

Standard bagging reduces variance by averaging many models fitted to bootstrap resamples. If the same influential outliers appear in many resamples, the individual models can all be pulled in the same direction, and averaging does not remove that shared bias. Robust Bagging weakens this effect at one of two points: the base learners resist extreme observations (for example through a Huber loss in place of squared error), or the aggregation uses a median or trimmed mean, so a few extreme predictions cannot set the final output. How much sensitivity remains depends on which modification is used and how many resamples share the contaminated records.

History

Bootstrap Aggregating (Bagging) was introduced by Leo Breiman in 1996 as a variance-reduction method for unstable learners. Modifications that add robust losses, robust aggregation or instance weighting to bagging are described under the name Robust Bagging. This entry does not attribute those modifications to a single originator, and the specific publications introducing them are not identified here.

When to use it

Choose Robust Bagging for tabular data where there is a concrete reason to suspect contamination, such as outliers, measurement errors, mislabelled targets, or heavy-tailed features, and where a standard ensemble's predictions change noticeably when a few records are removed. Clinical, sensor and financial records are examples where such problems are common. Do not use it as a substitute for data inspection: if the extreme values are themselves the phenomenon of interest, as with rare events, down-weighting them can remove the signal the model needs. When the data are carefully curated and contamination is not expected, standard bagging or random forests avoid the extra computation and tuning burden of robust modifications. The level of contamination at which robustness pays off depends on the dataset and is not fixed by the method. The approach assumes that training records are approximately independent and identically distributed, and each modification addresses a particular kind of contamination (outlying predictors, outlying responses or label noise), so the modification should be matched to the suspected source.

Limitations and considerations

  • Each base learner costs more to fit when a robust loss or trimming is used, and robust losses often require iterative optimisation rather than a closed-form fit.
  • The trimming fraction, Huber threshold, or weighting scheme must be chosen by the user. Each one sets the trade-off between resistance to outliers and efficiency on clean data, and the method does not specify defaults.
  • When contamination is small, the robust modifications give little benefit and can lose some efficiency relative to standard bagging on clean data.
  • Theoretical results for robust bagging are less developed than for classical bagging, so its behaviour under heavy or systematic contamination should be checked empirically rather than assumed.

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

Strengths

  • Limits the influence that a small number of outliers or mislabelled records can have on the aggregated prediction, because a robust loss, splitting criterion or aggregation rule limits the effect that extreme values can have.
  • Keeps the variance reduction of bagging, since the ensemble still averages over bootstrap-fitted learners; the robust modifications add resistance to contamination rather than replacing the resampling step.
  • Out-of-bag predictions are available for each training instance without a separate validation split, which helps when data are scarce, provided they are not reused for filtering or tuning (see pitfalls).
  • Robustness can be added at the base-learner level, the aggregation level, or both, so the modification can be matched to where contamination is suspected to enter.
  • Any base learner that accepts a robust loss, or whose individual predictions can be combined by a median or trimmed mean, can be used.

Applications

  • Clinical and biomedical datasets where measurement errors or mislabelled outcomes are plausible.
  • Financial records with heavy-tailed returns or erroneous entries.
  • Industrial sensor data with occasional faulty readings that cannot all be cleaned in advance.
  • Classification with noisy or crowd-sourced labels, where tolerance to label noise is needed.

How it works

How it works

1

As in standard bagging, T bootstrap samples are drawn with replacement from the training set. Each sample contains approximately 63% of distinct observations, and the remaining out-of-bag instances serve as a natural validation set without any separate hold-out split. Out-of-bag predictions approximate held-out performance, but they become optimistic if they are also used to choose filtering or tuning settings.

2

Each base learner is fitted to its bootstrap sample with a robustness modification. Examples are a robust loss, such as the Huber loss in place of squared error, or a robust splitting criterion in tree-based learners; either limits how far a single extreme observation can move the fitted model. The Huber loss, for instance, applies squared error to residuals up to a threshold and a linear (absolute) penalty beyond it, so large residuals contribute less than they would under squared error; the threshold is the tuning parameter. The method does not prescribe one loss or criterion, so the choice and its tuning parameter must be stated.

3

This step is optional. Records whose out-of-bag predictions are consistently poor across the learners that did not contain them can be flagged as likely outliers or label-noise cases, and then down-weighted or removed before the final fit. Because these flags are derived from out-of-bag predictions, error estimates computed on the same records are optimistic unless a separate test set is kept.

4

Instead of the arithmetic mean or majority vote, predictions from the T base learners are combined with a robust statistic such as the median or a trimmed mean, which discards a fixed fraction of the most extreme predictions. A weighted average, with lower weights for learners trained on suspected-contaminated samples, is another option. Either choice limits how far one extreme prediction can move the output.

Formula
\hat{y} = \text{median or trimmed mean of } T \text{ base-learner predictions}

Common pitfalls

  • Treating robustness as a replacement for exploratory data analysis: the modification reduces sensitivity to contamination but does not identify which records are wrong or why.
  • Setting the trimming fraction or filtering threshold too aggressively, which can remove genuine rare-class or tail observations and bias the model toward typical cases.
  • Using out-of-bag error both to flag outliers and to report performance. Records flagged from their out-of-bag predictions have already been evaluated, so the reported error is optimistic; keep a separate test set.
  • Reporting the method only as bagging, without stating which robust modification (loss, splitting criterion, aggregation rule or weighting) was used and with what parameter settings.

Frequently asked questions

How does Robust Bagging differ from standard Bagging?

Standard Bagging combines base learners fitted with standard loss functions by a simple average or majority vote. Robust Bagging modifies either the base-learner fitting (for example Huber loss or a robust splitting criterion), the aggregation step (for example the median instead of the mean), or both, so that outliers in the training data or extreme individual predictions have limited influence on the final output.

Should I clean my data before applying Robust Bagging?

Yes. Robust Bagging reduces sensitivity to contamination but does not replace proper data quality checks. If outliers carry genuine signal, such as rare but important events, cleaning or down-weighting them may harm performance. Use exploratory analysis first to understand the nature of the outliers.

Which base learner should I use with Robust Bagging?

The method does not single out a best base learner. Decision trees with robust splitting criteria and Huber-loss regression trees are common choices. Median aggregation only needs the individual predictions, so it can be applied to any base learner.

How should I report Robust Bagging results in a paper?

State which robustness modification was used (robust loss function, robust splitting criterion, median or trimmed aggregation, or instance weighting) and its parameter settings. Report the motivation for using a robust variant, and where feasible evaluate performance on both clean and contaminated test sets. Keep out-of-bag estimates separate from a held-out test set when filtering used out-of-bag predictions.

Is Robust Bagging the same as Robust Random Forest?

They are closely related but not identical. Random Forest can be described as bagging of decision trees with random feature subsets considered at each split, and this extra randomisation is what reduces the correlation between trees. Robust Bagging is a more general framework that can use any base learner with robust modifications, so the random feature selection step is not part of it by default.

Related methods

Sources

  1. Breiman, L. (1996). Bagging predictors. Machine Learning, 24(2), 123–140.

    Open DOI reference
  2. Chen, C., Liaw, A., & Breiman, L. (2004). Using Random Forest to Learn Imbalanced Data. University of California, Berkeley, Technical Report 666.

    Open publication reference