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

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Compile, Learn, or Both? When Weight-Space Programming Helps, What It Breaks, and Why Combining It with LoRA Matters

Puneet Bajaj
4 links
Zenodo (CERN European Organization for Nuclear Research)
Domain Adaptation and Few-Shot Learning
preprint

Compile, Learn, or Both? When Weight-Space Programming Helps, What It Breaks, and Why Combining It with LoRA Matters

Puneet Bajaj
preprint en

Abstract

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

Zenodo (CERN European Organization for Nuclear Research)
Domain Adaptation and Few-Shot Learning
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon