Reshuffling Resampling Splits Can Improve Generalization of Hyperparameter Optimization

Thomas Nagler, Lennart Schneider, Bernd Bischl, Matthias Feurer

When tuning machine learning models, the conventional wisdom is to use a fixed, "fair" data split to compare different hyperparameter settings. This ensures that every configuration is evaluated on the exact same training and validation data, theoretically reducing variance and allowing for an apples-to-apples comparison. However, recent research flips this logic on its head, demonstrating that reshuffling the training/validation split for every single configuration often leads to better performance on unseen data.

The Hidden Trap of Oversearching

Hyperparameter Optimization (HPO) is essentially a noisy search for the best "knobs" to turn on a model. The standard protocol evaluates various hyperparameter configurations using a resampling estimate of the generalization error to guide optimization.

However, keeping this split fixed introduces a hidden trap: oversearching (or overtuning). If an optimizer evaluates thousands of configurations on the exact same validation split, it will eventually find one that performs exceptionally well purely by chance. This configuration is "lucky" on that specific subset of data but fails to generalize to the real world. By changing the data split for every evaluation, we can break this reliance on luck.

Why Reshuffling Works: Signal, Noise, and Decorrelation

The researchers tackled this problem through theoretical analysis, controlled simulations, and large-scale benchmarking. By modeling the HPO loss surface as a Gaussian Process, they derived a bound on "expected regret"—the gap between the chosen configuration and the true optimum.

Reshuffling acts as a hedge against overfitting the validation set. While a fixed split might consistently favor a mediocre configuration that happens to fit that split's quirks, reshuffling ensures that only configurations robust across many possible splits rise to the top.

Loss surfaces under high and low signal-to-noise ratios.

As shown in the simulated loss surfaces above, reshuffling is most beneficial when the "signal" is weak (the loss surface is relatively flat) and the "noise" is high. By using different splits, the errors between evaluations become less correlated. This makes the optimization surface look rougher to the optimizer, but crucially prevents it from falling into "false valleys" created by a single static split.

Empirical Results: A "Free Lunch" for Holdout

To test these theories in practice, the authors implemented reshuffling across several popular HPO optimizers (Random Search, HEBO, and SMAC3) and model types (XGBoost, CatBoost, Elastic Net, and MLPs). They used 10 medium-sized tabular datasets from the AutoML benchmark, creating 30 distinct tasks by sampling subsets at different sizes ($n = 500, 1000, 5000$).

The core "novel" approach tested was Reshuffled Holdout: instead of one fixed 80/20 split, a new random 80/20 split is generated every time the optimizer suggests a new hyperparameter configuration.

Mean test performance across dataset sizes, comparing fixed vs. reshuffled splits.

The results revealed a drastic improvement for the holdout method. For a single train-validation split, reshuffling significantly improved final test performance across almost all tasks.

The most surprising insight is that reshuffled holdout (1 model fit per config) often performs as well as standard 5-fold Cross-Validation (5 model fits per config). As seen in the performance curves above, the dashed black line (reshuffled holdout) rapidly approaches the green lines (CV methods). This suggests practitioners can achieve CV-level generalization at just 20% of the computational cost.

Furthermore, the benefits were optimizer-agnostic. Whether using simple Random Search or state-of-the-art Bayesian Optimization (BO) like HEBO, reshuffling helped. Interestingly, for $M$-fold CV, reshuffling the folds had a negligible impact, aligning with the theory that CV already "sees" all the data and is inherently more robust to split-luck.

Limitations and Future Directions

While reshuffling offers a compelling "free lunch" for holdout validation, it is not without limitations:

  • Loss Sensitivity: For highly sensitive loss functions like logloss (especially on very small datasets), reshuffling can occasionally hurt performance because the increased variance of the estimator outweighs the benefits of decorrelation.
  • Data Modality: The experiments were limited to tabular data and binary classification. Whether these results hold for deep learning on image or text data—where training a single model is vastly more expensive—remains an open question.

Ultimately, this research suggests that the choice of resampling strategy might be just as important as the choice of optimizer. Future work may look toward "Adaptive CV" techniques that intelligently decide when to reshuffle or add more folds based on the observed noise during the search.

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