Scalpel and Brush: Pruning and Targeted Weight Editing of a Small Language Model by a Single LLM Agent

arXiv cs.LG Papers

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.

arXiv:2611.33426v1 Announce Type: new 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.
Original Article
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