TRANSMISSION // 2605.12394v3

A spectral warning sign for neural-network overfitting

Source published

A weight-only spectral test flags a late overfitting phase in three grokking experiments, but results on large language models remain exploratory.

AI-generated conceptual illustration for A spectral warning sign for neural-network overfitting
AI-generated conceptual illustration; not documentary evidence.

A neural network can learn its training examples, eventually generalize, and then lose some held-out performance if training continues. Hari K. Prakash and Charles H. Martin propose a way to flag possible overfitting from model weights alone. Their method finds unusual patterns in randomized weight matrices—but these patterns are clues for follow-up, not a universal score of model quality.

Neural networks can behave unexpectedly when trained for a long time. In grokking, a model first fits its training examples but only later begins to perform well on data it has not seen. Hari K. Prakash and Charles H. Martin examine what can happen after that improvement: continued training may be followed by declining test performance even as training accuracy remains high. They call this later phase anti-grokking.

Their central question is whether overfitting in this setting can be flagged from a model’s learned weights, without access to training or test data. That could be useful when inspecting a released model with no available training history. The paper’s method has two parts, however: detecting unusual weight structure uses weights alone, while assessing how that structure affects outputs also requires chosen random inputs and model outputs.

Shuffling weights to find unusual spectra

For each layer, the researchers randomly permute the individual entries of its weight matrix. This destroys their original row-and-column arrangement while preserving the set of weight values. They then form a covariance matrix from the shuffled weights and examine its eigenvalue spectrum—a summary of the matrix’s structure. The spectrum is compared with a Marchenko–Pastur (MP) distribution, a mathematical reference pattern expected under particular random-matrix conditions. The procedure also accounts for ordinary fluctuations at the edge of that reference pattern, using the WeightWatcher software.

Eigenvalues that lie well beyond the expected edge are called Correlation Traps. In everyday terms, they are unusually strong spectral features that remain detectable in the covariance matrix after the weights have been shuffled. The name reflects the authors’ interpretation; detection identifies a departure from the chosen statistical baseline, not a harmful correlation by definition.

The main tests follow models through three stages: before grokking, while test performance improves, and after it begins to decline. The experiments cover an MNIST multilayer perceptron, a transformer trained on modular addition, and a GPT-2-style model trained on a synthetic composition task. The authors also repeat shuffles and run controls, including subtracting layer means and editing the largest individual weights.

A signal in the late decline

Across those three settings, the authors report that traps were absent or nearly absent during pre-grokking and successful generalization, then appeared as test performance fell while training performance remained high. In the MNIST experiment, adding weight decay reduced both trap growth and the extent of the late test-performance decline. These results suggest the shuffled-spectrum signal can distinguish the observed anti-grokking phase from an earlier phase that may look similar in train and test accuracy alone.

To assess whether a detected trap affects model behavior, the researchers intervene on it and pass random probe inputs through the model. They compare the model’s softmax output-probability distributions before and after the intervention using Jensen–Shannon divergence (JSD). A higher JSD means the intervention changes the output distributions more on those probes; it does not say whether the change is beneficial. In the controlled experiments, JSD rankings were associated with the effects of removing traps on held-out performance. In one MNIST continued-training intervention, targeted trap removal was followed by better test accuracy than either ordinary continued training or a matched edit to the largest weights. This is evidence from a particular setup, not proof that deleting detected modes is generally a safe or effective remedy.

What remains uncertain

The paper also reports traps in two open-weight GPT-OSS language models. This is screening evidence: the authors say the traps’ effects on generalization in those models remain to be tested. Finding an outlier in a large model does not establish that the model is overfit or that the outlier harms its outputs.

The controlled evidence is limited to three grokking settings, and the authors do not claim that every form of overfitting will produce traps. The MP comparison is an approximate, conditional reference: shuffling entries does not make them fully independent, and interpretation depends on whether the spectral baseline is appropriate. JSD also depends on the chosen probe inputs and measures output sensitivity, not whether a change is good or bad; labeled task tests are needed to determine that. Trap counts therefore should not be treated as universal measures of model quality or safety.

This article is based on an arXiv preprint, a research manuscript that may not have undergone formal peer review. Its claims and methods may be revised, and the results should be read with that status in mind. The study offers a potentially useful way to flag unusual weight structure for further investigation, while leaving open how well it works across other models and tasks.

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.