An Effective Gram Matrix Characterizes Generalization in Deep Networks

Rubing Yang, Pratik Chaudhari
4/23/2025
cs.LGstat.ML

No confident code implementation found for this paper.

Abstract

We derive a differential equation that governs the evolution of the generalization gap when a deep network is trained by gradient descent. This differential equation is controlled by two quantities, a contraction factor that brings together trajectories corresponding to slightly different datasets, and a perturbation factor that accounts for them training on different datasets. We analyze this differential equation to compute an ``effective Gram matrix'' that characterizes the generalization gap in terms of the alignment between this Gram matrix and a certain initial ``residual''. Empirical evaluations on image classification datasets indicate that this analysis can predict the test loss accurately. Further, during training, the residual predominantly lies in the subspace of the effective Gram matrix with the smallest eigenvalues. This indicates that the generalization gap accumulates slowly along the direction of training, charactering a benign training process. We provide novel perspectives for explaining the generalization ability of neural network training with different datasets and architectures through the alignment pattern of the ``residual" and the ``effective Gram matrix".

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yang2025effective,
  title  = {An Effective Gram Matrix Characterizes Generalization in Deep Networks},
  author = {Rubing Yang and Pratik Chaudhari},
  year   = {2025},
  eprint = {2504.16450},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.16450v3}
}

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/2504.16450.svg)](https://codeofpaper.com/paper/2504.16450)

Discussion