Adding a Neural Prosthetic to a Language Model Without Harming It

A 7.04 MB frozen-host calculator and symbolic algebra sidecar lifts Qwen3.5-4B arithmetic from 42.2% to 92.2% and symbolic CAS from 23.3% to 100.0% with zero harm across 4,457 non-math items (−0.09 pp, p = 0.69). On a 1.22 GB quantized host, it beats the unquantized 8.41 GB model on math and heals general benchmarks (+1.66 pp, p = 2.4 × 10−5). The same recipe builds four more exact tools, and with a gate per card all five run on one model at once: 99.6% on 480 generated tool problems (intact 27.5%) and 90.0% on math and CAS, with none of the 4,457 standard answers changed. On 1,610 problems from ten public benchmarks the five cards gain 4.7 points (p = 1.9 × 10−5), all of it on one: graph maximum flow.

Shin Megami Boson

November 2026

On this page
Frozen-host neural prosthesis (ours) Published tool / math fine-tune (full weights updated)

Non-STEM MMLU (1,164 items) vs. general-text KL

0−5−10−15−200.0010.010.11.0BF16 prosthesis (ours)OpenMath-Mistral-7BToRA-Code-7BQwen2.5-Math-7BGeneral-text KL from parent base (nats, log scale · lower is closer)Non-STEM MMLU Δ (pp)

Standard questions answered differently from the parent model

changed
net change
(points)
BF16 prosthesis (ours)+7.04 MB, 0% host edited
1.3%
−0.1
1.22 GB quantized + prosthesis (ours)+7.04 MB on 2.32-bit host
6.8%
+1.7
Calcformer-FLAN-XL (3B)SymPy gadget vs. FLAN-T5-XL
30.2%
−15.0
OpenMath-Mistral-7BPython math SFT vs. Mistral-7B
15.0%
−0.8
ToRA-Code-7BPython/SymPy TIR vs. CodeLlama-7B
18.3%
+1.7
Qwen2.5-Math-7B-InstructCoT+TIR vs. Qwen2.5-7B-Instruct
33.5%
−20.8
Figure 1. The preservation gap between a frozen-host neural prosthesis and four published calculator and math-tool fine-tunes, each paired against its exact parent checkpoint on the same 4,457-item standard suite (4,293 items for seq2seq Calcformer). Every published fine-tune changes 15.0% to 33.5% of individual standard answers, drifts 138× to 1,350× farther in general-text KL than our 7.04 MB prosthesis (0.00164 nats, 1.3% changed), and collapses to 0.0% (0/40) on verbatim copy controls. Calcformer-FLAN-XL appears in the right panel only: it is an encoder-decoder model, and the general-text KL was measured only for the decoder-only models.

Tool fine-tuning buys capability by rewriting the base model

Language models fail reliably on multi-digit arithmetic, exact rational fractions, modular inverses, and symbolic algebra. The standard remedy — fine-tuning the model’s weights to emit calculator tags or Python programs [1] [2] [3] [4] — raises math scores but silently edits every layer of the base network. Published tool papers rarely measure paired degradation on general benchmarks against the exact parent checkpoint, or they rely on aggregate averages where replay on code or QA masks general-knowledge forgetting and instruction-following collapse.

We ask a stricter question: can a language model gain exact numeric arithmetic and symbolic computer algebra as a Pareto improvement — dramatically better on calculation, statistically indistinguishable from the untouched host on general non-math benchmarks, and runnable on top of an already-quantized frozen model at nearly native speed?

Our answer builds on neuron-homology maps [5] and cross-scale circuit grafting [6]. Rather than updating the host’s weights, we attach a 7.04 MB (3.42M-parameter, 0.081% of the 4.21B host) parallel sidecar anchored to the host’s own 6,857 mapped calculation neurons (2.3% of its MLP neurons), an activation-only intent gate read from the sidecar’s private stream, and an in-process exact arithmetic and SymPy co-processor. Every weight of the host remains bit-for-bit frozen, verified by checksum.

A parallel sidecar over the host’s calculation neurons separates calculation intent from general text

Host residual stream (Qwen3.5-4B) 100% of host weights frozen Read adapter rank-8 trained Write adapter zero-init (step 0 = intact) Host’s 6,857 calculation neurons (2.3%) frozen MLP slice · trained gain α & threshold τ Private sidecar stream sD multi-stage taps at layers 11, 21, 31 Intent gate & CAS fires after “=” only when sD intent > τ & valid AST inject exact result tokens
Figure 2. One layer of the frozen-host neural prosthesis. Gray weights are bit-for-bit frozen (host residual stream and its 6,857 mapped calculation neurons); blue weights are trained (3.42M total, 7.04 MB in FP16). Because the write adapter starts at zero, step 0 equals the intact host identically.

