← Latest papers
🤖 AI

Arithmetic in the Wild: Llama uses Base-10 Addition to Reason About Cyclic Concepts

This paper reveals that Llama-3.1-8B reasons about cyclic concepts not by performing modular arithmetic specific to the concept's period, but by reusing a task-agnostic base-10 addition mechanism driven by Fourier features and a sparse set of shared MLP neurons to compute sums before mapping them back to the cyclic domain.

Original authors: Sheridan Feucht, Tal Haklay, Usha Bhalla, Daniel Wurgaft, Can Rager, Raphaël Sarfati, Jack Merullo, Thomas McGrath, Owen Lewis, Ekdeep Singh Lubana, Thomas Fel, Atticus Geiger

Published 2026-05-06
📖 5 min read🧠 Deep dive

Original authors: Sheridan Feucht, Tal Haklay, Usha Bhalla, Daniel Wurgaft, Can Rager, Raphaël Sarfati, Jack Merullo, Thomas McGrath, Owen Lewis, Ekdeep Singh Lubana, Thomas Fel, Atticus Geiger

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

The Big Question: How Does the AI "Think" About Time?

Imagine you ask a smart AI, "What month is six months after August?"
You might expect the AI to have a special "calendar brain" that visualizes a circle of 12 months and simply rotates a pointer six steps forward. This is how humans often think about it.

However, the researchers found that Llama-3.1-8B (a specific AI model) doesn't do that. Instead, it uses a "universal calculator" that speaks Base-10 (our normal number system), even when the question is about months, days, or hours.

The Analogy: The Universal Translator

Think of the AI as a translator who is very good at math but terrible at geography.

  1. The Input (The Question): You ask, "What month is six months after August?"
    • The AI's first move: It ignores the fact that "August" is a month. It translates "August" into the number 8 and "six" into 6.
  2. The Calculation (The Math): It performs standard addition: 6 + 8 = 14.
    • It does not do "modular arithmetic" (which would be 14 minus 12 = 2). It just gets the raw sum, 14.
  3. The Output (The Answer): It takes the number 14 and translates it back into the "month language." Since 14 is two spots past 12 (the end of the year), it says February.

The Surprise: The AI uses the exact same math neurons to solve "6 + 8 = ?" as it does to solve "6 months after August." It doesn't have a separate "month calculator"; it just has one giant "number calculator" that it reuses for everything.

The Secret Sauce: The "Fourier" Rhythm

How does the AI keep track of these numbers? The paper reveals it uses something called Fourier features.

The Analogy: The Drum Circle
Imagine the AI's internal brain is a room full of drums.

  • Some drums beat every 2 seconds.
  • Some beat every 5 seconds.
  • Some beat every 10 seconds.
  • Some beat every 100 seconds.

When the AI adds numbers, it doesn't just count "1, 2, 3." Instead, it listens to the rhythm of these drums.

  • If the sum is 14, the "10-second drum" has beaten once, and the "2-second drum" has beaten twice.
  • The AI combines these rhythms to know it has reached the number 14.

Why is this weird?
If the AI were thinking about months (a cycle of 12), you'd expect it to use a "12-second drum." But it doesn't. It sticks to the 10-second drum (and 2, 5, 20, 50, 100). It treats months like they are just numbers on a straight line, not a circle, until the very last second.

The "Magic 28" Neurons

The researchers dug deep into the AI's code (specifically layer 18) and found a tiny, specialized team of workers responsible for this math.

  • The Team: There are only 28 neurons (tiny processing units) out of thousands in that layer.
  • The Job: These 28 neurons are the "addition crew." They are the ones listening to the drum rhythms and adding the numbers together.
  • The Efficiency: This tiny team (about 0.2% of the layer) does almost all the heavy lifting for addition, whether you are asking about time, days, or actual numbers.
  • The Specialization: These 28 neurons are grouped by their "drum rhythm." Some are the "Period 2" team (checking if a number is even or odd), some are the "Period 5" team, and some are the "Period 10" team. They all work together to build the final sum.

The "Echo" Effect

The paper also noticed a funny quirk. When the AI calculates "6 months after August" (which is 14), it sometimes gets confused about how big the number is.

  • It knows the answer is 14.
  • But because it's so used to thinking in Base-10, it sometimes also thinks the answer might be 114 (14 + 100).
  • It's like a person who knows the time is 2:00, but for a split second, also thinks it might be 102:00. The AI eventually picks the right one (February), but the "echo" of the larger number lingers.

Summary of Findings

  1. No Special "Calendar" Brain: The AI doesn't rotate a circle to find the next month. It converts everything to numbers, adds them up, and converts them back.
  2. Base-10 is King: Even for cycles like 12 months or 7 days, the AI uses a Base-10 system (periods of 2, 5, 10, etc.) to do the math.
  3. Shared Machinery: The same 28 tiny neurons do the math for everything. They are a universal addition engine.
  4. Geometry vs. Computation: Just because the AI represents months in a circle (like a clock face) doesn't mean it calculates using a circle. It calculates using a straight line of numbers and only draws the circle at the very end.

In a nutshell: The AI is a brilliant accountant who uses a standard calculator for everything, even when you ask it to solve a puzzle that looks like a clock. It doesn't "rotate" the clock; it just does the math and tells you where the hand should point.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →