The Weight Gram Matrix Captures Sequential Feature Linearization

Independent reproduction of arXiv:2605.06258v2 by Taehun Cha, Daniel Beaglehole, Adityanarayanan Radhakrishnan and Donghun Lee. Metrics written from the paper's definitions, 80 training runs on Modal T4 GPUs.

Gram-whitened gradient still learnssupported
Whitened update is fasterdid not reproduce
Stable at large step sizepartly supported
Table 1 absolute valuesdid not reproduce
Lower variance on SVHNsupported
Layers linearize in ordersupported
Target Linearity magnitudessupported
Repo learning rate reproduces Fig 4did not reproduce

The main claim reproduces

The paper's central empirical claim is that a deep network turns its representations into something linearly readable one layer at a time, and that the measure of this, Target Linearity, rises through training and rises with depth. That is what I find. With the paper's stated protocol (four hidden layers of width 256, GELU, SGD at learning rate 0.005, 100 epochs) the last layer reaches a Target Linearity of 0.52 and 0.51 on CIFAR-10 across two seeds, starting from about 0.14, and the four layers end stacked in the right order. On CIFAR-100 the last layer lands at 0.150 and 0.151, which is the 0.15 the paper quotes. The surrogate grows from about 1e5 to between 2 and 10 billion on the same runs, again ordered by depth, which is the same range and shape as Figure 4.

Where the whitening experiment departs

The second experiment says the part of the gradient that changes the weight Gram matrix is enough to train a network: project the update onto it, throw away the rest, and performance should hold. On SVHN that is exactly right, and the whitened update is both more accurate and quieter across seeds. On MNIST the two are tied. On CIFAR-10 the paper reports the whitened update several points ahead, and in my runs it is level or a shade behind, within the seed spread. On CIFAR-100 both are around 25 percent, in the direction the paper describes.

datasetGD bestGD epoch 20whitened epoch 20gapwhitened reaches GD best at epoch
mnist97.897.897.7-0.1never
svhn78.378.179.5+1.414
cifar1053.953.953.4-0.4never
cifar10026.925.624.7-0.9never

Accuracy in percent, five seeds each. Gap is in points at epoch 20, positive meaning the whitened update is ahead.

whitening
Standard GD (dashed) against the Gram-whitened update (solid), learning rate 0.01, five seeds. The band is twice the seed standard deviation.

Two smaller claims in the same section behave differently. The paper says the whitened update reaches GD's best accuracy within four or five epochs on SVHN and CIFAR-10; on SVHN it takes about fourteen epochs in my runs and on CIFAR-10 it never catches up, so that specific speed claim did not reproduce, even though the whitened curve is ahead of GD for most of SVHN. The lower variance on SVHN did reproduce clearly.

At large step sizes the whitened update is the stable one

learning ratestandard GDwhitenedadvantage
0.123.4%47.7%+24.3
0.0544.9%49.9%+5.0

Mean of the last five epochs on CIFAR-10. At 0.1 the whitened update holds 47.7 percent while standard GD falls to 23.4 with five times the run to run spread, so the stability argument is real. The paper also says standard GD collapses to chance at 0.05; it does not here, it sits at 44.9 percent, it is simply still behind. That is why this one is marked as partly reproduced.

The two numbers that do not line up

Table 1 sits several points below my runs. The same setup at learning rate 0.01 gives me 53.9 percent for standard GD and 53.4 for the whitened update at epoch 20, against 47.3 and 50.9 in the paper. Both of my numbers are higher, by six and by two and a half points, and I could not close the gap with the learning rate: 0.005 gives me 53.2. So the absolute level in that table does not reproduce on my side, and neither does the whitened update's advantage on CIFAR-10.

The paper text and the author code disagree on the learning rate for Figure 4. Section 4.3 says 0.005; src/experiment/target_linearity.py uses 0.0005. They are different experiments. At 0.0005 the last layer only reaches 0.30 and training accuracy stalls near 52 percent, which does not match Figure 4. At 0.005 everything lines up. I also tried momentum 0.9, since the paper never states momentum and the code uses 0.8: it changed the accuracy by nothing and broke the clean ordering of the surrogate, so 0.8 is the protocol that matches the figure.

Figure 4, both learning rates

Figure 4 replica on CIFAR-10. Left: the paper's stated learning rate 0.005. Right: the learning rate the author repository actually uses, 0.0005. Solid lines are Target Linearity per layer, dotted lines the surrogate on the right axis.
Figure 4 replica on CIFAR-10. Left: the paper's stated learning rate 0.005. Right: the learning rate the author repository actually uses, 0.0005. Solid lines are Target Linearity per layer, dotted lines the surrogate on the right axis.
Figure 4 replica on CIFAR-100, same two learning rates.
Figure 4 replica on CIFAR-100, same two learning rates.
Figure 2 replica: standard GD against the Gram-whitened update at learning rate 0.01.
Figure 2 replica: standard GD against the Gram-whitened update at learning rate 0.01.
Table 2 replica: the advantage of the whitened update at large step sizes on CIFAR-10.
Table 2 replica: the advantage of the whitened update at large step sizes on CIFAR-10.

What I checked instead of trusting my own code

My whitened optimiser produces bit identical parameters to the author's own class after three steps on the same batch, and my Target Linearity agrees with the author's function to 1e-5 on well conditioned features. So the deviations above are about protocol, not about a sloppy reimplementation.

One implementation note that matters for anyone reusing the code: Target Linearity is defined with a plain inverse at lambda equal to zero, and GELU features leave the Gram matrix numerically singular early in training. A plain inverse then returns nonsense, including negative R squared. I invert only the well conditioned eigendirections, which gives the minimum norm least squares fit and the same fitted values the definition intends.

Method

All runs trained from scratch on Modal T4 GPUs. Data come from the Hugging Face mirrors of CIFAR-10, CIFAR-100, SVHN and MNIST, because the Toronto mirror that torchvision uses refused this machine; pixel content and labels are identical. The author repository was read for the protocol and for cross checking; the metric and optimiser code here is written from the paper's definitions.

Raw per run logs, the aggregated curves and the machine readable verdict are in the accompanying dataset.