Crossvalidation in Brain Imaging Analysis

Nikolaus KriegeskortebioRxiv 2015

Abstract

Crossvalidation is a method for estimating predictive performance and adjudicating between multiple models. On each of k folds of the process, k-1 of k independent subsets of the data (training set) are used to fit the parameters of each model and the left-out subset (test set) is used to estimate predictive performance. The method is statistically efficient, because training data are reused for testing and performance estimates combined across folds. The method requires no assumptions, provides nearly unbiased (slightly conservative) estimates of predictive performance, and is generally applicable because it amounts to a direct empirical test of each model.

Introduction

In the field of brain imaging, researchers frequently encounter the "circularity" problem, often referred to as "double-dipping." This occurs when the same dataset is used both to generate a hypothesis—such as identifying specific voxels that respond to a stimulus—and to test that same hypothesis. Such practices lead to over-optimistic results and biased conclusions. Traditional statistical frameworks, like the General Linear Model (GLM), rely on strict assumptions regarding data distribution (e.g., normality) and independence. However, in complex multivariate analyses or non-linear computational modeling, these assumptions often fail. Cross-validation (CV) offers a robust, empirical alternative for estimating predictive performance and selecting the most appropriate model without relying on these fragile assumptions.

Methodology

The core of the proposed framework is the $k$-fold cross-validation process. In this approach, the total dataset is partitioned into $k$ independent subsets.

Schematic of a 5-fold cross-validation procedure.

The process follows these steps:

  1. Partitioning: Data is split into $k$ folds.
  2. Iteration: For each fold, $k-1$ subsets serve as the training data to fit model parameters, while the remaining subset acts as the test data to evaluate performance.
  3. Aggregation: This cycle repeats $k$ times, ensuring every data point is used for testing exactly once.

A critical refinement is nested cross-validation. When hyperparameters (such as regularization constants) need tuning, they must be optimized on a sub-split of the training data. This prevents "information leakage" from the final test set, maintaining the integrity of the performance estimate. While alternatives like the Akaike Information Criterion (AIC) or Bayesian Information Criterion (BIC) exist, they often rely on asymptotic approximations that may not hold for the finite, noisy datasets typical of fMRI research.

Key Insights

The Bias-Variance Tradeoff

The choice of $k$ involves a trade-off. A low $k$ (e.g., 2-fold) is computationally efficient but introduces "negative bias," underestimating model performance because the training set is small. Conversely, a high $k$ (e.g., leave-one-out) reduces bias but increases variance and computational demand. Practical experience suggests that $k=5$ to $10$ represents an optimal balance for most neuroimaging applications.

Ensuring Independence

Independence is the cornerstone of valid cross-validation. fMRI data is characterized by temporal autocorrelation. If adjacent time points are split into different folds, the test set is no longer independent, leading to inflated performance metrics. To mitigate this, data should be split by independent scanner runs rather than individual time points.

Assumption-Free Evaluation

Unlike classical statistics, CV does not require the data to follow a specific distribution. If a model can successfully predict held-out data, its validity is empirically demonstrated. This is particularly advantageous for Multivariate Pattern Analysis (MVPA), where multivariate normality is frequently violated.

Results and Best Practices

Cross-validation has become a "gold standard" for empirical testing in neuroimaging. Its application varies by analysis type:

  • Univariate Analysis: While standard parametric tests often suffice, CV is essential for defining independent Regions of Interest (ROIs) to avoid circularity.
  • MVPA and Encoding Models: CV is mandatory for evaluating complex, non-linear models (e.g., Deep Neural Networks) where classical frequentist statistics are inapplicable.
  • Generalization: CV provides a nearly unbiased estimate of how a model will perform on entirely new data, ensuring that brain imaging research remains grounded in empirical reality.

Limitations and Future Directions

Despite its strengths, CV is computationally intensive, especially for large-scale datasets or complex models. Furthermore, while CV excels at model selection, it does not inherently explain why one model outperforms another, nor does it provide the simple p-values familiar to many researchers. Future work points toward integrating CV with Bayesian approaches to combine empirical rigor with probabilistic depth.

Summary updated

BibTeX
@misc{kriegeskorte2015crossvalidation,
  author = {Nikolaus Kriegeskorte},
  title = {{Crossvalidation in Brain Imaging Analysis}},
  year = {2015},
  doi = {10.1101/017418},
  howpublished = {bioRxiv},
}
Figure