CLOct 28, 2024

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

arXiv:2410.21272v298 citationsh-index: 55ICLR
Originality Incremental advance
AI Analysis

This work addresses the interpretability of LLMs for researchers, revealing incremental insights into their internal mechanisms rather than robust algorithmic reasoning.

The study investigated whether large language models (LLMs) solve arithmetic reasoning by learning algorithms or memorizing data, finding that they rely on a sparse set of neurons implementing simple heuristics, which explains most of their accuracy on arithmetic tasks.

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".

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes