MNIST across training: the gradient kernel is the BIF at init — and something else at convergence

The BIF thread's foundation page clustered the loss-landscape kernel of a pixel-level autoregressive MNIST transformer at every checkpoint and found the digit taxonomy carved during training — via SGLD sampling, at real cost per cell, gated on seed agreement. Its epoch-0 control couldn't use SGLD at all (no stable local posterior at a random init) and fell back on the γ→∞ limit of the localised BIF: the raw gradient Gram. This page runs that limit object — plus the Adam-style version, computed — at all 31 checkpoints of the very same training run, on the very same 510 probes, with the very same spectral-clustering protocol, and compares against the published SGLD numbers point for point. Deterministic, no chains, no gate: ~18 s per checkpoint.

At initialisation the gradient kernel is the BIF (the with-embeddings kernel reproduces the published epoch-0 cell at r = 0.9999996). As training converges they part ways: the gradient kernel's digit structure peaks at epoch 2 (ARI 0.23) and fades to 0.09 by epoch 30, while the SGLD BIF holds flat at ≈0.31. Point gradients and posterior curvature are the same probe of a young landscape and different probes of a converged one.

ARI against digit labels versus training epoch: preconditioned gradient kernel rises to 0.23 at epoch 2 then decays to about 0.09; raw gradient kernel is roughly half that; published BIF points sit flat near 0.31 from epoch 2 onward; raw-pixel k-means baseline at 0.30.
Fig. 1 · Digit structure across training, 510 probes, exactly the published protocol (correlation → clipped affinity → spectral k = 10 → ARI), kernels over the 0.79M non-embedding parameters. Preconditioning roughly doubles the raw kernel's ARI at every epoch (the model is dense, so q = 1/(v+ε); an ε sweep over ×0.1/×10 moves ARI by <0.005). The BIF diamonds are the published across-epochs numbers from the mnist-grooves page, same probes.

Excluding the embeddings — our standard convention from the error-law study, here the tied pixel-value table plus the 100k-parameter positional embedding — turns out to change almost nothing, and the way it changes nothing is informative: the raw kernel improves at mid-training (epoch 10: ARI 0.087 vs 0.055 with embeddings in) while the preconditioned kernel is untouched at every epoch (peak 0.229 vs 0.230). The marginal preconditioner was already suppressing exactly the per-position clutter that exclusion removes by hand — preconditioning subsumes embedding-exclusion on this model, which is the same division of labour the ε-floor analysis found at Pythia scale, seen from the other side.

Six correlation matrices ordered by digit, from init (featureless), through epoch 1-2 (strong block structure), fading progressively through epochs 5, 10, 30 to faint blocks.
Fig. 2 · Preconditioned gradient-kernel correlation, probes ordered by digit. Featureless at init, strongest same-digit blocks at epochs 1–2, then progressively fainter — the visual of the Fig. 1 decay. Compare the BIF's version of this small-multiple on the mnist-grooves page, where the epoch-30 blocks stay crisp.

The mechanism is in the kernel spectra. At init the kernel is one common mode (stable rank reff = 1.0; the top eigenvalue carries 98% of the trace — every random-init gradient points the same way, and what clustering there is lives in the residual). At epoch 2 the kernel is genuinely class-structured: reff ≈ 22 with digit blocks carrying the spectrum. By epoch 10–30, reff ≈ 80–100: a converged model's per-image gradients are nearly-orthogonal idiosyncratic residuals — the loss is minimised, the shared class directions are trained away, and what remains of each gradient is that image's private noise. The SGLD BIF doesn't inherit this fade because it never measures the point gradient: it samples the basin, whose curvature keeps encoding which images share mechanisms after their gradients have shrunk into noise.

Pearson correlation of off-diagonal kernel entries between gradient kernels and published BIF matrices: about 0.999 at init, dropping monotonically to 0.33 (preconditioned) and 0.24 (raw) by epoch 30, against a BIF seed-to-seed ceiling near 0.9.
Fig. 3 · Same object, then not. Off-diagonal correlation agreement between our kernels and the published SGLD BIF cells (block-centred, seed-averaged), against the BIF's own seed-to-seed agreement (~0.9) as the ceiling. Init: 0.999 for the no-embed kernel — and the with-embeddings twin, which matches the published cell's all-parameter convention exactly, agrees at 0.9999996: an exact reproduction of their epoch-0 gradgram from independent code. Epoch 2: 0.61. Epoch 30: 0.33. The divergence is monotone in training progress.

This resolves cleanly against the ImageNet capstone, which found the opposite-sounding result — there, the preconditioned gradient kernel contained the loss kernel's geometry and beat it downstream. No contradiction: ImageGPT and Inception are one-to-two-epoch models over huge corpora, nowhere near the zero-gradient regime; this 30-epoch MNIST toy actually converges (test loss flat to 0.001 bits/pixel for the last five epochs). The gradient kernel's validity window is "gradients still carry signal" — which covers essentially every practically-trained large model, and stops covering a toy ground to its minimum. If you want landscape structure at such a minimum you need finite-radius information — though, per the addendum below, not SGLD: seeded Gaussian smoothing at the right temperature recovers it deterministically.

