How Much Weight Can Your LLM Bench? Benchmarking Weight-Space Programming on Open Language Models

Pedro Moreira, Leonida LumburovskaarXiv 2026

TL;DR

Instead of teaching a neural network a new trick through costly data collection and gradient-based fine-tuning, what if a smart AI agent could just open up the model's "brain" and rewrite its weights directly? This paper introduces OpenWSP, a comprehensive benchmark testing whether frontier LLMs can act as neurosurgeons on smaller language models—diagnosing their training history, removing hidden backdoors, and teaching them obscure programming languages using only Python code and forward passes. While open-weights models barely scratch the surface, top closed models can already perform surprisingly precise weight-space surgery.

What Problem Does This Paper Address?

Today's LLMs are phenomenal at things they see constantly in training, like Python or standard math, but stumble on niche formats and rare programming languages (like COBOL or Answer Set Programming). Fixing these blind spots usually requires gathering training examples and running gradient descent—an expensive, compute-heavy pipeline.

Weight-space programming (WSP) proposes a radical shortcut: let a frontier LLM inspect and edit a neural network’s raw weight tensors directly, with gradients completely disabled. While early proofs-of-concept and small benchmarks showed this might be possible on tiny networks or narrow objectives, the field lacked a rigorous, broad testbed on real pretrained language models. How well can today's best AI agents actually read, repair, and teach open language models from the inside out?

Methods

The authors built a sandboxed evaluation harness where an LLM agent interacts with one or more small "subject" models (360M to 1.7B parameters) turn by turn.

Figure 1: One OpenWSP task. (1) The agent receives an instruction from one of three families and the disguised weights of one or more small open language models. (2) It works in turns, running code over the weights in a Python kernel and, when the task allows, querying the models through a forward-pass tool with a fixed budget. (3) It submits an answer (read) or edited weights (edit, skill). The answer is compared with a private key; the edited model is run on hidden tests. Scores are normalised so that 0 is the baseline and 100 is a perfect solution.

Here is how the game is played—and how the authors prevent clever agents from cheating:

  • No Gradients, Strict Budgets: Agents get a CPU-based Python kernel (with PyTorch/SciPy, gradients disabled) to inspect and replace weight tensors, plus a strictly rationed budget of forward passes (e.g., 25 to 50 passes) to test inputs, read activations, or check performance on a practice set.
  • Cryptographic-Style Disguises: To stop agents from simply recognizing a public model checkpoint and looking up answers from memory, the harness strips config files, renames tensors, and applies random, function-preserving permutations to MLP neurons and attention heads.
  • Normalized Scoring: Every task is scored on a 0–100 improvement index. A score of 0 represents the baseline (either the unedited model's performance or a blind guess made without seeing the weights), and 100 represents a perfect solution on hidden, held-out tests.

Datasets

The paper introduces OpenWSP, a deterministic benchmark of 152 tasks (yielding 168 scored evaluation "cells" after accounting for tasks tested both with and without forward passes, plus 7 unscored practice tasks). Built atop 14 public checkpoints from five open families (Qwen2.5, Qwen3, SmolLM2, OLMo 2, and DeepSeek-R1-Distill), it spans three task families:

  1. Read (34 tasks): Forensics. Agents deduce which datasets a model was fine-tuned on, estimate linear merge coefficients, spot transplanted layers, or identify a sycophantic/backdoored twin and its trigger phrase.
  2. Edit (17 tasks): Targeted surgery. Agents remove backdoors without hurting math accuracy, or force specific word associations (e.g., predicting "violin" after "ladder") without damaging general text loss.
  3. Skill (94 tasks): Teaching 76 distinct skills—18 general skills (like SQL, OpenSCAD 3D modeling, and tool calling) and 58 coding tasks across 48 languages—evaluated strictly on hidden prompts.

Unlike concurrent benchmarks (WeightBench, IWIBench, WSPBench) that focus on tiny 4K-parameter Boolean networks or narrow text edits, OpenWSP uniquely tests model history reconstruction and broad skill acquisition across dozens of domains.

Key Insights and Ideas

  • Trial-and-error beats pure theory: When the authors restricted agents to "hand design" (reasoning from weights with minimal forward passes), top scores plummeted (GPT-6.1 Sol dropped from 73.4 to 37.2 on matched tasks). When allowed to run iterative searches using forward passes, scores rebounded. Frontier agents succeed mainly by testing candidate edits empirically, not by reading raw matrices like Neo in The Matrix.
  • Different failure modes for closed vs. open models: Weak closed models (like Claude Haiku 5.5 and GPT-6 Luna) get intimidated and quit early, returning the unedited model in 34%–67% of runs. Open-weights models (like MiniMax-M2.7) work tirelessly—editing weights in up to 98% of runs—but 84% of their edits score zero. One group lacks persistence; the other lacks surgical precision.
  • Surgical efficiency: You don't always need to rewrite the whole brain. In one standout example, GPT-6.1 Sol boosted SmolLM2-360M’s held-out SQL accuracy from 34% to 97% by modifying just one tensor—0.00026% of the model's weights.

Key Results

The authors evaluated 10 Closed and Open LLMs (11 setups total, testing Qwen3.8-27B with and without "thinking"):

  • Clear Tiers: GPT-6.1 Sol dominates with an overall index of 51.0 (74.1 Read, 65.2 Edit, 35.8 Skill). A middle tier follows with Claude Opus 5.5 (37.6), Claude Sonnet 5.5 (33.7), and GPT-6.1 Terra (29.0). All open-weights models cluster near the bottom, led by Qwen3.8-27B with thinking at 7.5 (vs. 4.1 without thinking).
  • Cost vs. Capability: Higher cost doesn't guarantee better surgery. GPT-6.1 Sol averaged $0.61 per run, outperforming Claude Opus 5.5 ($4.41/run), while Qwen3.8-27B (thinking) racked up $0.83/run due to massive 234k-token reasoning traces.
  • Triumphs and Brick Walls: Two agents closed over 90% of the accuracy gap when teaching Answer Set Programming, and the top three scored 95+ on teaching new facts, ffmpeg, and OpenSCAD. Conversely, multi-language function completion stumped everyone, with no agent averaging above 3.2.

Limitations and Future Work

The authors note that OpenWSP currently only tests small subject models (up to 1.7B parameters), leaving open whether weight-space programming scales to 70B+ giants. Furthermore, each cell was run only once per agent, closed models were evaluated alongside their specific CLI harnesses (Codex and Claude Code), and provider safety filters refused 28 of Claude Haiku 5.5’s runs (which were scored as 0).

Looking ahead, the authors plan to release a private 500-task version of OpenWSP to prevent "benchmaxing," expand into vision-language-action, audio, and flow-matching models, and explore the ultimate meta-experiment: having an LLM apply weight-space programming to upgrade its own weights.

Summary updated

BibTeX
@misc{moreira2026how,
  author = {Pedro Moreira and Leonida Lumburovska},
  title = {{How Much Weight Can Your LLM Bench? Benchmarking Weight-Space Programming on Open Language Models}},
  year = {2026},
  eprint = {2611.36676},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.36676},
}
Figure