kevtree.net

Weight-Space Jenga®

Astra improved an SLM's mathematical aptitude by editing its weights directly. I reproduced the patch, found collateral damage, and worked with Astra to repair it. The correction helped on a task it wasn’t calibrated on while retaining much of the measured math gain. Tracing the repair exposed a positional trade-off hidden by accuracy alone.

Slide a block out, then place it on top. Help has the full controls.

Loading the tower…

Preface

Last week, on November 2, 2026, Anthropic’s revised S-1/A filing made headlines for hinting that RSI may be around the bend. That same day, Rikiya Takehi and collaborators published Sparks of Weight-Space Programming, which quickly circulated online… it’s a fascinating demonstration of frontier intelligence’s (in this case, GPT-6 Astra’s) ability to understand and manipulate other neural networks.

I spent the last year out in San Francisco working firmly on the applied side of things. In a bit of a return to form, I am back east and re-embracing intellectualism at Yale. I’ve been fortunate to retain quite a bit of optionality in how I spend my twenties, and now find myself pulled between pushing the frontier of intelligence itself and working on the substrate it depends on (think chips, energy, & policy).

If RSI is truly near, then my friends are likely right when they say that starting down the research route this late in the game may pay few dividends. But, even supposing that’s a foregone conclusion, I’ve decided to develop a “back-of-the-napkin” competency in both so that I may see for myself and ultimately make a more informed decision.

As it comes to frontier intelligence, I see back-of-the-napkin competency as A) an understanding of the fundamentals the field is built on, B) enough grounding to ask useful questions, and C) the ability to steer the increasingly capable models we have at our disposal through scoped investigations with a healthy enough dose of discipline and skepticism to keep cognitive surrender at bay.

Of course, a pen and a napkin will only go so far with that nowadays; a few banked resets on a ChatGPT Pro subscription and a couple hours on an H200 took me the rest of the way. I thought weight-space programming was as good a place as any to start with.

What follows is a small case study co-written with Astra on the collateral effects of a weight edit made by Astra, the trade-offs involved in repairing them (also via Astra), and how much of that behavior we can explain through the model’s internal computations. I wanted to see what applying existing techniques to a particular patch would reveal, and dip my toes into mechanistic interpretability and, more broadly, alignment science!

The patch in question

In one of the CSAIL group’s experiments, they gave Astra access to a small language model’s weights, a Python environment, practice problems, and a limited budget of forward passes. Astra could inspect the model and change tensors directly, but was expressly not allowed to train the model with gradient descent. Of note is that the subject model was run and evaluated with "thinking" enabled (i.e. allowing it to produce a reasoning trace before its final answer). Both modes are supported, but this model defaults to non-thinking.

The target was Qwen3.5-0.8B. It often spent its entire answer budget looping. Astra was capable of tracing this to a direction written by two MLPs, at layers 15 and 19, and edited selected columns in their output matrices. With a 50-pass budget, the published edit raised MATH-500 accuracy from 7.9% to 48.1%. Instruction-following improved too.

I reproduced the released patch first. In an initial 25-question math pilot, with four responses per question, the original got 14/100 right and the patch got 47/100. An improvement in behavior was readily apparent.

Figure 1: Sample MATH-500 responses

Five selected examples where the patch succeeded and the original ran out of tokens (not a representative sample), holding settings constant.

Showing example 1 of 5: Prealgebra.

If 10x − 10 = 9990, what is x equal to?

Expected answer:4
…
Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait, could it be 10x - 10 = 9990? Wait
To find the value of x that satisfies the equation 10x - 10 = 9990, follow these steps: 1. Isolate the exponential term: Subtract 10 from both sides of the equation to move the constant term to the left side: 10x = 9990 + 10 2. Perform the addition: Calculate the sum on the right-hand side: 9990 + 10 = 10000 So, the equation becomes: 10x = 10000 3. Solve for x: Observe that both sides of the equation contain the number 10 raised to some power. To compare them directly, we look at the powers of 10: 10000 = 104 Now equate the exponents of the bases (which are identical, 10) on both sides: 10x = 104 For two exponential expressions with the same base to be equal, their exponents must be equal. Therefore: x = 4 Alternatively, you can use logarithms to verify: 10x = 104 ⇒ x · \log10(10) = 4 ⇒ x · 1 = 4 ⇒ x = 4 The value of x is 4. 4

Earlier, I had been reading about the degradation that can occur when a pretrained model’s weights are edited. Collateral damage from model editing is already well documented. The authors had evaluated their patch across the board via eight benchmarks: MATH-500, GSM8K, AMC23, Minerva Math, OlympiadBench, MMLU-Pro, GPQA Diamond, and IFEval. Those results did show gains beyond the math practice problems Astra had seen... but, higher aggregate scores can potentially conceal individual abilities degrading, so I began poking around to see if I could surface emergent failures.

Locating the damage

My first thought was that suppressing pathological loops might also interfere with useful repetition. I experimented with tasks variously involving sequences of state changes, ordered arithmetic, and repeated output, and some simpler controls. Unfortunately, the original model struggled with the majority of these tasks; a clearer way to distinguish damage caused by the edit from limitations the model already had was necessary.

I then narrowed the question: would the patch preserve correct answers on a small, precisely defined task? At Astra’s suggestion, I chose short lookup records — four keys, four digits, and a request to return the digit assigned to a named key. Qwen wouldn't need any outside knowledge (let alone arithmetic) as the answers were supplied directly:

Prompt

Record: C=0, B=2, A=1, D=3. Retrieve the digit assigned to C. Output that digit and nothing else.

The answer is (evidently) 0. By varying the digit assignments, entry order, queried key, and two fixed phrasings, I generated and tested 4,608 prompts.

The initial comparison examined each model’s first-token prediction in an FP32 reference implementation. The patch fixed 69 answers but broke 38. Overall accuracy increased, from 4,327/4,608 to 4,358/4,608 — or 93.90% to 94.57%. So, aggregate improvement and collateral damage were both apparent.

I then reran all 4,608 prompts in a BF16 reference implementation (to match the precision used for our full-response generation runs) and checked whether the failures persisted... the original scored 4,358/4,608 and the patch 4,378/4,608, with 61 fixes and 41 initial regressions. I repeated all 41 cases twice, running each prompt individually. To qualify, the original had to remain correct and the patch wrong in the initial batch and both repeats, with a unique highest-scoring token each time. A preselected control (the same assignment and query with the entries reordered) also had to remain correct without ties under both checkpoints. In all, seven cases passed, each of which also had appeared among the original 38 FP32 regressions.

Figure 2: A small score change flips the answer.

Five selected prompts from the BF16 reference test, matching Figure 3. A positive lead means the correct digit wins; a negative lead means it loses.

Example 1 of 5. Retrieve C; expected 0. Original lead +0.125; published patch lead −0.250 logits.
C=0 (queried key)
B=2
A=1
D=3

Retrieve C

Expected 0

Correct digit’s lead over its strongest rival (logits)

The score for 0 stayed at 23.75. The score for 1 rose from 23.625 to 24. The rival took the lead.

The other 34 BF16 cases were not necessarily inconsistent. Every excluded case encountered a tie for the highest score somewhere; 15 nevertheless repeated exactly the same predictions for both checkpoints across all three observations. I simply chose to exclude them because I wanted examples whose correctness difference did not depend on how tied BF16 scores were resolved.

I took the seven qualifying examples into vLLM and allowed complete responses. Five stable failures survived: the original returned the correct digit and the published patch a different digit in both the initial greedy run and its individual repeat. Of the other two examples, one failed initially but answered correctly on repeat; the other answered correctly in both runs.

Figure 3: A lookup should be simple.

Five selected non-thinking failures, confirmed in two complete-response greedy runs.

Example 1 of 5, non-thinking. Retrieve C; expected 0. Original model: 0, 2 of 2 runs correct. Published patch: 1, 0 of 2 runs correct.
C=0 (queried key)
B=2
A=1
D=3

Retrieve C

Expected 0

Original model

Final answer: 0
Correct2/2 runs correct

Published patch

Final answer: 1
Incorrect0/2 runs correct

An important catch: I started with non-thinking requests so I could compare the models’ immediate answer-token predictions, without a reasoning trace in between. With thinking enabled, the patched model answered all seven candidates correctly in both greedy runs. Thinking mode does not load a different set of weights, but does change Qwen's prompt and allows a reasoning segment before the final answer.

