Weight-Space Programming

About this test bench

This is an experiment in weight-space programming: you describe a change in behaviour in plain words, and a language model edits a tiny neural network's weights directly to make it happen. Nothing is trained. The model reads the numbers, works out what the units do, and writes a small patch.

Next to it runs the conventional route, a short gradient fine-tune toward the same goal, so you can compare the two. See the measured results.

The game

An agent moves in a square arena from a start on the left to a green goal on the right. On the way there is a red zone, and in most episodes a wall it has to get around. Entering the red zone doesn't end an episode; it just gets counted. Every episode runs exactly 120 steps, so the agent has to stop at the goal by itself if it is going to stop at all.

The network

The agent is a tiny network with 212 parameters: 8 named inputs, 16 hidden units (tanh), 4 outputs.

The baseline was trained once, offline, by copying a simple expert. The expert heads straight for the goal at full speed and ignores the red zone. When the wall is ahead, it slides down past the wall's lower (right-hand) end. Because its outputs are larger than the speed cap, it never slows down, so it jitters around the goal instead of stopping. The three test edits each target one of these habits.

How an edit works

  1. You pick a ready-made instruction or write your own, for example "Avoid the red zone", and press Apply. Every ready-made instruction has been tried against the real model and produced a real change. The results page lists what each one did, side effects included.
  2. The server sends the language model the instruction, a description of the game and the network, and the current weights as a table.
  3. With tools, the model may call two functions, at most 20 times in total:
    • forward(inputs) runs the network on one input vector and shows every hidden unit and output.
    • rollout(seed, n) plays up to 20 episodes and reports the numbers.
    Both can try a candidate patch, so the model can check its idea before submitting it. The model can't run code, and it has no optimiser or gradients. It is told not to search over values, and the 20-call limit is enforced by the server.
  4. The model answers with a patch, a list of operations on named weights (set, add or scale, for example add W2.h5.up +1.2), each with a one-sentence explanation. The server checks the patch before applying it: names must exist, values must be finite, at most 64 operations, and weights are clipped to ±25.

When an instruction makes no sense. Empty, overlong (more than 300 characters) or plainly garbled input is turned away before any model call. The model treats your text as a description to act on, never as new instructions. If the text can't be mapped to the agent's behaviour (off-topic, a request to do something else, an attempt to change its rules), it returns an empty patch marked "not applicable", with a short reason and a few instructions that do work. That answer appears in the edit log but changes nothing. If an instruction contradicts itself, the model may try, but it has to say what it could and couldn't do, and the numbers show the result. Whatever is typed, the server only accepts a valid patch, so the worst outcome is a badly behaved network that you can undo.

Zero-shot mode gives the model no tools. It has to write the patch from the weights and its reasoning alone, in one go.

The rollout tool only uses scenario seeds 0–999. The 100 episodes in the table (seeds 1000–1099) are never shown to the model.

The fine-tuning control

For each test goal there is a matching expert: one that steers around the red zone, one that takes the wall's left (north) end, and one that slows down and stops at the goal. The control fine-tunes the baseline toward that expert with plain gradient descent (Adam, 1000 or 3000 steps) in numpy on the server. It gets demonstrations of the goal behaviour, while the language model only gets the sentence. It also changes all 212 parameters, where an edit usually changes a handful.

What the numbers mean

The simulator runs in your browser and on the server with the same arithmetic, and a test checks that both play identical episodes.

Honest limits

Results of the three acceptance tests · Back to the test bench