Escape and commit: an Astra-level loop fix for 1% of the tokens

Animated summary in three parts. First, accuracy bars on 64 practice problems at an 8,192-token budget: base model 18.8%, Astra 45.3%, escape plus commit 64.1%. Second, tokens generated to build the edit: 92.2 million for Astra against 0.83 million, 111 times fewer, in 84 GPU-minutes. Third, three tiles: 64% against Astra's 45% at 8k tokens, 72% against 66% at 32k tokens, and 111 times fewer tokens.

In brief

A reasoning loop is a trap the model has a tiny chance of leaving in each pass. Astra's edit raises that chance only while the model loops, and it also pushes the model to close its reasoning.

Building those two terms directly from the model's own traces beats Astra at 8,192 tokens (paired p = 0.004) and matches it at 32,768, with about 1% of the generated tokens.

Small reasoning models often fail by looping. They repeat a block of their own reasoning until the token budget runs out, and the answer never arrives. Two weeks ago, Takehi, Teoh, Zhang and Khattab showed that a frontier model, GPT-6 Astra, could fix this in Qwen3.5-0.8B by editing its weights directly, with no training. Astra changed 131,072 weights in two MLP matrices and took MATH-500 from 7.9% to 48.1%. It needed 50 forward passes and about 20 hours to get there.

Several groups have since shown that the frontier model is not needed (AHA!, CLC-sel, a linear program). I asked a different question. Why does the edit work? The answer turned out to have two parts, and building an edit from both parts gives Astra-level accuracy for about 1% of the tokens Astra generated.

Schematic of a ball on a curved landscape. In the base model the ball sits in a deep well labelled loop. With the escape term the well is lifted and the ball wanders on a bumpy plateau labelled dithering. With the commit term the landscape tilts and the ball rolls into an exit labelled concluded.
The two terms, as a schematic. The escape term lifts the loop well only where the model loops. The commit term tilts the landscape toward closing the reasoning.

What the edit does

Astra's edit touches 64 columns of mlp.down_proj in layers 15 and 19. Each column is a neuron's write into the residual stream, and each one is replaced by itself minus six times its component along a single direction u. Fitted on the released weights, the factor is 6.000 on every column, between 5.991 and 6.007. A neuron that used to push along u with gain +1 now pushes with gain -5. The edit does not delete the push. It reverses it.

The 64 columns are not arbitrary. They are the neurons that write most along u while the model loops. They carry 78% of the MLP's write along u in loops at layer 15 and 90% at layer 19, and they write about five to seven times more during loops than during productive reasoning. So the reversed push is large exactly when the model loops and small otherwise. On the vocabulary, the loop side of u ranks list restarts and hesitation tokens ("...*", "but rather", "still"), and the other side ranks tokens that commit to content (" thus", " result", " yields").

Two bar charts, one per layer, of the MLP write along u in loop windows and productive windows. As beta grows from 0 to 6 the loop bars go from +0.51 to -1.86 at layer 15 and from +0.75 to -3.32 at layer 19, while the productive bars only go from +0.16 to -0.34 and from +0.19 to -0.41.
Write of the MLP along u, in windows where the base model loops and windows where it reasons productively. Dashed outlines are the values before the edit.

A loop is a trap with an escape rate

In an established loop of the base model, every token is nearly certain: the mean log-probability is -0.0001 nats per token over periods of about 55 tokens. Leaving the loop requires one improbable token somewhere in a period, so the chance of escaping per period is a sum of very small terms. Measured over 24 real loops, the median is 0.4%. That means about 260 periods, roughly 14,000 tokens, before the model leaves, which is more than the budget.

Repetition also deepens the trap. Feeding the model two lines of its own reasoning repeated k times, the mean log-probability of the k-th copy goes from -0.76 for the first copy to -0.03 by the eighth. This is the self-reinforcement effect Xu et al. described in 2022. A loop becomes permanent with positive probability when the chances of escaping shrink fast enough to add up to a finite total. Astra's edit puts a floor under them. With the edit, the copy curve stops at about -0.17 nats per token instead of going to zero, and escape from the same established loops goes from 0.4% to 99% per period.

The same reading explains a sharp threshold in the dose. The edit lowers the margin of the loop token by an amount that grows with the dose, and the escape rate of a period is a sum of terms exponential in that margin. Escape should therefore switch on as a double exponential, the way a particle escapes over a barrier. Applying the same kind of edit at layers chosen from that criterion, the escape per period is 1.0% at a dose of 2, 23% at 3 and 97% at 4. The law fitted through the doses of 3 and 4 puts the threshold at 3.5. It gives 1.9% at a dose of 2, where 1.0% is measured, and full escape from 5 on, as measured.

Line chart of escape per loop period against the dose alpha. Escape stays near 1% up to alpha 2, rises to 23% at 3 and 97% at 4, and is 100% from 5 on. A fitted double exponential curve passes through the points with a threshold at alpha 3.5. The base model sits at 0.6%.
Escape per loop period on established loops of the base model, teacher forced, against the dose of the escape term. The curve is the double exponential fitted through the doses of 3 and 4.

Escaping is not concluding

An edit built only for escape removes as many loops as Astra's, down to 12.5% of 64 practice problems at an 8,192-token budget. Its accuracy is 35.9%, against 45.3% for Astra. The missing part shows up in what the traces do after they leave the loop. They dither, writing "Wait... So 23.00. But wait..." until the budget runs out.

Astra's edit does something the escape-only edit does not. It raises the probability of closing the reasoning, the </think> token at the start of a line, by about 3 nats late in a trace. The escape-only edit lowers it slightly. So I fitted a second term of the same form, pushing from the dithering state toward the state just before </think>. A scan over layers 12 to 23 picked layers 19 and 15. Those are Astra's layers, found without using its edit. In this reading, Astra's single edit carries a commit drift at those layers, and its escape effect comes through the same neurons.

Stacked horizontal bars of loop, cut and finished shares for four models on 64 problems. Base model: 64% loop, accuracy 18.8%. Astra: 12.5% loop, accuracy 45.3%. Escape term only: 12.5% loop but 55% cut, accuracy 35.9%. Escape plus commit: 1.6% loop, 67% finished, accuracy 64.1%.
Outcomes at an 8,192-token budget on 64 practice problems: share of traces that loop, are cut at the budget or finish, and accuracy.

With both terms, accuracy at the 8,192-token budget is 64.1% against Astra's 45.3%. On the same problems, 14 are solved only by the two-term edit and 2 only by Astra (exact McNemar p = 0.004). The commit term was fitted on traces from half of these problems. On the other half the result is the same: 62.5% against 43.8%.

At Astra's budget

Astra was evaluated with 32,768 tokens, where a slow model also has time to finish. I ran both edits on 32 practice problems never used anywhere in this work, 16 from GSM8K and 16 from MATH, graded with math-verify. The two-term edit reaches 71.9% and Astra 65.6%. On GSM8K both reach 75.0%. On MATH it is 68.8% against 56.3%.

Grouped bar chart of accuracy at a 32,768-token budget. GSM8K: Astra 75, escape plus commit 75. MATH: Astra 56, escape plus commit 69. All 32: Astra 66, escape plus commit 72. Paired, 6 problems are solved only by the two-term edit and 4 only by Astra, p = 0.75. Loops 6% against 22%, mean tokens 13.9k against 17.2k.
Accuracy at a 32,768-token budget on 32 fresh practice problems, with the paired counts, the loop share and the mean length of a trace.

Paired by problem, 6 are solved only by the two-term edit and 4 only by Astra. With 32 problems that difference is not significant (p = 0.75), so the honest reading is a match. The two-term edit loops less, 6% of traces against 22%, and uses 19% fewer tokens.

The public benchmark gives the same reading. On 64 problems drawn at random from MATH-500, the two-term edit solves 48.4% with one sample per problem. Astra's own released evaluation gives 51.2% on the same problems, averaged over four samples. The difference, −2.7 points with a 95% interval from −12.9 to +7.4, is within the noise of a single sample, whose standard deviation here is 3.4 points.

When the two-term edit finishes a MATH-500 trace, its answer is right 84% of the time, against 81% for Astra. The points it gives back come from the hardest problems, at level 5 and in intermediate algebra, where it reasons for the whole budget without concluding. Astra fails most of those problems too. The commit term was fitted on GSM8K traces, which conclude much earlier, so a commit term fitted on MATH traces is the natural next step.

What sampling shows

The escape model above is measured with teacher forcing, on a fixed context. To check it on real generations, I sampled 8 continuations from inside each of 24 established loops with the release's sampler, at every dose. The probability of staying on the loop path, computed as the product of the sampler's probabilities along it, matches the sampled share to within 0.012 at every dose and for every edit. Along a fixed path that product is exact, so the model needs no assumption of independence between tokens.

Sampling also shows something teacher forcing cannot. Leaving the loop path is not the same as escaping the loop. At dose 5 every sample leaves the path, and 79% of them fall back into the same loop within 1,024 tokens. With the escape term alone, 55% of the samples that leave come back, and 49% under Astra's edit. With the commit term added, 26% come back, and 74% of all samples escape for good. CLC-sel, which is essentially a single commit direction, escapes most often, at 82%. The commit term is what makes an escape stick.

What it cost

Astra generated 92 million tokens before it froze its edit. The two-term edit needs 0.83 million: the base model's traces on 48 problems, and the escape-edited model's traces on 64. Everything else is teacher-forced reading. On one RTX 4080, the whole construction took about an hour and a half, with no frontier model and no gradients.

Limits

This is one model and one failure mode. At the long budget the comparisons rest on 32 fresh practice problems and 64 MATH-500 problems. That is enough to call the two edits level and not enough to rank them. AHA! and CLC-sel also report results above Astra's at 32,768 tokens on full benchmarks. CLC-sel releases its edit, and its accuracy on the same problems will follow. AHA! releases no edit.

An earlier version of this post reported a precursor before loops: at layer 11, the variance and the autocorrelation of the projection on the loop direction rise over the 2,000 tokens before a loop starts. Near repetition explains that rise. Positions that repeat a 16-token span from the previous 1,024 tokens already make up 5.7% of a trace 2,000 tokens before an exact loop, against 0.8% in traces that finish, and once that is accounted for the residual effect is not significant. The practical reading is simpler: counting repeated spans anticipates a loop about 2,000 tokens ahead.

All posts Home page