We now had reproducible failures under specified non-thinking settings. Of course, this was not evidence that the paper’s thinking-mode math improvement was wrong, nor a claim that Astra had predicted these failures of its own accord... my next question was whether Astra could repair that damage without undoing the original benefit.

Astra’s mixed repair

I gave Astra an environment with the five failures, the original and patched weights, internal measurements, and access to GPU tests. I also supplied code implementing activation-subspace protection, allowing Astra to reduce the patch’s effect along internal directions identified from selected examples. Astra chose the calibration examples, token positions, and protection settings.

Projection-based protection appears in AlphaEdit, and restoring capabilities after an intervention has precedents such as L2W. Having looked into it, I wanted to see what Astra could do with that tool and this particular damage.

Its first attempts exposed a trade-off. For reference, the original model answered 1/32 correctly and the published patch 16/32 on the same development math questions and settings. Broad protection at both edited layers fixed all five failures, but scored only 10/32 on those questions. Protecting only the final prompt position at both layers brought that score to 15/32, but fixed just one of the five failures.

Figure 4: Choosing what to protect.

Combining broad protection at layer 15 with narrow protection at layer 19 fixed all five known lookup failures and retained more math accuracy than either uniform approach. Three of five candidates are shown, in test order; these development results were used to select the repair.

Protection choices and development results for three repair candidates
Model / candidateLayer 15Layer 19Lookup / 5Math / 32
Original——5 out of 51 out of 32
Published patch——0 out of 516 out of 32
1. Broad, not selectedAll positionsAll positions5 out of 510 out of 32
2. Narrow, not selectedFinal onlyFinal only1 out of 515 out of 32
3. Mixed, selectedAll positionsFinal only5 out of 518 out of 32

Excerpt from Astra before testing the mixed candidate:

“Candidate 3 tests upstream-record protection at layer 15 (all 220 rows, rank 128) while keeping layer 19 protection narrowly at the five answer vectors (rank 5). This retains the larger layer 19 patch components that broad protection may have weakened.”

Astra then tried treating the two layers differently: broad protection at layer 15, narrow protection at layer 19. That candidate fixed all five failures, answered 55/64 development lookups correctly, and scored 18/32 on development math. I froze the selected checkpoint and continued on to evaluate it with additional problem types.

The subsequent screen tested 2,048 questions spanning direct lookups, conditional values, two-hop references, and variable updates. It found 132 repeat-confirmed cases where the original answered correctly and the published patch did not. Our frozen correction repaired 93, compared with 23 for simple weakening and nine for generic protection.

Weakening simply keeps 75% of the published weight change. Generic protection uses the same projection idea, protecting a single direction at each layer, calibrated on 32 zero-answer lookups... both served as controls to Astra’s targeted work.

Figure 5: Recovering 93 of 132 broken answers.

New problem types, the same frozen repair. Counts show answers recovered on both runs, among repeat-confirmed losses caused by the published patch.

Recovered / confirmed failures. Bars show the share recovered.
Task familyOur correctionWeakeningGeneric protection
Direct lookups40/4410/443/44
Conditional values17/251/250/25
Two-hop references29/479/473/47
Variable updates7/163/163/16
Total93/13223/1329/132

Recovery counts exclude 28 new first-pass failures introduced by our correction relative to the published patch. On overall variable-update accuracy, generic protection did better: 208/512 versus our 186/512.

The correction was not uniformly better. It introduced 28 new first-pass failures relative to the published patch; generic protection also performed better specifically on variable-update questions: 208/512 versus our repair’s 186/512. The original model fell below the arbitrary competence threshold I predeclared for all three new tasks... these results then more suggest transfer than a preservation of reliable abilities. Still, the repair helped beyond its five calibration examples. Now, how far will it generalize?

An interesting transfer

At this point, I needed to see whether the patch’s collateral effects extended to a thinking-mode workload. The original paper evaluated Qwen with thinking enabled, and in our own tests the published patch had answered all seven lookup candidates correctly in that mode (including the five it consistently failed without thinking). I therefore turned to a different task: copying a string exactly.

Prompt

