Reshuffling Resampling Splits Can Improve Generalization of Hyperparameter Optimization

Thomas Nagler, Lennart Schneider, Bernd Bischl, Matthias Feurer

When tuning a machine learning model, the "golden rule" of hyperparameter optimization (HPO) has long been to keep your training and validation splits fixed. The logic is intuitive: to compare two configurations fairly, you should test them on the exact same data.

However, a new paper from researchers at LMU Munich and the Munich Center for Machine Learning suggests that this "fairness" might be a trap. By reshuffling your data splits for every single configuration you test, you can actually find models that generalize much better to the real world.

TL;DR

Standard HPO uses fixed data splits to reduce variance, but this often leads to "overtuning"—picking models that are lucky on one specific split but mediocre elsewhere. This paper proves, both theoretically and empirically, that reshuffling splits for every evaluation acts as a hedge against this bias, making cheap holdout methods nearly as effective as expensive cross-validation.

What Problem Does This Paper Address?

Hyperparameter optimization is essentially a noisy search problem. We try different "knobs" (learning rates, tree depths, etc.) and pick the ones that perform best on a validation set.

The danger is oversearching (or overtuning). If you evaluate thousands of configurations on the same fixed split, you will eventually find one that performs spectacularly well just by chance—it happens to fit the quirks of those specific validation samples perfectly. When you deploy that model on new data, its performance often tanks.

To avoid this, practitioners often use $M$-fold cross-validation (CV), which averages results over multiple splits. While robust, CV is computationally expensive (e.g., 5x slower for 5-fold CV). The authors wanted to see if a simpler trick—reshuffling the split for every configuration—could provide the benefits of CV at the cost of a single holdout.

Methods

The authors tackle the problem from three angles:

  1. Theoretical Analysis: They use a Gaussian Process framework to model the "loss surface" of hyperparameters. They prove that reshuffling reduces the correlation between evaluations of different configurations. While this adds some noise, it also increases the chance of "good luck"—finding a configuration that is truly robust across different data samples.
  2. Simulation Study: They tested their theory on a controlled, synthetic quadratic loss surface where they could precisely vary the "signal-to-noise" ratio.
  3. Large-Scale Benchmarking: They ran a massive experiment involving 2.4 million model fits. They compared fixed vs. reshuffled splits across four model types (XGBoost, CatBoost, Elastic Net, and MLPs) using various optimizers like Random Search and Bayesian Optimization (HEBO, SMAC3).
Figure 1: Example of reshuffled empirical loss yielding a worse (left) and better (right) minimizer.

Datasets

The benchmark used 10 diverse tabular datasets from the popular AutoML benchmark, including:

  • Airlines (predicting flight delays)
  • Albert (binary classification)
  • Adult (income prediction)
  • MiniBooNE (particle physics)
  • Porto-Seguro (insurance claim prediction)

They specifically sampled tasks of different sizes ($n=500, 1000, 5000$) to see how data scarcity impacts the benefits of reshuffling.

Key Insights and Ideas

  • The "Hedging" Effect: Reshuffling prevents the optimizer from getting "stuck" in a region of the hyperparameter space that only looks good because of a specific, lucky data split.
  • Signal vs. Noise: Reshuffling is most beneficial when the loss surface is "flat" (meaning many configurations are roughly equal) and the evaluation noise is high. In these cases, the "fair comparison" of fixed splits actually reinforces the noise rather than the signal.
  • Holdout's Redemption: The most surprising finding is that reshuffled holdout (using just one split per config, but a different one each time) often performs as well as standard 5-fold cross-validation.
Figure 2: Simulation results showing that as noise correlation ($\kappa$) increases and the surface becomes flatter (lower $m$), reshuffling (lower $\tau$) leads to lower true risk.

Key Results

  • Massive Gains for Holdout: In the benchmark experiments, reshuffling drastically improved the test performance of the best-found configuration when using a holdout protocol.
  • Efficiency: Reshuffled holdout achieved competitive results with 5-fold CV while being 5 times computationally cheaper.
  • Optimizer Agnostic: The benefits were consistent whether using simple Random Search or state-of-the-art Bayesian Optimizers like HEBO and SMAC3. In fact, reshuffling narrowed the performance gap between simple and complex optimizers, suggesting that how you evaluate is sometimes more important than how you search.
Figure 3: Average test performance (negative ROC AUC) of the incumbent for XGBoost on dataset albert for increasing n (train-validation sizes, columns). Shaded areas represent standard errors.

Limitations and Future Work

  • Loss Sensitivity: The authors found that reshuffling can actually hurt performance when using highly sensitive loss functions like logloss on very small datasets. In these cases, the added variance from reshuffling outweighs the "hedging" benefit.
  • Tabular Focus: The study focused on tabular data and binary classification. Whether these insights translate to deep learning on images or text (where training is much longer and splits are often more rigid) remains an open question.
  • Asymptotic Assumptions: The theoretical proofs rely on large-sample approximations, which might not perfectly capture the behavior of extremely small datasets.

The takeaway for engineers? If you're currently using a fixed holdout split for tuning, start reshuffling. It's a nearly "free" change to your code that could significantly boost your model's real-world performance.

Summary updated

BibTeX
@inproceedings{nagler2024reshuffling,
  author = {Thomas Nagler and Lennart Schneider and Bernd Bischl and Matthias Feurer},
  title = {{Reshuffling Resampling Splits Can Improve Generalization of Hyperparameter Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=C4SInFLvuB},
}
Figure