Model adaptation / An empirical study

ExploringWeight-SpaceProgramming

Capabilities, Generalization,
and Limitations

Authors
Junru Hu1Cheng Tang1Wei Li1Hongze Zhu1Chun-Mei Feng1,2Qi Zhang1,3Yirong Chen1Ming Hu1
Affiliations
1 Shanghai Artificial Intelligence Laboratory · 2 Tongji University · 3 Fudan University

Can a reasoning agent improve a model by editing its weights? We test the idea across seven benchmarks and two model scales.

A localized edit / MATH primary

1,023

BF16 weight values changed

L23 · MLP down-projection1,024 × 3,584 column 507

W′ = W − u e507⊤

Base accuracy8.35%
Edited accuracy37.80%
Qwen3.5-0.8B · MATH-500 · Parameter support shown schematically
16editing trajectories
7benchmark families
2model scales
≤ 50forward-request budget / search

The idea

Model adaptation,
through direct weight edits.

Weight-Space Programming (WSP) lets a reasoning agent inspect a model, diagnose its behavior, and directly modify selected weights, without gradients or optimizers.

We follow 16 editing trajectories on Qwen3.5-0.8B and Qwen3.5-9B to examine performance gains, cross-task transfer, and the reliability of finding useful edits.

How it works

How weight-space
editing works.

GPT-6 Astra proposes weight edits and tests them using development feedback. Editing and selection use development data; held-out tests provide a separate evaluation.

Editor GPT-6 AstraTarget Qwen3.5 · 0.8B / 9BFeedback Generation + teacher forcing
01 / OBSERVE

Diagnose

Inspect weights and model behavior

02 / INTERVENE

Edit weights

Write a targeted weight update

03 / TEST

Probe & compare

Compare task scores and diagnostic signals

04 / SELECT

Select

Choose an edit or keep the original

Separate held-out evaluationHidden test questionsBase θ₀ ↔ Edited θ*
Technical & evaluation details
θt+1 = bf16(θt + Δθt)

Updates are computed in float32 and stored in bfloat16. Editing uses no gradients, backward passes, or optimizers.

A constrained editing space

Admissible transformer-block parameters only. Embeddings, final normalization, the LM head, and architecture remain fixed.

Two feedback modes

Generation provides task scores. Teacher forcing returns conditional log-probabilities and activations, not task accuracy.

Held-out comparisons

Test questions are hidden from the editor. Base and edited models are compared under matched evaluation settings.

Source: Methods, Figure 2, and Appendix A–B

The results

Results at a glance.

Held-out accuracy, before and after editing. Switch model scales to compare the results. Development scores are available in the full table.

Target model
Accuracy % · Change in percentage points

Qwen3.5-0.8B · Held-out accuracy (%)

† Marks trajectories identified in Table 2 as ultimately retaining the original weights. Their edited scores belong to evaluated, discarded candidates.

Scores are percentages; gains are percentage points (pp). Deltas preserve the paper’s reported values and may differ slightly from differences of rounded scores.

Paper, Table 2 ↗

Inside the edit

Three searches.
Three outcomes.

All three MATH searches edit the same MLP down-projection. The smallest retained edit achieves the largest gain: 1,023 changed values, +29.45 points on MATH-500.

Layer23
Primary column507
Tensor shape1,024 × 3,584

Indices are zero-based. Edit size counts stored BF16 values that actually change.

Changed BF16 valuesMATH-500 accuracy

1,023 Primary

37.80%
Column 507 only+29.45 pp

1,037,572 Rerun 1

13.35%
Dense rank-one update+5.00 pp

1,981,083 Rerun 2

35.65%
Dense rank-one update+27.30 pp
Marker: base accuracy 8.35% · Shared bar scale 0–40%
Source: Figures 4–5 and Appendix D

Beyond the headline result.

Cross-task transfer

One edit can affect other tasks.

A MATH-edited checkpoint can affect scientific QA, instruction following, and scientific reasoning without further editing. Transfer is uneven: a gain on one task does not guarantee improvements everywhere.

See transfer experiments
Reliability & limitations

6 of 16 searches keep the original.

Development gains do not always hold up on unseen questions. Finding effective interventions remains inconsistent, and an equal request budget does not mean equal computational cost.

Read the discussion

Paper & resources

Read the study.

Exploring the capabilities, generalization, and limitations of weight-space programming.

BibTeX citation

@misc{hu2026exploringwsp,
  title = {Exploring Weight-Space Programming: Capabilities, Generalization, and Limitations},
  author = {Junru Hu and Cheng Tang and Wei Li and Hongze Zhu and Chun-Mei Feng and Qi Zhang and Yirong Chen and Ming Hu},
  year = {2026},
  howpublished = {arXiv preprint arXiv:2611.09382},
  url = {https://arxiv.org/abs/2611.09382}
}

Citation for this research manuscript.