Preprint

A Lead Time Is Not a Detection

Auditing Grokking Predictor Signals

Under a firing rule fixed before looking, the Fourier signals warned before grokking on every seed, weight norm never fired, and effective embedding rank arrived after the event on five seeds out of eight.

PDF: to addCode not public

Preprint. S. Singh, 2026. Not peer reviewed.

0.000.250.500.751.001101001,00010,00040,000training step (log scale)accuracy(a + b) mod 97, seed 0memorised 500grokked 4,1003,600 steps of memorising without generalising
Train accuracy reaches 1.0 by step 500. Test accuracy sits at chance for thousands of steps, then jumps at 4,100. The shaded band is the gap the paper is about.Redrawn for this page from logs/single.csv
8/8Seeds where the Fourier signal family led the test-accuracy jumplogs/lead_times_summary.csv
2,550 to 2,650Median steps of lead for the three Fourier signalslogs/lead_times_summary.csv
0/8Seeds where weight norm fired at alllogs/lead_times_summary.csv
5/8Seeds where effective embedding rank fired after grokking, not beforelogs/lead_times.csv
5/5Replication seeds on modular subtractionlogs/lead_times_sub_summary.csv

The finding

A small transformer learning modular addition memorises its training set within a few hundred steps, then sits at chance on held-out data for thousands more, then suddenly generalises. Several signals have been proposed that are supposed to warn you this is coming.

I fixed the rule for what counts as a warning before looking at any of the results: a signal has to move five standard deviations away from its own early-training baseline and stay there for three consecutive checkpoints.

Under that rule, the three Fourier measures warned before the jump on all eight seeds, with a median lead of roughly 2,600 steps. Weight norm, which is widely cited, never fired once. Effective embedding rank fired on five of eight seeds only after generalisation had already happened, which is not a warning at all.

Why it matters

A lead time is a number you can always produce. Take any curve, pick the moment it crosses some line, and subtract. You get a positive number, and a positive number looks like a result.

If the threshold is chosen after seeing where the jump was, the number measures your freedom to choose, not the signal. The gap between the two is the whole subject of the paper: one of these signals survives a rule it did not get to pick, and the others do not.

Method

Where grokking happens at all, across weight decay and the fraction of the data used for training. The sweep that fixed the setting used for the seed study.Source: figures/phase_diagram.png, from logs/sweep.csvdownload PNG

A one-layer transformer, 128-dimensional model width, four heads, trained on (a + b) mod 97 with 30% of the pairs used for training. 223,360 parameters, 12,000 steps, weight decay 1.0, on CPU. The sweep above fixed the weight decay and training fraction, because grokking does not happen everywhere in that space.

Six signals were tracked at every hundredth step: weight norm, embedding norm, effective embedding rank, and three Fourier measures of the embedding spectrum. The firing rule was written down first and applied to all of them identically.

Results

Lead time per seed, modular addition01,0002,0003,0004,0005,000steps of warning before the test-accuracy jumpembed_eff_rank3/8embed_norm8/8fourier_eff_freqs8/8fourier_entropy8/8fourier_top_k_power8/8weight_normnever fired on any of the 8 seedseach dot is one seed; red dots fired after the jump, not before
Lead time for every signal on every seed. Each dot is one seed. Red dots fired after the jump rather than before it, which is how effective embedding rank can fire on eight seeds and still be late on five.Redrawn for this page from logs/lead_times.csv
0.000.250.500.751.0003,0006,0009,00012,000training stepaccuracyfired 1,600grokked 4,100
train accuracy test accuracy signal fires test accuracy crosses 0.5

2,500 steps of lead on seed 0: fired at 1,600, grokking at 4,100.

Training and test accuracy for one seed of modular addition, with the step the chosen signal fired and the step test accuracy crossed 0.5. The shaded band is the lead time. A band to the left of the grokking line is a warning that arrived early; a signal that fires after the line arrived late.Source: logs/predictor_seed0.csv to predictor_seed7.csv and logs/lead_times.csv
Lead time for each candidate signal on modular addition, across eight seeds. A positive value is a warning that arrived before the test-accuracy jump.Source: figures/lead_times.png, from logs/lead_times.csvdownload PNG

