Introduction: The Paradox of LLM Arithmetic
Large Language Models (LLMs) demonstrate remarkable capabilities in complex reasoning, yet they often exhibit paradoxical fragility in fundamental arithmetic. A classic example is the "off-by-one" error in multi-digit addition. Interestingly, previous research has shown that even when an LLM outputs an incorrect sum, a simple linear probe can often decode the correct answer from its internal activations. This implies a disconnect between internal computation and discrete output—the model "knows" the right answer but fails to express it.
This paper investigates the "why" and "how" behind this phenomenon by analyzing the geometric structure of the model's internal representation space. By examining the residual stream during multi-operand addition, the authors uncover the continuous, topological shapes that govern how transformers process basic math.
The Geometry of Addition: IRST and Carry Potential
The researchers discovered that LLMs do not process arithmetic in purely discrete terms. Instead, they organize mathematical information into a continuous geometric manifold called an Iso-Raw-Sum Trajectory (IRST).
Within the residual stream, numbers are organized into "digit basins" (clusters representing the digits 0-9). However, these basins are not isolated. They are connected by continuous "fibers" representing constant raw sums. As the carry value increases, the internal representation slides along these fibers, piercing through one digit basin into the next.
Crucially, the model maintains a continuous Carry Potential ($\Phi$) rather than a discrete binary carry (0 or 1). This potential acts as a "pressure" or "momentum" to carry over to the next digit. For instance, if the preceding digits sum to 0.99, the model registers a strong latent thrust to carry, even before the discrete carry is formally triggered.
The Noisy Quantization Model
If the model computes a continuous potential, why does it make discrete mistakes? The authors propose the Noisy Quantization Model, framing arithmetic errors as topological slippages.
Errors are not random; they follow a periodic "bathtub" distribution. When the Carry Potential is near an integer (e.g., 1.0 or 2.0), the model enters a metastable state. In this fragile state, internal neural noise can easily push the continuous representation across a quantization threshold into the wrong digit basin, resulting in an off-by-one error. Conversely, when the potential is at a half-integer (e.g., 1.5), the representation is highly stable, and the model rarely makes mistakes.
Methodology and Experimental Setup
The study analyzed the residual stream activations of models like Qwen3-4B, Qwen3-8B, and Gemma-3-4B-IT using a custom dataset of 10,000 multi-operand addition problems (ranging from 3 to 5 terms of 10-digit integers). The researchers employed several key techniques:
- UMAP Visualization: Projecting high-dimensional neural activations into 2D and 3D space to observe the IRST manifold.
- Versatile Probing: Training lightweight probes to disentangle conflicting latent signals—such as Ground Truth, Model Output, Raw Sum, and Carry—from a single activation vector.
- Causal Steering: Manually shifting activations along specific directions in the manifold to predictably alter the model's output, proving the geometry is functional rather than merely correlational.
Key Findings and Self-Correction
The geometric framework yielded several critical insights into the mechanics of LLM arithmetic:
- The Decoding Lag: The model resolves the arithmetic internally around Layer 24, but it does not rotate this information into the final vocabulary space until Layer 30. This hidden "latent computation phase" explains why tools like the Logit Lens often fail to capture the math in progress.
- High Probe Accuracy: Probes successfully decoded the Raw Sum with 98.6% accuracy, even during incorrect final outputs. This confirms that local column math is usually correct, and the failure almost entirely occurs within the carry logic.
- Noise Scaling: As the number of addends increases from 3 to 5, internal "cognitive noise" ($\sigma$) grows significantly (from 0.05 to 0.25). This explains the exponential degradation in performance on longer math problems.
Building on these insights, the authors introduced a Dual-Stream Consistency Check for inference-time intervention. By decoding both the local column sum and the global carry potential, they could detect when the two signals misaligned. Forcing the model back to a mathematically consistent state improved token-level accuracy from 86.26% to 89.56%. While a modest numerical jump, it proves that the model's internal representations contain the necessary information for self-recovery without any additional training.
Limitations and Future Directions
The study's findings are currently limited to models utilizing single-digit tokenization. BPE-based models that group multiple digits into single tokens likely possess much more entangled geometries. Furthermore, the research focuses exclusively on addition; whether subtraction, multiplication, or broader logical reasoning tasks follow similar trajectory geometries remains an open question. Finally, while the paper identifies the layers and shapes of these representations, the specific neural circuitry—the exact neurons and attention heads that construct these manifolds—has yet to be mapped.
Summary updated