At each layer l of Qwen3.5-4B [7], the host computes its normal residual update untouched. In parallel, the prosthesis reads the host’s clean residual stream xclean = x − δH through a trained rank-8 read adapter, runs the frozen slice of the host’s own calculation neurons with learned per-neuron gain α and soft-threshold τ, accumulates its internal state in a private sidecar stream sD, and writes back through a zero-initialized rank-8 write adapter:

ul = RMSNorml( xclean + (xclean − μl) UA,lVA,lT + sD )
vl = soft_shrink(fcalc,l(ul) − ml; τl) ⊙ αl · Wdown,calc,l,   sD ← sD + vl
ΔH,l = βl vl + vl UB,lVB,lT,   δH ← δH + ΔH,l

Three controlled waves turn a 46-point arithmetic lift with regressions into a strict Pareto improvement

Evaluating every variant on the exact same frozen 780-problem math, symbolic CAS, and copy-control split — 180 twelve-family exact arithmetic problems, 150 multi-step word problems with large numbers, 200 GSM8K [8], 150 MATH [9], 60 held-out symbolic CAS problems, and 40 verbatim copy traps — isolates why each design choice is necessary (Figure 3).

Exact arithmetic (180 problems, 12 families)

score
Intact Qwen3.5-4B (baseline)0 trained
42.2%
Wave 1 · matched MLP LoRA3.01M off-policy
83.9%
Wave 1 · symbolic sidecar2.64M off-policy
82.2%
Wave 1 · strict activation sidecar5.13M off-policy
87.8%
Wave 2 · strict activation (on-policy)5.13M zero text parse
82.8%
Wave 2 · gated native (on-policy)3.42M arithmetic
84.4%
Wave 3 · gated native + SymPy CAS3.42M (7.04 MB FP16)
92.2%

Pooled math (680 problems: arithmetic, word, GSM8K, MATH)

score
Intact Qwen3.5-4B (baseline)0 trained
69.4%
Wave 1 · matched MLP LoRA3.01M off-policy
79.4%
Wave 1 · symbolic sidecar2.64M off-policy
78.5%
Wave 1 · strict activation sidecar5.13M off-policy
74.6%
Wave 2 · strict activation (on-policy)5.13M zero text parse
83.1%
Wave 2 · gated native (on-policy)3.42M arithmetic
87.4%
Wave 3 · gated native + SymPy CAS3.42M (7.04 MB FP16)
86.9%
General-text KL for each build
BuildKL from the original
Intact Qwen3.5-4B (baseline)0.0000
Wave 1 · matched MLP LoRA0.0051
Wave 1 · symbolic sidecar0.0018
Wave 1 · strict activation sidecar0.0020
Wave 2 · strict activation (on-policy)0.0018
Wave 2 · gated native (on-policy)0.0018
Wave 3 · gated native + SymPy CAS0.0016
Figure 3. The vertical mark on each bar is the intact 4B score for that test. Controlled progression across Waves 1, 2, and 3 on the exact same frozen evaluation split. Off-policy training lifts arithmetic but hurts GSM8K/MATH; on-policy KL anchoring eliminates the regression while cutting KL 2.75× below matched LoRA; adding symbolic CAS reaches 92.2% exact arithmetic and 100.0% CAS at 0.00164 general-text KL.

On a 1.22 GB quantized host, the 7.04 MB prosthesis beats the unquantized 8.41 GB model and heals non-math benchmarks

Quantizing Qwen3.5-4B to 2.32 bits per weight (1.22 GB via LookAtMyQuant 2 [11]) shrinks the model 6.8× but drops 740-problem math+CAS from 65.7% to 63.6%, introduces 3 verbatim copy errors (92.5%), raises KL against the 16-bit model to 0.306 nats, and lowers pooled 4,457-item standard accuracy from 62.84% to 53.31%.

Attaching our 7.04 MB prosthesis to the frozen 1.22 GB quantized weights (1.229 GB total, slicing the 6,857 calculation neurons directly from the quantized host) produces two striking results (Figure 4):

Math & symbolic CAS (740 problems)

score
of 16-bit
16-bit Qwen3.5-4B intact8.41 GB baseline
65.7%
100%
2.32-bit quantized intact1.22 GB (6.8× smaller)
63.6%
97%
2.32-bit + BF16 prosthesis, zero-shot1.23 GB, 0 grad steps
69.9%
106%
2.32-bit + adapted prosthesis (v2)1.23 GB, +7.04 MB
83.9%
128%
2.32-bit + adapted prosthesis (v1)1.23 GB, +7.04 MB
86.1%
131%
16-bit + prosthesis (ours)8.42 GB, +7.04 MB
88.0%
134%

Non-math accuracy on the 1.22 GB host (4,457 items)

Δ pp
p
HumanEval (164)42.1% → 49.4% (16-bit: 58.5%)
+7.3
0.043
HellaSwag (500)61.0% → 66.0% (16-bit: 72.6%)
+5.0
4.2 × 10−7
CommonsenseQA (1,221)45.2% → 46.9% (16-bit: 54.9%)
+1.7
0.0099
ARC-Challenge (1,172)44.8% → 46.3% (16-bit: 54.7%)
+1.5
0.069
MMLU (1,400)66.1% → 65.9% (16-bit: 73.6%)
−0.1
0.92
Figure 4. The vertical mark shows the intact 16-bit score in the math panel and the intact 1.22 GB model’s score in the non-math panel. Left: a 1.22 GB (2.32-bit) quantized model plus our 7.04 MB prosthesis outperforms unquantized 8.41 GB Qwen3.5-4B on 740 math and CAS problems, even at 0 gradient steps. Right: anchoring the same 7.04 MB sidecar to 16-bit prose KL actively heals quantization damage on 4 of 5 standard non-math benchmarks (+1.66 pp pooled across 4,457 items, p = 2.4 × 10−5).

Four published calculator and math-tool fine-tunes all churn 15%–34% of standard answers and collapse to 0% on copy controls

To test whether general-benchmark preservation is genuinely unusual in practice, we evaluated four published ungated calculator and math-tool model pairs across all 5,237 items: the exact same 4,457-item standard suite — MMLU [12] (1,400 stratified), ARC-Challenge [13] (1,172), HellaSwag [14] (500), CommonsenseQA [15] (1,221), and HumanEval [16] (164, with SentencePiece-safe joint-sequence decoding so base indentation is preserved) — plus 32-passage forward prose KL (Table 1, Figure 1) and the exact same 780-item Math, Symbolic CAS, and Copy Control suite running each tool model’s official prompt and live SymPy/Python interpreter against its untooled parent baseline (Table 2). For ToRA-Code-7B [3], we also restored its true training RoPE base (rope_theta = 10,000, hardcoded in its original transformers 4.31 / vLLM 0.1.4 stack rather than the unused 1,000,000 left in CodeLlama’s config), lifting its GSM8K from 33% to 68% and MMLU from 31.3% to 36.9%.

Every published full-weight fine-tune exhibits severe behavioral drift, in two distinct regimes. First, direct calculator and math-specialist fine-tunes collapse general benchmarks outright: Calcformer-FLAN-XL [2] (the closest published SymPy calculator-tag analog) drops −15.02 pp across 4,293 items (p = 1.1 × 10−74), and Qwen2.5-Math-7B-Instruct [7] drops −20.78 pp across 4,457 items (p = 2.8 × 10−136, KL = 2.210 nats, 1,350× ours). Second, Python-TIR models trained on raw base checkpoints look milder in pooled multiple-choice averages yet still rewrite the base model: OpenMath-Mistral-7B [4] loses significant MMLU (−2.43 pp, p = 0.03) with 15.0% churn and 138× higher KL (0.226 nats), while ToRA-Code-7B [3] finishes net-positive on pooled QA (+1.68 pp, p = 0.0095) over its Python-only base yet still drops HellaSwag (−3.2 pp, p = 0.036), flips 18.3% of answers, and drifts 232× in prose KL (0.380 nats). Most strikingly, all four published tool models collapse from 62.5%–100% down to 0.0% (0/40) on Copy Control (invoking Python/SymPy or solving arithmetic inside lines explicitly marked “copy verbatim”), whereas our BF16 prosthesis scores 100.0% (40/40). On the 740-problem Math + CAS benchmark, our 4B prosthesis reaches 88.0% (100.0% on Symbolic CAS), outscoring both 7B Python-TIR models — OpenMath-Mistral-7B (80.3%) and ToRA-Code-7B (77.0%) — and landing within 2.8 pp of Qwen2.5-Math-7B (90.8%), with zero significant drop on any general benchmark (MMLU p = 0.54, non-STEM MMLU −0.34 pp p = 0.45, 1.3% churn).

Table 1. Paired standard non-math benchmark audit (tool model minus exact parent base, percentage points) and forward general-text KL across 4,457 items (4,293 for seq2seq Calcformer). Exact two-sided McNemar p-values [17] are shown under MMLU, Non-STEM MMLU (1,164 humanities/social/general items; 1,129 for ToRA/CodeLlama), and Pooled Δ. Flipped % is the fraction of individual items whose correctness changed in either direction.

