Can a Linear Program Do Weight-Space Programming?
- ID
- 46038
- Status
- summarized
- Published
- 11 Nov 2026, 8:30 PM
- Fetched
- 13 Nov 2026, 5:54 AM
- Provider
- Hacker News
- Category
- dev-community
- Original URL
- https://nathan.rs/posts/weight-space-lp/
- Source URL
- https://hnrss.org/best
Summary
- Score
- 7.5
- Created
- 13 Nov 2026, 5:55 AM
- Tags
- Audience
- ai_ml_learnersai_agent_usersdevelopers
What happened
Nathan Barry analyses MIT CSAIL's 'Sparks of Weight-Space Programming' paper, where GPT-6 Astra edited 0.016% of Qwen3.5-0.8B's weights and lifted MATH-500 from 7.9% to 48.1%, IFEval from 21% to 62%, and cut answers hitting the 32,768-token limit from 93% to 33.1%. Astra spent roughly 8 hours and 28 forward passes on the search, but Barry shows the edit was mostly a linear program solved by trial and error — two LP solves of about a minute each reproduce it with 8× fewer changed weights. The underlying fix is narrow: the model was stuck in thinking loops, so Astra averaged residual-stream vectors from four hand-written productive/looping text pairs, derived a 'loop direction' in the 1,024-dimensional residual stream, and edited two layers to push the opposite way — on Gemma 3 270M, which rarely loops, the same approach couldn't improve math ability at all.
Why it matters
If you're doing any weight-level or activation-level model surgery, this is a cheaper recipe than agentic search: the whole effect came from a direction vector computed from ~8 short texts and applied to two layers, and an LP solve matched an 8-hour, 28-forward-pass search with 8× fewer weight changes. It also caps expectations — the edit removed an obstacle (looping) rather than adding a capability, so budget for this only on small models that actually exhibit the failure mode; on Gemma 3 270M it did nothing. Separately, 0.016% of weights moving MATH-500 by 40 points is a reminder that tiny, targeted deltas can dominate broad fine-tunes for small models.
Discussion angle
How much of what looks like 'the model reasoning about weights' is really a linear program the model is brute-forcing? If a one-minute LP solve beats 8 hours of inference-time search on the same edit, where else in your agent pipelines are you paying for search over a problem that has closed-form structure?