DoubleAI proposes mechanistic intervention, letting models write code during training to change the architecture
Start here
DoubleAI proposes a method called "mechanistic intervention" that lets a coding agent insert Python code layers into the network mid-training and, at inference time, read internal activations and roll back erroneous trajectories early. The research claims that in 1500 steps of training a 12-layer nanochat, inserting code layers three times was equivalent to 15% extra training progress; when the memory window was limited to 500 words, a code cache layer inserted only at step 1200 achieved 72% recall, while one installed at step 0 achieved only 55%. Inserting 10 code layers in succession on 30 classic algorithms raised total accuracy from 55%.
Generated by AI from reports · Updated 21 days ago
Progress timeline
- WebAI Era (Xinzhiyuan)· Media coverageAI rewrites the Transformer architecture by hand! DeepSeek self-modification jumps 7 points(opens the original post in a new tab)
- XiaohongshuXiaohongshu · AI Pioneer· DiscussionAI rewrites the Transformer architecture by hand! Without changing a single weight, math scores jump by 7 points!(opens the original post in a new tab)
- WeChat · AI Era (Xinzhiyuan)AI writes Python code into the Transformer architecture, DeepSeek-V4.1-Flash math accuracy improves by 7 percentage points
DoubleAI proposes a method called "mechanistic intervention," which lets a coding agent insert Python code layers into the network mid-training, and at inference time read internal activations and roll back erroneous trajectories in advance. The research claims that in 1500 steps of training a 12-layer nanochat, inserting code layers three times is equivalent to 15% extra training progress; when the memory window is limited to 500 words, a code cache layer inserted only at step 1200 reaches a recall rate of 72%, whereas one installed at step 0 reaches only 55%. Inserting 10 code layers in succession on 30 classic algorithms raised total accuracy from 55% to 84%. DeepSeek-V4.1-Flash, based on the solving trajectories of 243 math problems, wrote its own probe resampling program, raising accuracy on AIME and HMMT 2026 from 63.9% to 71.0%; Qwen3-8B rose from 58.5% to 65.5%, and neither updated its weights.
Related discussion
- Older than 72 hours · Not included in the 72-hour figures
- WebAI Era (Xinzhiyuan)AI rewrites the Transformer architecture by hand! DeepSeek self-modification jumps 7 points(opens the original post in a new tab)
- XiaohongshuXiaohongshu · AI PioneerAI rewrites the Transformer architecture by hand! Without changing a single weight, math scores jump by 7 points!(opens the original post in a new tab)