Scalpel and Brush: Pruning and Targeted Weight Editing of a Small Language Model by a Single LLM Agent
Summary
This arXiv paper studies whether an LLM agent (DeepSeek-V4.1-Flash) can perform targeted weight repair and structured pruning of Qwen2.5-Math-1.5B-Instruct, finding that agent-directed sparse edits improve BLEU and classification F1 substantially, while standard non-agentic procedures reproduce much of the gains once given the intervention location and form.
View Cached Full Text
Cached at: 11/26/26, 09:35 AM
# Scalpel and Brush: Pruning and Targeted Weight Editing of a Small Language Model by a Single LLM Agent
Source: [https://arxiv.org/abs/2611.33426](https://arxiv.org/abs/2611.33426)
[View PDF](https://arxiv.org/pdf/2611.33426)
> Abstract:It has recently been shown that an LLM can itself edit the weights of a language model, yet it remains unclear which part of such a result is due to the agent and which part is reproduced by a random edit of the same shape, by an instruction in the prompt, or by a standard procedure without an LLM\. We unify repair and pruning as sparse weight edits to optimize a metric we specify, using BLEU as an example: three tasks \-\- targeted weight repair \("brush"\), structured MLP neuron pruning \("scalpel", zeroing pruned weights\), and layer removal with repair \- are assigned to a DeepSeek Harness agent powered by DeepSeek\-V4\.1\-Flash, with up to 50 dev evaluations\. We study Qwen2\.5\-Math\-1\.5B\-Instruct in three independent runs per task, with final evaluation on two hidden splits\. On ordinary differential equations, changing at most 0\.0084% of weights raised test BLEU by 24\-32% on second\-order equations and by a factor of 1\.8\-2\.5 on equations with polynomial right\-hand sides\. An independent substitution check showed that higher BLEU reflects notation alignment rather than improved correctness\. Masks that remove 12\.5\-15% of MLP neurons shrink the model by 9\.4\-11\.2% with mean BLEU loss of at most 0\.01 on both hidden splits, whereas standard pruning with equal shares per layer failed the constraint at all tested shares\. On seven\-class GoEmotions classification, edits raise macro\-F1 from 0\.100 to 0\.396\-0\.451 on test and from 0\.175 to 0\.455\-0\.476 on holdout\. A ridge\-based classifier written into agent\-selected weight rows yields macro\-F1 of 0\.424 and 0\.464\. Pruning search with the same evaluation limit removes 15\.9% of neurons versus 14\-21\.4% for agent runs passing the hidden check\. Standard procedures without an LLM reproduce much of the performance once given the location and form of intervention found by the agent; a comparison of agentic and non\-agentic search remains open\.
## Submission history
From: Vera Ignatenko \[[view email](https://arxiv.org/show-email/b8445423/2611.33426)\] **\[v1\]**Tue, 24 Nov 2026 20:48:19 UTC \(1,064 KB\)Similar Articles
Weight-space programming: an LLM edited another model's weights directly and lifted its math score from 7.9% to 48.1%
MIT researchers showed an LLM (GPT-6 Astra) can directly edit another model's weights to fix a repetitive habit, lifting a small Qwen model's math score from 7.9% to 48.1% by modifying ~0.016% of parameters without training, with caveats and independent reproduction still pending.
Structured Pruning of Large Language Models via Power Transformation and Sign-Preserving Score Aggregation with Adaptive Feature Retention
This paper proposes a structured pruning method for LLMs that addresses distribution mismatch, sign-information loss, and outlier influence when adapting unstructured pruning techniques, achieving comparable accuracy with 1.56-1.57x speedup on models like Llama-3-8B and Vicuna-v1.5-13B.
Weight Pruning Amplifies Bias: A Multi-Method Study of Compressed LLMs for Edge AI
This study reveals a 'Smart Pruning Paradox' where activation-aware pruning methods like Wanda preserve perplexity but significantly amplify bias in Large Language Models deployed on edge devices.
Recursive Self-Editing: LLMs Program Their Own Weight Edits for Self-Improvement (1 minute read)
The paper introduces SelfWrite, a framework where an LLM studies its own reasoning and activations, then programs low-rank weight edits to itself without any gradient steps, improving Qwen3.8-27B math accuracy over five generations (gate 73.95%→76.45%).
Multi-Objective Structured Pruning of LLMs for Latency and Model Size Optimization
Proposes a two-stage structured pruning framework for LLMs that jointly optimizes latency and model size using multi-objective depth pruning and parallel Bayesian optimization, achieving favorable trade-offs for edge deployment.