Leakage moved accuracy more than the choice of algorithm

We scored every feature subset of 12 datasets in advance, so each metaheuristic could be judged against the true optimum. Their held-out accuracy was statistically indistinguishable, and test leakage moved it far more than the choice of method.

Data, code and citation
  • 6.49 ppaverage accuracy added when the test data guided the search
  • 9.4×the whole leak-free accuracy spread across nine metaheuristic variants
  • p = 0.77Friedman test for any difference in held-out accuracy, 12 datasets

The question

Papers on binary metaheuristics for feature selection compare grey wolves, whales and particle swarms by the accuracy of the subsets they find. Two things make those comparisons shaky: nobody knows how close any method got to the best possible subset, and the test data often leaks into the search. We set out to measure both.

What we did

For 12 public datasets with at most 22 features, we enumerated every non-empty feature subset and stored the error of a 5-nearest-neighbour classifier on each one, for every fold. That is up to 4,194,303 subsets for the largest dataset. We checked the tables against an independent NumPy implementation on 199,703 subsets and found no mismatch, and building them took 984 seconds on a MacBook Air M2.

With exact answers in hand, we ran nine metaheuristic variants and three controls, including random search, under equal evaluation budgets: 129,960 runs, following an analysis plan that was frozen and tagged in git before any of them started.

What we found

Contrary to what we expected, the best metaheuristics did reach the exact optimum far more often than random search. That advantage vanished on held-out data: we found no significant difference in test accuracy between the methods (Friedman test, p = 0.77).

When the test data also guided the search, as it did in a recently published study, reported accuracy rose by 6.49 percentage points on average. That is 9.4 times the whole leak-free spread across the nine variants and 68 times the gap between the two leading methods. In an exploratory comparison, the selected subsets were less accurate than simply using all the features on 7 of the 12 datasets once evaluation was leak-free.

What leakage adds, next to what separates the methods

Data: Paper abstract and summary.json in fsbench (Zenodo 10.5281/zenodo.23070325)
01234567Gap between the two leading methods0.10 ppSpread across all nine variants,leak-free0.69 ppAdded by test-guided selection6.49 pp0246Gap between the two leading methods0.10 ppSpread across all nine variants, leak-free0.69 ppAdded by test-guided selection6.49 pp
Show the numbers as a table
QuantityPercentage points
Gap between the two leading methodsabout 0.10 (6.49 / 68)
Leak-free spread across nine variantsabout 0.69 (6.49 / 9.4)
Added by test-guided selection6.49

What it does not show

One wrapper, one fitness weighting, and datasets small enough to enumerate. The rankings also moved with the summary statistic, the budget and the number of datasets, which is part of the point.

What I take from it

Score a feature-selection method against an exact reference where one exists, and keep the test split out of the loop. The tables are public so any new method can be checked against a known optimum.

Data, code and citation

doi:10.5281/zenodo.23070325

Code on Zenodo under the MIT licence, published 30 September 2026.

fsbench: exhaustive feature subset references and a leak-free benchmark of binary metaheuristics

Open on Zenodo
Show BibTeX
@software{sahay2026_23070325,
  author    = {Sahay, Shahan and Jaiswal, Avishkar and Yadav, Harsh and Tiwari, Ravi and Gupta, Shivani},
  title     = {fsbench: exhaustive feature subset references and a leak-free benchmark of binary metaheuristics},
  year      = {2026},
  publisher = {Zenodo},
  version   = {paper-v1},
  doi       = {10.5281/zenodo.23070325},
  url       = {https://doi.org/10.5281/zenodo.23070325}
}
doi:10.5281/zenodo.23070391

Data on Zenodo under CC BY 4.0, published 30 September 2026.

Exhaustive k-nearest-neighbour error tables over all feature subsets of 12 UCI-derived benchmark datasets

Open on Zenodo
Show BibTeX
@dataset{sahay2026_23070391,
  author    = {Sahay, Shahan and Jaiswal, Avishkar and Yadav, Harsh and Tiwari, Ravi and Gupta, Shivani},
  title     = {Exhaustive k-nearest-neighbour error tables over all feature subsets of 12 UCI-derived benchmark datasets},
  year      = {2026},
  publisher = {Zenodo},
  version   = {v1},
  doi       = {10.5281/zenodo.23070391},
  url       = {https://doi.org/10.5281/zenodo.23070391}
}