Manuscript Offprint

arXiv:2610.29195

Truncated Out-of-Bag Probability Gain: A Noise-Robust Criterion for Random-Forest Wrapper Feature Selection

Sejong Oh

Abstract

Random-Forest wrapper feature selection can use out-of-bag (OOB) predictions as a built-in validation signal, but the criteria that decide each forward step accumulate OOB estimation noise. We propose TOP-Gain (Truncated Out-of-bag Probability Gain), which scores a candidate feature by the mean sample-level increase in the OOB probability of the true class, with decreases truncated at zero. Under a simple noise model, truncation removes about two-thirds of the noise variance contributed by unaffected samples while preserving the signal, and it makes the ranking of candidate features markedly more reproducible. In a pre-registered benchmark on 26 OpenML-CC18 datasets, TOP-Gain achieved the best mean rank in area under the ROC curve (ROC-AUC), accuracy and Macro-F1 among 15 methods; it was significantly better than 13 of 14 baselines and matched the accuracy of VSURF with 21 times less single-core computation. Within an identical wrapper, it selected significantly more stable feature sets than net-gain, Brier, log-loss and accuracy criteria without loss of accuracy. A confirmatory study on 24 further datasets replicated the advantage over all baselines. The accuracy gains were broad rather than tied to specific dataset characteristics, and, as pre-registered, the stability gain grew as relevant features became sparser.

Keywords: Feature selection · Wrapper methods · Random forest · Out-of-bag estimation · Selection stability · Pre-registered benchmark

1 Introduction

Selecting a small subset of informative variables is a routine step in the analysis of tabular data, from biomedical profiles to industrial and web data [1], [2]. A compact feature panel reduces measurement cost, limits overfitting and gives analysts a short list of variables to examine further [3]. Two properties matter. The panel must be predictive, so that a classifier trained on it generalises, and it should be stable, so that the same features are chosen when the data are perturbed slightly [4], [5]. We measure stability with Nogueira's estimator Φ\Phi [5], which is corrected for chance.

Feature selection methods are commonly grouped into filters, embedded methods and wrappers [1]. Filters score each feature with a statistic that does not depend on the model that will later use the features. The simplest filters are univariate tests, which rank features by how well each one separates the classes on its own. Information-theoretic filters go a step further and account for the relations between features. mRMR [6] trades the relevance of a feature to the class against its redundancy with the features already chosen, and JMI [7] rewards features that are informative jointly with them. ReliefF [8] takes a different route and scores a feature by how well it distinguishes each instance from its nearest neighbours of other classes. Embedded methods select features as a by-product of fitting a model. Elastic Net [9] drives the coefficients of uninformative features of a linear model to zero, HSIC-Lasso [10] applies the same sparsity principle to a kernel measure of dependence, and LassoNet [11] extends sparsity penalties to neural networks. A third group aggregates the results of a base selector to make them more reliable. Stability Selection [12] fits sparse models on many random subsamples and keeps the features that are selected most often, and ensemble feature selection [13] combines several selectors or several data perturbations in a similar way. Filters are fast and their rankings are typically stable, but they ignore how the features will be used and can miss features that are useful only in combination with others. Wrappers, discussed next, are usually more predictive but less stable [4].

Wrappers [14] score candidate feature subsets directly by the performance of a learning algorithm. Their scores therefore reflect predictive utility, including the non-linear effects and interactions that the classifier is able to exploit. Random Forests [15] are a natural engine for such methods: every tree is grown on a bootstrap sample, so the trees that did not see an instance provide an out-of-bag (OOB) prediction for it, and the OOB predictions of all instances estimate generalisation performance without an inner cross-validation loop. Random-Forest-based selection has accordingly become well established. The impurity and permutation importances of a single forest [15], [16] rank all features at once, although both measures are biased when features are correlated or measured on different scales [17]. RF-RFE [18] refits the forest repeatedly and removes the least important features at each round, and varSelRF [19] follows the same backward strategy but uses the OOB error to decide how many features to keep. VSURF [20] first discards features whose importance does not exceed a noise threshold and then builds nested models by forward selection. Boruta [21] compares the importance of every feature with that of randomly permuted “shadow” copies and keeps only the features that beat them. The work closest to ours is that of Velthoen et al. [22], who select variables by forward selection that minimises an OOB estimate of a proper scoring rule, the continuous ranked probability score for regression, and stop the search with a binomial test on the signs of the per-sample risk differences. We build on this RF-OOB forward-selection framework; the framework itself is not our contribution.