Weight norm fired on zero of eight seeds. It is the signal most often quoted, and under a rule it did not choose it detects nothing.

The three Fourier measures each fired on eight of eight, with median leads of 2,550, 2,650 and 2,650 steps. Embedding norm also fired on all eight, with a shorter median lead of 1,700.

Effective embedding rank is the interesting failure. It fired on eight seeds, so a table of firing counts would make it look successful, but on five of those the firing step came after the test-accuracy crossing. Averaging its lead times without checking the sign would have produced a positive mean and a false claim.

Every tracked signal over one run: weight norm, embedding norm, effective embedding rank, and the three Fourier measures. The point of the paper is which of these cross a threshold before the jump and which do not.Source: figures/predictor_signals.png, from logs/predictor.csvdownload PNG
The embedding spectrum before and after the jump. Energy concentrates into a few frequencies, which is what the Fourier signals are measuring.Source: figures/fourier_spectrum_beforeafter.png, from logs/mechanism_fourier.npzdownload PNG

What I checked that could have broken it

The obvious worry is that the result is specific to addition, so I repeated the whole measurement on modular subtraction with five fresh seeds. Weight norm again fired on zero of five. The Fourier measures again fired on five of five, with longer median leads of 4,600 to 4,900 steps.

The same measurement repeated on modular subtraction across five seeds, as a check that the result was not specific to addition.Source: figures/lead_times_sub.png, from logs/lead_times_sub.csvdownload PNG

The second worry is the definition of grokking itself. The step at which a run counts as grokked depends on the accuracy threshold, and the lead times shift with it. The lead-time study uses a test accuracy of 0.5, and both thresholds are recorded in the run files so the choice is visible rather than buried.

Limits

One task family, one architecture, one model size. Modular arithmetic is where grokking is easiest to produce and study, and nothing here shows the same signals behave this way on a real dataset.

Eight seeds is enough to separate zero from eight. It is not enough to put a confident interval on a median lead time, and the spread across seeds is wide: the standard deviation on the Fourier leads is over 1,100 steps.

The Fourier measures are also the signals most obviously related to the mechanism people believe drives grokking on this task. That they work here is a smaller claim than it might look: they were the best guess going in, and they were tested on the task that guess was made for.

From the Rigor Log

weight_norm fired on zero of eight seeds

Firstweight_norm is cited as an early-warning signal for grokking, with a reported lead time.

SecondUnder a detection rule fixed before I looked at the results, weight_norm fired on 0 of 8 seeds. The Fourier signal, under the same rule, led on 8 of 8 by a median of about 2,600 steps.

Paper, pre-registered firing rule: 5 sigma over 3 checkpoints

A second predictor that only worked in hindsight

Firstembed_eff_rank looked like it fired early, which would have given me a second working predictor and a much nicer paper.

SecondUnder the same pre-registered rule it fired on 5 of 8 seeds, but after grokking had already happened. An early warning that arrives late is not an early warning.

Paper, section on predictor screening

The whole Rigor Log

Files

The result artefacts these pages are built from. Every number above is read from one of these.

  • logs/lead_times.csvLead time per seed per signal, the table the headline numbers come from2 KB
  • logs/lead_times_summary.csvLead times aggregated over the eight addition seeds344 B
  • logs/lead_times_sub_summary.csvThe same, for the five subtraction seeds357 B
  • logs/predictor_seed0.csvPer-step accuracy and every tracked signal, one file per seed21 KB
  • logs/predictor_seed0.jsonRun configuration and summary, including the firing rule2 KB
  • logs/single.csvThe 40,000 step run behind the headline curve24 KB
  • logs/sweep.csvWeight decay and training fraction sweep behind the phase diagram1 KB
  • logs/mechanism_fourier.npzEmbedding spectra before and after the jump44 KB
  • logs/pipeline.logFull run log97 KB

Stack

  • PyTorch
  • NumPy
  • Matplotlib
  • LaTeX