Large Language Models (LLMs) exhibit a striking paradox: they can synthesize complex legal briefs or write functional code, yet they frequently stumble on three-digit addition. While this is often dismissed as a lack of "reasoning," recent research suggests the culprit is a fundamental architectural mismatch. Standard Transformers are autoregressive, predicting tokens from left to right, whereas the logic of arithmetic—specifically carry propagation—flows from right to left.
The Directional Mismatch
In standard Western notation (Big-Endian), we write numbers with the most significant digit (MSD) first. When a Transformer adds $456 + 789$, its first task is to predict the "1" in the thousands place. However, in the standard algorithm for addition, that "1" depends on carries generated by the hundreds, tens, and units columns.
As Nayoung Lee and Dimitris Papailiopoulos argue in Teaching Arithmetic to Small Transformers, this creates a computational bottleneck. The model is forced to perform a global calculation of all potential carries across the entire number string before it can output even the first digit of the answer. For a shallow Transformer, this requirement to "look ahead" across the entire input sequence exceeds its internal processing depth.
The Lookahead Bottleneck and Cascading Carries
The difficulty scales sharply with the complexity of the "carry chain." Josef van Genabith and Simon Ostermann demonstrate in The Lookahead Limitation that LLMs often rely on a shallow "one-digit lookahead" heuristic. They can accurately predict a carry from the immediate next column, but they fail when a carry in the units place triggers a chain reaction (a "cascading carry") that flips digits multiple positions away.
Reverse-engineering these circuits, Philip Quirke and Fazl Barez found that Transformers attempt to solve this by developing parallel, digit-specific circuits. However, because the model generates tokens sequentially, it lacks the "compute depth" to propagate these dependencies reliably in a single forward pass when the answer is formatted from most-to-least significant digit.
Reversing the Flow: Little-Endian Fine-Tuning
The most effective solution discovered across these papers is deceptively simple: reverse the numbers. By representing numbers in Little-Endian format (least significant digit first), the model's autoregressive generation order aligns perfectly with the mathematical dependency of the carry.
In Reverse That Number! Decoding Order Matters in Arithmetic Learning, Daniel Zhang-Li and Jifan Yu introduce LEFT (Little-Endian Fine-Tuning). When a model predicts the units digit first, the carry information for the tens digit is naturally "baked into" the hidden state of the previous token. This alignment allows the model to achieve significantly higher accuracy with far less training data—up to 20x fewer tokens in some cases.
Beyond Order: Positional Information
While reversing the digits solves the directional conflict, the model still needs to know which digits are being added. Ruoqi Shen and Sébastien Bubeck show in Positional Description Matters for Transformers Arithmetic that standard absolute positional encodings are often too rigid for arithmetic.
By combining digit reversal with randomized positional embeddings or specific padding techniques, even tiny 100M-parameter models can master 15-digit multiplication—a task that typically baffles frontier models like GPT-4. This suggests that the "emergent" numeracy of large models is not a matter of scale, but a matter of how well the data format respects the Transformer's architectural constraints.
Why It Works: Aligning Compute with Logic
The success of these methods highlights a core principle in Transformer training: computational alignment.
- Big-Endian (Standard): The model must calculate the entire sum internally before outputting the first digit. The "hardest" part of the math happens at the very first token.
- Little-Endian (Reversed): The model calculates the sum incrementally. Each token generated represents a small, local step in the addition algorithm, with the "carry" passed forward as a simple state transition.
By changing the data format to match the model's natural processing flow, researchers have transformed arithmetic from a global reasoning problem into a local sequence modeling task.