Our contribution concerns the criterion that each forward step maximises. The most common choice, validation accuracy, is a step function of the subset: many candidates reach exactly the same accuracy, and the tie is then broken by noise. Continuous criteria avoid such ties. Examples are the mean predicted probability of the true class, which we call the net probability gain, and the strictly proper scoring rules Brier score [23] and log-loss [24]; the latter two are the classification analogues of the criterion of [22]. All of these criteria, however, aggregate the per-sample increases and decreases of the predicted probability with equal weight. When the probabilities are OOB estimates from a modest forest, most of the per-sample changes caused by adding a single feature are estimation noise of either sign, and this noise enters the criteria in full.

Several other methods also work with per-sample quantities, but none of them truncates per-sample probability gains to select features. Conditional predictive impact [25] compares the loss of each instance under the original feature and under a knockoff-perturbed copy, averages these differences and tests them; it is designed for statistical inference about a given model rather than for subset selection. Model-X knockoffs [26] use synthetic copies of the features to select a set with a controlled false discovery rate. SHAP values [27] attribute each individual prediction to the features, and their averages are often thresholded to select features. Danyluk and Arnosti [28] score features by their effect on estimated class probabilities rather than on class labels, which makes the score sensitive to features that change the predicted probabilities without changing the predicted class.

In this paper, we propose TOP-Gain (Truncated Out-of-bag Probability Gain), a criterion that counts only improvements. For a candidate ff and the current subset SS, TOP-Gain averages the sample-level increase max⁡(0,piSU{f}−piS)\max(0, p_i^{SU\{f\}} - p_i^S) of the OOB true-class probability and ignores the decreases. The idea of crediting a feature only for the individual cases it helps was motivated by case-based feature attribution [29], and the improvement-only form also resembles expected improvement in Bayesian optimisation [30]. The change to the RF-OOB wrapper is a single line, but it alters how the wrapper responds to estimation noise, and the rest of the paper examines this effect analytically and empirically. The main contributions are as follows.

  1. A noise-robust selection criterion with a simple explanation. We show that truncation keeps the signal of truly improved instances while removing about two-thirds of the noise variance contributed by unaffected instances (Section 2.3). The effect can be observed directly: TOP-Gain ranks candidate features more reproducibly than every alternative criterion, and the part it discards is the noisiest component of the score (Section 4.6).

  2. Stability without an accuracy cost. In a controlled comparison inside an identical wrapper, TOP-Gain selects more stable feature sets than the net gain, the proper scoring rules Brier and log-loss, and OOB accuracy and balanced accuracy, on 22–26 of 26 datasets each, while its accuracy is equal to or higher than theirs (Section 4.2).

  3. The accuracy of the best RF wrapper at a fraction of its cost. Among 15 methods on 26 OpenML-CC18 datasets, TOP-Gain has the best rank in ROC-AUC, accuracy and Macro-F1. It is significantly better than 13 of 14 baselines and on par with VSURF, which needs 21 times more single-core computation (Sections 4.1, 4.4), and the advantage replicates against all 12 baselines tested on 24 independent datasets (Section 4.3).

  4. Where the stability benefit is largest, and how to tune it. A hypothesis registered before the confirmatory data were analysed was supported: the stability gain from truncation grows as relevant features become sparser, whereas the accuracy gain is broad rather than tied to an identifiable type of dataset (Section 4.3). The size of the surrogate forest further acts as a direct handle on stability that leaves accuracy unchanged (Section 4.8).

  5. An open and reproducible implementation. All code, raw results and the pre-registration protocol are publicly available.

The paper is organised as follows. Section 2 defines the TOP-Gain criterion, analyses why truncation reduces estimation noise and what it costs, and describes the forward-selection algorithm, its candidate pool and its computational cost. Section 3 presents the experimental design: the pre-registered dataset rules and hypotheses for the OpenML-CC18 benchmark and for the confirmatory study on the AutoML Benchmark, the compared methods, the evaluation protocol and statistics, and the runtime and sensitivity studies. Section 4 reports the results, beginning with the comparison with the baselines and the controlled comparison of criteria, followed by the confirmatory study, the computational cost, the accuracy–stability–cost trade-off, the analysis of the mechanism, ground-truth experiments and the sensitivity to the surrogate configuration. Section 5 discusses the findings, the practical use of TOP-Gain and its limitations, and Section 6 concludes. Online Resource 1 contains the dataset lists and the supplementary studies.

References (34)