Copy the text between the markers exactly. Output only that text.
<start>3hCZqFrd<end>

On 64 fresh strings, each sampled with four fixed seeds, the original copied 218/256 correctly. The published patch copied 141/256. Our correction copied 217/256. It recovered 85 responses the patch got wrong while losing nine the patch got right.

This was interesting: the correction had already been frozen before these copying failures were investigated. It had been developed around non-thinking lookups. No copying examples were used to revise it after the result appeared.

Figure 6: A lookup repair helps a different task.

The repair was frozen before this thinking-mode copying test.

Copy exactly: 3hCZqFrdSelected example · 1.5 presence penalty
OOriginal3hCZqFrdExact copy
PPublished patch3hCZqFOmitted rd
RMixed repair3hCZqFrdExact copy
WWeakening3hCZqFrdExact copy
GGeneric protection3hCZqFOmitted rd

Presence penalty 1.5: 64 strings · 4 fixed seeds · 256 responses per model

The repair recovered most of the loss; weakening was close.

Presence penalty
  1. OOriginal218/25685.2%
  2. PPublished patch141/25655.1%
  3. RMixed repair217/25684.8%
  4. WWeakening213/25683.2%
  5. GGeneric protection147/25657.4%

A couple qualifications. My arbitrary predeclared requirement was that the original copy at least 240/256 correctly... it reached 218, so that stronger confirmation gate did fail. Second, weakening was close to our correction: 213/256. Copying alone did not establish a clear advantage for the targeted approach.

The generation settings mattered as well. The primary condition used a presence penalty of 1.5, also used in the published thinking-math evaluation (discouraging reusing tokens already generated). With it removed, using two seeds per string instead of four, the original scored 70/128 while the published patch scored 84/128: their ordering reversed. The correction still scored 112/128, against weakening’s 109/128.

So, we can’t claim that the patch makes thinking-mode copying worse in every configuration, or estimate how often this would happen in production. Nor does transfer by itself establish that lookup and copying share the mechanism we were protecting. What we have is a measured interaction between an edit, a task, and a generation setting.

Preserving the benefit

I ran all five checkpoints on the full 500-question MATH benchmark, four responses per question, using the published thinking-mode protocol and grader.

Figure 7: Most of the math gain remained.

500 MATH-500 questions · 4 thinking-mode responses per question · 2,000 responses per model.

  1. OOriginal163/2,0008.2%
  2. PPublished patch1,027/2,00051.4%
  3. RMixed repair962/2,00048.1%
  4. WWeakening944/2,00047.2%
  5. GGeneric protection1,010/2,00050.5%

The published patch gained 864 correct responses over the original. Our correction kept 799 of those additional correct responses in aggregate: 92.5% of the measured gain.

It still scored 65 answers below the published patch, or 3.25 percentage points. The correction scored 18 answers above weakening, but the paired 95% interval for that difference was −1.15 to +2.95 percentage points... so, no clear math advantage over weakening. Generic protection kept more math performance than our correction did.

Of course, the useful result is the combination: a large advantage on the related-task failure subset, transfer to the copying workload, and retention of most of the math gain.

Testing the recipe

This was all very encouraging. The end I was pursuing was a mechanistic explanation of the trade-off/repair. First, though, there was an explanation I wanted to rule out. Had Astra found a correction that specifically needed the five failure examples we provided it, or would the same recipe work with ordinary examples of the task?

I held the repair recipe fixed: the same layers, token positions, numbers of protected directions, and protection strengths. I then built five alternatives using lookup examples that both the original and published models already answered correctly. Only the calibration examples changed. The alternative selected on development lookups was called C2. It also fixed all five historical failures.

Figure 8: Same recipe, different examples.

The mixed repair used five known failures; C2 used five already-correct examples. Layers, token positions, ranks, and strengths stayed fixed. Correct / tested. Bars show accuracy within each task.

EvaluationMixed repairC2
Known lookup failuresHistorical examples5/55/5
Fresh lookupsIndependent final panel918/1,024925/1,024
CopyingReused panel217/256219/256
Math pilot50 questions × 4 responses106/200103/200