Model pairMMLU
1,400
Non-STEM
~1,164
ARC-C
1,172
HellaSwag
500
CSQA
1,221
HumanEval
164
Pooled ΔFlippedProse KL
nats
Frozen-host neural prostheses (this work)
BF16 prosthesis (ours)
+7.04 MB, 0% host edited
−0.29
p=0.54
−0.34
p=0.45
−0.1+0.2+0.1−0.6−0.09
p=0.69
1.3%0.00164
1.22 GB quantized + prosthesis (ours)
+7.04 MB on 2.32-bit host
−0.14
p=0.92
−0.43
p=0.66
+1.5+5.0+1.7+7.3+1.66
p=2.4 × 10−5
6.8%0.306→0.255
Published tool-augmented & math-specialist fine-tunes (paired against exact parent)
Calcformer-FLAN-XL (3B)
SymPy gadget vs. FLAN-T5-XL
−16.50
p=4.2 × 10−24
−17.35
p=8.1 × 10−23
−9.6−13.6−19.1–−15.02
p=1.1 × 10−74
30.2%–
OpenMath-Mistral-7B
Python math SFT vs. Mistral-7B
−2.43
p=0.03
−3.01
p=0.011
−1.6−1.4+1.0+6.1−0.85
p=0.15
15.0%0.226
ToRA-Code-7B
Python/SymPy TIR vs. CodeLlama-7B
+1.57
p=0.27
+1.42
p=0.38
+1.2−3.2+4.4+0.6+1.68
p=0.0095
18.3%0.380
Qwen2.5-Math-7B-Instruct
CoT+TIR vs. Qwen2.5-7B-Instruct
−17.36
p=1.1 × 10−32
−20.62
p=8.1 × 10−38
−12.0−20.6−33.8−15.8−20.78
p=2.8 × 10−136
33.5%2.210

Table 2. Raw accuracy (%) of each untooled parent → its tool model on the same 5,237 items: the 4,457-item standard suite of Table 1 and the 780-item Math, Symbolic CAS and Copy Control suite. Parents: Qwen3.5-4B (ours), FLAN-T5-XL, Mistral-7B, CodeLlama-7B-Python, Qwen2.5-7B-Instruct. Each published tool model runs its official prompt template and live SymPy or sandboxed Python interpreter; on math, base models run 4-shot CoT (Mistral-7B, CodeLlama-7B) or native CoT (FLAN-T5-XL, Qwen2.5-7B-Instruct, Qwen3.5-4B). Copy Control is scored separately: a reply counts only if the whole reply is the given line, character for character, and it is not in either pooled row. *4,293 items: Calcformer has no HumanEval score.

WorkloadBF16 prosthesis
Ours · 4B
Calcformer
FLAN-XL · 3B
OpenMath
Mistral · 7B
ToRA-Code
CodeLlama · 7B
Qwen2.5-Math
Instruct · 7B
Standard benchmarks
MMLU (1,400)73.6 → 73.448.5 → 32.059.4 → 57.035.3 → 36.971.1 → 53.7
ARC-Challenge (1,172)54.7 → 54.640.7 → 31.154.8 → 53.235.1 → 36.455.5 → 43.4
HellaSwag (500)72.6 → 72.861.6 → 48.082.6 → 81.265.2 → 62.079.8 → 59.2
CommonsenseQA (1,221)54.9 → 55.069.0 → 50.062.2 → 63.149.5 → 53.967.7 → 33.9
HumanEval (164)58.5 → 57.9–28.7 → 34.839.0 → 39.665.8 → 50.0
Pooled standard (4,457)62.8 → 62.853.7 → 38.7*60.4 → 59.642.6 → 44.366.8 → 46.1
Math and symbolic CAS
Exact arithmetic (180)42.2 → 92.20.6 → 4.48.3 → 95.62.2 → 95.656.7 → 94.4
Word arithmetic (150)69.3 → 90.00.0 → 11.30.0 → 89.30.0 → 82.041.3 → 79.3
GSM8K (200)92.0 → 92.014.0 → 38.038.0 → 82.58.0 → 68.092.5 → 93.5
MATH (150)72.0 → 70.73.3 → 8.013.3 → 49.38.7 → 56.088.7 → 93.3
Symbolic CAS (60)23.3 → 100.00.0 → 1.70.0 → 81.70.0 → 91.758.3 → 93.3
Pooled math + CAS (740)65.7 → 88.04.6 → 15.415.0 → 80.34.5 → 77.069.9 → 90.8
Copy control
Copy verbatim (40)100.0 → 100.062.5 → 0.0100.0 → 0.0100.0 → 0.092.5 → 0.0

Inference speed: eliminating Python hook overhead recovers near-baseline throughput, while calculator injection speeds up hard math up to 8.0×

Full-weight fine-tunes modify weights in place and therefore run at ~100% of their parent’s per-token speed on non-math queries (with any wall-clock difference on generative benchmarks like HumanEval coming from shorter or longer completions). By contrast, a frozen-host sidecar adds a small parallel computation on every layer — an important practical cost whenever a host is kept frozen or quantized (where adapters cannot be merged into low-bit trellis weights).

