A network computes with its weights. The programming question is how those weights are constructed, what behavior they encode, and how that behavior is reused. An exact counting operation and an email classifier make the differences concrete.
Two functions, two kinds of specification#
Count the letter a in abac: the answer is 2. A sequence program can write that count at every position, producing [2, 2, 2, 2]. The rule determines the answer for every valid input. A compiler can translate this rule into the attention and feed-forward components of a transformer.
Now classify an email as URGENT or ROUTINE. “Please approve this by 5 p.m. today” asks for prompt action. “Forwarding yesterday’s urgent request for the record; it is resolved” does not. The function depends on meaning and context as well as individual words. Its specification describes the intended behavior; examples reveal the distinctions it must preserve.
Construct once, execute on new inputs#
Keep two questions separate: how is the neural program constructed, and what runs when the next input arrives? In Tracr, the source program determines transformer weights. In Program-as-Weights, a function specification becomes a saved neural program for a shared interpreter.
Scroll horizontally to read the figure.
Run the exact counting example or compile and reuse the email function. The method map compares other ways to construct the saved program.
From a sequence program to transformer weights#
RASP is a language for describing sequence computations. It provides operations over tokens and positions, selectors that choose positions, and aggregations over the selected values. These operations express algorithms such as counting and reversing a sequence.
Tracr translates supported RASP programs into transformer parameters. A selector becomes an attention computation; other sequence operations become feed-forward computations. The compiler works from the source operation, vocabulary and sequence-length bound. The resulting network executes the specified computation on new sequences.
A network that generates another network’s parameters#
A hypernetwork generates parameters for another network. Training teaches the generator how its output parameters affect the receiving network’s behavior. The information supplied to the generator determines what kind of variation it represents.
Text-to-LoRA conditions a hypernetwork on a natural-language task description. It generates a LoRA adapter: low-rank parameter updates used with a compatible base model. The generator is trained beforehand; constructing an adapter for a new description then uses a forward pass.
Reading and writing weights with a general-purpose LLM#
The Sparks experiments ask a general-purpose LLM to reason about numerical weights. In one reading experiment, Astra receives small game-policy weights and descriptions of their inputs and actions, then identifies the game without tools. In the MinAtar construction experiment, it receives game rules, source code and the network layout, then writes weights without playing the game first.
The larger-network experiments add a Python environment and bounded execution feedback. The experiment breakdown follows each setup separately, including the model edit and the results used to assess it.
From a task description to a reusable neural function#
Program-as-Weights introduces fuzzy-function programming: describe a function in natural language, compile it into a saved neural program, and run it on new inputs with a shared interpreter.
PAW specifically trains a compiler to generate LoRA adapters that edit the interpreter’s weights, while the approach in Sparks uses a general-purpose LLM (not specifically trained for this purpose) to edit weights. A PAW program includes readable task text as well as the generated parameter component. The interpreter uses both when executing a new input.
Parameter generation supplies the adapter. The compiler–interpreter interface makes it a software object: something a developer can save, load and call from ordinary Python. The complete walkthrough follows that lifecycle; the playground lets you write a specification directly.
Training can be part of compilation#
Compile by Training constructs a function using task-specific examples generated by teacher models and optimization of an adapter. Later calls execute the saved function without those teachers. This connects the programming interface to a different construction procedure: compiling a function can involve a trained generator, per-function optimization, or both.
The useful distinctions are what is supplied, how construction proceeds, what is saved, and what runs on the next input. The method comparison follows those questions across the research.