When we evaluate a machine learning model using cross-validation (CV), we often treat the error measurements from each fold as independent samples. We calculate a mean, find the standard deviation, and slap on a 95% confidence interval. However, this standard statistical approach is fundamentally flawed: the folds are not independent. Because the training sets in different folds overlap significantly, the errors they produce are correlated.
This "independence illusion" leads to variance estimates that are systematically too low, resulting in confidence intervals that are dangerously narrow and "dishonest." Recent research has focused on quantifying this correlation and developing correction factors to produce reliable uncertainty estimates for both model performance and interpretability.
The Problem of Overlapping Data
The core issue, as identified by Claude Nadeau and Yoshua Bengio in Inference for the Generalization Error, is that the variability in cross-validation comes from two sources: the randomness of the test set and the randomness of the training set.
Standard tests only account for the test set noise. They ignore the fact that if you change the training data slightly, the model itself changes. In $K$-fold cross-validation, each training set shares the vast majority of its data with every other fold. This shared data induces a correlation between the error estimates. Nadeau and Bengio demonstrated that this correlation is approximately proportional to the ratio of the test set size to the total dataset size. Ignoring this relationship causes us to underestimate the true uncertainty of our performance metrics.
What Does Cross Validation Actually Estimate
A common misconception is that cross-validation tells us how well our specific trained model will perform. In Cross-validation: what does it estimate and how well does it do it?, authors including Trevor Hastie and Robert Tibshirani clarify that CV actually estimates the average error of the learning algorithm across many potential datasets.
Because the "estimand" (the thing being estimated) is the algorithm's general performance rather than the specific model's performance, the variance is naturally higher than a simple holdout test would suggest. To address this, they propose Nested Cross-Validation (NCV). By using an inner loop for standard CV and an outer loop to hold out data, NCV empirically measures how much the CV estimate itself fluctuates. This hierarchical approach accounts for the statistical dependencies that standard CV ignores, producing wider, more "honest" confidence intervals.
Correcting Interpretability and Feature Importance
The consequences of underestimated variance extend beyond simple accuracy scores. When we use techniques like Partial Dependence (PD) plots or Permutation Feature Importance (PFI) to explain "black box" models, we are often looking at artifacts of a single model fit rather than true underlying patterns in the data.
Christoph Molnar, Timo Freiesleben, and colleagues have bridged this gap in Relating the Partial Dependence Plot and Permutation Feature Importance to the Data Generating Process. They found that naive confidence intervals for feature importance often achieve only 30-40% coverage for a target 95% confidence level.
By applying the variance correction logic—specifically adjusting for the ratio of training to test data size—they developed "learner-based" explanations. These corrected intervals prevent researchers from over-interpreting features that might appear important due to sampling noise but are not robust across different training sets.
Choosing a Reliable Estimator
With various correction methods available, which should practitioners use? Hannah Schulz-Kümpel, Bernd Bischl, and others conducted a comprehensive benchmark in Constructing Confidence Intervals for 'the' Generalization Error.
Their findings confirm that while standard t-tests fail, heuristic correction factors—like the Corrected Resampled t-test introduced by Nadeau and Bengio—significantly improve reliability. These corrections essentially "inflate" the variance estimate based on the degree of data overlap, ensuring that the resulting confidence intervals actually contain the true generalization error at the expected rate.