Introduction
Machine learning models are notoriously brittle when deployed in real-world scenarios where data differs from the training set—a phenomenon known as "distribution shift." A model trained on sunny day driving footage might fail catastrophically in the fog. To ensure safety and reliability, we need robust ways to estimate a model's accuracy on new, unlabeled data without relying on ground-truth labels.
Recent research has highlighted a phenomenon called "Agreement-on-the-line": the rate at which two models disagree on a dataset is often linearly correlated with their actual error rate. However, most existing methods rely on "top-1 disagreement"—simply checking if both models pick the same label. This approach is a blunt instrument that ignores the nuance of model confidence. If Model A is 99% sure an image is a cat, and Model B is only 51% sure, they "agree" on the label, but their underlying probability distributions suggest a significant discrepancy that top-1 metrics miss.
Methods: Moving to Distributional Disagreement
To address this, the authors propose moving beyond binary agreement to Distributional Disagreement. They evaluate three classic statistical divergences to measure the distance between the full softmax outputs of two models:
- Hellinger Distance (HD): A symmetric metric bounded between 0 and 1, providing high stability for comparisons.
- Jensen-Shannon Divergence (JSD): A symmetric, bounded version of KL divergence.
- Kullback-Leibler (KL) Divergence: A symmetrized, unbounded version that penalizes differences in low-probability classes more harshly.
These divergences are integrated into the ALineD framework. By plotting the disagreement of two models on in-distribution (ID) data versus out-of-distribution (OOD) data, a linear relationship can be established and extrapolated to estimate the actual OOD error rate without requiring labels for the OOD set.
Key Insights
- Confidence as a Signal: Distributional divergences capture "discrepancies in uncertainties." This paper proves that differences in confidence, even when labels agree, are powerful predictors of impending failure.
- Hellinger as the "Goldilocks" Metric: Due to its bounded nature and metric properties, HD provides the most stable and accurate estimates for test error across various shifts.
- KL Divergence for OOD Detection: While KLD can be noisy for error estimation due to being unbounded, its extreme sensitivity to distribution shifts makes it superior for identifying "out-of-distribution" samples.
- The Calibration Connection: The strength of these linear correlations depends on model calibration. While "confidently wrong" models can weaken the relationship, divergence-based methods generally remain as robust as standard top-1 approaches.
Key Results
The study utilized standard benchmarks (CIFAR-10/100) and their corrupted counterparts (CIFAR-10C/100C), testing 19 deep vision architectures alongside the CLIP foundation model.
- Superior Error Estimation: Hellinger Distance (HD) achieved the lowest Mean Absolute Percentage Error (MAPE) in 17 out of 22 tested distribution shifts.
- Stronger Correlations: Divergence-based scores showed significantly higher $R^2$ values compared to top-1 disagreement. This was particularly evident when comparing standard models against a high-performance "anchor" like CLIP.
- Enhanced Detection: For OOD detection, KLD and HD consistently outperformed baseline methods like Maximum Softmax Probability (MSP), achieving the highest ROC-AUC scores on CIFAR-100C across all corruption severity levels.
Limitations and Future Work
While the empirical evidence is strong, several challenges remain. The advantage of HD narrowed as the number of classes increased (e.g., on CIFAR-100). Furthermore, severe model miscalibration can cause the "on-the-line" phenomenon to break down. Future research is needed to provide a rigorous theoretical explanation for why these specific divergences maintain such strong linear correlations under distribution shift.
Summary updated