Statistical variability in comparing accuracy of neuroimaging based classification models via cross validation

Bahram Jafrasteh, Ehsan Adeli, Kilian M. Pohl, Amy Kuceyeski, Mert R. Sabuncu, Qingyu ZhaoScientific 2025

Abstract

Machine learning (ML) has significantly transformed biomedical research, leading to a growing interest in model development to advance classification accuracy in various clinical applications. However, this progress raises essential questions regarding how to rigorously compare the accuracy of different ML models. In this study, we highlight the practical challenges in quantifying the statistical significance of accuracy differences between two neuroimaging-based classification models when cross-validation (CV) is performed. Specifically, we propose an unbiased framework to assess the impact of CV setups (e.g., the number of folds) on the statistical significance. We apply this framework to three publicly available neuroimaging datasets to re-emphasize known flaws in current computation of p-values for comparing model accuracies. We further demonstrate that the likelihood of detecting significant differences among models varies substantially with the intrinsic properties of the data, testing procedures, and CV configurations of choice. Given that many of the above factors do not typically fall into the evaluation criteria of ML-based biomedical studies, we argue that such variability can potentially lead to p-hacking and inconsistent conclusions on model improvement. The obtained results from this study underscore that more rigorous practices in model comparison are urgently needed in order to mitigate the reproducibility crisis in biomedical ML research.

The Challenge of Non-Independence in Cross-Validation

In fields like neuroimaging, where datasets are often small ($N < 1000$), researchers rely on cross-validation (CV) to prove their new model outperforms existing methods. To justify these claims, they typically use $p$-values derived from $K$-fold CV. However, CV violates a fundamental assumption of most statistical tests: independence. Because training sets overlap across folds, the resulting accuracy scores are correlated. This study investigates how the "knobs" of CV—specifically the number of folds ($K$) and repetitions ($M$)—influence the likelihood of finding a significant difference between models, even when no such difference exists.

An Unbiased Framework for Model Comparison

To isolate the effect of the CV setup, the authors introduced a framework designed to compare two models with identical intrinsic predictive power. By adding a small random vector to a base model's weights in one direction ($+v$) and subtracting it in the other ($-v$), they created two symmetric models. Any statistical difference found between these two identical models is purely an artifact of the testing procedure.

Schematic of the M-Repeated K-fold Cross-validation framework used to isolate the effects of CV configurations on statistical significance.

These models were compared using four common tests: the standard paired t-test, a "corrected" paired t-test, McNemar’s test, and DeLong’s test (for AUC). The study utilized major neuroimaging datasets including ABCD (sex classification), ADNI (Alzheimer’s diagnosis), and ABIDE I (Autism identification).

Key Insights: The Sensitivity Trap

The research reveals that increasing the number of repetitions ($M$) or folds ($K$) does not merely make the estimate more precise; it drastically increases the "Positive Rate" (the chance of finding $p < 0.05$). For identical models, this means the false positive rate skyrockets just by changing the CV configuration.

Boxplots showing the distribution of p-values for the ABCD dataset as the number of repetitions (M) increases from 1 to 10.

As shown in the ABCD dataset results above, the probability of finding a significant difference between two identical models increased by 0.49 simply by moving from 1 repetition to 10 repetitions of the CV. Similarly, moving from 2-fold to 50-fold CV consistently resulted in lower $p$-values and higher variance in accuracy, further inflating test sensitivity.

Implications for Reproducibility

The study found that for almost every pair of real-world ML classifiers (e.g., Random Forest vs. SVM), there existed at least one combination of CV setup and statistical test that would yield a significant result, even when accuracies were nearly identical. This variability suggests that many reported "improvements" in model accuracy may be artifacts of the evaluation strategy rather than genuine algorithmic advances.

To mitigate the reproducibility crisis in biomedical ML, the authors suggest moving away from a sole reliance on $p$-values. Instead, they advocate for prioritizing effect sizes (e.g., requiring a minimum 5% accuracy boost) and emphasizing validation on truly independent, external datasets.

Summary updated

BibTeX
@inproceedings{jafrasteh2025statistical,
  author = {Bahram Jafrasteh and Ehsan Adeli and Kilian M. Pohl and Amy Kuceyeski and Mert R. Sabuncu and Qingyu Zhao},
  title = {{Statistical variability in comparing accuracy of neuroimaging based classification models via cross validation}},
  booktitle = {Scientific},
  year = {2025},
  doi = {10.1038/s41598-025-12026-2},
}
Figure