← All entries
Post#1564

Can LLMs redesign themselves as they train?

Summary

doubleAI research blog (2026-11-06) on 'mechanistic intervention': coding agents placed inside the training loop that redesign a network's architecture as it trains, splicing program-like 'code layers' into the network behind zero-initialised learnable gates (at insertion the network is unchanged; gradient descent opens the gate if the layer helps). The agent's core tool is the phantom gradient - the gradient of the loss with respect to each layer's representations (equivalently, of zero-initialised per-token weights that are not there), centred per target token; layers where phantom-gradient demand persists across checkpoints mark unmet demand SGD is not satisfying. Candidate layers are fitted so their output points along the centred phantom gradient, scored on held-out documents against a plain linear-map baseline, and must survive twin races (identical run, layer off) and sham controls (same shape and parameters, scrambled inputs) plus a causality check before ranking - unusually careful controls for a blog post. Four experiments. (1) nanochat (286M, 12 layers): the agent inserted three code layers; validation loss dropped after each insertion and the gap persisted to step 5,000. (2) Sliding-window blind spot (124M, 8K-token documents, 500-token window): a parameter-free exact-match lookup code layer (tokens following earlier occurrences of the last 3 tokens, fed to every attention head) restored recall of variables defined 600-4,000 tokens earlier - but timing mattered: inserted halfway through training, recall reached 72% vs 55% when the identical layer was present from step 0, at near-identical loss; the authors read this as shortcut learning (present from the start, the network leans on the layer instead of building its own circuits). (3) CLRS-Text (86M trained from scratch): ordinary training plateaus at 55% accuracy and solves only ~33% of problems at input lengths between those seen in training; ten grown code layers lift overall accuracy to 84% and in-between-length accuracy to 79%; twice the training does not close the gap (linear probes locate where the network holds the values the code needs to read). (4) Self-modification: DeepSeek-V4.1-Flash (763B MoE) acted as the agent on itself for competition maths without thinking mode - it built a linear probe on its own residual stream (seven deepest blocks, read once the solution is finished) from its own graded solutions to 243 problems from 2024-25 contests, wrapped it in a sampling-controlling code layer (resample up to 3x when the probe predicts a wrong answer), and raised AIME 2026 from 76.2 to 82.3 and HMMT Feb 2026 from 52.7 to 60.8 (combined 63.9 -> 71.0); the probe rejects ~4/5 of wrong answers and ~1/15 of right ones, a length-only resampling baseline gains under 2 points, and mid-solution probes encode difficulty rather than correctness - the 'I got this wrong' signal exists only once the answer is written. A companion run let Qwen3-8B (thinking on) write its own sampling policy in Python over prebuilt stop/doom/local probes, evolving ~15,000 candidate policies scored on ~800 older contest problems: 59% -> 66% combined, at 2.8x the thinking tokens of a single attempt. Flags, as entered: first-party lab blog, no paper and no code release linked, no independent replication; the training experiments are small (86M-286M); the self-modification gains are partly bought with extra sampling compute and are not compared against compute-matched best-of-n/majority voting (the length baseline only partially covers this); the 2026 contest sets are stated to be hidden from the agents throughout (MathArena sourcing). Cross-references: extends the weight-space programming thread (IDs 1798-1799) from editing weights to editing architecture; Experiment 2's lookup layer is the Copy-Paste LMs pointer-head idea tested inside a sliding-window hybrid, with a new timing result; the DeepSeek/Qwen probe policies connect to the self-verification and inference-policy thread in the agent-app work.

Venue
doubleAI blog
Source
blog
Access
free
Language
en
Added
Nov 6, 2026
Verified
Nov 6, 2026

Research notes

  • Research blog, published 2026-11-06; announced via @_doubleAI_ launch thread (status 2118733156069032292, project led by @AlonVin). No arXiv version and no code repository linked in the post. Test sets stated hidden from the agents in every experiment.

Similar entries