Writing Weights or Training Them? Spatial Reasoning through Weight-Space Programming and Low-Rank Adaptation

arXiv cs.AI Papers

Summary

The paper compares weight-space programming edits with rank-1 LoRA training on spatial reasoning tasks using Qwen3.5-0.8B, finding that LoRA trained on worked solutions reaches near-perfect accuracy but causes catastrophic interference on neighbouring distance tasks, while a public weight-space edit yields smaller gains without degrading other skills.

arXiv:2611.27089v1 Announce Type: new Abstract: Weight-space programming lets a language model inspect and edit another model's weights, offering an alternative to gradient-based adaptation. We evaluated both approaches using Qwen3.5-0.8B on a fixed reference-frame task (128 items), StepGame (200 items), and two untrained distance-comparison tasks. With thinking enabled, the public patch (p50c) raised mean accuracy from 0.0% to 22.1% on the reference-frame task and from 19.2% to 33.7% on StepGame across three sampling seeds. Randomly permuting its weight change removed the gain. Further closed-form edits did not improve on p50c, whereas a rank-1 LoRA adapter trained on worked solutions reached 100% and 98.8%, respectively, with 0.09% trainable parameters. Removing the worked solutions from supervision prevented the adapter from passing the learning gate. The trained adapters reached 82% accuracy on unseen StepGame sentence templates, 42% on held-out difficulty levels 6-10 after training on levels 1-5, and 33-50% on unseen heading-answer combinations. Their target gains coincided with a sharp decline on the distance tasks: accuracy fell from 94% and 92% under p50c to 0-2%, and their outputs applied the StepGame solution template to distance questions. With thinking disabled and reasoning requested in the visible answer, the base model also solved the distance tasks while remaining weak on the target tasks. The comparison reveals a trade-off between improving spatial task performance and preserving neighbouring skills: the public edit restored completion while preserving distance performance, whereas supervised adaptation produced much larger target gains together with interference across tasks.
Original Article
View Cached Full Text

Cached at: 11/23/26, 09:18 AM

