---
title: Feature Bagging in Ensemble Learning
url: https://www.emergentmind.com/topics/feature-bagging
type: topic
---

# Feature Bagging in Ensemble Learning

Feature bagging, also known as the random subspace method, is an ensemble learning strategy wherein each base learner is trained not only on a resampled (bootstrapped) dataset but also on a randomly selected subset (subspace) of the total feature set. This construction promotes classifier diversity and variance reduction, providing distinct advantages over both single-learner and sample-only ensemble approaches—particularly in high-dimensional, noise-prone, or redundant feature settings.

## 1. Principles and Motivation

The core idea of feature bagging is to increase ensemble diversity by decoupling base learners via feature subsampling, thereby reducing the correlation between learners' errors. Each member of the ensemble is trained with different feature subspaces, improving robustness and, typically, generalization error relative to using the full feature set for all learners. This is especially effective for unstable base learners—such as decision trees or nearest-neighbour methods—where small changes in the training data or feature set can lead to large changes in predictions [2503.09651].

Bagging methods that operate exclusively by instance resampling (e.g., classical bootstrap-aggregated trees) benefit from variance reduction, but in high-dimensional spaces, such resampling does not provide enough diversity if redundant or irrelevant features dominate. Feature bagging combats this problem by randomly choosing subsets of features, increasing the signal-to-noise ratio for each learner and suppressing the impact of irrelevant dimensions [1810.11973][2503.09651].

## 2. Algorithms and Methodologies

The canonical procedure for feature bagging is as follows:

- For each of $B$ base learners:
  - Draw a bootstrap sample (with or without replacement) of the training data.
  - Select (uniformly or adaptively) a subset $Q_b$ of the available $d$ features of fixed size $q_0<d$.
  - Train the base learner (e.g., tree, kNN, perceptron) only on the features in $Q_b$.
- Aggregate the predictions of all $B$ base learners via averaging (for regression) or voting/probability-averaging (for classification) [2503.09651].

There exist notable variants:

- **Random Subspace kNN/Discriminant Projections**: Each base learner is a $k$-nearest neighbour classifier, trained on a bootstrap sample projected into a discriminant subspace computed to maximize between-class separation. This is exemplified by the Bags of Projected Nearest Neighbours (BOPNN) algorithm, which selects low-dimensional, label-adaptive projections within randomly chosen feature subsets to further encourage relevance and diversity [2503.09651].
- **Evolutionary Sampling Feature Bagging**: Evolutionary algorithms are employed to explore distributions of feature subspaces, optimizing base learner ensembles for minimal generalization error according to a population-based search under fitness functions that assess OOB, private tests, or global test performance. Crossover and mutation propagate useful feature combinations and inject additional diversity as compared to purely random selection [1610.00465].
- **Cascade Bagging**: A two-level ensemble method where first-level base learners are trained via data bagging, and second-level meta-learners are trained through feature bagging over the set of first-level predictions (and optionally, a reduced feature representation). This approach can further reduce variance and correct systematic bias [2108.05613].
- **Internal Node Bagging**: Constructs ensembles at the layer or node level within neural networks by partitioning neurons into groups designed to redundantly learn the same feature, followed at inference by collapsing groups to a single representative neuron [1805.00215].

## 3. Theoretical Insights and Statistical Properties

Feature bagging modifies the classic bias–variance trade-off by influencing both the expected variance reduction and potential for increased noise:

- **Variance Reduction**: The ensemble variance for bagged predictors with feature subspacing, $\mathrm{Var}(g_\text{bag}) = \rho\,\mathrm{Var}(g_1) + \frac{1-\rho}{B}\,\mathrm{Var}(g_1)$, depends on the correlation $\rho$ between errors of individual learners. Feature subspacing (especially with random projection or discriminant adaptation) drives $\rho$ lower than bootstrap-only ensembles, thus accelerating variance decay with ensemble size [2503.09651].
- **Noise Amplification and Double Descent**: Subsampling features increases the effective noise in predictions, with analytical models (e.g., equicorrelated feature-noisy ridge regression) showing that reducing feature fraction $\phi=k/p$ shifts model complexity thresholds and may introduce additional "double descent" peaks in risk curves. Ensembles of learners with heterogeneously chosen feature-subspace sizes can smooth out these peaks, mitigating instability—even in linear models under feature or label noise [2307.03176].
- **Randomization as Regularization**: Including additional random, independent features in augmentation regimes (e.g., Augmented Bagging, or "AugBagg") imposes a shrinkage effect akin to ridge penalties, reducing overfitting and acting as an alternative or complement to explicit regularization [2003.03629].

## 4. Empirical Studies and Benchmarking

Empirical evaluation of feature bagging variants has demonstrated:

- **Superiority vs. Pure Random Subspaces**: Evolutionary Sampling of feature subsets consistently outperforms blind random subspace ensembles. For example, RMSE reductions of up to 1.1% were observed in regression benchmarks, with paired $t$-tests showing statistically significant gains across a suite of UCI tasks [1610.00465].
- **Robustness in High Dimensions**: Feature bagging enables distance-based anomaly detectors (e.g., LOF) and shallow learners to remain effective even as high-dimensionality degrades the meaning of Euclidean distances. In steganographer identification, feature bagged ensembles of LOF detectors on random subspaces lowered average guilty-actor rank by 10–25% across practical payload and JPEG quality settings, with performance scaling consistently in $T$ (number of subspaces) [1810.11973].
- **Adaptive Projections vs. Random Subspaces**: On 162 classification tasks, the BOPNN algorithm (adaptive projection feature bagging) matched or exceeded Random Forests in average standardized accuracy and demonstrated lower worst-case error and improved robustness on high-complexity class boundaries, outperforming both random subspace kNN (no projection) and standard bagged kNN [2503.09651].
- **Augmented Bagging**: Augmenting the feature set with pure noise features led to improved test error, especially in low-SNR regimes and after proper tuning. Relative test-error improvements compared to classical bagging were positive in 12 of 14 datasets, and sometimes even exceeded optimally tuned random forests. However, indiscriminate noise can degrade performance when signal is sparse [2003.03629].
- **Internal Node Bagging**: On small neural architectures, internal node bagging sharply reduced test errors (e.g., 10–20% lower than dropout baselines on CIFAR-10/SVHN), supporting the thesis that forced feature redundancy is more efficient than emergent redundancy from overparametrization [1805.00215].

## 5. Applications and Extensions

Feature bagging has found application in diverse domains and learning paradigms:

- **Ensembles of Traditional Learners**: Decision trees, kNN, and anomaly detectors are the canonical base learners, but feature-bagged ensembles have broader utility provided the learner supports training on arbitrary feature subsets [2503.09651][1810.11973].
- **Structured Anomaly Detection**: In the SIP (Steganographer Identification Problem), ensembles of anomaly detectors on random feature subspaces were used to successfully identify outlier actors in large image corpora, demonstrating robustness to high-dimensional and low-signal settings [1810.11973].
- **Neural Network Compression and Regularization**: Internal node bagging as an explicit layerwise feature bagging technique enables architectures that are wide and redundant at training, then collapsed for efficient inference, yielding both regularization and efficiency gains [1805.00215].
- **Few-Shot and Weak-Signal Regimes**: Cascade bagging leverages feature bagging across meta-learners to stabilize accuracy predictors in neural architecture search, especially when strong supervision is scant [2108.05613].
- **Regularization via Feature-Supersetting**: Augmented bagging introduces randomly generated features to induce regularization, thus enabling practitioners to balance shrinkage by "subsetting" (dropping features) and "supersetting" (adding noise), a duality not available in classical subspace methods [2003.03629].

## 6. Limitations, Pitfalls, and Future Directions

Key limitations and directions include:

- **Computational Overheads**: Extending bagging to feature subspaces increases training time and memory, especially when combined with evolutionary sampling or projection computation. Proper engineering and parallelization are required for scalability [1610.00465][2503.09651].
- **Risk of Overfitting Small Validation Sets**: Aggressively optimizing subspace selection on small held-out sets can result in overfitting; using larger validation partitions or cross-validation mitigates this issue [1610.00465].
- **Variable Importance and Interpretation**: Introduction of noise features (as in AugBagg) can render permutation-based variable importance scores unreliable; statistically valid tests require "Model-X knockoff" or similar replacement schemes to control Type I error [2003.03629].
- **Adaptive Feature Selection and Heterogeneous Ensembles**: Theory and empirical data support ensembles with heterogeneous subspace dimensions to smooth out double-descent risk regimes. Optimization of subspace size distribution, ensemble size, and projection method remain open research problems [2307.03176].
- **Hybrid Sampling Schemes**: Exploring joint subsampling of data rows and features (e.g., evolutionary hybrid sub-sampling and sub-spacing) and coevolution of base-learner architectures with feature selection are promising directions for high-dimensional, structured-data settings [1610.00465].

## 7. Comparative Analysis: Feature Bagging versus Alternative Ensembles

While classical bagging, boosting, and stacking focus on sample resampling or re-weighting, feature bagging introduces an orthogonal source of diversity that is particularly effective in high-dimensional problems and for base learners sensitive to feature redundancy or noise. Random Forests combine both data and feature bagging per split in decision trees, but fixed subspace methods (random subspace, BOPNN) differ in forming a single subspace per learner rather than at each tree node [2503.09651]. Adaptive subspace construction (as in BOPNN or evolutionary sampling) provides clear advantages over purely random selection, yielding superior performance and interpretable feature projection structures [2503.09651][1610.00465].

Feature bagging thus constitutes a fundamental building block in modern ensemble methodology, bridging variance reduction, regularization, and diversity via subspace manipulation, and remains an open area for algorithmic innovation, theoretical analysis, and practical deployment across the statistical, machine learning, and signal processing domains.

Source: https://www.emergentmind.com/topics/feature-bagging