Command Palette
Search for a command to run...
Comprendre le grokking : Preuves de grokking en régression ridge
Comprendre le grokking : Preuves de grokking en régression ridge
Mingyue Xu Gal Vardi Itay Safran
Résumé
Nous étudions le grokking — l’apparition de la généralisation bien après le sur-apprentissage — dans un cadre classique de régression ridge. Nous démontrons des résultats complets de grokking pour l’apprentissage de modèles de régression linéaire sur-paramétrés en utilisant la descente de gradient avec décroissance du poids. Plus précisément, nous prouvons que les étapes suivantes se produisent : (i) le modèle sur-apprend les données d’entraînement tôt dans la formation ; (ii) une mauvaise généralisation persiste longtemps après que le sur-apprentissage se soit manifesté ; et (iii) l’erreur de généralisation devient finalement arbitrairement petite. De plus, nous montrons, à la fois théoriquement et empiriquement, que le grokking peut être amplifié ou éliminé de manière rigoureuse par un réglage approprié des hyperparamètres. À notre connaissance, ce sont les premières bornes quantitatives rigoureuses sur le délai de généralisation (que nous appelons le « temps de grokking ») en fonction des hyperparamètres d’entraînement. Enfin, au-delà du cadre linéaire, nous démontrons empiriquement que nos bornes quantitatives capturent également le comportement du grokking sur des réseaux de neurones non linéaires. Nos résultats suggèrent que le grokking n’est pas un mode de défaillance inhérent à l’apprentissage profond, mais plutôt une conséquence de conditions d’entraînement spécifiques, et ne nécessite donc pas de modifications fondamentales de l’architecture du modèle ou de l’algorithme d’apprentissage pour être évité.
One-sentence Summary
The authors establish the first rigorous quantitative bounds on grokking time for over-parameterized linear regression with gradient descent and weight decay, prove that hyperparameter tuning can amplify or eliminate grokking, and empirically demonstrate that these bounds capture grokking behavior in non-linear neural networks, suggesting that grokking is not an inherent failure mode of deep learning but a controllable consequence of specific training conditions.
Key Contributions
- The paper establishes the first rigorous quantitative bounds on grokking time for over-parameterized linear regression trained with gradient descent and weight decay, proving a progression from overfitting through persistent poor generalization to arbitrarily small test error.
- Both theoretical analysis and experiments show that grokking can be systematically amplified or eliminated by tuning hyperparameters, such as the weight decay coefficient, providing a principled control mechanism.
- Beyond the linear setting, the quantitative bounds empirically capture grokking behavior on non-linear neural networks, supporting the conclusion that grokking results from specific training conditions rather than a fundamental deficiency of deep learning.
Introduction
The authors study grokking, a counterintuitive phenomenon where test performance improves long after a model perfectly fits the training data. Prior theoretical analyses have attributed grokking to transitions between lazy and rich training regimes or to the role of weight decay, but none provided a rigorous end-to-end guarantee that poor generalization persists after overfitting before eventually resolving. The authors fill this gap by analyzing overparameterized ridge regression with a teacher-student setup, showing for the first time that even a linear model trained with gradient descent and weight decay can exhibit provable grokking. They establish quantitative bounds on training error convergence, a slower generalization error decay that demonstrates prolonged overfitting, and eventual convergence to a global minimum with good test performance, all fully controllable through hyperparameters like the weight decay coefficient.
Method
Theauthors investigate the phenomenon of grokking within the context of ridge regression. They consider a fundamental regression problem where a student linear regression model N(x;θ)=⟨θ,ϕ(x)⟩ is trained to learn a realizable teacher function N∗(x)=⟨θ∗,ϕ(x)⟩. Here, ϕ(x) is a fixed feature map and θ represents the trainable parameters.
The training process utilizes ridge regression, which minimizes the empirical mean squared loss augmented with an ℓ2-regularization term. The training objective is defined as:
Ln(θ;λ)=2n1∑i=1n(N(xi;θ)−N∗(xi))2+2λ∥θ∥22
where λ>0 is the weight decay parameter. The model is optimized using vanilla Gradient Descent (GD) with a fixed step size η, updating the parameters via θ(t+1)=θ(t)−η∇θLn(θ(t);λ).
To formalize grokking, the authors define the training loss convergence time t1 and the generalization loss convergence time t2. Grokking occurs when there is a significant delay between these two events (t2≫t1). In the over-parameterized regime (m≫n), the GD optimization process effectively updates the projection of the weight vector onto the data-spanning subspace to fit the training data quickly. However, the component in the complementary subspace converges at a much slower rate dictated by the weight decay, leading to harmful overfitting before eventual generalization.
The authors provide quantitative bounds for the grokking time t2−t1 and analyze how different training hyperparameters influence this delay.
As shown in the figure below, the theoretical bounds closely match empirical results regarding hyperparameter dependencies. Specifically, decreasing the weight decay λ extends the generalization delay, as t2 is inversely proportional to λ. Decreasing the sample size n amplifies grokking by speeding up the convergence of the training loss. Increasing the feature dimension m has little effect on t1 and t2, while increasing the initialization scale ν2 increases both t1 and t2 simultaneously at logarithmic rates.
Experiment
The experiments confirm the theoretical framing of grokking by demonstrating that gradient descent with weight decay can first achieve low training error while generalization remains poor, and then eventually generalize well after a delay that can be made arbitrarily long through smaller weight decay. The observed dependencies of the early and late critical time points on hyperparameters closely track the derived bounds for linear ridge regression, and this qualitative behavior persists in both random-features networks and fully trained two-layer ReLU networks, indicating that the analytical insights may hold beyond the simplified linear setting.