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 et al. · Peking University
19 Nov 2026 · cs.LG, cs.AI · empirical analysis · laptop / colab · code
14 hf upvotes · 0 hn points, 0 comments · 39 stars · – citations
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.
Compute: laptop / colab. Programs are installed via frozen-LLM API calls, no gradient training; smallest ResNet-20 run is laptop-scale.
Smallest run that tests the claim: ResNet-20 (0.27M weights) on CIFAR-10 with 64 labeled corrupted and 64 clean images, one program session (~0.5 GPU-hours on one A100-class GPU).
“Programs are written by Claude Opus 5.5 at maximum reasoning effort.”
(read from the paper's full text by Claude)
Potential
signals behind the hidden gems rankingearly traction: 7 upvotes/day in its first 2 days · from PekingUniversity, whose recent “Motion Mamba 2.0: Autoregressive Diffusion Mamba for Long-Ho…” drew 191 upvotes/points
Existing reproductions
Not checked yet. Looks for GitHub repos that cite this arXiv id and HF models tagged with it, then separates independent reproductions from code that only cites or uses the paper, and from paper lists.
Comments