What the taxonomy looks like as it is carved — and un-carved — is best seen directly. The figure below is the interactive cluster hierarchy from the BIF page, rebuilt for the gradient kernel: sweep the number of clusters k left to right, switch checkpoints with the tabs, hover any node to see its member digits (click to pin, Esc to dismiss). At init nothing splits meaningfully at any k; at epoch 2 the 1s separate first and loop-digits part from stroke-digits as k rises; by epoch 30 the flows blur back toward mixture.

checkpoint
05 1479 k = 2 ARI 0.06 05 1479 k = 3 ARI 0.05 1 05 36 1479 k = 4 ARI 0.06 479 36 168 09 05 35 k = 6 ARI 0.07 479 138 05 19 04 36 235 126 k = 8 ARI 0.09 05 148 04 19 479 3 238 136 05 k = 10 ARI 0.09 3 035 24 479 05 024 13 268 17 149 k = 12 ARI 0.09 17 23 05 24 479 13 235 05 04 149 368 17 k = 14 ARI 0.09 0 1 2 3 4 5 6 7 8 9 hover a cluster to see its members · click to pin
Fig. 4 · The cluster hierarchy of the exact preconditioned gradient kernel across training — spectral clustering at k = 2…14 (columns, ARI against digit labels underneath), nodes stacked by digit composition and labelled with their dominant digits; same probes, k-ladder and layout as the BIF page’s Fig 9. Use the tabs to move through training; hover any cluster for sixteen of its members, click to pin. At initialisation the kernel is one common-mode blob; by epoch 2 the digit taxonomy is at its sharpest (the 1s split out first, then loop-digits from stroke-digits); past epoch 5 the converged model’s per-image gradients decohere and the taxonomy blurs back out — the fade the static ARI curve shows.
ARI versus number of clusters k from 2 to 16, one line per checkpoint: epoch 2 dominates at every k and keeps rising to about 0.23 at k=14-16; init is flat and low; epoch 30 sits in between.
Fig. 5 · The quantitative side of the sweep: ARI against digit labels as k rises, per checkpoint. The epoch-2 kernel keeps gaining ARI out to k = 14–16 — the young kernel holds a taxonomy finer than ten digits (sub-digit variants split before distinct digits merge) — while init is flat at chance and the converged kernel gains little.
ARI versus probe count 510 to 5100: preconditioned epoch-2 kernel rises from 0.23 to 0.34; epoch-30 preconditioned kernel rises from 0.09 to 0.19; raw kernels rise more shallowly.
Fig. 6 · Exact kernels scale where SGLD couldn't. The BIF's 2,050-probe cell degraded to ARI 0.29 (draw-budget noise: T ≫ M fails); the exact kernel has no draw budget, and the epoch-2 kernel reaches 0.339 at N = 5,100 (0.364 with embeddings in — the embedding rows carry a little genuine signal at large N), approaching the BIF's cross-checkpoint-ensemble headline (0.36) from a single checkpoint. The epoch-30 kernel doubles with N (0.092 → 0.190): convergence dilutes the class signal per pair, it doesn't erase it. Honesty footnote: the raw-pixel k-means baseline also rises with N (≈0.38 at 2,050+), so on MNIST the gradient kernel matches pixels rather than beating them — the interesting content is what the kernel measures (landscape structure, Fig. 3), not MNIST clustering supremacy.

All 31 checkpoints cost 17 minutes ≈ $0.21 on one mid-tier card — ~18 s per checkpoint against ~3 GPU-hours per published BIF cell: ×545 cheaper, with no step-size calibration, no burn-in, no seed gate, and exact reproducibility.

§+ Addendum, same day: the divergence diagnosed — then erased

Asked why the loss kernel wins, we measured instead of argued. Three diagnostics against the published cells (same probes, same protocol): the BIF's class-gap signal-to-noise is 2–3× ours at every trained epoch (1.11 vs 0.71 at epoch 2, 0.81 vs 0.40 at 30); the BIF kernel re-concentrates late (reff 117 → 24 → 18 across epochs 5→30) exactly where ours diffuses (46 → 100 → 83); and — the fossil test — the converged BIF agrees best not with our converged kernel but with our epoch-1 kernel (r 0.485 vs 0.311): the basin's curvature is a fossil record of the directions carved while gradients were informative. Checkpoint-ensembling our kernels (TracIn-flavoured) recovers most of that geometry (agreement 0.31 → 0.64 for early-weighted ensembles) but not the clustering (ARI ≤ 0.25). The theory this points at: at finite temperature the BIF is Cov(ℓi,ℓj) ≈ giᵀΣgj + ½tr(HiΣHjΣ) — and the second-order term, which no point-gradient object contains, carries the class signal once gradients shrink.

ARI versus training epoch: the perturbative loss kernel at calibrated temperature stays flat-high around 0.30 to 0.43 across all 31 checkpoints, at or above the published BIF diamonds; the plain gradient kernel peaks at epoch 2 and fades below 0.10.
Fig. 7 · The recovery. Replace SGLD with K = 512 seeded Gaussian weight perturbations — w* + σξ, preconditioned (ξ ∝ q−1/2), σ calibrated so the loss rises ~10–40 nats, i.e. the same temperature the SGLD cells ran at — and compute Covk(ℓi, ℓj) from forward passes only. The curve goes BIF-shaped: flat-high across all 31 checkpoints (mean 0.349, epoch-30 0.379 vs the BIF's 0.312), agreement with the published cells 0.65–0.68 at every trained epoch (their seed-to-seed ceiling: 0.9), reff re-concentrated to 21. Cost: 1–2 GPU-minutes per checkpoint, ~100× below a published SGLD cell, no burn-in, no gate, exactly reproducible.
Five panels, one per checkpoint, ARI versus perturbation scale sigma: flat and low at small sigma (matching the gradient kernel), rising to a peak near sigma 0.3 preconditioned, then collapsing at sigma 1.
Fig. 8 · Temperature is the whole story. Cold (Δℓ ≤ 1 nat, any σ over two decades): the perturbative kernel is the gradient kernel — flat in σ, ARI 0.07–0.10 at epoch 30, identity check r = 0.998 at init. Calibrated (Δℓ ≈ 10–40 nats): the BIF regime, ARI 0.33 at epoch 30. Overheated (σ = 1): collapse to a single common mode (reff → 1). The published SGLD cells' per-checkpoint ε calibration was doing exactly one thing — setting this knob.

Two cheap corollaries. A q-weighted squared-gradient kernel (rows gi² ∘ q — per-probe diagonal-curvature proxies, one backward each) already reaches ARI 0.290 at epoch 30 (agreement 0.49 with the BIF); unweighted g² fails (0.04–0.08). And top-mode deflation of the converged Gpre does not rescue it (0.092 → 0.065–0.103 for m = 1–10): the late class signal genuinely is not in the point-gradient span at any depth — it lives at finite radius. Net punchline for the thread: the BIF thread's capstone said "sampling the loss kernel is the expensive way to compute a GEMM"; the converse also holds — at a converged minimum the GEMM is the wrong object, and the loss kernel is a temperature-calibrated Gaussian smoothing of it that you can compute deterministically, forward-only, for ~1% of the SGLD price.

Positioning: Timaeus showed per-sample landscape information clustering MNIST digits across (epoch × temperature) with per-sample LLCs, and their Loss Kernel paper sweeps checkpoint structure on ImageNet; He & Su clustered MNIST classifiers with an NTK-flavored gradient similarity at a single snapshot. The combination here — deterministic exact gradient Gram, autoregressive generative model, the published BIF protocol swept over every checkpoint with a direct cell-by-cell agreement curve — appears to be new, and the punchline is two-sided rather than triumphalist: the cheap deterministic object replicates the expensive sampled one exactly where they coincide by construction (init), tracks it closely through early training, and measurably stops being the same thing at a converged minimum.

model
PixelTransformer d128 · 4L · 4H · pixel-CE, 16 levels, 784-pixel raster AR — the BIF thread's exact checkpoints, epochs 0–30, from HF
parameters
P = 793,344: transformer blocks + final LN only — embeddings excluded ({embed, pos, bos}; head is tied to embed) from both rows and preconditioner; with-embeddings twin run kept for comparison
probes
the BIF run's exact 510 (51/class, test split; byte-identical indices), scaling arm to 2,050/5,100
rows
per-image gradient of summed per-pixel NLL, fp32; preconditioner q = 1/(v+ε), v from 1,024 disjoint train images per checkpoint, ε = 10⁻²·mean(v) (ARI flat under ε ×0.1/×10)
clustering
published protocol verbatim: correlation → clip(r,0,1) affinity → spectral k=10 (+ k = 2–16 sweep) → ARI/NMI vs digits
agreement
off-diag Pearson vs published BIF cells (z-normed, seed-averaged); with-embed init gate 0.9999996 before anything else was trusted
cost
12 s grads + 6 s moments per checkpoint; 31 checkpoints ≈ 17 min ≈ $0.21 (both runs + interactive figure ≈ $1.50 total)
Code · ArcadiaImpact/gradient-kernel experiments/mnist_dynamics/ (spec e661ca5, runs fba585be09cbde, recovery 52ccf75; vendored PixelTransformer from small-abstraction-test @ d7a7620).
Artefacts · HF arcadia-impact/gradient-kernel-mnist-dynamics-20260714 (all kernels, moments and analysis JSONs for both runs; no-embed under noembed/) · checkpoints from small-abstraction-test-logs.
Compute · 1× RTX PRO 4500, ≈ $7 lifetime (with-embed sweep $0.21 + no-embed sweep + hierarchy build + perturbative-kernel sweeps). Pod stopped after verified upload.