The spectra of loss kernels

Across the loss-kernel thread and the training-prediction work we have quietly accumulated a zoo of second-moment matrices: SGLD-sampled K on eight different models, two preconditioned loss kernels Kpre, and exact gradient Grams G / Adam-preconditioned Grams Gpre at three of those models. This page eigendecomposes all of them — no new training, no new sampling, just eigh on matrices we already had — and asks three questions: what do the spectra look like, what does preconditioning do to them, and when do two of these objects share an eigenbasis rather than just a spectrum?

Every loss kernel we have ever computed has a heavy-tailed power-law spectrum whose top mode leans on the common mode — and the spectrum transfers across model scale while the eigenbasis does not: the spectral transform f(G) → K that exists at gemma-270m is gone at gemma-1b.

§1The four objects, and what we have

All four matrices are M×M Grams over a fixed probe set of documents (or images), computed once at the trained checkpoint w0:

K
loss kernel: covariance of per-document losses under a localized posterior around w0 (the estimator; block-centred, seed-gated)
Kpre
the same loss kernel sampled under preconditioned dynamics — RMSProp-SGLD at its own calibrated step size (pythia-14m gold), or an isotropic sampler with a (iGPT-S)
G
exact gradient Gram Gij = gi · gj at w0 (one-checkpoint TracIn; cosine-normalized for iGPT-S)
Gpre
Adam-preconditioned Gram giᵀ diag(1/√v) gj, LESS-style

Theory says these are all the same thing in different metrics: linearize the model and the delta method gives KJ Σ Jᵀ where Σ is the posterior covariance — a curvature-filtered Gram of the same per-document gradients that build G = JJᵀ and Gpre = JPJᵀ. Whether that relationship is visible downstairs, in 512-doc space, is an empirical question. The coverage:

modelprobe setMKKpreGGpreexperiment
pythia-14mpile, 8 domains1024✓ gold✓ pSGLDsampler A/B
pythia-160mpile, 8 domains400✓ ×2 seedsestimator validation
gemma-3-270mpile, 8 domains512training-prediction (public)
gemma-3-1bpile, 8 domains512✓ v1+v2training-prediction (held-out)
gemma-3-4b-itpersona responses376✓ ×2 seedscharacter-BIF (OCT)
llama-3.1-8b-itpersona responses490✓ ×2 seedscharacter-BIF (TIDE)
iGPT-SImageNet val10000✓ ×2 seeds✓ Fisher ×2✓ cos✓ cosImageNet kernel
inception-v1ImageNet val10000✓ ×2 seedsImageNet kernel