To measure real inference overhead without cold-CUDA order bias, we ran a warm, counterbalanced A-B-B-A timing audit with full-shape untimed warmup and GPU synchronization across all five standard benchmarks plus fixed-length forced decode (batch sizes 1 and 16, 128 tokens) on H100 (Figure 5, Table 3; baseline pass-1 vs. pass-2 MC drift ≤ 0.3%). Our Wave 1–3 research harness attached 169 eager Python forward hooks per token with redundant FP32 casts, holding HumanEval decode to 77.0% of baseline. Replacing those hooks with a zero-hook, pure-BF16 inline wrapper over the exact same checkpoint (98.81% top-1 logit agreement) lifts speed to 91.1% on 4,293 MC+MMLU items, 90.4% wall-clock (88.8% tok/s) on HumanEval, and 75.2% / 79.1% on fixed-length B=1 / B=16 decode (vs. 96.7% MC / 92.2% B=16 for unmerged parameter-matched MLP LoRA and 17.0% MC for a 325-token tool-schema system prompt without prefix caching). Notably, even among published full-weight fine-tunes, ToRA-Code-7B’s addition of a single padding token (resizing the LM head from 32,000 to an unaligned 32,001) drops MC prefill to 93.4% of CodeLlama-7B-Python while keeping decode at 100.1%. On hard arithmetic and symbolic CAS, injecting exact results cuts token length 5×–10× (746 → 69 tokens on CAS), making our prosthesis 1.2× faster on exact arithmetic and 8.0× faster on symbolic CAS end-to-end (3.5× faster on the 1.22 GB host) even before hook removal.

4,293 MC + MMLU prefill (% of baseline speed)

% of parent
BF16 prosthesis · fused inline (ours)7.04 MB, 0 hooks
91.1%
1.22 GB + prosthesis · fused inline7.04 MB on 2.32-bit host
85.2%
BF16 prosthesis · eager hooks169 PyTorch hooks
82.6%
Strict activation · eager+32-head KV bus
81.9%
Unmerged MLP LoRA · inline3.01M params (merged = 100%)
96.7%
Tool-schema system prompt325 tok, no prefix cache
17.0%
Published full fine-tunes (4 pairs)median across pairs 1–4
99.8%

Fixed-length B=16 decode (% of baseline tok/s)

% of parent
BF16 prosthesis · fused inline (ours)
79.1%
1.22 GB + prosthesis · fused inline
73.2%
BF16 prosthesis · eager hooks169 PyTorch hooks
64.4%
Strict activation · eager32-head KV bus
60.8%
Unmerged MLP LoRA · inlinemerged = 100%
92.2%
Tool-schema system prompt325 tok, no prefix cache
95.3%
Published full fine-tunes (3 causal)median fixed B=16 across pairs 2–4
96.0%
Figure 5. Each bar shows speed as a percentage of that method’s untouched parent on H100. The vertical mark is 100%. Table 3 gives all per-benchmark timings, including HumanEval. Removing 169 eager Python hooks lifts our prosthesis roughly 9–15 points across prefill and decode, beating a 325-token tool-schema prompt by >5× on short MC queries without prefix caching. Full-weight fine-tunes stay near 100% except ToRA-Code-7B, whose unaligned 32,001-token output head drops MC prefill to 93.4%.

Table 3. Warm counterbalanced inference speed (% of exact untouched parent baseline speed; higher is faster) on H100 across 4,293 MC+MMLU items (A-B-B-A counterbalanced after full-shape warmup), HumanEval 164 (wall-clock item speed on top, per-token throughput underneath; variable completion lengths and first-pass long-batch allocation can push second-run models above 100%), and fixed-length forced decode (128 tokens, 3-run warm median, zero length variance).

MethodMMLUARC-CHellaSwagCSQAMC 4,293HumanEvalFixed B=1Fixed B=16
Frozen-host methods on Qwen3.5-4B (% of untouched warm host speed)
BF16 prosthesis · fused inline (ours)
7.04 MB pure BF16, 0 hooks
91.0%90.9%91.8%90.8%91.1%90.4%
88.8% tok/s
75.2%79.1%
BF16 prosthesis · eager research hooks
7.04 MB, 169 PyTorch hooks
82.0%82.7%82.8%82.9%82.6%77.0%
75.6% tok/s
65.9%64.4%
Strict activation prosthesis · eager
5.13M params + 32-head KV bus
81.0%81.7%81.9%82.9%81.9%75.9%
75.2% tok/s
63.4%60.8%
Unmerged MLP LoRA · fused inline
3.01M params (merged = 100%)
96.4%96.7%96.6%97.1%96.7%115.0%
112.4% tok/s
80.7%92.2%
Tool-schema system prompt
325 tokens prepended, no cache
32.0%14.7%23.0%12.0%17.0%102.3%
114.5% tok/s
99.9%95.3%
2.32-bit (1.22 GB) quantized host (% of untouched warm quantized host speed)
1.22 GB + prosthesis · fused inline (ours)
7.04 MB pure BF16, 0 hooks
87.4%84.4%89.8%81.8%85.2%88.7%
88.7% tok/s
73.9%73.2%
1.22 GB + prosthesis · eager hooks
7.04 MB, 169 PyTorch hooks
79.0%78.3%81.9%72.1%77.1%78.7%
78.7% tok/s
69.0%66.2%
Published full-weight fine-tunes (% of warm exact parent speed, A-B-B-A counterbalanced)
Calcformer-FLAN-XL
vs. FLAN-T5-XL (seq2seq)
100.3%101.3%96.3%99.0%99.6%–––
OpenMath-Mistral-7B
vs. Mistral-7B-v0.1
100.2%100.0%100.0%99.9%100.0%128.1%
98.8% tok/s
98.6%94.1%
ToRA-Code-7B
vs. CodeLlama-7B-Python
93.3%93.5%93.2%93.7%93.4%134.8%
112.6% tok/s
100.1%100.1%
Qwen2.5-Math-7B-Instruct
vs. Qwen2.5-7B-Instruct
100.1%100.0%100.0%100.1%100.1%134.4%
171.1% tok/s
101.7%96.0%

