Are Arithmetic Heuristic Neurons Form-Invariant? A Mechanistic Analysis of Symbols, Text, and Code in LLMs
This paper demonstrates that arithmetic computation in LLMs relies on a shared, form-invariant set of "heuristic neurons" across symbolic, natural language, and code formats, revealing that cross-format failures stem from activation states rather than distinct internal circuits.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to teach a super-smart robot how to do math. You might think that if the robot learns to add numbers using a simple equation like "4 + 5 = 9," it would automatically know how to solve the same problem if you told it a story ("Tom has 4 apples, Alice gives him 5...") or asked it to write a computer program to do it. But here's the twist: these robots, known as Large Language Models (LLMs), are surprisingly fickle. They might get the answer right in the story but fail miserably when you ask for the code, even though the math is exactly the same. This isn't just a glitch; it's a mystery about how these models "think" inside their digital brains.
To understand this, we need to peek under the hood. Think of an LLM not as a single giant brain, but as a massive city of tiny workers called "neurons." When the model solves a problem, specific groups of these workers light up to do the heavy lifting. Scientists call this "mechanistic interpretability"—basically, reverse-engineering the machine to see which specific gears are turning to make it work. The big question researchers have been asking is: When the robot switches from doing math with symbols to doing it with words or code, does it recruit a whole new team of workers? Or is it the same team of workers, just getting confused because the instructions look different?
This paper sets out to solve that mystery by treating the robot's brain like a detective case. The researchers took three different versions of the same math problem—one written as a standard equation, one as a Python computer program, and one as a natural language word problem—and watched which neurons fired up in three different Llama-3 models. They found that the robot isn't using different teams for different formats. Instead, there is a tiny, compact "core crew" of about 50 to 100 neurons per layer that does the actual math, no matter how you ask the question.
Here is the most exciting part of their discovery: when the robot fails to solve a problem in one format (like code) but succeeds in another (like a word problem), it's not because it lacks the right tools. It's simply because the "core crew" isn't getting the right signal to start working. The researchers proved this by performing a digital "brain transplant." They took the activation signals from the successful word-problem run and pasted them onto the failed code run. Suddenly, the robot that was stuck started solving the code problem correctly more than 97% of the time for addition and subtraction!
This suggests that the robot's failure isn't due to a lack of knowledge or a broken circuit; it's just a case of the right neurons being in the wrong mood. The study shows that these "arithmetic heuristic neurons" are "form-invariant," meaning they are the same reliable workers regardless of whether the math is presented as symbols, stories, or code. They consistently belong to the same "families" of strategies, like checking if numbers are in a certain range or looking for specific patterns. So, while the robot might seem confused by different ways of asking the same question, its internal math engine is actually remarkably consistent and robust, waiting only for the right spark to get the job done.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.