atlas

Research map / Large language models / Agents, code and math

Arithmetic Without Algorithms: Language Models Solve Math with a Bag of Heuristics

ICLR 2025 · Large language models › Agents, code and math · approach: Mathematical and structural reasoning benchmarks · 4 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Uses causal circuit analysis and neuron-level heuristic classification to show that pretrained LLMs perform arithmetic via a "bag of heuristics" rather than a robust algorithm or pure memorization.

Problem

Whether LLMs solve arithmetic reasoning with generalizable algorithms or by memorizing input-output patterns, and what mechanism implements arithmetic answers inside pretrained models.

Approach

Identifies the arithmetic circuit via activation patching, decomposes circuit MLP neurons into key-value heuristics, classifies neurons into human-defined heuristic types (range, modulo, pattern, identical operands, multi-result), and shows ablating heuristic neurons by type or by prompt reduces accuracy; the unordered combination of heuristics explains most accuracy and emerges early in training.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Ablate neurons classified as a specific heuristic (ablation)Llama3-8B arithmetic circuit · Correct arithmetic prompts associated with the ablated heuristicaccuracy: average drop of 29% out of 95% average pre-ablation accuracyHurt
Ablate neurons classified as a specific heuristic (ablation)Llama3-8B arithmetic circuit · Prompts associated with the heuristic versus prompts not associated with itaccuracyMixed
Ablate the highest-scoring neurons from heuristics associated with each prompt rather than an equal number from unassociated heuristics (ablation)Arithmetic models · Arithmetic promptsaccuracyHurt
Ablate 25 prompt-associated heuristic neurons per layer (ablation)Pythia-6.9B checkpoints · Arithmetic prompts across training stagesaccuracy: near-zero accuracyHurt
Use neurons mutual with the final checkpoint as the heuristic set (ablation)Pythia-6.9B intermediate checkpoints · Arithmetic prompts across trainingshare of total heuristics' contribution to accuracy: 79%Helped
Ablate prompt-associated heuristic neurons instead of a similar number of random heuristic neurons (ablation)Pythia-6.9B checkpoints · Correct arithmetic prompts, including earlier checkpointsaccuracyHurt
Use the arithmetic circuit rather than the full modelLlama3-8B · Arithmetic prompts across four operatorsfaithfulness: 0.96Helped
Keep only 200 high-effect neurons per layerLlama3-8B middle- and late-layer MLP circuit · Arithmetic promptsfaithfulness: only 200 neurons (roughly 1.5%) per layer are needed to achieve high faithfulnessHelped
Keep the top 1% of MLP0 neurons in the circuitLlama3-8B arithmetic circuit · Arithmetic promptsfaithfulness: 1%Helped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic arithmetic prompts (operands in [0,300], four operators)

Benchmarks: synthetic arithmetic prompts

Metrics: faithfulness accuracy normalized logit knockout accuracy drop probe accuracy

Baselines: Fourier-feature account of addition (Zhou et al.) Nanda et al. modular addition circuit

Builds on: activation patching key-value memories logit lens TransformerLens

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy