about
Arithmetic Without Algorithms: LLMs Solve Math with a Bag of Heuristics (arxiv.org)
1 point by jsenn on Nov 28, 2024 | hide | past | pdf | 1 comment on HN

In plain words: They traced which parts of a language model do basic arithmetic and found a small set of neurons, each lighting up for a simple number pattern and giving a matching answer. Together these rules, not real calculation or memorized answers, explain most of its accuracy.

Abstract · Arithmetic Without Algorithms: Language Models Solve Math With a Bag of Heuristics

Do large language models (LLMs) solve reasoning tasks by learning robust generalizable algorithms, or do they memorize training data? To investigate this question, we use arithmetic reasoning as a representative task. Using causal analysis, we identify a subset of the model (a circuit) that explains most of the model's behavior for basic arithmetic logic and examine its functionality. By zooming in on the level of individual circuit neurons, we discover a sparse set of important neurons that implement simple heuristics. Each heuristic identifies a numerical input pattern and outputs corresponding answers. We hypothesize that the combination of these heuristic neurons is the mechanism used to produce correct arithmetic answers. To test this, we categorize each neuron into several heuristic types-such as neurons that activate when an operand falls within a certain range-and find that the unordered combination of these heuristic types is the mechanism that explains most of the model's accuracy on arithmetic prompts. Finally, we demonstrate that this mechanism appears as the main source of arithmetic accuracy early in training. Overall, our experimental results across several LLMs show that LLMs perform arithmetic using neither robust algorithms nor memorization; rather, they rely on a "bag of heuristics".

Yaniv Nikankin, Anja Reusch, Aaron Mueller, Yonatan Belinkov
arXiv:2410.21272 · cs.CL · submitted Oct 28, 2024 · updated May 20, 2025
abstract · pdf · html

add comment on HN

I would have never guessed that networks that exist solely to approximate functions work on heuristics...