iGPT-S is the only cell with the full 2×2 — both kernels and both Grams — and pythia-14m is the only direct K-vs-Kpre sampler A/B on language. Nobody has sampled a preconditioned kernel at Gemma scale yet (that's the obvious gap this page leaves open).

§2Gemma-3-1B: same spectrum, different basis

The training-prediction study left a specific puzzle. Its winning formula — developed on a public gemma-3-270m grid, scored on a sequestered gemma-3-1b reproduction — includes a pairwise-interaction term built from the top eigenmode of the exact Gram G, and the post-hoc ablations found that this term is nearly substitutable at the development scale: source it from the loss kernel's top eigenmode instead and the public-grid score barely moves (LDS 0.659 → 0.627). But the same substitution halves the held-out score at 1b (0.641 → 0.370). Somewhere between 270m and 1b, K's eigenvectors stop being interchangeable with G's. The spectral decomposition locates the change:

Three panels: gemma-3-1b spectra of G, G_pre, K v1 and v2; subspace overlap curves for K~G at both scales against controls; and transform-fit dumbbells showing the spectral transform collapsing from R² 0.88 at 270m to 0.25 at 1b.
Fig. 1 · gemma-3-1b. Left: trace-normalized eigenvalue decay. G is rank-1 dominated (λ₁ = 92% of trace); Gpre is flat (λ₁ = 16%); K sits in between (λ₁ = 34%) — and beyond rank ~3 all three decay with the same power law (slope 0.74 for K and G alike). The under-sampled v1 kernel shows what estimator starvation looks like: a too-steep slope (1.06) and a tail that dies at rank ≈ 250. Middle: overlap of top-k eigenspaces. Gpre~G (violet) is the "same basis, different metric" control; K seed0~seed1 (grey dashes) is the noise ceiling; K~G at 1b (orange) sits far below both until k ≈ 64, where it converges to the seed ceiling. Right: best spectral transform f(G) → K (double-centred Frobenius R², matrix functions preserve eigenvectors): at 270m a power law c·G0.6 reaches 0.88 of a 0.89 ceiling; at 1b the ceiling itself collapses to 0.29 — barely above the 0.22 random-basis floor.

Three readings, in order of how much they surprised me:

§3The zoo: one power law everywhere

Same decomposition, every model. To compare kernels across probe sets and amplitude scales, the figure and table use the correlation flavour (unit diagonal); Fig. 1's covariance-flavour numbers differ slightly.

Loss-kernel eigenspectra for six language models and three image-model kernels, all approximately power-law.
Fig. 2 · Trace-normalized loss-kernel spectra (correlation flavour), log–log. Left: six language models spanning 14M→8B parameters, two probe-set types (pile documents, persona responses), three model families — the decay exponents α span only 0.46–0.75, with no visible trend in model size. Right: the image models. iGPT-S's kernel looks like the language kernels (α 1.16 at the top, uniform-ish leading mode); the Fisher-tethered Kpre is far flatter. Inception-v1 is the one supervised model in the zoo.

Numbers for every kernel and Gram (kernels in correlation flavour, for cross-model comparability):

modelnoteMλ₁/trαrank₅₀rank₉₀u₁seed CKA
Kpythia-14mpile · gold SGLD10240.0650.72906270.58
pythia-160mpile · 2 seeds4000.3610.46211920.980.93
gemma-3-270mpile5120.3900.6751750.99
gemma-3-1bpile · v25120.3890.59132050.980.65
gemma-3-4b-itpersona responses3760.2960.60231570.990.51
llama-3.1-8b-itpersona responses4900.1890.75271730.960.68
igpt-sImageNet100000.3441.16911800.980.93
inception-v1ImageNet · supervised100000.0271.0526127340.880.69
Kprepythia-14mRMSProp-SGLD gold10240.0880.491677000.54
igpt-sFisher tether100000.0130.7971546200.860.34
Ggemma-3-270mraw Gram5120.8380.741310.57
gemma-3-1braw Gram5120.9180.74110.57
igpt-scosine Gram100000.0861.332210590.16
Gpregemma-3-270mAdam-precond.5120.0920.73523470.31
gemma-3-1bAdam-precond.5120.1580.75433320.56
igpt-scosine, precond.100000.0200.66149774140.87

Kernels shown in correlation flavour (unit diagonal) for cross-model comparability — Fig. 1 quotes the covariance flavour, hence small differences. Grams as stored (iGPT’s are cosine-normalized). α = power-law decay exponent fit over ranks 3 – M/3; rankq = modes holding q% of the trace; u₁ = |top eigenvector · uniform|; seed CKA = centered CKA between the two seed kernels (an eigen-pattern noise ceiling).

Consistent facts across the zoo: the spectrum is heavy-tailed everywhere (rank90 is a third of M, give or take — never low-rank in the "top ten modes suffice" sense), and the leading eigenvector is close to the uniform vector nearly everywhere (u-overlap 0.53–0.99, strongest for the Gemma/llama kernels). The power-law exponent is remarkably insensitive to model size within language — α spans just 0.46–0.75 from 14M to 8B parameters, across three model families and two completely different probe-set designs — while the image kernels run steeper (α ≈ 0.8–1.2). The apparent outliers are estimator stories, not model stories: pythia-160m's α = 0.46 comes from the noisiest instrument in the table (2 seeds, early validation-era chains), and gemma-1b's v1 kernel steepening to 1.06 is pure under-sampling (§2).

§4What preconditioning does: flatten

We have three independent versions of "the same object, with and without a preconditioner": the pythia-14m sampler A/B (SGLD vs RMSProp-SGLD, both at their own calibrated step size), the iGPT-S Fisher-tether control, and the exact Grams G → Gpre at three models. All of them move the same direction:

Three panels: pythia-14m K vs K_pre spectra; iGPT-S full 2x2 spectra; dumbbell chart of rank50/M moving right under preconditioning for five instances.
Fig. 3 · Preconditioning flattens the spectrum, in every instance we have. Left: pythia-14m gold kernels — the RMSProp-preconditioned sampler's kernel needs 107 modes for half its variance where plain SGLD needs 57, with the mid-band slope dropping 0.87 → 0.65. Middle: the iGPT-S 2×2. The kernels and the Grams pair up: K with G (steep, concentrated), Kpre with Gpre (flat, high-rank). Right: rank50/M for each raw → preconditioned pair.

The iGPT-S numbers are the dramatic ones: the Fisher tether takes λ₁/tr from 0.35 to 0.013 and rank50 from 8 to 686 — an ~85× increase in how many modes carry the bulk. This is exactly what the ImageNet experiment concluded by other means: the isotropic kernel is dominated by a few loud common-mode directions (reproducible, semantically crude), and the preconditioner suppresses precisely those, exposing the high-rank semantic structure underneath — at the cost of per-seed reproducibility (2-seed gate 0.94 → 0.28). The same trade shows up in the training-prediction work as raw-covariance K degrading as the optimizer departs from SGD while Gpre is the best rank predictor for every optimizer: the flat, whitened geometry is the one fine-tuning actually moves in.

§5Which pairs share geometry?

Lollipop chart of centered CKA for eight matrix pairs, with 2-seed noise ceilings marked.
Fig. 4 · Centered CKA between pairs, judged against each kernel's own 2-seed noise ceiling (grey ticks) where available. Alignment is pair- and scale-dependent: the theory pair Kpre~Gpre at iGPT-S is the strongest cross-family agreement in the zoo, K~G collapses at gemma-1b, and Gpre~G is high only where the raw Gram is rank-1-dominated. The Kpre~Gpre dot sitting right of its own seed tick is not an error: the comparison uses the 2-seed ensemble kernel, which is cleaner than either seed — Gpre is the de-noised Kpre.

§6Take-aways and loose ends

Analysis: experiments/kernel_spectra_zoo/ in latent-learning (code, SPEC/RESULTS, and the full stats/pairs/fits JSON + eigenvalue arrays; compute_spectra.py generalizes the held-out spectral ablation experiments/training_prediction/ablations/spectral_transform.py — same math, bands adapted to M — and independently reproduces its numbers, the published iGPT Gram spectra, and rmspropsgld's gold cross-sampler CKA). Data: training-prediction grids (results_public/ + held-out 1b), llm_validation pythia-pile kernels, rmspropsgld gold kernels, character-BIF k64 kernels, and arcadia-impact/imagenet-loss-kernel-logs (iGPT-S / Inception-v1 kernels + Grams). Papers: the Loss Kernel, BIF, LESS (Gpre). No GPUs were harmed: sixteen 10,000×10,000 eigendecompositions (~75 s each; the slow part was 21 QR random-basis baselines) ran niced in the background on a 16-core desktop over ~2.6 h.