Abstract
Early stopping is a critical technique for preventing overfitting in deep learning, typically requiring a dedicated validation set. However, in data-constrained domains like medical imaging, partitioning data is costly. This paper introduces Gradient Disparity (GD), a theoretically grounded "train-train" signal that identifies the onset of overfitting without a validation set. By measuring the $\ell_2$ distance between gradient vectors of different training mini-batches, GD detects when a model begins chasing batch-specific noise rather than generalizable features. Our results show that GD-based early stopping matches or exceeds the performance of cross-validation while being more data-efficient and robust to noisy labels.
Introduction
Deep learning models are notorious for overfitting, especially when training data is scarce or labels are "noisy." The standard defense is early stopping: halting training when performance on a held-out validation set starts to decline. This approach has two major flaws: it wastes expensive data that could otherwise be used for training, and it can be unreliable if the validation set itself contains noisy labels.
We propose a "train-train" signal called Gradient Disparity (GD) that predicts generalization error using only the training data. The intuition is that if a model is learning generalizable features, the gradient directions for different mini-batches should be similar. When these gradients begin to diverge significantly, it indicates the model is memorizing batch-specific quirks rather than universal patterns.
Methodology: Gradient Disparity
The core contribution is the Gradient Disparity (GD) metric, defined as the $\ell_2$ norm distance between the gradient vectors of two different mini-batches ($S_1$ and $S_2$) sampled from the training set: $$GD = \|g_1 - g_2\|_2$$
As shown in Figure 1, GD captures the misalignment between batch-specific loss surfaces. The authors derive GD from a probabilistic upper bound on the generalization penalty using the PAC-Bayesian framework. Computationally, averaging disparity over just five batches is sufficient to provide a stable signal, making it highly efficient.
Experimental Setup
The authors validated GD across diverse scenarios:
- Standard Benchmarks: MNIST, CIFAR-10, and CIFAR-100.
- Noisy Labels: Benchmarks with up to 75% randomized labels to test robustness against memorization.
- Real-World Limited Data: The MRNet dataset, containing MRI scans for knee injury detection (ACL and meniscal tears), representing a high-stakes, small-data regime where every training sample counts.
Key Results and Insights
Outperforming Cross-Validation
On the MRNet medical dataset, using GD for early stopping resulted in a >1% improvement in Test AUC compared to 5-fold cross-validation. By allowing the model to train on 100% of the data in a single run, GD is both more accurate and significantly faster than $k$-fold CV, which requires multiple separate training runs.
Superiority in Noisy Environments
GD is often more reliable than a validation set when labels are noisy. In MNIST experiments with 50% random labels, GD achieved a test error of 16.66%, significantly beating $k$-fold cross-validation (17.86%) and GSNR (35.68%). Because GD monitors the disagreement between gradients, it effectively catches the model's attempt to memorize conflicting random labels, a signal that a noisy validation set might miss.
Conclusion
Gradient Disparity offers a robust, validation-free alternative for early stopping. It is particularly valuable in small-data regimes like medical imaging and in the presence of label noise. Future work includes investigating GD's behavior during "double descent" and its interaction with adaptive optimizers like Adam.
Summary updated