# Writing Weights or Training Them?Spatial Reasoning through Weight-Space Programming and Low-Rank Adaptation
Source: [https://arxiv.org/html/2611.27089](https://arxiv.org/html/2611.27089)
Yalin YangAffiliation:West Virginia GIS Technical Center, West Virginia University, Morgantown, WV 26505, USAYanan WuAffiliation:Department of Geography, University of Central Arkansas, Conway, AR 72035, USAHao YangAffiliation:Systems Engineering Program, Cornell University, Ithaca, NY 14853, USARyan Zhenqi ZhouAffiliation:Yale Center for Geospatial Solutions, Yale University, New Haven, CT, USA

###### Abstract

Weight\-space programming lets a language model inspect and edit another model’s weights, offering an alternative to gradient\-based adaptation\. We evaluated both approaches using Qwen3\.5\-0\.8B on a fixed reference\-frame task \(128 items\), StepGame \(200 items\), and two untrained distance\-comparison tasks\. With thinking enabled, the public patch \(p50c\) raised mean accuracy from 0\.0% to 22\.1% on the reference\-frame task and from 19\.2% to 33\.7% on StepGame across three sampling seeds\. Randomly permuting its weight change removed the gain\. Further closed\-form edits did not improve on p50c, whereas a rank\-1 LoRA adapter trained on worked solutions reached 100% and 98\.8%, respectively, with 0\.09% trainable parameters\. Removing the worked solutions from supervision prevented the adapter from passing the learning gate\. The trained adapters reached 82% accuracy on unseen StepGame sentence templates, 42% on held\-out difficulty levels 6–10 after training on levels 1–5, and 33–50% on unseen heading–answer combinations\. Their target gains coincided with a sharp decline on the distance tasks: accuracy fell from 94% and 92% under p50c to 0–2%, and their outputs applied the StepGame solution template to distance questions\. With thinking disabled and reasoning requested in the visible answer, the base model also solved the distance tasks while remaining weak on the target tasks\. The comparison reveals a trade\-off between improving spatial task performance and preserving neighbouring skills: the public edit restored completion while preserving distance performance, whereas supervised adaptation produced much larger target gains together with interference across tasks\.

11footnotetext:Corresponding authors\.
Email addresses:[yalin\.yang@mail\.wvu\.edu](mailto:[email protected])\(Yalin Yang\);[xiao\.huang2@emory\.edu](mailto:[email protected])\(Xiao Huang\)\.## 1Introduction

Large language models are increasingly adapted after pre\-training through task\-specific optimisation and targeted interventions\. Parameter\-efficient training fits a small set of parameters by gradient descent on task data\. Parameter\-efficient variants restrict the change to small adapters\[[1](https://arxiv.org/html/2611.27089#bib.bib1)\], continuous prompts\[[2](https://arxiv.org/html/2611.27089#bib.bib2),[3](https://arxiv.org/html/2611.27089#bib.bib3)\]or low\-rank weight updates\[[4](https://arxiv.org/html/2611.27089#bib.bib4),[5](https://arxiv.org/html/2611.27089#bib.bib5),[6](https://arxiv.org/html/2611.27089#bib.bib6)\], which makes adaptation cheap enough to be routine\. Targeted interventions instead specify changes to weights or activations using measurements of the network, learned update rules or differences between trained models\. It includes locate\-then\-edit methods for factual associations\[[7](https://arxiv.org/html/2611.27089#bib.bib7),[8](https://arxiv.org/html/2611.27089#bib.bib8)\], learned editors\[[9](https://arxiv.org/html/2611.27089#bib.bib9),[10](https://arxiv.org/html/2611.27089#bib.bib10)\], arithmetic on weight differences\[[11](https://arxiv.org/html/2611.27089#bib.bib11)\], and steering or ablation of directions in the residual stream\[[12](https://arxiv.org/html/2611.27089#bib.bib12),[13](https://arxiv.org/html/2611.27089#bib.bib13),[14](https://arxiv.org/html/2611.27089#bib.bib14)\]\. Weight\-space programming extends this family by giving a language model programmatic access to another network’s weights and letting it decide, from measurements it requests, what to change\[[15](https://arxiv.org/html/2611.27089#bib.bib15)\]\. Its first demonstration on Qwen3\.5\-0\.8B\[[16](https://arxiv.org/html/2611.27089#bib.bib16)\]removed a direction associated with repetitive looping from two MLP layers and raised MATH\-500 accuracy\[[17](https://arxiv.org/html/2611.27089#bib.bib17),[18](https://arxiv.org/html/2611.27089#bib.bib18)\]from 7\.9% to 48\.1% without a gradient step\.

The two families have mostly been studied apart, and with different goals\. Direct edits are usually evaluated on whether they change a fact or suppress a behaviour while leaving everything else untouched\[[19](https://arxiv.org/html/2611.27089#bib.bib19)\]; gradient methods are evaluated on how much of a new task they learn and, more recently, on how much they forget\[[20](https://arxiv.org/html/2611.27089#bib.bib20),[21](https://arxiv.org/html/2611.27089#bib.bib21)\]\. We compare closed\-form weight editing with gradient training on the same backbone, spatial tasks and evaluation protocol, asking how each improves target performance and affects neighbouring skills\.

We chose text\-based spatial reasoning as the domain because it requires composing relations over several steps, a known difficulty for language models\[[22](https://arxiv.org/html/2611.27089#bib.bib22),[23](https://arxiv.org/html/2611.27089#bib.bib23),[24](https://arxiv.org/html/2611.27089#bib.bib24)\], and because its tasks have exact symbolic solutions against which a model’s intermediate steps can be checked\. We used four task families with two roles \(Section[3\.2](https://arxiv.org/html/2611.27089#S3.SS2)\)\. Two target tasks measure directional reasoning, on which the base model fails\. The reference\-frame task asks for the egocentric relation \(ahead, behind, left, right\) of a landmark given in map coordinates and an observer’s heading, the conversion between allocentric and egocentric frames of reference that is central to human spatial language\[[25](https://arxiv.org/html/2611.27089#bib.bib25)\]\. StepGame asks for the relation between two agents from relative\-position statements at dataset difficulty levels 1 to 10\[[23](https://arxiv.org/html/2611.27089#bib.bib23),[26](https://arxiv.org/html/2611.27089#bib.bib26)\]\. Two off\-target families measure whether a change preserves a neighbouring skill that the patched model already has: comparing straight\-line distances between points on a map, and the same comparison phrased in terms of product prices and weights, without spatial language\. As the written edit we used p50c, the published weight\-space\-programming patch of Qwen3\.5\-0\.8B, and as the trained alternative we used LoRA adapters of rank 1 and 16\.

The comparison yields four results\. First, the patch’s gain on both tasks depends on the arrangement of its weight change, not on its magnitude, and five attempts to extend it with further closed\-form edits did not improve on it\. Second, LoRA with a rank\-1 update, with a trainable parameter count of the same order as the closed\-form edits, reached ceiling on the reference\-frame task and near\-ceiling on StepGame\. Third, the trained adapters learned a procedure tied to the form of the training data: worked\-solution supervision outperformed answer\-only supervision, and transfer was stronger for new wording than for higher difficulty levels or unseen combinations of known elements\. Fourth, the adapters applied that procedure to an untrained task that resembled their inputs and their accuracy collapsed, whereas the patch preserved performance\.

## 2Background and Related Work

Fine\-tuning a pre\-trained network changes behaviour reliably but can overwrite earlier competence, a problem first described for connectionist networks as catastrophic interference\[[27](https://arxiv.org/html/2611.27089#bib.bib27)\]and addressed with regularisation\[[28](https://arxiv.org/html/2611.27089#bib.bib28)\]and rehearsal\[[29](https://arxiv.org/html/2611.27089#bib.bib29)\]\. Low\-rank adaptation adds a trainable product of two thin matrices to each frozen weight\[[4](https://arxiv.org/html/2611.27089#bib.bib4)\]\. The observation that fine\-tuning objectives can be optimised in low\-dimensional subspaces\[[30](https://arxiv.org/html/2611.27089#bib.bib30),[31](https://arxiv.org/html/2611.27089#bib.bib31)\]explains why very low ranks often suffice\. Restricting the update does not remove forgetting: LoRA forgets less than full fine\-tuning but also learns less\[[20](https://arxiv.org/html/2611.27089#bib.bib20)\], continual instruction tuning degrades general knowledge and reasoning\[[21](https://arxiv.org/html/2611.27089#bib.bib21)\], fine\-tuning can distort pretrained features and reduce out\-of\-distribution performance\[[32](https://arxiv.org/html/2611.27089#bib.bib32)\], and changes in implicit task inference can suppress existing capabilities\[[33](https://arxiv.org/html/2611.27089#bib.bib33)\]\.

Targeted editing draws on the computational structure of the network\. Feed\-forward layers act as key–value memories\[[34](https://arxiv.org/html/2611.27089#bib.bib34)\], and individual neurons or low\-rank directions can be associated with specific facts\[[35](https://arxiv.org/html/2611.27089#bib.bib35),[7](https://arxiv.org/html/2611.27089#bib.bib7)\]\. Locate\-then\-edit methods use this structure to solve for a closed\-form update\[[7](https://arxiv.org/html/2611.27089#bib.bib7),[8](https://arxiv.org/html/2611.27089#bib.bib8)\], learned editors predict the update from a gradient\[[9](https://arxiv.org/html/2611.27089#bib.bib9),[10](https://arxiv.org/html/2611.27089#bib.bib10)\], and steering methods add or remove a direction in the activations at inference time\[[12](https://arxiv.org/html/2611.27089#bib.bib12),[13](https://arxiv.org/html/2611.27089#bib.bib13)\]\. Removing a single direction can disable refusal\[[14](https://arxiv.org/html/2611.27089#bib.bib14)\], which shows that some behaviours are mediated by very low\-dimensional structure\. Where an edit should be applied is not always where causal analysis locates the information\[[36](https://arxiv.org/html/2611.27089#bib.bib36)\]\. Weight\-space programming differs from these methods in that the edit is designed by a language model that requests measurements and writes code against the weights\[[15](https://arxiv.org/html/2611.27089#bib.bib15)\]\. Its published results concern removing an obstacle, looping, that prevented a model from completing its reasoning\.

Spatial question answering has been studied since the bAbI tasks\[[22](https://arxiv.org/html/2611.27089#bib.bib22)\]\. StepGame added multi\-hop chains and a large set of sentence templates\[[23](https://arxiv.org/html/2611.27089#bib.bib23)\], SpartQA added more complex spatial descriptions\[[24](https://arxiv.org/html/2611.27089#bib.bib24)\], and a corrected release of StepGame removed label errors and showed that mapping each statement to coordinates makes the task largely mechanical\[[26](https://arxiv.org/html/2611.27089#bib.bib26)\]; we use that release\. Intermediate\-step supervision and reasoning prompts, including scratchpads, chain\-of\-thought demonstrations and zero\-shot reasoning instructions, help language models with multi\-step computation\[[37](https://arxiv.org/html/2611.27089#bib.bib37),[38](https://arxiv.org/html/2611.27089#bib.bib38),[39](https://arxiv.org/html/2611.27089#bib.bib39)\]\.

Neural sequence models often fail to recombine known parts in new ways\[[40](https://arxiv.org/html/2611.27089#bib.bib40)\], to extend procedures to longer inputs than those seen in training\[[41](https://arxiv.org/html/2611.27089#bib.bib41)\], or to compose subroutines reliably as depth grows\[[42](https://arxiv.org/html/2611.27089#bib.bib42)\]\. Written reasoning need not reflect the computation that produces the answer\[[43](https://arxiv.org/html/2611.27089#bib.bib43)\], a point that becomes concrete in Section[8](https://arxiv.org/html/2611.27089#S8)\. Linear probes\[[44](https://arxiv.org/html/2611.27089#bib.bib44),[45](https://arxiv.org/html/2611.27089#bib.bib45)\]are the usual way to ask whether a quantity is represented at a given layer, and we use them to decide whether a closed\-form write has a signal to amplify\.

## 3Experimental Setup

### 3\.1Models

The editing and training experiments used Qwen3\.5\-0\.8B at Hugging Face revision2fc06364as the base model\[[16](https://arxiv.org/html/2611.27089#bib.bib16)\], a hybrid architecture that combines attention with gated delta\-rule layers\[[46](https://arxiv.org/html/2611.27089#bib.bib46)\]\. The weight\-space\-programming patch p50c \(revisiond1671a17\) differs from the base model in exactly two tensors, the MLP down\-projections of layers 15 and 19 \(7,340,032 elements, of which 130,188 differ after BF16 storage\); adding the float32 difference to the base weights reproduces p50c bit for bit\. The project workstation is equipped with an Intel Core i9\-14900K CPU and an NVIDIA RTX 4090 GPU\.

### 3\.2Tasks and Benchmarks

Qualitative spatial relations are conventionally divided into topological, directional and distance relations\[[47](https://arxiv.org/html/2611.27089#bib.bib47)\], and directional relations are further distinguished by the frame of reference in which they are expressed\[[25](https://arxiv.org/html/2611.27089#bib.bib25)\]\. The four task families of this study cover directional and distance relations and serve two roles \(Table[1](https://arxiv.org/html/2611.27089#S3.T1)\)\. All items come from one frozen task file and were used unchanged\.

The two target tasks, on which the closed\-form edits were designed and the adapters were trained, measure directional reasoning, and they were chosen to separate two component skills\. The reference\-frame task isolates a single transformation without chaining\. A direction defined in a fixed, absolute frame \(a map with north up\) must be re\-expressed in the relative frame defined by an observer’s heading, which requires computing two coordinate differences, deciding which of them dominates, and rotating the resulting compass direction by the heading\. StepGame measures the complementary skill\. All of its relations are stated in one fixed frame, and the answer is obtained by composing relations along the query path, each expressed through one of many sentence templates \(compass terms, clock positions, angles and plain prepositions\), and the story also contains statements that do not lie on the path between the two queried agents\. Both tasks have exact symbolic solutions against which the worked solutions of Section[6](https://arxiv.org/html/2611.27089#S6)and the models’ written intermediate steps can be checked\. On both, the base model has low accuracy and p50c answers correctly on only part of the items, so there is room for a change to show a gain\.

The two off\-target families measure what a change to the model should leave intact\. The map family asks which of two points is nearer to a third in straight\-line distance\. It is a distance relation that uses the same coordinate format as the reference\-frame task but a different computation, the comparison of\(Δ​x\)2\+\(Δ​y\)2\(\\Delta x\)^\{2\}\+\(\\Delta y\)^\{2\}between two candidates\. Its 128 items were constructed so that simple shortcuts fail: in 64 of them the city\-block distance\|Δ​x\|\+\|Δ​y\|\|\\Delta x\|\+\|\\Delta y\|gives the opposite answer to the Euclidean distance, in 64 the correct answer differs from the one obtained by comparingxxoffsets alone, and each of the answers B and C occurs 64 times\. The product family repeats every map item with the same numbers and the same answer but describes the points as products with a price and a weight, so it requires the same arithmetic without spatial language\. A loss on both families indicates that the computation itself or its use has been disturbed; a loss on the map family alone would indicate a reaction to spatial wording\. p50c answers more than 90% of the items of both families correctly \(Section[9](https://arxiv.org/html/2611.27089#S9)\), so a drop on them is a cost of the change and not a pre\-existing weakness\.

Table 1:The four task families\. Examples are quoted verbatim from the frozen task file, with the line breaks of the StepGame story replaced by spaces and the closing answer\-format instruction omitted \(“Answer with one word\.”, “Return only the label\.” with the list of nine labels, or “Answer with one letter\.”\)\. Target families were used for editing, training and the main evaluation; off\-target families were used only to measure side effects \(Section[9](https://arxiv.org/html/2611.27089#S9)\)\.In the map example, comparingxxoffsets alone \(72 against 78\) would select B, whereas the squared distances are 11,113 and 6,085, so the answer is C\. In the StepGame example, placingIIat\(0,0\)\(0,0\)givesX=\(1,0\)X=\(1,0\)andT=\(0,0\)T=\(0,0\)from the fifth and first statements, andW=T−\(1,1\)=\(−1,−1\)W=T\-\(1,1\)=\(\-1,\-1\)from the second, soWWis lower\-left ofII; the third and fourth statements are not needed\.

The reference\-frame task consists of 128 items of the form*“On a flat map, x increases east and y increases north\. An observer stands at\(ox,oy\)\(o\_\{x\},o\_\{y\}\)facinghh\. A landmark is at\(tx,ty\)\(t\_\{x\},t\_\{y\}\)\. Relative to the observer, is the landmark ahead, behind, left, or right?”*The items cover all 16 combinations of heading and answer, eight items each, and the offset along the minor axis is at most 0\.4 times the offset along the major axis\. With compass indicesc⁡\(north\)=0,…,c⁡\(west\)=3c\(\\text\{north\}\)=0,\\dots,c\(\\text\{west\}\)=3and relative indicesρ⁡\(ahead\)=0,ρ⁡\(right\)=1,ρ⁡\(behind\)=2,ρ⁡\(left\)=3\\rho\(\\text\{ahead\}\)=0,\\ \\rho\(\\text\{right\}\)=1,\\ \\rho\(\\text\{behind\}\)=2,\\ \\rho\(\\text\{left\}\)=3, the gold answer is

ρ∗=\(c⁡\(w\)−c⁡\(h\)\)mod4,w=\{east if​Δ​x\>0,west otherwise,\|Δ​x\|\>\|Δ​y\|,north if​Δ​y\>0,south otherwise,otherwise,\\rho^\{\\ast\}=\\bigl\(c\(w\)\-c\(h\)\\bigr\)\\bmod 4,\\qquad w=\\begin\{cases\}\\text\{east if \}\\Delta x\>0,\\ \\text\{west otherwise\},&\|\\Delta x\|\>\|\\Delta y\|,\\\\ \\text\{north if \}\\Delta y\>0,\\ \\text\{south otherwise\},&\\text\{otherwise,\}\\end\{cases\}\(1\)whereΔ​x=tx−ox\\Delta x=t\_\{x\}\-o\_\{x\}andΔ​y=ty−oy\\Delta y=t\_\{y\}\-o\_\{y\}\. The StepGame set consists of 200 items, 20 for each dataset difficulty levelkkfrom 1 to 10, from the validation split of the corrected release \(repositoryFangjun\-Li/SpatialLM\-StepGame, revision1114cb58\)\. We usekkfor the source dataset’s level designation; the number of relations on the query path is determined by the story\. Each statement relates two agents through one of nine labels, which correspond to the unit offsetsv∈\{−1,0,1\}2v\\in\\\{\-1,0,1\\\}^\{2\}; for the relation ofPPtoQQthe gold label is\(sgn⁡\(dx\),sgn⁡\(dy\)\)\\bigl\(\\operatorname\{sgn\}\(d\_\{x\}\),\\operatorname\{sgn\}\(d\_\{y\}\)\\bigr\)withd=pos⁡\(P\)−pos⁡\(Q\)d=\\mathrm\{pos\}\(P\)\-\\mathrm\{pos\}\(Q\)obtained by composing the offsets along the chain\. For the two distance families the gold answer is the candidateX∈\{B,C\}X\\in\\\{B,C\\\}that minimises\(xX−xA\)2\+\(yX−yA\)2\(x\_\{X\}\-x\_\{A\}\)^\{2\}\+\(y\_\{X\}\-y\_\{A\}\)^\{2\}; ties do not occur\.

### 3\.3Decoding and Scoring

Items, prompts, system prompt, gold labels and scoring rules were fixed before the experiments reported here and verified by hash before every evaluation\. The main comparisons used the chat template with thinking enabled, at most 32,768 new tokens, nucleus sampling\[[48](https://arxiv.org/html/2611.27089#bib.bib48)\]with temperature 0\.6, top\-pp0\.95 and top\-kk20, presence penalty 1\.5 and batches of 64\. A rule\-based parser read the final label after the thinking block, and an output without a parseable label counts as incorrect\. The base, p50c, prompting and principal LoRA comparisons used three seeds,s0\+ks\_\{0\}\+kfork∈\{0,1,2\}k\\in\\\{0,1,2\\\}, wheres0s\_\{0\}is 191071 for the reference\-frame task and 201071 for StepGame, and each batch of 64 used seeds0\+k\+offsets\_\{0\}\+k\+\\text\{offset\}\. Single\-seed editing and control evaluations are identified with their results; the thinking\-off diagnostics are described in Section[5](https://arxiv.org/html/2611.27089#S5)\.

### 3\.4Evaluation Criteria and Statistical Tests

A condition was counted as improved on a task when it exceeded p50c by at least ten percentage points\. Withaka\_\{k\}the number of correct items for seedkkandNNthe number of items, the criterion is

13​∑kak≥a¯p​50​c\+0\.1​Nandmink⁡ak\>maxk⁡akp​50​c,\\tfrac\{1\}\{3\}\\textstyle\\sum\_\{k\}a\_\{k\}\\;\\geq\\;\\bar\{a\}\_\{p50c\}\+0\.1N\\quad\\text\{and\}\\quad\\min\_\{k\}a\_\{k\}\>\\max\_\{k\}a^\{p50c\}\_\{k\},\(2\)which witha¯p​50​c=28\.3\\bar\{a\}\_\{p50c\}=28\.3and67\.367\.3requires a mean of at least 41\.1/128 and 87\.3/200 and every seed above 34 and 69\. Paired comparisons between two models on the same items and seed used the exact two\-sided McNemar test\[[49](https://arxiv.org/html/2611.27089#bib.bib49)\],p=min⁡\{1,2​∑i≤min⁡\(b,c\)\(b\+ci\)​2−\(b\+c\)\}p=\\min\\\{1,\\ 2\\sum\_\{i\\leq\\min\(b,c\)\}\\binom\{b\+c\}\{i\}2^\{\-\(b\+c\)\}\\\}, wherebbandcccount the items answered correctly by only one of the two models\.

## 4Further Weight Edits Did Not Improve on the Public Patch

Five experiments attempted to add to p50c with gradient\-free edits of at most 0\.1% of the weights, and none improved on it\. In the first, an independent editing model \(GPT\-6 Astra\) was given tool access to the weights and activations of p50c and to a development subset of 32 reference\-frame and 40 StepGame items\. It submitted an edit to four MLP output matrices \(85,519 BF16 values, 0\.011% of the weights\) that reinforced a direction separating early and late states of failing trajectories\. On the full benchmark this edit scored 31/128 and 65/200, below the seed\-matched p50c scores of 34/128 and 69/200 and indistinguishable from a matched random perturbation \(26/128 and 67/200\)\. A second editing session targeted the inversion of a queried relation in StepGame; the selected activation direction worsened the log\-probability margin of the correct continuation more than a random direction of the same norm, and no weight was written\.

The remaining experiments were designed from mechanistic measurements\. A mapping that depends on the heading, written as eight conjunctive neurons in layer 20, in the key–value form of an MLP layer\[[34](https://arxiv.org/html/2611.27089#bib.bib34)\], raised the teacher\-forced accuracy of the mapping statements for non\-north headings on held\-out trajectories from 0\.267 to 0\.653, short of the pre\-set gate of 0\.70\. On the development subset this edit gave 10/32 on the reference frame \(p50c 7, gate 11\) and 13/40 on StepGame \(p50c 17, gate 15\), and it was not carried to the full benchmark\. A final experiment looked for the answer itself at the conclusion positions of p50c’s reasoning\. A ridge\-regularised linear probe\[[44](https://arxiv.org/html/2611.27089#bib.bib44)\]in layer 20 predicted the gold answer with accuracy 0\.376 against a gate of 0\.60, and the comparison of\|Δ​x\|\|\\Delta x\|with\|Δ​y\|\|\\Delta y\|that Equation[1](https://arxiv.org/html/2611.27089#S3.E1)requires was readable with accuracy 0\.536, close to the chance level of 0\.5\. The probe did not meet the selection gate, and no candidate was produced\.

## 5The Public Patch’s Gains Depended on Edit Structure

Three simpler questions about p50c itself precede the comparison with training \(Table[2](https://arxiv.org/html/2611.27089#S5.T2)\)\. The first is whether its gain comes from the specific pattern of its edit or from perturbing two MLP matrices by a given amount\. LetΔℓ=Wℓp​50​c−Wℓbase\\Delta\_\{\\ell\}=W^\{p50c\}\_\{\\ell\}\-W^\{\\text\{base\}\}\_\{\\ell\}for each of the two edited tensors\. We formedWℓ′=Wℓbase\+vec−1⁡\(Π​vec⁡\(Δℓ\)\)W^\{\\prime\}\_\{\\ell\}=W^\{\\text\{base\}\}\_\{\\ell\}\+\\operatorname\{vec\}^\{\-1\}\\\!\\bigl\(\\Pi\\,\\operatorname\{vec\}\(\\Delta\_\{\\ell\}\)\\bigr\), whereΠ\\Piis a uniformly random permutation of the tensor’s elements, which keeps the distribution, number of non\-zero entries and norm of the change but destroys its arrangement\. Two independent permutations scored 1/128 and 3/128 on the reference frame and 39/200 and 40/200 on StepGame, the same as the base model \(0/128 on all three seeds; 39, 38 and 38/200\) and far below p50c\. The gain of p50c therefore depends on the structure of its edit\. The base model’s failures were almost entirely non\-terminations: 126 to 127 of its 128 reference\-frame outputs and 135 to 140 of its 200 StepGame outputs reached the 32,768\-token limit, whereas p50c reached it on 3 and 5\. The patch’s effect on these tasks is thus consistent with the repair of looping reported for mathematics\[[15](https://arxiv.org/html/2611.27089#bib.bib15)\]\.

The second question is whether the procedure that training later supplied could be supplied by the prompt instead, as instructions or demonstrations often can\[[50](https://arxiv.org/html/2611.27089#bib.bib50),[39](https://arxiv.org/html/2611.27089#bib.bib39)\]\. We prefixed each original prompt with a description of the solution method, and in a second condition with the same description followed by two worked examples generated by the training programs of Section[6](https://arxiv.org/html/2611.27089#S6)\(not benchmark items\); the original prompt followed unchanged\. Neither condition improved p50c\. The method description gave 26\.0/128 and 61\.0/200, and the worked examples gave 10\.0/128 and 65\.3/200\. Many of these outputs ended their reasoning without a parseable label, for example 96 to 103 of 128 reference\-frame outputs in the worked\-example condition, so the instructions changed the form of the answers more than their correctness\.

The third question is what the model does when the thinking block, in which the base model loops, is switched off\. This diagnostic locates the effect of the patch and is reported separately from Table[2](https://arxiv.org/html/2611.27089#S5.T2)\. With the original prompts, which ask for one word or one label, the base model and p50c both answered in one or two tokens \(one seed, at most 1,024 new tokens, a limit that no output reached\) and scored at the level of always choosing the most frequent label \(32/128 and 38/200\): 36 and 38/128 on the reference frame and 38 and 36/200 on StepGame\. Without a reasoning trace the patch therefore had no effect\. We then gave the base model, still with thinking off, a system prompt that asks it to reason step by step before answering and to write the answer on a final line of the formAnswer: <label\>; the user prompts were unchanged, and decoding otherwise followed Section[3](https://arxiv.org/html/2611.27089#S3), including the limit of 32,768 tokens\. The model then wrote its reasoning in the visible answer, on average 1,300 to 1,800 tokens on the reference frame and 4,300 to 4,800 on StepGame, and reached the token limit on at most 2 and 10 items per run\. It scored 38\.0/128 \(31, 40 and 43\) on the reference frame and 51\.0/200 \(51, 52 and 50\) on StepGame\. On the two distance families, on which the base model scores 13 and 17 with thinking on because it does not finish \(Section[9](https://arxiv.org/html/2611.27089#S9)\), it scored 123\.0/128 and 114\.7/128, close to the 120\.3 and 118\.0 of p50c\. Adding the method description to this prompt lowered the target scores to 31\.3/128 and 42\.3/200, and adding the worked examples gave 34\.7/128 and 40\.7/200\.

When the base model was kept from looping, it therefore solved the distance questions as well as p50c and part of StepGame\. On StepGame the seed\-0 score exceeded every one of 10,000 random reassignments of its predictions that keep their label frequencies, but the mean stayed below the 67\.3 of p50c\. On the reference frame the mean remained close to the most\-frequent\-label level of 32, which p50c with thinking on \(28\.3\) does not exceed either, and the seed\-0 score was not distinguishable from such a reassignment \(p=0\.32p=0\.32\)\. These results support the reading that the base model’s failures in thinking mode were mainly non\-terminations of an existing computation, while reference\-frame performance remained near the most\-frequent\-label baseline\.

Table 2:Accuracy on the original benchmark items \(correct items per seed and mean\)\. Changed or trainable parameters are given as a fraction of the language\-model parameters\. p50c is the published weight\-space\-programming patch; “further closed\-form edit” is the best submitted candidate of Section[4](https://arxiv.org/html/2611.27089#S4)\(one seed\)\. The shuffled\-delta rows are two independent permutations, each evaluated with seed 0\. An asterisk marks conditions that meet the improvement criterion of Equation[2](https://arxiv.org/html/2611.27089#S3.E2)on that task\.Reference frame \(/128\)StepGame \(/200\)ConditionChangedSeedsMeanSeedsMeanBase model–0 / 0 / 00\.039 / 38 / 3838\.3Base \+ shuffled p50c delta0\.016%1, 32\.039, 4039\.5p50c0\.016%34 / 25 / 2628\.369 / 67 / 6667\.3p50c \+ further closed\-form edit0\.011%3131\.06565\.0p50c \+ method instruction–24 / 26 / 2826\.056 / 61 / 6661\.0p50c \+ worked examples–12 / 8 / 1010\.070 / 59 / 6765\.3LoRA rank 16, answer\-only1\.44%32 / 26 / 3330\.329 / 17 / 2724\.3LoRA rank 10\.09%128 / 128 / 128128\.0∗196 / 198 / 199197\.7∗LoRA rank 161\.44%128 / 128 / 127127\.7∗191 / 186 / 190189\.0∗LoRA rank 16, 1,792 examples1\.44%127 / 126 / 128127\.0∗193 / 194 / 190192\.3∗LoRA rank 16, 448 examples1\.44%123 / 123 / 122122\.7∗185 / 180 / 179181\.3∗LoRA rank 16, trained from base1\.44%120 / 121 / 119120\.0∗194 / 195 / 193194\.0∗
## 6LoRA Surpassed the Public Patch on Both Spatial Tasks

### 6\.1Training Procedure

We trained LoRA adapters on p50c with supervision on a worked solution written inside the thinking block, in the manner of scratchpad supervision\[[37](https://arxiv.org/html/2611.27089#bib.bib37)\]\. Table[3](https://arxiv.org/html/2611.27089#S6.T3)lists the settings\. For the reference frame, 2,048 training scenes \(128 for each heading–answer combination\) and 128 held\-out scenes were drawn from the benchmark’s generator with a new seed, excluding every scene that appears in any task file of the project\. The target text states the heading’s mapping, computes the offsets, names the dominant world direction and converts it, for example

> Facing north: ahead is north, right is east, behind is south, left is west\. dx = 8 \- 10 = \-2, dy = 74 \- 49 = 25\. \|dx\| = 2 and \|dy\| = 25, so the y offset dominates and the landmark lies mainly north\. North is ahead for an observer facing north\.

followed by the closing thinking tag and the label\. For StepGame, 512 training and 20 held\-out problems per hop were drawn from the official training split\. Problems that matched a benchmark item after renaming the agents in order of appearance \(1,378, including the one exact duplicate\) and problems with a story identical to a benchmark story were excluded\. The worked solution was produced by a symbolic solver that maps each of 196 sentence templates, induced from one\-hop training problems only, to an offset and composes the offsets along the chain \(Offsets \(x right, y up\): \.\.\. Put P at \(0, 0\) \.\.\.\)\. The solver reproduced the official label of all 200,265 training problems, all 6,639 validation problems and all 200 benchmark items; benchmark labels were used only for this check\. No model output entered any training target\.

WithWWa frozen linear weight, the adapter addsΔ​W=s​B​A\\Delta W=s\\,BAwithA∈ℝr×dinA\\in\\mathbb\{R\}^\{r\\times d\_\{\\text\{in\}\}\},B∈ℝdout×rB\\in\\mathbb\{R\}^\{d\_\{\\text\{out\}\}\\times r\}and scales=20s=20\[[4](https://arxiv.org/html/2611.27089#bib.bib4)\], applied to the linear modules within all 24 decoder layers\. The loss is the token\-mean cross\-entropy over the target tokens𝒯\\mathcal\{T\}only \(worked solution, closing tag, label and end\-of\-turn token\),

ℒ\(θ\)=−1∑b\|𝒯b\|∑b∑t∈𝒯blogpθ\(yb,t∣yb,<t\)\.\\mathcal\{L\}\(\\theta\)=\-\\frac\{1\}\{\\sum\_\{b\}\|\\mathcal\{T\}\_\{b\}\|\}\\sum\_\{b\}\\sum\_\{t\\in\\mathcal\{T\}\_\{b\}\}\\log p\_\{\\theta\}\\bigl\(y\_\{b,t\}\\mid y\_\{b,<t\}\\bigr\)\.\(3\)Each training batch of 16 was split into four micro\-batches with per\-layer gradient checkpointing\[[51](https://arxiv.org/html/2611.27089#bib.bib51)\]; weighting each micro\-batch by its share of target tokens makes the accumulated gradient identical to that of a single batch\. Checkpoints were saved at 384, 768 and 1,536 steps and scored on the generator held\-out sets\. The first checkpoint that reached 0\.90 on the reference frame and 0\.50 on StepGame was selected, and benchmark items were never used for selection\.

Table 3:LoRA training settings shared by all gradient conditions unless a row of Table[2](https://arxiv.org/html/2611.27089#S5.T2)states otherwise\.
### 6\.2Target\-Task Performance

Gradient training succeeded where the closed\-form edits had not \(Figure[1](https://arxiv.org/html/2611.27089#S6.F1)\)\. An adapter trained on the reference frame alone reached 128/128 on all three seeds, but it answered every StepGame question with the reference\-frame template and fell to 12/200 on seed 0\. Training on both tasks together removed this collapse: the mixed adapter passed the selection gate at the first checkpoint \(384 steps, held\-out 128/128 and 190/200\) and scored 128, 128 and 127 on the reference frame and 191, 186 and 190 on StepGame, meeting Equation[2](https://arxiv.org/html/2611.27089#S3.E2)on both tasks\. Its outputs were short and always terminated\.

To exclude the possibility that the gain came from the short answer format rather than from what the supervision said, we trained a control adapter on the same data, in the same order and for the same 384 steps, with a different initialisation seed and with every conclusion and label shifted to a fixed wrong label \(one step clockwise for the reference frame; the next label in the label list for StepGame\)\. Scored against the true gold labels it obtained 0/128 and 0/200, and its predictions matched the shifted labels on 128 of 128 and 197 of 200 items\. The adapters therefore carry out the mapping that they were taught\.

Figure 1:Accuracy of the base model, the weight\-space\-programming patch p50c and its variants, prompting baselines and LoRA adapters on the original reference\-frame \(128 items\) and StepGame \(200 items\) benchmarks\. Bars show the mean over seeds and dots the individual seeds; the dashed line marks the three\-seed mean of p50c\. Randomly permuting the elements of p50c’s weight change within each tensor returns accuracy to the base level, prompting does not improve on p50c, and LoRA adapters trained on worked solutions approach ceiling on both tasks even at rank 1, provided the supervision includes the intermediate steps\.

## 7Supervision Mattered More Than Adapter Rank

Each of three ablations changed one property of the mixed adapter and kept everything else \(Table[2](https://arxiv.org/html/2611.27089#S5.T2)\)\. Reducing the rank from 16 to 1 reduced the trainable parameters to 676,416, or 0\.09% of the model, the same order of magnitude as the closed\-form edits of Section[4](https://arxiv.org/html/2611.27089#S4)\. The rank\-1 adapter passed the gate at 384 steps and scored 128/128 on all seeds and 196, 198 and 199/200\. This result is consistent with the low intrinsic dimension of fine\-tuning objectives\[[30](https://arxiv.org/html/2611.27089#bib.bib30),[31](https://arxiv.org/html/2611.27089#bib.bib31)\]: high target accuracy was achieved with a small trainable update\.

Keeping the data but removing the worked solution from the target, so that the model was supervised only on the label after thinking freely, reduced target accuracy\. No checkpoint passed the gate \(the best, at 768 steps, reached 0\.27 and 0\.08 on the held\-out sets\), and the selected checkpoint scored 30\.3/128 and 24\.3/200, the latter well below p50c\. Worked\-solution supervision produced the target gains in this comparison, consistent with the value of intermediate steps for multi\-step computation\[[37](https://arxiv.org/html/2611.27089#bib.bib37),[38](https://arxiv.org/html/2611.27089#bib.bib38)\]\. The amount of data needed was small \(Figure[2](https://arxiv.org/html/2611.27089#S7.F2)\)\. Using the first 448 examples of the training file \(128 reference\-frame scenes and 32 StepGame problems per hop, about 14 epochs at 384 steps\) already gave 122\.7/128 and 181\.3/200, and 1,792 examples matched the full set\.

Finally, we trained the same adapter from the base model instead of p50c, with all other settings unchanged\. It passed the gate at the same step and scored 120, 121 and 119/128 and 194, 195 and 193/200, with no output reaching the token limit although the base model itself exhausted the budget on almost every item\. A margin of five percentage points around the adapter trained from p50c \(121\.3 and 179\.0\) was set in advance for concluding that the starting point does not matter\. StepGame was within the margin and slightly higher; the reference frame was 7\.7 items \(6\.0 points\) below it, so by that rule p50c helped the training on the reference frame\. Training does not need p50c to reach high accuracy on either task\.

Figure 2:Accuracy of rank\-16 LoRA adapters trained with step\-by\-step supervision on 448, 1,792 and 7,168 examples \(reference\-frame scenes plus StepGame problems in a fixed 2:5 ratio\), evaluated on the original benchmark items with three seeds \(dots\) and their mean \(line\)\. The dashed line is the three\-seed mean of the weight\-space\-programming patch p50c\. Accuracy is already far above p50c with 448 examples and saturates by 1,792\.
## 8Transfer Was Stronger to New Wording Than to New Combinations

The training data of Section[6](https://arxiv.org/html/2611.27089#S6)came from the same generator or the same corpus as the benchmark items\. To measure generalisation without changing the benchmark, we trained two further mixed adapters with parts of the input space removed from training and scored them on the subsets of the original items that fall into the removed parts \(Figure[3](https://arxiv.org/html/2611.27089#S8.F3), Table[4](https://arxiv.org/html/2611.27089#S8.T4)\)\. In both adapters the reference\-frame training data excluded four heading–answer combinations, \(north, ahead\), \(east, right\), \(south, behind\) and \(west, left\), so that each heading and each answer was still seen with three other partners, a split in the spirit of compositional generalisation tests\[[40](https://arxiv.org/html/2611.27089#bib.bib40)\]\. The “hop” adapter was trained on StepGame problems at levels 1 to 5 only \(1,024 per level\) and tested on the 100 benchmark items at levels 6 to 10, a test of transfer across dataset difficulty levels motivated by length\-generalisation studies\[[41](https://arxiv.org/html/2611.27089#bib.bib41)\]\. The “template” adapter was trained on all levels but without 46 of the 196 sentence templates, chosen at random within each direction, and tested on the 140 benchmark items that contain at least one held\-out template\.

Table 4:Accuracy on the held\-out subsets of the original items \(mean of three seeds\)\. “No hold\-out” is the mixed adapter of Section[6](https://arxiv.org/html/2611.27089#S6), which saw all parts of the input space\. The McNemar test compares the held\-out adapter with p50c on seed 0 \(bb: only the adapter correct;cc: only p50c correct\)\.Generalisation depended on what was held out\. New wording transferred well: on items containing unseen templates the template adapter scored 0\.82, close to the 0\.95 of the adapter that had seen every template\. Transfer to higher difficulty levels was partial: the hop adapter scored 0\.42 at levels 6 to 10, twice the 0\.22 of p50c but far below the 0\.93 obtained when those levels were included in training, and its accuracy fell steadily with dataset level, from 0\.55 at level six to 0\.22 at level ten, consistent with increasing difficulty in compositional tasks\[[42](https://arxiv.org/html/2611.27089#bib.bib42)\]\. It was also lower than the full adapter at the trained levels 3 to 5 \(0\.75, 0\.75 and 0\.70 against 0\.95, 0\.92 and 0\.93\)\. Transfer to new combinations was weaker: on the four held\-out heading–answer cells the two adapters scored 0\.50 and 0\.33, neither significantly different from p50c\. Reading these outputs showed a specific failure\. In the held\-out cells whose world direction is south, \(east, right\) and \(west, left\), almost every answer was*behind*, the answer that south has for a north\-facing observer\. For a scene with heading east, an adapter would correctly write “right is south” in the mapping line and then conclude “South is behind for an observer facing east”\. The correct mapping statement was followed by an incompatible conclusion, illustrating the inconsistency between written reasoning and final answers discussed by[Turpin et al\. \[43\]](https://arxiv.org/html/2611.27089#bib.bib43)\. The outputs followed a familiar heading–answer association instead of the transformation in Equation[1](https://arxiv.org/html/2611.27089#S3.E1)\.

Figure 3:Generalisation of LoRA adapters to parts of the input space removed from training, measured on the corresponding subsets of the original benchmark items \(three\-seed means\)\. \(a\) Accuracy of p50c, the adapter trained without the held\-out part, and the adapter trained on everything\. \(b\) StepGame accuracy by dataset difficulty level for p50c, an adapter trained on all levels, and an adapter trained on levels 1–5 only; the shaded region contains levels absent from that adapter’s training data\. Accuracy is highest on unseen sentence templates and lower on held\-out difficulty levels and heading–answer combinations\.
## 9Spatial Adaptation Disrupted Distance Reasoning

The single\-task adapter of Section[6](https://arxiv.org/html/2611.27089#S6)had shown that training on one task can take over another\. To ask whether the mixed adapters had a similar side effect, we evaluated p50c and three adapters \(rank 16 from p50c, rank 1, and rank 16 from base\) on the two distance\-comparison families that were part of the original task file but never used in training or selection\. The first asks which of two points is closer to a third on a map; the second asks the same question about products described by price and weight\. Seeds and decoding followed the original measurement of these families \(seeds 171071 and 181071, pluskk\)\.

The result was a near\-complete collapse in distance\-task accuracy \(Figure[4](https://arxiv.org/html/2611.27089#S9.F4)\)\. p50c answered 120\.3/128 and 118\.0/128 correctly on average, whereas all three adapters scored between 0 and 2 on both families; the rank\-16 adapters scored 0 on every seed \(McNemar against p50c on seed 0,p<10−34p<10^\{\-34\}for every adapter and family\)\. The outputs showed a consistent change in task interpretation\. The adapters treated the distance question as a StepGame problem: they opened the thinking block withOffsets \(x right, y up\):, converted the points into offsets, and after the thinking block returned a direction label such as*upper\-right*instead of the letter B or C that the question asked for\. This happened on all 128 items of the map\-worded family for every adapter and seed, and on all items of the product\-worded family for both rank\-16 adapters, although that family contains no spatial language\. The rank\-1 adapter entered the same template and then repeated its last steps until it reached the token limit on 121 to 128 items per run\. In the seed\-0 outputs, which we classified individually, the reference\-frame template never appeared\. The base model, for comparison, scored 13 and 17 on these families, mostly because it did not finish\.

The adapters had therefore learned a procedure that is triggered by the presence of coordinates or paired numbers in a relational question and that displaced distance reasoning in its outputs\. This matches the view that fine\-tuning can change which task a model infers from its input, so that a capability is suppressed rather than erased\[[33](https://arxiv.org/html/2611.27089#bib.bib33)\]\. The closed\-form patch, which improved the target tasks much less, left that reasoning intact\.

Figure 4:Effect of training on two tasks outside the training data: comparing straight\-line distances between points on a map, and the same comparison phrased in terms of product price and weight \(128 original items each, three seeds\)\. \(a\) Accuracy, with seed values as dots and the mean printed above each bar\. \(b\) Percentage of outputs that contain the StepGame worked\-solution template\. The weight\-space\-programming patch p50c answers more than 90% correctly and never uses the template; every LoRA adapter applies the StepGame template to almost every item and answers with a direction label, so its accuracy falls to between 0% and 2%\.
## 10Discussion

The experiments separate several questions that the comparison between writing and training weights tends to merge\. A rank\-1 adapter reached high target accuracy, showing that a small trainable update can support the task mapping\. The contrast with unsuccessful closed\-form edits directs attention to how the update is constructed\. The closed\-form routes tested here sought activation signals that a write could strengthen or remove\. For the reference frame, the linear probe of the offset\-magnitude comparison remained near chance at the inspected conclusion positions\. Gradient training achieved high accuracy with worked solutions, whereas answer\-only training failed to pass the learning gate\. What it learned was a procedure tied to the form of its training data\. It extended to new wording, degraded at higher difficulty levels, transferred weakly to new combinations, and was applied to every question that resembled its inputs, including questions to which it did not belong\.

The weight\-space\-programming patch shows the opposite profile\. Its gain on the spatial tasks is modest and consistent with removing the looping that kept the base model from finishing, an obstacle\-removing edit of the kind that single\-direction interventions achieve for refusal\. That gain is tied to the arrangement of its weight change, and it costs nothing measurable on the neighbouring distance tasks\. The choice between the two is therefore not between a method that works and one that does not\. Training on worked solutions is the reliable way to install a specific procedure, but it should be expected to install that procedure wherever its trigger appears unless the training data say otherwise\. A written edit is narrower in what it can currently achieve and gentler in what it disturbs\. Whether the two can be combined, for example by using a trained adapter to locate a computation and a written edit to install it locally, is an open question that the present results make concrete\.

We also asked whether the comparison could be carried to small instruction\-tuned models that have no thinking mode, Gemma 3 1B \(google/gemma\-3\-1b\-it\) and Llama 3\.2 1B \(meta\-llama/Llama\-3\.2\-1B\-Instruct\)\. They were evaluated on the same 584 items with the same decoding settings, with thinking necessarily off\. With the original prompts both answered the target tasks in one to three tokens, at or below the level of always choosing the most frequent label \(32/128 on the reference frame and 38/200 on StepGame\)\. We then used the step\-by\-step system prompt of Section[5](https://arxiv.org/html/2611.27089#S5), and for the two target tasks added, in two further conditions, the method description and the worked examples used with p50c\. No condition lifted either model above the most\-frequent\-label level on either target task; three\-seed means ranged from 0\.3 to 30\.7 of 128 on the reference frame and from 14\.7 to 28\.3 of 200 on StepGame\. The two models failed in different ways\. Gemma wrote about 300 tokens of reasoning per item, but its arithmetic comparisons were wrong, for instance treating an offset of 1 as larger than one of 25, and with the method description it stopped at a compass direction instead of converting it into an observer\-relative label\. Llama ignored the instruction on the target tasks and still answered in one or two tokens; the method description and the worked examples made it write reasoning without raising its accuracy\. On the distance families Gemma stayed near the chance level of 64/128, and most of Llama’s outputs contained no parseable letter\. These prompting runs did not establish the target or neighbouring\-task performance needed for the same editing\-versus\-training comparison\. The contrast with Qwen3\.5\-0\.8B, which with the same prompt and thinking off solved the distance questions and part of StepGame \(Section[5](https://arxiv.org/html/2611.27089#S5)\), suggests that the edit studied here removes an obstacle to a computation the model already performs, while supervised adaptation supplies a route to high target accuracy\.

The comparison covers one 0\.8B model and two\-dimensional directional and distance tasks; the two additional 1B models were tested with prompting only\. Each adapter was trained once, so the three evaluation seeds measure sampling variation rather than training variation\. Editing and LoRA also used different data volumes and computational budgets, and their parameter counts describe different update structures\. The results therefore compare achieved behaviour rather than equal\-budget efficiency\. The unsuccessful edits and answer\-only ablation establish outcomes for the tested methods, without making worked solutions universally necessary or ruling out other editing strategies\. Similarly, probe failures do not establish the absence of a computation, and distance\-task failures do not establish that its underlying capability was erased\. StepGame’s source\-dataset levels do not directly measure query\-path length, so the held\-out\-level comparison combines changes in story complexity and reasoning demands\. All benchmark items had been inspected before these experiments; Section[8](https://arxiv.org/html/2611.27089#S8)provides the generalisation tests\. Off\-target evaluation covers two related task families, with individual classification of the absence of the reference\-frame template performed for seed 0\. Broader capability preservation and the effect of mixing tasks during training remain to be measured\.

The most direct next step is to mix a small amount of off\-target data into training, as rehearsal methods do for continual learning, and ask whether the take\-over disappears while the target gain remains, together with repeated training runs for the main adapters\. A second direction is to compare the mechanisms: the difference between p50c’s localised change and the adapters’ broad one should be visible in which inputs activate the changed components, and the “written but unused” mapping of Section[8](https://arxiv.org/html/2611.27089#S8)is a concrete target for causal analysis with probes and activation patching\.

## References

- \[1\]Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin de Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly\.Parameter\-efficient transfer learning for NLP\.In*Proceedings of the 36th International Conference on Machine Learning*, 2019\.
- \[2\]Xiang Lisa Li and Percy Liang\.Prefix\-tuning: Optimizing continuous prompts for generation\.In*Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing \(Volume 1: Long Papers\)*, 2021\.doi:10\.18653/v1/2021\.acl\-long\.353\.
- \[3\]Brian Lester, Rami Al\-Rfou, and Noah Constant\.The power of scale for parameter\-efficient prompt tuning\.In*Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing*, 2021\.
- \[4\]Edward J\. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen\-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen\.LoRA: Low\-rank adaptation of large language models\.In*International Conference on Learning Representations*, 2022\.
- \[5\]Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer\.QLoRA: Efficient finetuning of quantized LLMs\.In*Advances in Neural Information Processing Systems*, 2023\.
- \[6\]Shih\-Yang Liu, Chien\-Yi Wang, Hongxu Yin, Pavlo Molchanov, Yu\-Chiang Frank Wang, Kwang\-Ting Cheng, and Min\-Hung Chen\.DoRA: Weight\-decomposed low\-rank adaptation\.In*Proceedings of the 41st International Conference on Machine Learning*, 2024\.
- \[7\]Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov\.Locating and editing factual associations in GPT\.In*Advances in Neural Information Processing Systems*, 2022\.
- \[8\]Kevin Meng, Arnab Sen Sharma, Alex Andonian, Yonatan Belinkov, and David Bau\.Mass\-editing memory in a transformer\.In*International Conference on Learning Representations*, 2023\.
- \[9\]Nicola De Cao, Wilker Aziz, and Ivan Titov\.Editing factual knowledge in language models\.In*Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing*, 2021\.
- \[10\]Eric Mitchell, Charles Lin, Antoine Bosselut, Chelsea Finn, and Christopher D\. Manning\.Fast model editing at scale\.In*International Conference on Learning Representations*, 2022\.
- \[11\]Gabriel Ilharco, Marco Tulio Ribeiro, Mitchell Wortsman, Suchin Gururangan, Ludwig Schmidt, Hannaneh Hajishirzi, and Ali Farhadi\.Editing models with task arithmetic\.In*International Conference on Learning Representations*, 2023\.
- \[12\]Alexander Matt Turner, Lisa Thiergart, Gavin Leech, David Udell, Juan J\. Vazquez, Ulisse Mini, and Monte MacDiarmid\.Steering language models with activation engineering\.arXiv:2308\.10248, 2023\.
- \[13\]Kenneth Li, Oam Patel, Fernanda Viégas, Hanspeter Pfister, and Martin Wattenberg\.Inference\-time intervention: Eliciting truthful answers from a language model\.In*Advances in Neural Information Processing Systems*, 2023\.
- \[14\]Andy Arditi, Oscar Obeso, Aaquib Syed, Daniel Paleka, Nina Panickssery, Wes Gurnee, and Neel Nanda\.Refusal in language models is mediated by a single direction\.In*Advances in Neural Information Processing Systems*, 2024\.
- \[15\]Rikiya Takehi, Jayden Teoh, Alex Zhang, and Omar Khattab\.Sparks of weight\-space programming: LLMs can natively read & write neural network weights\.Blog post,[https://rikiyat\.github\.io/blog/weight\-space\-programming/](https://rikiyat.github.io/blog/weight-space-programming/), November 2026\.Checkpoint:[https://huggingface\.co/RikiyaT/Qwen3\.5\-0\.8B\-weight\-space\-programming](https://huggingface.co/RikiyaT/Qwen3.5-0.8B-weight-space-programming), revision d1671a178705bcab7644806d23c535517f35723b\.
- \[16\]Qwen Team\.Qwen3\.5: Towards native multimodal agents\.[https://qwen\.ai/blog?id=qwen3\.5](https://qwen.ai/blog?id=qwen3.5), February 2026\.Model used:[https://huggingface\.co/Qwen/Qwen3\.5\-0\.8B](https://huggingface.co/Qwen/Qwen3.5-0.8B), revision 2fc06364715b967f1860aea9cf38778875588b17\.
- \[17\]Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt\.Measuring mathematical problem solving with the MATH dataset\.In*Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks*, 2021\.
- \[18\]Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe\.Let’s verify step by step\.In*International Conference on Learning Representations*, 2024\.
- \[19\]Yunzhi Yao, Peng Wang, Bozhong Tian, Siyuan Cheng, Zhoubo Li, Shumin Deng, Huajun Chen, and Ningyu Zhang\.Editing large language models: Problems, methods, and opportunities\.In*Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing*, 2023\.
- \[20\]Dan Biderman, Jacob Portes, Jose Javier Gonzalez Ortiz, Mansheej Paul, Philip Greengard, Connor Jennings, Daniel King, Sam Havens, Vitaliy Chiley, Jonathan Frankle, Cody Blakeney, and John P\. Cunningham\.LoRA learns less and forgets less\.*Transactions on Machine Learning Research*, 2024\.
- \[21\]Yun Luo, Zhen Yang, Fandong Meng, Yafu Li, Jie Zhou, and Yue Zhang\.An empirical study of catastrophic forgetting in large language models during continual fine\-tuning\.*IEEE Transactions on Audio, Speech and Language Processing*, 33:3776–3786, 2025\.doi:10\.1109/TASLPRO\.2025\.3606231\.
- \[22\]Jason Weston, Antoine Bordes, Sumit Chopra, Alexander M\. Rush, Bart van Merriënboer, Armand Joulin, and Tomas Mikolov\.Towards AI\-complete question answering: A set of prerequisite toy tasks\.In*International Conference on Learning Representations*, 2016\.
- \[23\]Zhengxiang Shi, Qiang Zhang, and Aldo Lipani\.StepGame: A new benchmark for robust multi\-hop spatial reasoning in texts\.In*Proceedings of the AAAI Conference on Artificial Intelligence*, 2022\.
- \[24\]Roshanak Mirzaee, Hossein Rajaby Faghihi, Qiang Ning, and Parisa Kordjamshidi\.SpartQA: A textual question answering benchmark for spatial reasoning\.In*Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies*, 2021\.
- \[25\]Stephen C\. Levinson\.*Space in Language and Cognition: Explorations in Cognitive Diversity*\.Cambridge University Press, 2003\.doi:10\.1017/CBO9780511613609\.
- \[26\]Fangjun Li, David C\. Hogg, and Anthony G\. Cohn\.Advancing spatial reasoning in large language models: An in\-depth evaluation and enhancement using the StepGame benchmark\.In*Proceedings of the AAAI Conference on Artificial Intelligence*, 2024\.
- \[27\]Michael McCloskey and Neal J\. Cohen\.Catastrophic interference in connectionist networks: The sequential learning problem\.In*Psychology of Learning and Motivation*, volume 24, pages 109–165\. Academic Press, 1989\.doi:10\.1016/S0079\-7421\(08\)60536\-8\.
- \[28\]James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A\. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska\-Barwinska, Demis Hassabis, Claudia Clopath, Dharshan Kumaran, and Raia Hadsell\.Overcoming catastrophic forgetting in neural networks\.*Proceedings of the National Academy of Sciences*, 114\(13\):3521–3526, 2017\.doi:10\.1073/pnas\.1611835114\.
- \[29\]David Rolnick, Arun Ahuja, Jonathan Schwarz, Timothy P\. Lillicrap, and Greg Wayne\.Experience replay for continual learning\.In*Advances in Neural Information Processing Systems*, 2019\.
- \[30\]Chunyuan Li, Heerad Farkhoor, Rosanne Liu, and Jason Yosinski\.Measuring the intrinsic dimension of objective landscapes\.In*International Conference on Learning Representations*, 2018\.
- \[31\]Armen Aghajanyan, Sonal Gupta, and Luke Zettlemoyer\.Intrinsic dimensionality explains the effectiveness of language model fine\-tuning\.In*Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing \(Volume 1: Long Papers\)*, pages 7319–7328, 2021\.doi:10\.18653/v1/2021\.acl\-long\.568\.
- \[32\]Ananya Kumar, Aditi Raghunathan, Robbie Jones, Tengyu Ma, and Percy Liang\.Fine\-tuning can distort pretrained features and underperform out\-of\-distribution\.In*International Conference on Learning Representations*, 2022\.
- \[33\]Suhas Kotha, Jacob Mitchell Springer, and Aditi Raghunathan\.Understanding catastrophic forgetting in language models via implicit inference\.In*International Conference on Learning Representations*, 2024\.
- \[34\]Mor Geva, Roei Schuster, Jonathan Berant, and Omer Levy\.Transformer feed\-forward layers are key\-value memories\.In*Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing*, pages 5484–5495, 2021\.doi:10\.18653/v1/2021\.emnlp\-main\.446\.
- \[35\]Damai Dai, Li Dong, Yaru Hao, Zhifang Sui, Baobao Chang, and Furu Wei\.Knowledge neurons in pretrained transformers\.In*Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\)*, pages 8493–8502, 2022\.
- \[36\]Peter Hase, Mohit Bansal, Been Kim, and Asma Ghandeharioun\.Does localization inform editing? surprising differences in causality\-based localization vs\. knowledge editing in language models\.In*Advances in Neural Information Processing Systems*, 2023\.
- \[37\]Maxwell Nye, Anders Johan Andreassen, Guy Gur\-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, Charles Sutton, and Augustus Odena\.Show your work: Scratchpads for intermediate computation with language models\.arXiv:2112\.00114, 2021\.
- \[38\]Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, and Denny Zhou\.Chain\-of\-thought prompting elicits reasoning in large language models\.In*Advances in Neural Information Processing Systems*, 2022\.
- \[39\]Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa\.Large language models are zero\-shot reasoners\.In*Advances in Neural Information Processing Systems*, 2022\.
- \[40\]Brenden Lake and Marco Baroni\.Generalization without systematicity: On the compositional skills of sequence\-to\-sequence recurrent networks\.In*Proceedings of the 35th International Conference on Machine Learning*, pages 2873–2882, 2018\.
- \[41\]Cem Anil, Yuhuai Wu, Anders Andreassen, Aitor Lewkowycz, Vedant Misra, Vinay Ramasesh, Ambrose Slone, Guy Gur\-Ari, Ethan Dyer, and Behnam Neyshabur\.Exploring length generalization in large language models\.In*Advances in Neural Information Processing Systems*, 2022\.
- \[42\]Nouha Dziri, Ximing Lu, Melanie Sclar, Xiang Lorraine Li, Liwei Jiang, Bill Yuchen Lin, Peter West, Chandra Bhagavatula, Ronan Le Bras, Jena D\. Hwang, Soumya Sanyal, Sean Welleck, Xiang Ren, Allyson Ettinger, Zaid Harchaoui, and Yejin Choi\.Faith and fate: Limits of transformers on compositionality\.In*Advances in Neural Information Processing Systems*, 2023\.
- \[43\]Miles Turpin, Julian Michael, Ethan Perez, and Samuel R\. Bowman\.Language models don’t always say what they think: Unfaithful explanations in chain\-of\-thought prompting\.In*Advances in Neural Information Processing Systems*, 2023\.
- \[44\]Guillaume Alain and Yoshua Bengio\.Understanding intermediate layers using linear classifier probes\.In*5th International Conference on Learning Representations, Workshop Track*, 2017\.
- \[45\]Yonatan Belinkov\.Probing classifiers: Promises, shortcomings, and advances\.*Computational Linguistics*, 48\(1\):207–219, 2022\.doi:10\.1162/coli\_a\_00422\.
- \[46\]Songlin Yang, Jan Kautz, and Ali Hatamizadeh\.Gated delta networks: Improving Mamba2 with delta rule\.In*International Conference on Learning Representations*, 2025\.
- \[47\]Anthony G\. Cohn and Shyamanta M\. Hazarika\.Qualitative spatial representation and reasoning: An overview\.*Fundamenta Informaticae*, 46\(1\-2\):1–29, 2001\.
- \[48\]Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi\.The curious case of neural text degeneration\.In*International Conference on Learning Representations*, 2020\.
- \[49\]Quinn McNemar\.Note on the sampling error of the difference between correlated proportions or percentages\.*Psychometrika*, 12\(2\):153–157, 1947\.doi:10\.1007/BF02295996\.
- \[50\]Tom B\. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert\-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M\. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei\.Language models are few\-shot learners\.In*Advances in Neural Information Processing Systems*, 2020\.
- \[51\]Tianqi Chen, Bing Xu, Chiyuan Zhang, and Carlos Guestrin\.Training deep nets with sublinear memory cost\.arXiv:1604\.06174, 2016\.
- \[52\]Diederik P\. Kingma and Jimmy Ba\.Adam: A method for stochastic optimization\.In*International Conference on Learning Representations*, 2015\.

Similar Articles

Weight-Space Geometry of Offline Reasoning Training

arXiv cs.LG

This paper investigates whether different offline reinforcement learning losses (RFT, RIFT, DFT, Offline GRPO, DPO) for reasoning distillation produce mechanistically distinct weight updates in a small language model. Using identical math rollouts and a controlled setup with Qwen3-4B and attention-only LoRA, they find that SFT, RFT, and RIFT yield nearly colinear weight deltas, while DPO sits in a near-orthogonal subspace and achieves the highest accuracy.

Training Vision Models for LLM-Driven Weight-Space Programming

Hugging Face Daily Papers

The paper presents a benchmark of LLM-driven weight-space programming on vision models (CNNs and ViTs) across five LLMs and four datasets, introducing Edit-Ready Training (ERT), a method that rehearses closed-form weight edits to substantially improve LLM edit success, achieving the highest mean scores for GPT-6 Astra and Claude Opus 5.5.