Get the daily emailDaily email
  1. Home
  2. Research
  3. This story

Compiling exact arithmetic circuits into pretrained LLM weights with zero gradients

The authors present a closed-form, gradient-free method that compiles deterministic circuits (multi-digit add/subtract/multiply, Boolean logic) directly into pretrained LM weights by widening layers, with no training data or runtime hooks. On 6-digit…

Published Read the original
Compiling exact arithmetic circuits into pretrained LLM weights with zero gradients

Why it matters

It shows exact capabilities can be built into small models without external tool calls, though it remains a research technique.

What happened

1 min read

The authors present a closed-form, gradient-free method that compiles deterministic circuits (multi-digit add/subtract/multiply, Boolean logic) directly into pretrained LM weights by widening layers, with no training data or runtime hooks. On 6-digit arithmetic, IBM Granite 4.2 3B and Qwen 3.5 4B reach 99.17% and 100% accuracy versus 42.2% and 61.7% for a LoRA baseline trained on 12.8K samples.

inscraper analysis

Our analysis

The construction is highly intricate and architecture-specific, and its practical edge over calling a calculator tool is small. Comparing a hand-compiled circuit with a learned LoRA is not apples to apples. The main value is in understanding what exact computation transformer weights can represent.

More in Research