Variance Estimation for Correlated Cross-Validation Folds

You are reading version 1 of this direction, frozen 2026-10-04. The latest version is version 2.

Version 1 of 256 papers90 conceptsfrozen 2026-10-04

In machine learning, we treat $K$-fold cross-validation (CV) as the gold standard for estimating how well a model will perform on unseen data. The process seems straightforward: split the data into $K$ parts, train on $K-1$, test on the remaining one, and average the results. To communicate our certainty, we often calculate the standard deviation across those $K$ folds and report it as an "error bar."

However, this common practice rests on a shaky statistical foundation. The "error bars" produced by standard cross-validation are almost always too narrow, leading researchers to claim "statistically significant" improvements that are often just noise. The core of the problem is a violation of independence: because the training sets in different folds overlap significantly, the resulting error estimates are deeply correlated.

The Impossibility of Unbiased Variance

The fundamental "no-go" theorem in this field was established by Yoshua Bengio and Yves Grandvalet in No Unbiased Estimator of the Variance of K-Fold Cross-Validation. They mathematically proved that there is no universal, unbiased way to estimate the variance of a cross-validation result.

The intuition is simple: to estimate the variance of a mean, you need independent samples. In a 10-fold CV, each training set shares 80% of its data with every other training set. If a specific outlier in the data makes the model struggle, that outlier will appear in 9 out of 10 training folds. Consequently, the errors across folds will move together. Treating these folds as independent experiments—as a standard t-test does—ignores this positive correlation and systematically underestimates the true uncertainty.

The Dependence Penalty

Recent work by Ido Nachum and Rüdiger L. Urbanke in The Structure of Cross-Validation Error describes this as a "dependence penalty." Because the folds are not independent, cross-validation hits a "performance floor." It can never be as statistically efficient as a single, massive independent hold-out set of the same total size.

As Trevor Hastie and Robert Tibshirani clarify in Cross-validation: what does it estimate and how well does it do it?, CV doesn't actually estimate the error of the specific model you trained; it estimates the average error of the algorithm across many potential datasets. When we ignore the correlation between folds, our confidence intervals become over-optimistic, failing to cover the true generalization error at the expected rate.

Data Leakage and Voodoo Results

The dangers of ignoring these correlations are most visible in specialized domains like medicine or biology. Sohrab Saeb and colleagues warned of "voodoo" machine learning in clinical predictions. If a researcher uses "record-wise" CV (splitting by individual data points) rather than "subject-wise" CV (splitting by patient), the model can memorize a patient's unique quirks. This creates a hidden correlation between the training and test sets, leading to accuracy scores that vanish when the model is applied to new patients.

Similarly, Ping Liu and Mustafa Bilgic found that cells in microscopy images are highly correlated with their neighbors. Standard CV splits at the cell level suffer from data leakage, providing over-optimistic results because the "test" cells share the same environmental conditions as the "training" cells.

Toward Honest Significance Tests

To combat this overconfidence, researchers have developed "corrected" statistical tests that explicitly account for fold correlation. Claude Nadeau and Yoshua Bengio introduced the Corrected Resampled t-test, which adjusts the variance estimate based on the ratio of test-to-training data.

Other modern approaches move away from frequentist p-values entirely:

  • Bayesian Frameworks: Ainhize Barrainkua and others proposed the Uncertainty Matters (UM) framework, which treats performance metrics as random variables and uses an "effective confusion matrix" to incorporate fold correlations.
  • Mixture Estimators: In Natural Language Processing, Yan Xue and colleagues suggest using 3×2 cross-validation to stabilize model comparisons, as it balances the signal-to-noise ratio better than standard 10-fold CV.
  • Nested Cross-Validation: This technique helps separate the process of hyperparameter tuning from performance estimation, reducing the optimistic bias that occurs when the same data is used for both.

The consensus across these 50 papers is a call for "statistical honesty." Whether evaluating LLMs on small benchmarks or comparing brain imaging models, the path to reproducible science requires acknowledging that our data partitions are rarely as independent as our formulas assume.

Papers in this version

History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 48 papers
  2. Version 1 · 2026-10-04 · 56 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_cross_validation_fold_correlation_491486a7,
  title = {cross-validation fold correlation},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/cross-validation-fold-correlation/rdr_491486a7157348ba8afc21ec26ccb244},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-24},
}

This exact version (version 1, frozen text):

@misc{lacuna_variance_estimation_for_correlated_cross_491486a7_v1,
  title = {Variance Estimation for Correlated Cross-Validation Folds},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/variance-estimation-for-correlated-cross-validation-folds/rdr_491486a7157348ba8afc21ec26ccb244/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-24},
}