Compile, Learn, or Both? When Weight-Space Programming Helps, What It Breaks, and Why Combining It with LoRA Matters
Weight-space programming (WSP) lets a language-model agent edit another model's weights directly, without gradients. We compare it with LoRA fine-tuning on Qwen2.5-1.5B across four tasks, from knowledge the model already holds to knowledge it lacks, using 20 independent programmer runs, and repeat the key tests on SmolLM2-1.7B. WSP reliably corrected a deliberately wrong sentiment readout and compiled explicit tables into the weights, but LoRA was better at ordinary sentiment classification. The highest-scoring compiled circuits bypassed the network: one recalled all 900 fictional facts while the model's MMLU accuracy fell from 59.6% to 22.2%. A preservation instruction changed the kind of edit an agent built, at a cost in accuracy. Starting LoRA from a non-destructive programmed memory reached 99.0–99.7% fact accuracy with 4,000 training presentations, against 22.2% for LoRA alone, and the combined models kept general ability (MMLU 58.0–59.6%). On mirrored sentiment, the swap let LoRA learn on every seed at the default budget; LoRA alone learnt on every seed only when given three times the data. Programming is most useful for targeted changes and as a starting point for training, judged by what each edit does to the rest of the model. Code, results, run records and the full technical report: https://github.com/Puneet-Bajaj-IITM/wsp-vs-lora
Authors
- Puneet Bajaj (ORCID: https://orcid.org/0000-0002-8688-4059)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-25
- DOI
- https://doi.org/10.5281/zenodo.24515792
- Primary Topic
- Domain Adaptation and Few-Shot Learning
- Type
- preprint