The recipe builds four more exact tools, and a gate per card lets all five share one model without changing a standard answer

Nothing in the recipe is specific to arithmetic. We built four more cards the same way, each on its own seat of host neurons with its own exact engine: strings (character counts, reversal, encodings, regular expressions), calendars and units (date arithmetic, business days, time zones, cron schedules, unit conversion), bits and networks (bitwise operations, IEEE-754 floats, C struct layout, CIDR subnets, CRC-32), and logic and graphs (satisfiability, integer programs and schedules with Z3, shortest paths, spanning trees, maximum flow). Each was tested on 120 problems from six generated families, held out from training, and the four together on 40 tool-like lines to copy verbatim. Alone, at rank 8 like Card 0, the cards scored 97.5%, 100.0%, 100.0% and 100.0% against the intact model’s 50.0%, 37.5%, 20.0% and 2.5% (477 of 480 against 132). Most of the intact model’s misses are replies cut off at the 1,024-token limit (317 of 480, and 117 of the 120 logic and graph problems); with a card attached, the engine returns the answer in a few tokens.

Attached together and always on (35.2 MB), the five rank-8 cards left the standard suite statistically unchanged (62.62% against 62.84%, p = 0.30) but hurt each other: pooled math + CAS fell from Card 0’s 88.0% alone to 74.9%, and the new tools from 99.4% to 80.6%. Every card adds its correction to the same residual stream on every token, whether or not the prompt concerns it, and the new cards called their engines less: 0.57 to 0.91 calls per problem in the stack against 1.00 alone.

We therefore gave each card a gate: a 504K-parameter classifier that reads the untouched model’s residual stream at layers 11, 21 and 31 on the prompt’s last token, before the reply starts, and attaches the card for that reply only if it scores at least 0.85. Because every gate reads the model with no card attached, a card’s gate decides the same way whatever other cards are installed. We retrained the cards at rank 4 (5.4 MB each with its gate, 27.0 MB for all five) on seats that share no neuron. With all five cards and their gates installed (Table 4), no card attached on any of the 14,356 standard-benchmark sequences (each multiple-choice option is scored as its own sequence) or the 32 prose passages, so the model matched the intact model on all 4,457 standard items. Card 0 attached on all 740 math and CAS problems and scored 90.0% (the logic and graph card also attached on 3 MATH problems); each new card attached on all 120 of its problems, 478 of 480 in all (99.6%); and all 80 copy lines stayed verbatim. On every math, tool and copy row the stack scored exactly what each card scored alone.

Card 0’s seat matters. At rank 4 with the same training, a seat built like the new cards’ (no neuron from the map’s tight-bundle or memory-recall sets [5]; 6,121 neurons) reached 87.6% on pooled math + CAS, and a seat on the three neuron groups that hold 100 of the host’s 104 mapped addition-circuit neurons (4,981 neurons) reached 90.0%; the circuit seat is the Card 0 in the stack. Against the 7.04 MB Wave 3 card it gained 28 problems and lost 13 (p = 0.028), most of the net gain on competition MATH (70.7% → 76.7%). The two cards differ in rank, seat and one training step: halfway through training, the rank-4 card solved 256 training problems itself, its correct solutions joined the training targets [18], and the problems it got wrong where the intact model got them right were anchored to the intact model’s answers.

Table 4. Raw accuracy (%) of the intact Qwen3.5-4B, all five cards attached without gates (rank 8, 35.2 MB), and all five with their gates (rank 4, 27.0 MB), on the same 5,757 items. The last column compares the gated stack with the intact model item by item: items gained / lost and the exact two-sided McNemar p-value [17]. Each new tool suite has 120 held-out generated problems; the intact model’s replies hit the 1,024-token limit on 317 of those 480. Copy control has 40 math-style and 40 tool-style lines, scored as in Table 2.