C2 scored slightly higher on the final lookup panel and the reused copying panel, and slightly lower on the small math pilot. The primary lookup comparison, against the average of all five alternatives, placed the entire uncertainty interval within our predeclared two-percentage-point equivalence range. Copying passed its check against losing more than five percentage points relative to our repair, without establishing a clear winner. The math pilot remained inconclusive.

The exact failure examples were not needed to reproduce these lookup rescues once the recipe had been chosen. To be clear, C2 inherited the recipe Astra developed while investigating the damage; it was not an independent repair designed without that investigation. But, calibrating on failure examples had not made Astra’s initial repair uniquely effective on these lookups.

This appeared far less surprising after some thought, and a good case-in-point for the cognitive surrender I mentioned earlier. Astra had framed this outcome to me as surprising, and I had largely accepted that framing. But, activation-subspace protection operates on internal directions extracted from examples; whether an example was answered incorrectly is not itself part of the projection. Indeed, I myself had seen in the AlphaEdit the usage of projection to protect representations of existing knowledge, without first requiring observed failures. It then seemed entirely plausible that already-correct lookups could supply relevant directions too.

In any case, what remained unresolved was what these corrections were actually protecting. I moved on to a causal investigation.

Borrowing the repair’s keys

I returned to the five historical lookup failures. The published patch answered them incorrectly; the mixed repair and C2 answered them correctly... what had changed within the model, and did our two corrections work through the same route?

I’m new to this sort of thing, and Astra supplied much of the initial intuition. We started by testing one part of the mixed repair in isolation. The model keeps an internal representation at each token position, so we could distinguish the positions containing the lookup record (i.e. the "C=0, B=2, A=1, D=3" portion of the prompt) from those containing the instructions (i.e. the "retrieve C" part). At layer 15, we used the repair’s MLP calculation only for the record positions, leaving the published model’s calculation elsewhere. We then let the remaining layers run normally. This temporary intervention recovered four of the five correct digits in our FP32 first-token test.

To investigate exactly how it helped, we ran each prompt with and without the intervention and saved the internal outputs of the later layers. We compared those outputs and measured how their differences contributed toward scoring the correct digit above the published model’s wrong answer. Layer 19’s attention output stood out. We reran two rescued examples, this time replacing that output with its saved, uncorrected version before continuing through the remaining layers. Both answers became wrong again. Something important to the rescue passed through layer 19’s attention; a similar test showed that layer 18 also mattered.

We next opened up layer 19’s attention calculation. It combines three ingredients: routing probabilities, which determine how much each token position draws from other positions; value vectors, which contain the information being combined; and an output gate, which scales the resulting signal. We had saved these ingredients from both the published model and the run with our localized correction, so we could mix and match them.

Figure 9: What we swapped.

Swap in routing from the localized correction while keeping the published model’s values and gate. Shown for C=0, B=2, A=1, D=3 · ask C.

Layer 19 · head 2 · final prompt position · FP32
RoutingHow much each position draws from others
Attention · 0–20%
ValuesInformation being combined
Coordinates 0–3
C=0
B=2
A=1
D=3
Published model
GateHow much of the combined signal passes through
Pass-through · 0–100%
Published model
Combine values using routing
Apply gate
Output projection
Routing comes from the published model. Values and gate remain from the published model.

We first gave the published model the corrected run’s routing probabilities while keeping its own values and gate. Then we let the remaining computation continue. All five correct first tokens were recovered. Replacing only the values or gate did not produce the same rescue... this pointed toward a change in how information was routed.

Attention compares a query vector at the receiving position with key vectors at the positions it can attend to. To pin down the routing change further, we therefore tested these separately too: borrowing the corrected keys while retaining the published queries recovered all five answers; borrowing only the queries did not (note that these “keys” are internal vectors, not the literal letters in the record).

For this Qwen model, Layer 19 performs attention through eight parallel heads, each with its own routing probabilities. Our earlier measurements on the two discovery examples pointed to heads 2 and 5. Borrowing just those two heads’ corrected probability maps, across all prompt positions, recovered all five answers. Borrowing the other six heads’ maps recovered none. We had narrowed the rescue to a particular part of the attention calculation.

Figure 10: Following the repair’s effect.

A localized layer-15 correction led us to layer-19 attention routing. These are separate FP32 first-token interventions on historical failures, not successive versions of a repaired model.

