🤖 AI Summary
Estimating test accuracy under distribution shift without access to test labels remains a fundamental challenge in unsupervised model evaluation.
Method: We propose a novel, label-free proxy metric based on the gradient norm of the classification layer—specifically, the ℓ₂-norm of the gradient of cross-entropy loss with respect to the final-layer weights, computable via a single backward pass.
Contribution/Results: We theoretically establish and empirically validate a strong negative correlation between this gradient norm and test accuracy—a previously unexplored relationship—bypassing reliance on model outputs or intermediate features. Extensive experiments across diverse distribution shifts (e.g., covariate/concept drift, domain shift) and mainstream architectures demonstrate that our method reduces average estimation error by 35% over state-of-the-art approaches. It is plug-and-play, architecture-agnostic, and robust across varying data distributions.
📝 Abstract
Estimating test accuracy without access to the ground-truth test labels under varying test environments is a challenging, yet extremely important problem in the safe deployment of machine learning algorithms. Existing works rely on the information from either the outputs or the extracted features of neural networks to formulate an estimation score correlating with the ground-truth test accuracy. In this paper, we investigate--both empirically and theoretically--how the information provided by the gradients can be predictive of the ground-truth test accuracy even under a distribution shift. Specifically, we use the norm of classification-layer gradients, backpropagated from the cross-entropy loss after only one gradient step over test data. Our key idea is that the model should be adjusted with a higher magnitude of gradients when it does not generalize to the test dataset with a distribution shift. We provide theoretical insights highlighting the main ingredients of such an approach ensuring its empirical success. Extensive experiments conducted on diverse distribution shifts and model structures demonstrate that our method significantly outperforms state-of-the-art algorithms.