Can a Linear Program Do Weight-Space Programming? nathan.rs · 275 points · 38 co...
HN Best 30 @best30
Can a Linear Program Do Weight-Space Programming? nathan.rs · 275 points · 38 comments · HN thread
TL;DR The author reanalyzes an MIT CSAIL result in which an LLM agent (Astra) edited 0.016% of Qwen3.5-0.8B's weights to stop it from looping, lifting MATH-500 from 7.9% to 48.1%. He shows the edit is a rank-1 change whose column choices can be found by solving a sparse linear program in about a minute, matching Astra's edit with 8x fewer changed weights. A constant push can also be reproduced as a steering vector without any weight change.
- Astra's edit on Qwen3.5-0.8B raised MATH-500 from 7.9% to 48.1%, GSM8K from 13.8% to 67.1%, and IFEval from 21% to 62%, mainly by reducing token-limit hits from 93% to 33%.
- The edit is a rank-1 update: it adds a fixed direction u to the residual stream, scaled by how active the edited columns are, and found by trial and error over about 8 hours and 28 forward passes.
- The author formulates choosing the edit as an L1-minimizing LP with constraints that looping tokens get pushed away from u and productive tokens stay nearly unchanged, then keeps 8 columns per layer.
- The LP edit matches Astra's accuracy on GSM8K, MATH-500 and IFEval while changing 16k weights instead of 130k; with a heuristic direction found without an LLM it reaches about 93% of that.
- Because the LP edit is nearly a constant push, the same effect can be reproduced at 1x strength as a steering vector added at inference time; the author notes the window is narrow and the work tests only one model and one behavior.
Discussion The thread is mostly technical and curious, with a sizable side argument about whether the headlines overstated what Astra did. Commenters debate whether Astra 'edited weights' in any meaningful sense, whether an LP solver is a useful tool for AI-driven weight editing, and whether this counts as recursive self-improvement. Several commenters were skeptical of the hype, while others found the linear-programming angle a clever and practical insight. Mood is generally positive toward the analysis, with some pushback on framing.
- LP and classical optimization are underused next to LLMs (many): Several commenters welcome the result as a reminder that classical numerical methods can beat LLM trial and error. They argue the field has settled on suboptimal approaches out of attachment to LLMs.
- Headlines overstated what Astra actually did (many): Some argue the coverage implied models understand weights directly. Others point out that the agent used forward passes and tools, and that the main experiment fixed a known looping problem without understanding how the model solves problems.
- Debate over whether 'editing weights' implies agency (some): One side says it is just linear algebra and broad statistics, so calling it editing overstates awareness. The other says the agent still made decisions, so the distinction is splitting hairs.
- Hybrid reasoning with embedded solvers is desirable (some): Commenters want LLMs that use constraint solvers natively inside reasoning. One replies that writing solver code and interpreting results is already ideal because it stays auditable.
- Self-editing and recursive improvement questions (a few): Some ask whether a model could apply the same approach to itself, possibly even at runtime, to make reasoning more direct. Others see that as an interesting but untested idea.
- Steering vectors are standard interpretability (a few): One commenter notes that steering vectors are basic interpretability and that a single behavior-removing direction is rare, so the result is less surprising than presented.
#linearProgramming #weightEditing #LLMs #mechanisticInterpretability #steeringVectors #optimization