Neural networks generalize differently across layers with weight decay training

A Theoretical Analysis of Generalization Dynamics in Neural Networks under Gradient Descent with Weight Decay

Machine Learning

Summary

Understanding why and how neural networks make good predictions on new data is hard because it depends on many factors like the data, the network design, and training details. This paper by the authors develops a new way to analyze how these factors work together during training with a specific setup called gradient descent with weight decay. They break down errors into parts and study how the predictions change during training in detail, especially across different network layers. Their findings explain why some layers generalize better than others and provide a theory for a mysterious behavior called grokking, where learning improves suddenly after delay.

What this means in practice

A theory result. No direct application yet.

Authors

Yuqing Wang, Ioannis G. Kevrekidis, Mikhail Belkin

Abstract

Understanding generalization remains a central challenge in machine learning because it requires jointly considering data, architecture, and training dynamics. In this paper, we develop a theoretical framework that characterizes how these factors jointly shape generalization performance throughout training. More precisely, we study a broad class of neural networks trained under the $\ell^2$ loss by gradient descent (GD) with weight decay, and prove the convergence of GD to a neighbourhood of the global minimizers of the empirical loss. By partitioning the space based on the input data, we then decompose the population error into data error, optimization error, and prediction variation error, and bound them separately. In particular, for the prediction variation error, which measures the oscillations of the learned function, we propose (local) approximate homogeneity and derive explicit cellwise and layerwise bounds for its evolution along the training trajectory. These bounds yield two important implications: a necessary condition of improved generalization explains differences in layerwise generalization behavior; a sufficient condition describes delayed generalization and provides a theoretical characterization of grokking.