Localize the correctionLayer 15
Apply it only at the record positions
Test a downstream mediatorLayer 19
Restore the published attention output
Before
After

Both discovery rescues disappear. Layer 18 also mattered.

Separate the routingLayer 19

Borrow corrected routing; keep the published values and gate.

All eight heads
Heads 2 and 5 only
Other six heads only

Promising. Till now, we had been tracing a localized layer-15 intervention, not the full mixed checkpoint. We therefore repeated the key experiment using the actual repair as donor: could the published model borrow just its layer-19 record keys and recover the answers? The recipient kept its own queries, values, gates, other keys, and weights, then continued computing normally.

All five answers became correct. Reversing the swap — giving the repaired model the published model’s record keys — brought back all five wrong digits. Both directions held in two complete, non-thinking BF16 runs, with all three control prompts still correct. One forward rescue did have tied highest first-token scores.

Figure 11: Borrowing the full repair’s record keys.

Only layer 19’s record keys change source. Counts show correct complete answers on five historical prompts; both swap directions repeated in non-thinking BF16 runs.

Published patchBorrow the mixed repair’s record keys.
Before
After
Mixed repairBorrow the published patch’s record keys.
Before
After

C2 passed the same causal test in the FP32 reference: its layer-19 record keys rescued all five answers in the published model, while the reverse swap removed those rescues. Its similar performance was no longer surprising, but this did link the two corrections to the same tested part of the computation. The mixed repair’s record keys also lay close to the original model’s on these examples.

The key experiment revealed the central trade-off: the repair’s record keys favored the first entry, even when another entry was requested. We tested this in a fixed 64-prompt panel varying digit assignments, entry order, and the queried key. Borrowing those keys inside the published model increased the correct-answer margin on 14/16 first-entry requests but decreased it on 41/48 later-entry requests.

In the FP32 first-token reference, the isolated key swap raised accuracy from 61/64 to 63/64, matching the original and repaired models. Both rescued errors requested zero from the first entry. All 48 later-entry answers stayed correct, but most had a smaller lead over their strongest wrong alternative. The higher accuracy concealed this uneven change in the model’s scores.

Figure 12: The key swap favored the first entry.

Borrowing the repair’s record keys rescued two first-entry errors but reduced the correct-answer margin on 41/48 later-entry requests. All 48 later-entry answers stayed correct: improved accuracy concealed a positional trade-off.

Requested entryMean answer-margin change · logits
First entry14 higher · 2 lower
+0.172
Second entry2 higher · 14 lower
−0.099
Third entry2 higher · 14 lower
−0.159
Fourth entry3 higher · 13 lower
−0.126

At the final prompt position, attention to the first digit relative to the other three increased in all 64 prompts in both nominated heads (2 and 5). The raw query-key scores for all four digit positions actually fell; the first entry’s score simply fell less than the others on average. This is a trade-off in the isolated key intervention; other changes in the full repair could reinforce or oppose it.

One architectural detail also constrained the explanation... Layer 19’s attention precedes its MLP, so that layer’s MLP edit cannot change keys already computed in the same forward pass. The altered keys arrive through upstream computation. This is a signal that could carry the rescue; how does it influence the final answer?

Following the signal

Changing the record keys can alter attention at many positions in the prompt. We replayed the resulting layer-19 attention output into the published model at earlier positions only, the final position only, both, or neither. In the FP32 reference, those conditions recovered 1/5, 2/5, 5/5, and 0/5 first-token answers respectively. The final position alone did not account for the rescue; earlier-position computation contributed too.

On the two discovery examples, layer 22’s recurrent mixer had the strongest positive downstream contribution from including those earlier positions. We tested that nomination by exchanging its final-position output between the “final only” and “both” conditions. Giving the two-correct condition the output from the five-correct condition moved it to 5/5; reversing the exchange returned it to 2/5. All three controls remained correct. These swaps showed that layer 22’s final-position output carried an important part of the earlier-position effect on these prompts.

Figure 13: Following the effect downstream.

Earlier and final positions together recovered all five answers. Exchanging layer 22’s final-position mixer output transferred the extra rescues. Counts show correct first tokens on five historical failures in CPU FP32.

