← Latest papers
🤖 machine learning

The Shape of Addition: Geometric Structures of Arithmetic in Large Language Models

This paper reveals that large language models' arithmetic errors stem from "geometric slippages" within a continuous latent space called the Iso-Raw-Sum Trajectory, proposing a Noisy Quantization Model to explain how neural noise disrupts carry propagation and offering a geometric framework to detect and correct these failures.

Original authors: Liuyuan Wen, Xun Zhu, Lihao Huang, Wenbin Li, Yang Gao

Published 2026-06-03
📖 6 min read🧠 Deep dive

Original authors: Liuyuan Wen, Xun Zhu, Lihao Huang, Wenbin Li, Yang Gao

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 Mystery: Why Do Smart AI Models Fail at Simple Math?

Imagine a brilliant student who can write complex essays and solve logic puzzles but occasionally gets a simple addition problem wrong, like saying 123+392+136=652123 + 392 + 136 = 652 instead of $651$. This is the "paradox" the paper starts with: Large Language Models (LLMs) are great at high-level reasoning but surprisingly fragile when doing basic math, often making "off-by-one" errors (getting the number just one digit wrong).

The researchers wanted to know: Where does the mistake happen inside the computer's brain? Is the model confused about the numbers, or is it just making a tiny slip at the very end?

The Discovery: The "Digital Highway" (Geometric Structure)

To find the answer, the researchers looked inside the model's "residual stream" (the internal highway where information travels). They used a technique called UMAP to shrink the massive, complex 3D (or 3000D) map of the model's thoughts down to a 2D picture they could see.

They found that the model's internal math doesn't look like a messy pile of data. Instead, it looks like a highly organized geometric landscape:

  1. The Digit Basins (The Cities): Imagine ten large, deep valleys or "basins," one for each digit from 0 to 9. If the model is thinking "5," its internal state sits deep in the "5 Valley."
  2. The Carry Fibers (The Roads): Inside each valley, there are invisible "roads" or fibers running through it. These roads represent the carry (the extra number you carry over to the next column, like when 7+7=147+7=14, you carry the 1).
    • One road is for "Carry 0."
    • Another road is for "Carry 1."
    • A third is for "Carry 2."

The Analogy: Think of the model's math process as a train traveling on a specific track. The "track" is the Raw Sum (the total of the digits you are adding right now). The "station" is the Digit (0–9). The "ticket" is the Carry.

The Core Concept: The "Iso-Raw-Sum Trajectory" (IRST)

The paper names a specific structure they found: the Iso-Raw-Sum Trajectory (IRST).

  • What it is: A continuous, winding path that connects different digit valleys.
  • How it works: If you are adding numbers that sum to a specific amount (say, 11), the model's internal state moves along a single, continuous thread. As the "carry" changes from 0 to 1 to 2, the model slides smoothly along this thread, moving from the "1 Valley" to the "2 Valley" to the "3 Valley."
  • The Insight: The model isn't jumping randomly between numbers. It is sliding along a smooth, continuous wire.

The Problem: "Geometric Slippage"

So, why does the model make mistakes?

The researchers propose that the model is actually calculating the math correctly most of the time, but it gets confused at the very moment it has to decide which "station" (digit) to stop at.

  • The Analogy: Imagine the model is a car driving along a smooth road (the IRST). The road passes right between two towns (Digit 1 and Digit 2).
  • The Noise: The car's engine has a little bit of "static" or vibration (neural noise).
  • The Slippage: When the car is exactly on the border between the towns, that tiny bit of vibration pushes the car slightly over the line into the wrong town.
    • If it should have stopped at Town 1, the noise pushes it into Town 2 (Overestimation/Hallucination).
    • If it should have stopped at Town 2, the noise pushes it back into Town 1 (Underestimation/Leakage).

The paper calls this Geometric Slippage. The math logic is there, but the "decision boundary" is fuzzy because of internal noise.

The "Noisy Quantization" Model

The authors formalize this with a theory called the Noisy Quantization Model.

  • Continuous Potential: The model doesn't just think in whole numbers (0, 1, 2). It thinks in a continuous "pressure" or "potential" (like 1.4, 1.51, 1.9).
  • The Threshold: To output a final answer, the model has to round this continuous number down to the nearest whole integer (Quantization).
  • The Error: If the continuous number is 1.9 and the noise adds a tiny bit, it might cross the threshold to 2.0, causing the model to output "2" when it should have been "1."

They found that errors happen most often when the "pressure" is right in the middle between two whole numbers (like 1.9 or 2.1), creating a "bathtub" shape of errors: high error rates at the edges, low error rates in the middle.

The "Magic" of Probes

One of the coolest findings is about Probes. A probe is a simple tool that looks at the model's internal state and tries to guess what it's thinking.

  • The Surprise: Even when the model outputs the wrong answer (e.g., it says "2" but the answer is "1"), a probe can look at the internal state and correctly say, "Hey, the model actually knows the answer is 1, and it knows the carry is 0."
  • The Explanation: Because the model's internal state is a smooth, continuous landscape, the "truth" and the "error" are right next to each other. The probe can see the "truth" hidden inside the "error" because they are geometrically close. It's like seeing a person standing on the wrong side of a fence but knowing exactly which side of the fence they intended to be on.

The Solution: "Dual-Stream Consistency"

Since the model knows the right answer internally but just slips up at the end, the researchers built a fix.

  1. Stream 1 (Local): A tool checks the immediate math (the sum of the current column).
  2. Stream 2 (Global): A tool checks the "pressure" (the carry potential from previous steps).
  3. The Check: If the model's output doesn't match what these two tools say should be consistent, the system intervenes. It forces the model to output the mathematically consistent digit.

The Result: This method significantly reduced errors without needing to retrain the model. It proved that the model's "brain" was holding the correct information all along; it just needed a nudge to stay on the right side of the geometric line.

Summary

  • The Model: LLMs do math by sliding along smooth, continuous paths (fibers) in a geometric landscape.
  • The Error: Mistakes happen when internal "static" pushes the model's thought across the line into the wrong digit valley.
  • The Truth: Even when the model gives a wrong answer, the correct answer is still hidden inside its internal state, just slightly displaced.
  • The Fix: By checking if the internal "pressure" matches the local math, we can catch these slips and correct them in real-time.

The paper concludes that the fragility of LLM math isn't a lack of knowledge, but a geometric instability caused by noise at the decision boundaries.

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 →