WeightCode: Installing New Capabilities into Neural Networks via Weight-Space Programming
Bo Li, Taoyong Cui, Bob Zhang, Mengran Li, Chengyang Zhang, Yang Zhang, Pheng Ann Heng, Wanli Ouyang and 3 others
University of Macau · National University of Singapore · The Chinese University of Hong Kong · Sun Yat-sen University · Sichuan University · University of Oxford
Published November 19, 2026 · on the feed November 24, 2026 · ▲ 14 · arXiv 2611.25476
The abstract
Neural networks encode learned capabilities in their weights, yet extending those capabilities with explicit task knowledge remains a fundamental challenge. Here we show that Weight-Space Programming (WSP), in which executable programs read, construct or modify a network's weights directly, can install new capabilities within trained neural networks. WeightCode, a WSP framework, uses a frozen language model to write executable weight programs that install new computations into trained neural networks using task knowledge and their existing weights, without gradient-based training. Once installed, the new capabilities run independently of the language model. Given a grammar or eight demonstrations, weight programs enable previously unseen command compositions (0% to 99.8% exact match) and a new pickup action (0% to 98.4% success), while preserving the original command and navigation capabilities. On ImageNet, four weight programs achieve net gains of 8.84-17.62 points while preserving clean accuracy, outperforming the best of eight fine-tuning methods under matched examples, checks, and retention constraints. In a Vision Transformer, causal interventions show that installed noise-correction gates drive robustness gains, while their selective activation preserves clean accuracy. Rerun on five independently trained Vision Transformers without further language model calls, ten weight programs retain 83-110% of their source-network gains on average, whereas copying their fixed weight edits yields negligible gains. Six programs written for an already edited network add 5.23-14.50 points of contrast robustness while retaining the previously installed noise gain. Together, these results establish WSP as a new route to acquiring and accumulating capabilities in trained neural networks through reusable weight programs.
The Brief
2:55A short podcast summary of the paper. Written and voiced by AI.
Transcript
WeightCode. Installing New Capabilities into Neural Networks via Weight-Space Programming. By Bo Li and ten others, from the University of Macau, the National University of Singapore, and six other institutions. Published on the nineteenth of November.
A neural network keeps what it has learned in its weights. Extending those capabilities with explicit task knowledge, such as a rule you can write down or a handful of demonstrations, remains a fundamental challenge. The usual route is more training, and the knowledge has to be squeezed back in through gradients.
The paper proposes Weight-Space Programming, or WSP. Executable programs read, construct, or modify a network's weights directly, and in doing so install new capabilities inside a network that is already trained. WeightCode is a framework for this. A frozen language model writes executable weight programs that install new computations into trained networks, using the task knowledge and the network's existing weights, and without any gradient-based training. Once a capability is installed, it runs independently of the language model. The language model is the author of the edit, not part of the resulting system.
Because the output is a program rather than a fixed set of weight changes, it can be run again. A program written for one network can be rerun on other, independently trained networks, and new programs can be written for a network that has already been edited, adding to what is there.
Given a grammar or eight demonstrations, weight programs enable command compositions the network had not seen before, going from zero percent to ninety-nine point eight percent exact match. They also add a new pickup action, from zero percent to ninety-eight point four percent success. In both cases the original command and navigation capabilities are preserved.
On ImageNet, four weight programs achieve net gains of between eight point eight four and seventeen point six two points while preserving clean accuracy. They outperform the best of eight fine-tuning methods, under matched examples, checks, and retention constraints. In a Vision Transformer, causal interventions show that the installed noise-correction gates drive the robustness gains, while their selective activation is what preserves clean accuracy.
Reuse is tested next. Rerun on five independently trained Vision Transformers, with no further language model calls, ten weight programs retain on average between eighty-three and one hundred and ten percent of the gains they achieved on their source network. Copying their fixed weight edits across instead yields negligible gains. Accumulation is tested last. Six programs written for a network that had already been edited add between five point two three and fourteen point five points of contrast robustness, while keeping the noise gain installed earlier.
The contrast between rerunning a program and copying its edits carries the argument. A fixed edit belongs to the network it was computed on. A program recomputes its edit against whatever network it meets, which is why it travels to new networks and why new programs can be stacked on old ones. The authors present WSP as a new route to acquiring and accumulating capabilities in trained networks, through weight programs that can be reused.
More with an account
Listen to every day’s papers
Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.
Join free