Gradient-Weight Alignment as a Train-Time Proxy for Generalization in Classification Tasks

Florian A. Hölzl, Daniel Rueckert, Georgios Kaissis
10/29/2025
cs.LG

No official code found. Best implementation: hlzl/gwa (1 star, last commit 2025-11-07).

Abstract

Robust validation metrics remain essential in contemporary deep learning, not only to detect overfitting and poor generalization, but also to monitor training dynamics. In the supervised classification setting, we investigate whether interactions between training data and model weights can yield such a metric that both tracks generalization during training and attributes performance to individual training samples. We introduce Gradient-Weight Alignment (GWA), quantifying the coherence between per-sample gradients and model weights. We show that effective learning corresponds to coherent alignment, while misalignment indicates deteriorating generalization. GWA is efficiently computable during training and reflects both sample-specific contributions and dataset-wide learning dynamics. Extensive experiments show that GWA accurately predicts optimal early stopping, enables principled model comparisons, and identifies influential training samples, providing a validation-set-free approach for model analysis directly from the training data.

View on arXivView PDF

Code Implementations(1)

hlzl/gwaCommunity69%

Gradient-Weight Alignment as a Train-Time Proxy for Generalization in Classification Tasks

10PythonOct 28, 202511 months ago
deep-learningvalidation-metrics

Similar Papers

Cite this paper

@article{hlzl2025gradientweight,
  title  = {Gradient-Weight Alignment as a Train-Time Proxy for Generalization in Classification Tasks},
  author = {Florian A. Hölzl and Daniel Rueckert and Georgios Kaissis},
  year   = {2025},
  eprint = {2510.25480},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.25480v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.25480.svg)](https://codeofpaper.com/paper/2510.25480)

Discussion