Neuron surgery
Grafting 1.9% of Qwen3.8-27B into a frozen Qwen3.5-4B lifts its exact-math score to 90% of the 27B’s
Qwen3.5-4B solves 40.3% of 320 hard exact-math problems, such as multiplying long numbers or working out a determinant. Qwen3.8-27B, 6.4 times larger, solves 71.9%.
We copied five columns of math neurons out of the 27B: 16,000 MLP neurons that run through all 64 of its layers, with one attention head from each of 32 of its layers and a low-rank slice of its output layer. That is 515,660,896 parameters, 1.9% of the 27B. Both models stay frozen, and only the connections between them are trained. The grafted 4B solves 65.0% of the problems: 161% of its own score and 90% of the 27B’s.
A switch at layer 10 of the 4B sends math through the graft and nothing else. It opened on all 570 math test prompts and on none of 1,164 others, so everything else the 4B says comes from the 4B alone.
Linking neurons only when the link runs both ways finds columns through the whole model
The Encyclopedia of LLM homologies places every MLP neuron of a model by the neurons it fires with. Its groups were built from each neuron’s 30 most correlated partners. In Qwen3.5-4B most of those links run one way: many neurons list the same few hub neurons, which do not list them back, so groups formed around hubs.
The new grouping keeps a link only when each neuron is among the other’s 30 closest partners, and only between neurons in different layers. Leiden community detection on what remains finds groups that run up through many layers, which we call columns. In the 4B, where the circuit that adds numbers is known, the columns are more than twice as modular as the old groups (0.32 to 0.77), two neurons in one column are 59 times likelier than chance to be wired to each other directly (36 times before), and the three largest columns hold 79% of the addition circuit (68% before). The cost is coverage: 55% of neurons have a partner that lists them back.
In the 27B the same grouping finds 18 columns that span at least 16 layers and put at least 42% of their activity on math text. We took the five with the highest share, 52% to 64%, whole except the last, for 16,000 neurons. All five run through all 64 layers.
The columns beat spending the same budget on the 4B and a graft of shuffled weights
Spending the same 13,236,545 trainable parameters on the 4B itself, as a low-rank adapter behind the same switch, reaches 45.9%. Most of what a graft gives comes from the added room and from training against the 27B: the previous grouping’s 16,000 neurons (Tube and Ring, from the grafting paper) with their weights shuffled still reach 60.0%.
The real columns reach 65.0%, 5.0 points above the shuffled graft: they solve 35 problems it misses and miss 19 it solves (McNemar p = 0.04). The previous grouping’s real neurons reach 62.2%, which does not beat their own shuffled twin by a significant margin (p = 0.40).
The graft helps most where the 27B is strongest
Multiplication goes from 45% to 95%, level with the 27B, and determinants from 45% to 90%. Fractions and greatest common divisors do not move, and the 27B is weak at them too. On GSM8K word problems the graft changes nothing: 88.0% against the 4B’s 88.4%, where the 27B scores 95.2%.
How the graft is built
- Frozen. Every weight of the 4B, which has the same checksum before and after, and every weight copied from the 27B.
- Copied from the 27B. The five columns (16,000 MLP neurons, 76 to 522 in each layer), one attention head from each of the 16 full-attention layers and from the 16 linear-attention layers just below them, and a rank-192 slice of the output layer: 515,660,896 parameters.
- Connections. Each of the 27B’s 64 layers reads from and writes to the 4B layer at half its depth. The maps between the two models’ coordinates are fitted by regression (94,863,360 numbers), then adjusted by training 13,287,811 parameters.
- Training. 800 steps on worked solutions that the 27B wrote and that were checked correct. At step 400 the grafted model works the training problems itself and the 27B corrects the answers it gets wrong.
- The switch. A small classifier at layer 10 reads the prompt and opens the graft for the whole answer or not at all. Its threshold was set so it opened on none of a held-out set of prose, MMLU, HellaSwag and code prompts.
- Size. 4.83 billion parameters with the switch open, 14% more than the 4B and 5.6 times fewer than the 27B.
Replacing a group shows that neurons carry a skill
A graft adds parts beside a working model. The cleaner test of whether a group of neurons carries a skill is to remove it and put another model’s group in its place. Lesioning Qwen3.5-4B’s calculation group, 6,857 neurons, takes its GSM8K accuracy from 89.6% to 4.8%. Qwen3.5-9B’s matching group of 8,713 neurons in its place, with 445,490 parameters trained (0.011% of the 4B), brings it back to 84.0%: 94% of the 4B’s own score and 89% of the 9B’s.
Here the donor’s own weights matter far more than in the graft. With the 9B’s weights shuffled, the same surgery with almost twice as many trained parameters reaches 37.6% (119 problems gained against 3 lost, p = 0.0 × 100). Between Qwen3.5-4B and Qwen3.5-2B, trained separately, the 4B’s group restores the lesioned 2B to 41.2% of an intact 70.0%, against 15.6% shuffled.




In the replacement the donor’s group runs inside the host with its own weights. At each layer a fitted linear map takes the host’s residual stream into the donor’s coordinates, the donor’s neurons fire, and a second map writes their output back; what the group writes for itself stays in a private stream, so its internal wiring is exactly the donor’s. Only the way out is trained, against the intact host’s next-token distribution.
What the result covers
- One training run for each arm, scored once: 320 exact-math problems, 250 GSM8K problems, 500 MMLU and 500 HellaSwag items and 164 HumanEval problems.
- The shuffled control was built from the previous grouping’s neurons. A shuffle of the five columns themselves has not been run.
- Word problems do not improve, and the graft makes the model 14% larger whenever the switch is open.
- With the switch shut the graft takes no part in the computation. Against a separate run of the plain 4B, 4 of 500 MMLU answers and 4 of 164 HumanEval results differ, with no net gain or loss beyond 0.4 points.
- On windows of worked-calculation text used to check training, the switch opened on 56%: it is tuned to keep everything that is not math out, and some math stays out with it.
Closest published work
Model stitching joins the early layers of one network to the late layers of another through a fitted map (Lenc and Vedaldi, 2015; Bansal, Nakkiran and Barak, 2021). Chen, Merullo, Stolfo and Pavlick (2025) fit affine maps between the residual streams of language models of one family and carry sparse autoencoders, probes and steering vectors across them. CALM (Bansal et al., 2024) joins two whole models with trained cross-attention. Neuron transplantation (Öz et al., 2024) fuses models of one architecture by moving their largest neurons and fine-tuning the result.
The graft here copies a set of neurons and heads that runs through every layer of a model 6.4 times larger, runs it beside a frozen smaller model, and keeps it out of everything but math.
GPU time
The graft, its preparation and its four arms took 2.7 H100-hours and 1.0 B200-hours. The replacement runs took 3.6 H100-hours.