WorkloadIntact 4B5 cards, no gates
rank 8 · 35.2 MB
5 cards, gated
rank 4 · 27.0 MB
Gated vs intact
gained / lost
Standard benchmarks
MMLU (1,400)73.673.273.6no item changed
ARC-Challenge (1,172)54.754.554.7no item changed
HellaSwag (500)72.672.672.6no item changed
CommonsenseQA (1,221)54.954.654.9no item changed
HumanEval (164)58.559.158.5no item changed
Pooled standard (4,457)62.862.662.8no item changed
Math and symbolic CAS
Exact arithmetic (180)42.257.292.8+93 / −2 p = 2.3 × 10−25
Word arithmetic (150)69.392.794.0+42 / −5 p = 2.5 × 10−8
GSM8K (200)92.088.091.5+3 / −4 p = 1.0
MATH (150)72.054.076.7+16 / −9 p = 0.23
Symbolic CAS (60)23.391.7100.0+46 / −0 p = 2.8 × 10−14
Pooled math + CAS (740)65.774.990.0+200 / −20 p = 1.6 × 10−38
New exact tools
Strings (120)50.065.098.3+59 / −1 p = 1.1 × 10−16
Calendars and units (120)37.590.8100.0+75 / −0 p = 5.3 × 10−23
Bits and networks (120)20.075.0100.0+96 / −0 p = 2.5 × 10−29
Logic and graphs (120)2.591.7100.0+117 / −0 p = 1.2 × 10−35
Pooled new tools (480)27.580.699.6+347 / −1 p = 1.2 × 10−102
Copy control
Copy verbatim (80)100.0100.0100.0no item changed

On ten public benchmarks the cards gain 4.7 points, all of it on graph maximum flow

The tool suites above were generated in our own formats. To see what the cards do on problems written by others, we ran the gated stack unchanged on 1,610 problems taken verbatim from ten public benchmarks, one to three per card, with the same 1,024-token limit (Table 5). The stack scored 65.9% against the intact model’s 61.2% (189 gained, 114 lost, p = 1.9 × 10−5), and attaching each benchmark’s own card directly, with no gate, scored 65.7% (p = 0.75 against the stack), so the gates are not what limits it. The whole net gain is on NLGraph maximum flow, where the intact model hit the token limit on 147 of 150 problems and the card’s engine solves the network (6.7% → 57.3%, 76 gained, 0 lost); across the other nine benchmarks the cards lose 1 problem net. On NLGraph shortest paths it lost ground (36.0% → 23.3%): its engine reads every edge as one-way while NLGraph’s graphs are two-way, so 21 of its 27 calls found no path and answered “INF”, losing 18 problems the intact model solved. On GSM-Hard the model called the calculator 4.3 times per problem and scored 61.0% against 63.5%, and on BIG-Bench Hard dates the calendar card’s gate attached on 11 of 250 problems.

Table 5. Raw accuracy (%) on 1,610 problems taken verbatim from ten public benchmarks: the intact Qwen3.5-4B, the gated five-card stack of Table 4 unchanged, and each benchmark’s own card attached directly with no gate. Each benchmark is scored by its own answer format (a number, within 0.1% for GSM-Hard and unit conversion and exact elsewhere; a multiple-choice letter; yes or no; or a dictionary of counts); every arm has the same 1,024-token limit. The last column compares the gated stack with the intact model item by item, with the exact two-sided McNemar p-value.

BenchmarkIntact 4B5 cards, gatedOwn card,
no gate
Gated vs intact
gained / lost
GSM-Hard [19]
Calculator · 200 problems
63.561.063.0+8 / −13 p = 0.38
CharBench character counts [20]
Strings · 200 problems
97.0100.0100.0+6 / −0 p = 0.031
Letter-counting eval [21]
Strings · 100 problems
12.016.016.0+7 / −3 p = 0.34
CUTE, contains character [22]
Strings · 150 problems
100.098.798.7+0 / −2 p = 0.50
BIG-Bench Hard, dates [23]
Calendars and units · 250 problems
78.879.676.4+7 / −5 p = 0.77
Unit conversion [24]
Calendars and units · 94 problems
92.690.490.4+6 / −8 p = 0.79
Cisco CCNA, IPv4 and CIDR [25]
Bits and networks · 66 problems
57.659.157.6+5 / −4 p = 1.0
NLGraph, maximum flow [26]
Logic and graphs · 150 problems
6.757.360.0+76 / −0 p = 2.6 × 10−23
NLGraph, shortest path [26]
Logic and graphs · 150 problems
36.023.322.7+17 / −36 p = 0.013
BIG-Bench Hard, logical deduction (7) [23]
Logic and graphs · 250 problems
46.852.451.6+57 / −43 p = 0.19
All ten
1,610 problems
61.265.965.7+189 / −114 p = 1.9 × 10−5

The complete study took 28.8 H100-hours

