Language models can produce arithmetic that looks convincing while still making mistakes on multi-digit calculations. Fine-tuning and external calculators are common ways to address that weakness. This paper explores a different option: compile deterministic computations into pretrained model weights, with no gradient updates, training examples, or runtime tool hooks. The resulting model is still run through its usual model.generate() interface.
The proposal is more involved than adding calculation instructions to a prompt. An automated compiler maps signed addition, subtraction, and multiplication circuits, as well as Boolean, Majority, and Parity circuits, onto model components. The engineering challenge is that normalization changes internal activation scales, while operands may need to move across tokens. The authors use Mellin-GLU quadrature to accommodate RMSNorm-related scale variation, and mechanisms including attention and GatedDeltaNet for cross-token routing. They also extend the hidden representation and adjust output mappings to emit canonical results.
The paper reports tests on Granite 4.2 3B and Qwen 3.5 4B. For six-digit arithmetic, ALU-prefix accuracy is reported as 99.17% for Granite and 100% for Qwen; using an FP32 circuit sidecar brings the evaluated result to 100%. The authors also report 100% accuracy on a Boolean set of 1,728 cases and on tested Majority and Parity circuits. Added active weights are said to remain below 0.06%. Other reported checks include no false circuit triggers among 11,134 out-of-domain inputs and noninferiority on 14 preregistered natural-language evaluation splits.
These findings point to a broader possibility: model weights might carry not only patterns learned from data, but also explicit, deterministic programs. Yet benchmark accuracy is not proof of reliability across every phrasing, number length, or precision setting. The provided material does not establish those broader guarantees. A useful next step is independent testing across prompt formats, architectures, and quantization settings, alongside wider evaluations of language ability.
If the approach holds up, it could offer another way to add narrow, predictable capabilities to models, distinct from fine-tuning or tool use. Its appeal is a more integrated inference path; its cost is the need to carefully build and validate the compiler and weight modifications. The work does not show that LLMs have become generally reliable mathematicians. Rather, it investigates whether bounded computational tasks can be placed inside existing models in a structured and testable form.
Comments
Checking sign-in status...
Loading comments...