Which positions matter?Layer 19
Earlier positionsKey-swap output
Final positionKey-swap output
Both · correct first tokens
What carries the extra rescues?Layer 22

Swap the final-position mixer output:

BothOutput donor
Final onlyRecipient
Before
After
Final onlyOutput donor
BothRecipient
Before
After

The native BF16 check complicated the answer-count story. Earlier-only, final-only, and both produced 5/5, 4/5, and 5/5 complete correct answers — but only the last condition had any uniquely correct first-token maxima. Reversing the layer-22 contribution also left the native answer count at 5/5. Tied scores could conceal a disadvantage for the correct digit, so we kept those recorded answers and Astra separately audited the final score calculation using the exact saved hidden vectors and output-head weights.

With the saved operands, the correct digit was the unrounded winner on 2/5 earlier-only cases, 2/5 final-only cases, and all five with both. Replacing the latter’s layer-22 output with the final-only output reduced that to 2/5. This supported the score-level contribution.

Figure 14: Correct answers can hide tied scores.

The same five failures, viewed through complete native answers and an unrounded readout of the saved final states. The latter is a score diagnostic, not another generation run.

Correct complete answers and uniquely correct unrounded first-token scores across five historical failures
Attention outputNative answersUnrounded winners
Earlier only5 tied
Final only4 tied
Both1 tied
Bothwith final-only layer-22 output3 tied

Next, we opened up layer 22’s update. Its recurrent mixer decays an incoming memory state, writes a correction using a key, value, and write strength, then reads the updated state with a query. Exchanging the incoming state and final-step inputs separately showed that the final-step inputs carried most of this isolated margin effect. Those inputs still contain upstream context and short-convolution history.

Keeping incoming memory fixed, we then tested which final-step inputs carried the effect. A rule fixed before the run used two discovery examples to nominate the smallest group that carried it in both insertion and removal tests. The joint write-input group — key, value, and write strength — was the sole smallest qualifying choice, and the unchanged criterion passed on the other three failures. It carried approximately the entire isolated effect on the matched final-step margin. In both recipient contexts, insertion changed 2/5 uniquely correct first tokens to 5/5, and removal returned them to 2/5.

The group also carried the effect under additional internal backgrounds, including cases where scores improved without making the answer correct. This measures one local contribution, not the fraction of the whole repair explained. These component tests used FP32 first-token interventions on the historical failures.

Figure 15: Narrowing the effect to the write.

Final-step inputs carried most of the isolated layer-22 effect; the joint write group was the smallest qualifying group within them. Ranges span cases and internal contexts. Counts show uniquely correct first tokens.

Memory or final-step inputs?Layer 22
Incoming memory6.6–26.9%
Final-step inputs72.2–93.1%
Which final-step inputs?16 combinations tested
QueryRead from memory
Joint writeKey · value · strength
DecayRetain prior memory
Output gateScale the readout
Insert the joint write98.04–104.06% of the matched final-step effect
Before
After
Remove the joint write97.53–103.22% of the matched final-step effect
Before
After

We now had a partial causal route: repaired record keys changed attention routing, an earlier-position contribution reached layer 22, and its final-step write inputs carried nearly all of the tested local effect. Now: what information did that write carry?

Making a prediction

What information was the write carrying? We made pairs of lookup records with the digits in their first two entries exchanged (see Figure 16). We tested donors asking for the second entry and for the unchanged third entry.

For example, one donor record contains P=1, Q=2, R=5, S=8; another contains P=2, Q=1, R=5, S=8. Both ask for R, whose answer remains 5. We wanted to know whether moving 2 into the first entry shifted the write’s contribution toward 2 relative to 1. Regardless of whether the model answers with either digit, we can assess the competing scores within.

For context: a donor is a run supplying saved internal inputs; the recipient is the run we insert them into. For each donor, we saved layer-22 write inputs from the “both” and “final-only” conditions in the previous section. Both includes the changed layer-19 attention output at earlier and final positions; final only includes it at the last position. The recipient was the published checkpoint in the final-only condition, not the full mixed repair. We replaced its layer-22 write inputs, then let the remaining computation continue to the first answer-token scores.