All training, evaluation, external-pair audits, and speed benchmarks ran on rented Modal H100 GPUs: 2.3 H100-hours for Wave 1 (4 arms + baseline), 2.4 H100-hours for Wave 2 (on-policy rollout prep + 2 synthesis arms), 4.6 H100-hours for Wave 3 (v1 + v2 symbolic CAS, 1.22 GB quantized rescue, and full 4,457-item standard audits), 1.3 H100-hours for the external standard-benchmark audit (including SentencePiece HumanEval and ToRA RoPE refresh), 2.5 H100-hours for the 780-item external Math, CAS, and Copy Control benchmark across all four published tool runtimes, 3.0 H100-hours for the warm counterbalanced speed audit, 3.3 H100-hours for the four new cards and the un-gated five-card stack, 6.5 H100-hours for the rank-4 cards, Card 0’s seat comparison, the gates and the gated stack, and 2.9 H100-hours for the ten public benchmarks. Each figure is the GPU time Modal billed, smoke tests included.

Limitations

References

  1. Toolformer. Schick et al., Toolformer: Language Models Can Teach Themselves to Use Tools. NeurIPS 2023. arXiv:2302.04761
  2. Calcformer & Calc-X. Kadlčík et al., Calc-X and Calcformers: Empowering Arithmetical Chain-of-Thought through Interaction with Symbolic Systems. EMNLP 2023. arXiv:2305.15017
  3. ToRA. Gou et al., ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving. ICLR 2024. arXiv:2309.17452
  4. OpenMathInstruct-1. Toshniwal et al., OpenMathInstruct-1: A 1.8 Million Math Instruction Tuning Dataset. NeurIPS 2024. arXiv:2402.10176
  5. Encyclopedia of LLM homologies. A map of the MLP neurons of 30 language models. 2026. qwen-neuron-map.pages.dev
  6. Grafting Neural Primitives Across Model Scales. Shin Megami Boson, 2026. lookatmyquant.pages.dev/grafting
  7. Qwen3.5 and Qwen2.5. Qwen Team. huggingface.co/Qwen/Qwen3.5-4B, Qwen2.5-Math-7B-Instruct
  8. GSM8K. Cobbe et al., Training Verifiers to Solve Math Word Problems. 2021. arXiv:2110.14168
  9. MATH. Hendrycks et al., Measuring Mathematical Problem Solving With the MATH Dataset. NeurIPS 2021. arXiv:2103.03874
  10. LoRA. Hu et al., LoRA: Low-Rank Adaptation of Large Language Models. ICLR 2022. arXiv:2106.09685
  11. LookAtMyQuant 2. Shin Megami Boson, 2026. lookatmyquant.pages.dev/2
  12. MMLU. Hendrycks et al., Measuring Massive Multitask Language Understanding. ICLR 2021. arXiv:2009.03300
  13. ARC. Clark et al., Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge. 2018. arXiv:1803.05457
  14. HellaSwag. Zellers et al., HellaSwag: Can a Machine Really Finish Your Sentence? ACL 2019. arXiv:1905.07830
  15. CommonsenseQA. Talmor et al., CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledge. NAACL 2019. arXiv:1811.00937
  16. HumanEval. Chen et al., Evaluating Large Language Models Trained on Code. 2021. arXiv:2107.03374
  17. McNemar’s test. McNemar, Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika 12, 1947.
  18. DAgger. Ross, Gordon and Bagnell, A Reduction of Imitation Learning and Structured Prediction to No-Regret Online Learning. AISTATS 2011. arXiv:1011.0686
  19. GSM-Hard. Gao et al., PAL: Program-aided Language Models. ICML 2023. arXiv:2211.10435
  20. CharBench. Character-frequency counting set. huggingface.co/datasets/omriuz/CharBench
  21. Letter-Counting-Eval. Nous Research. huggingface.co/datasets/NousResearch/Letter-Counting-Eval
  22. CUTE. Edman, Schmid and Fraser, CUTE: Measuring LLMs’ Understanding of Their Tokens. EMNLP 2024. arXiv:2409.15452
  23. BIG-Bench Hard. Suzgun et al., Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Them. Findings of ACL 2023. arXiv:2210.09261
  24. Unit-Conversion. English question-answer set. huggingface.co/datasets/roby1222/Unit-Conversion
  25. Cisco CCNA questions. huggingface.co/datasets/Elfsong/Cisco_CCNA
  26. NLGraph. Wang et al., Can Language Models Solve Graph Problems in Natural Language? NeurIPS 2023. arXiv:2305.10037

Citation

@misc{boson2026prostheses,
  title  = {Adding a Neural Prosthetic to a Language Model Without Harming It},
  author = {{Shin Megami Boson}},
  year   = {2026},
  month  = nov,
  url    = {https://lookatmyquant.pages.dev/prostheses/}
}