Weight-space programming

This page is password protected.

lasal.aiOCR story · weight-space programming
No training run: an LLM edits the weights

Weight-space programming on Qwen3-VL-2B

Claude read the weights of the small model that pulls 11 fields out of invoices and purchase orders, found what got in its way, and edited the numbers directly. It used no optimiser and no labelled training. Every edit is shown here: what it changed in the architecture and which fields it fixed or broke. The test documents use layouts Claude never saw.

What is weight-space programming? · a 30-second introduction

A trained neural network is a program written in numbers. Training writes that program indirectly: show it millions of examples and let gradient descent nudge every number a little. Weight-space programming treats the numbers as code someone can read and edit. An LLM (here Claude) looks at the weights and at how the network behaves, works out what a few specific numbers are doing wrong, and changes those numbers directly. It uses no gradients and no new data, and it gets only a small budget of test runs to check its work.

  1. 1 · Readthe weights, the neurons, where it fails
  2. 2 · Hypothesise"this threshold is too low", "this input is read backwards"
  3. 3 · Editwrite a few lines of code that change specific numbers
  4. 4 · Evaluateone run on practice data, from a fixed budget
  5. 5 · Keep or dropthen a final check on data it never saw
TrainingWeight-space programming
Who changes the numbersan optimiser, following gradientsan LLM, deciding on purpose
How many numbers changeall of them, a littlea few, by a lot
Why each change was madeno stated reasonwritten down, one hypothesis per edit
What it can doteach new abilitiesremove obstacles; it cannot add an ability the network lacks

This page has two demos: Qwen3-VL-2B reading invoices (2.13 billion numbers; the first four tabs) and small networks playing a game (3 to 401 numbers; on its own page ↗), where every edit can be seen working.

Fields right, per field
Original 2BAfter the edits4B (same family, more weights)8B

Each row is one field, out of the number of documents. Hover a bar for exact counts. The 4B and 8B are the same model family, run in the SOTA IDP with the same prompt.

Accuracy after each kept step
Dev (the agent saw these scores)Test (held out, scored afterwards)
Table view

Method from Takehi, Teoh, Zhang and Khattab, “Weight-Space Programming” (2026). Documents, prompt and scoring from the SOTA IDP / Legacy IDP stops of this series. Wingbeat is an original game made for this page; the idea of small networks learning a one-button flying game comes from the open-source neuroevolution demos.