Astra made a nifty little comparison towards this end. Holding the recipient fixed, we measured its score for 2 minus its score for 1 after borrowing each donor’s “both” write and again after borrowing its “final-only” write. Subtracting those margins gave one effect per donor. We then subtracted donor 1’s effect from donor 2’s. A positive result meant that exchanging the first two digits shifted this contribution toward the digit now in first place, relative to the second.

Figure 16: Does the write follow the first entry?

Exchange the first two donor digits, keeping their question unchanged. Compare the writes inside one fixed recipient: does the contribution shift toward 2 relative to 1 when 2 moves first?

Donor 1Ask R → 5
P=1Q=2R=5S=8
Saved writesBothFinal only
Donor 2Ask R → 5
P=2Q=1R=5S=8
Saved writesBothFinal only
Fixed recipient
Layer 22 · write inputs
KeyValueStrength
Memory updateRemaining layersMargin: score 2 − score 1
Published model · final onlyIncoming memory, query, decay, gate and weights stay fixed.
Donor 1
Both margin−Final-only margin=Effect 1
Donor 2
Both margin−Final-only margin=Effect 2
Did the contribution follow the digit moved first?Effect 2 − effect 1

Changing only the write’s value input retained about 86% and 99% of the full-write contrasts for second-entry and unchanged-third-entry donors, respectively. The second-entry result varied substantially between groups, but much of the measured effect traveled through the value vector.

We then froze a prediction about this internal effect: value-only substitution would retain the first-versus-second-entry contrast after shifting the request four tokens later. We tested 32 fresh requests in eight structured groups, with and without the prefix “Lookup task.” followed by a newline — 64 prompts in all. Both layouts passed the predeclared effect-size and value-retention criteria, with positive contrasts in all eight groups.

Figure 17: The predicted score effect survives a prompt shift.

Value-only substitution retained roughly 99% of the first-versus-second-entry score contrast after the prompt shift, even as the full-write effect decreased.

Full writeValue onlyMean contrast · logits
Mean positional score contrasts in logits and value-only retention, before and after a four-token prompt shift
Donor asks forOriginal positionShifted +4 tokens
Second entryAnswer changes with swap
Full write: +0.3007 logits
Value only: +0.2958 logits
98.4% retained
Full write: +0.2758 logits
Value only: +0.2731 logits
99.0% retained
Third entryAnswer stays fixed
Full write: +0.1102 logits
Value only: +0.1096 logits
99.5% retained
Full write: +0.0802 logits
Value only: +0.0799 logits
99.6% retained

Score contrasts, not accuracy; all three checkpoints already answered all 64 prompts correctly at the first token.

In the shifted layout, changing only the value input retained about 99% of each mean contrast; the reverse removal check agreed. The score effects became smaller after the shift, but the predicted relationship survived! The original, published and repaired models already gave the correct first-token answer on all 64 prompts.

Together, the interventions give a partial causal explanation: repaired record keys alter attention routing; a contribution from earlier positions reaches a later memory write; and its value input carries a positional score effect that survived a fresh test. It should be said that this validates only this particular effect, not the whole causal chain or a general explanation of lookup or copying recovery.

Conclusions

It boggles my mind that I went nearly a year-and-a-half out west with such a limited understanding of the nature of the fire that I was playing with. Abstraction has always been something of an end to me. To shape a product or architect a system is surely preferable to getting your hands all greasy.

But there is something wonderfully tactile about grasping something I didn’t a week or two ago. The techniques were established; applying them here revealed a specific positional trade-off and traced part of its causal route through the model. Astra served variously as my assistant and mentor through it all, and I gained a newfound appreciation for today's models. I remember the days I spent wrangling models to call a single tool reliably.

It seems stupid and more than a bit convenient to say that this technology is the one that will change everything and that of course I am alive for the main event, so I won’t push the point too much here and we will just have to see how it goes.

In summary: We found collateral damage from a useful weight edit, repaired much of it while retaining most of its measured math benefit, and found that controls could match important parts of that recovery. Tracing one component exposed a positional trade-off: favoring the first entry rescued some answers while reducing other correct answers’ score margins. We followed part of that effect into a later memory write and validated a prediction about its internal score contribution on fresh prompts.

Discussion

Loading comments…