Manuscript Offprint
arXiv:2610.06605Separators Make Carry Propagation Learnable:The Geometry of Latent Carry in a Multiplication Transformer
Abstract
Transformers asked to multiply multi-digit numbers in a single forward pass often fail, and interpretability studies of pretrained language models find arithmetic solved by input-range heuristics rather than by an explicit carry. We train small Llama-style transformers from scratch on multiplication without chain of thought and find that the input format is decisive: inserting a space token between digits raises exact-match accuracy from 1% to 89%. Output positions are learned in carry-chain order, with the middle digits, which have the longest-range dependencies, learned last. Inside the model, the separator token that predicts each digit (its prediction slot) encodes the carry-in as an angle on a ring in the residual stream; examples with more distinct carry values fill more of the ring. Activation patching between examples matched on the column sum shows that this state is causally used before the last layer: patching the prediction slot alone transfers the source carry in up to 84% of cases after block 4 for one middle column of our best model, while for other columns the carry is first assembled at the neighboring answer slot before reaching its own. Remaining errors are almost always off by one, consistent with a small error on the carry or on the circular digit code.
1. Introduction
Multi-digit arithmetic is a useful testbed for studying what transformers learn: each problem has a verifiable answer, and failure modes are diagnostic. Small-operand arithmetic is solved easily, but multi-digit multiplication remains brittle even for frontier models (Saxton et al., 2019; Bai et al., 2025). The asymmetry with addition points to long-range carry propagation: each output digit depends on partial products from many input pairs, and the carries themselves can be much larger than one and span several columns.
Recent interpretability work suggests that transformers do not acquire a genuine carry-propagation mechanism. Nikankin et al. (2025) find that pretrained LLMs solve arithmetic through input-range MLP heuristics, with no subcircuit dedicated to carry routing; Qiu et al. (2024) report that, in small transformers trained on multiplication, the loss component associated with multi-digit carry propagation converges last and remains noisiest throughout training.
We revisit this picture by training small Llama-style transformers from scratch on multiplication, without chain of thought, and ask two questions: what makes the carry learnable in a single forward pass, and when a model succeeds, how is the carry represented and used?
Our contributions are: (i) the format matters: with a space token between digits, a 4.8M-parameter model reaches 89% exact match, and 1% without it; positions are learned in carry-chain order and the middle columns never converge in the compact format; (ii) in the models that learn the task, the carry-in of each column is encoded as an angle on a ring at the position that predicts its digit; (iii) matched activation patching shows this state is causally used at intermediate layers, and that for columns 4 and 5, the carry is first assembled at the neighboring answer slot; (iv) residual errors at convergence are almost always .
Sorbonne Center for Artificial Intelligence (SCAI), Sorbonne Université, Paris, France Laboratoire de Probabilités, Statistique et Modélisation (LPSM), Sorbonne Université, CNRS, Paris, France Institut universitaire de France (IUF), Paris, France MEGAVOLT team, Inria Paris, France. Correspondence to: Sama Satariyan sama.satariyan@etu.sorbonne-universite.fr.
Preprint. October 6, 2026.
Separators Make Carry Propagation Learnable: The Geometry of Latent Carry in a Multiplication Transformer.

Figure 1. PCA of the residual stream at layers 1 and 3 for answer tokens, projected onto the first principal components. Digit and space tokens are colored by output position (see legend). Each panel corresponds to a different carry count (0, 1, 3, 4, 6), drawn from 2000 multiplication examples. As grows, the space tokens trace a larger part of a ring: examples with more carries take more distinct carry values and so cover more of it.
carry algorithm (Nikankin et al., 2025; Baeumel et al., 2025; Gambardella et al., 2024; Yan et al., 2025). These results are not in contradiction with ours: they concern large pretrained models whose data never forced a systematic carry. We show that a small model trained on multiplication, given a suitable format, does build an explicit carry-in representation.
Geometry of latent space. Semantic content in transformer activations often takes specific geometric forms: linear directions for truth, refusal, and pre-committed answers (Marks & Tegmark, 2024; Arditi et al., 2024; Cox et al., 2026); circular and helical manifolds for cyclic concepts and digits modulo ten (Engels et al., 2025; Kantamneni & Tegmark, 2025); orthogonal subspaces for hierarchies (Park et al., 2025); linear axes for space and time (Gurnee & Tegmark, 2024); and fractal belief-state geometries for Hidden Markov data (Shai et al., 2024). Our finding adds a case in which the shape encodes an intermediate computational quantity, the carry, rather than a concept of the input.
Separator and filler tokens. Pfau et al. (2024) show that filler tokens such as repeated dots can host hidden computation; Goyal et al. (2024); London & Kanade (2025) extend this to learned pause tokens. In our setting the space token plays a related role: it adds a position with no digit content before each output digit, and the model uses it as the slot from which that digit is predicted and where its carry-in is encoded.
3. Setup
Model and data. We train a Llama-style decoder transformer with RMSNorm, RoPE, SwiGLU and tied embeddings. The model has hidden size 256, 4 attention heads, intermediate size 704, and 6 layers (4.8M non-embedding parameters). We use 1M training examples of multiplication with operands in [0, 9999], zero-padded to four digits, and answers zero-padded to eight digits. Under uniform sampling, examples with many carries are rare, so we skew the training distribution so that every carry count (the number of output columns receiving a non-zero carry) is well represented. In the spaced format a space token separates consecutive digits, in MSB-first order, e.g. 0 1 2 3 * 0 4 5 6 = 0 0 0 5 6 0 8 8; the compact format removes the spaces. The model outputs the answer directly, without chain of thought: with CoT it reaches 100% in 13k steps, but the computation is then written in the output and there is nothing left to find inside the network.
For output column (LSB-indexed), with column sum and carry-in ,
The carry-in reaches 30 in our data. Because the model predicts each token from the position before it, the digit of column c is read out from the hidden state of the space token just before that digit. We call this position the prediction slot of column c.
Training and evaluation. We use AdamW (1r=3e-4, weight decay 0.1) with a cosine schedule and 200 warmup
Separators Make Carry Propagation Learnable: The Geometry of Latent Carry in a Multiplication Transformer.
steps, batch size 128, and 100K training steps. Weights are initialised . The main (spaced, 4-head) configuration is trained with three seeds, which reach 89%, 80% and 78% exact match. We evaluate on 2K held-out examples and report exact-match accuracy and the per-position log error , where and are the predicted and ground-truth digits at output position .
Hidden-state analysis. We record the residual stream after every block and at every token position (the embedding plus the outputs of all attention and MLP blocks up to and including block ). Within each (layer, position) group we fit a PCA across examples; for curved structure we also use diffusion maps. To probe the dependence on carry structure, we form groups of examples with fixed carry count and fit separate PCAs per group. All representational analysis uses the seed 10.
Activation patching. We partition examples into a source group (carry-in at a target output column) and a target group (). For each target example we select the individual source example whose column sum is closest (an exact match in 90–96% of cases across the columns tested), which holds fixed the only other quantity that determines the correct digit. For each block and position , we replace the target's with that of its matched source example, let the forward pass continue, and measure
the fraction of examples whose digit becomes the one implied by the source carry. Patching a position the model does not use leaves the target's own digit, which differs from the source-carry value, so it gives . Per-example matching matters: patching the unmatched source-group mean instead conflates the carry with variation in and gives , against 0.85–0.95 with matching (column 4, carry , all layers patched).
Patching at the last block is a sanity check rather than evidence: after block 5, the prediction slot's state alone determines the output, so replacing it transfers the matched source's answer by construction. Evidence about where the carry is held comes from blocks , where later layers can still read other positions and overwrite the patched value.
4. Results
4.1. Separators make multiplication learnable
Table 1 compares the two formats. Without separators, the model reaches 1% exact match; with them, 89%. Tracking per-position error during training (Section 4.3) shows that in the compact format the middle positions never converge, while in the spaced format all positions converge, from the outside in. A plausible reason why separators help is that they give each digit a prediction slot with no other job; in the compact format, the same hidden state must both represent a digit and predict the next one.
| Format | Best acc. (%) |
|---|---|
| spaced | 89 |
| compact | 1 |
Table 1. Answer-only multiplication, zero-padded, trained until convergence on 1M examples (best of three seeds for spaced; a single run for compact).
4.2. Token embeddings: digits on a circle, space at the centre
Figure 2 shows PCA of the input token embeddings: after training, digits 0–9 lie on a circle ordered by value, the Fourier-style encoding documented in prior work (Nanda et al., 2023; Kantamneni & Tegmark, 2025; Bai et al., 2025); the space token sits at the centre, as an input it carries no digit value.

Figure 2. PCA of the input token embeddings at training steps 1k (left) and 21k (right). After training, digits 0–9 form a circle ordered by value; the space token sits near the centre.
4.3. Per-position learning dynamics
For each output position , indexed LSB-first, we measure the per-position log error on the held-out set throughout training (Figure 3). In the spaced format, positions converge in a consistent order across seeds: the outer positions (0, 7) first, then 1 and 6, then 2 and 5, and the middle positions (3, 4) last. In the compact format, the middle positions never converge. A model at intermediate exact-match accuracy is not “halfway done”: it has solved several positions cleanly and is still struggling on a few.
This order matches the structure of long multiplication (Figure 4): positions 0 and 7 depend on a single input-digit pair, positions 1 and 6 on two, and position 3 on all four pairs in their column plus the largest carries. The same positions whose prediction slots cover the most of their ring (3 and 4,
Separators Make Carry Propagation Learnable: The Geometry of Latent Carry in a Multiplication Transformer.

(a)
(b)
— pos_0 — pos_2 — pos_4 — pos_6 — pos_8
— pos_1 — pos_3 — pos_5 — pos_7
Figure 3. (a): Per-position log error over 200K steps in the compact format. (b): Per-position log error over 100K steps in the spaced format, averaged over three seeds. Curves are output digit positions, LSB-first (pos 0 = units).
Section 4.4) are those learned last.

Figure 4. Direct input-digit dependencies for each output position in multiplication, ignoring carry propagation. Outer positions (0, 7) depend on a single input-digit pair, while middle positions (3, 4) depend on all four pairs in their column.
4.4. The angle on the ring is the carry-in
On the answer side, the space tokens stop being neutral: separated by output column, each prediction slot forms its own ring-shaped cloud in the leading principal components. Splitting examples by carry count k and fitting one PCA per group, Figure 5 shows the two extremes: at k = 0 the prediction slots form short arcs, at k = 7 nearly closed rings, and intermediate k interpolate (Figure 1).
The diffusion map of the column-3 prediction slot (Figure 6) shows what the ring encodes: at block 3, points are ordered around it by their carry-in . This explains the dependence on k. Examples with many carries take many different carry values and so fill a larger part of the ring; examples with no carry all share and sit on a small part of it. The ring is a carry dial, and the carry count decides how much of the dial is used. At block 5 the ring points are no longer ordered by carry-in but group by output digit instead, as the slot commits to the digit it will emit.
7 carry events

0 carry events

• units digit ▲ thousands space ▲ ten-k space ▲ hundred-k space ▲ millions space
0 carry example: 1021 * 1022 = 01043462-> [0, 0, 0, 0, 0, 0, 0, 0]
7 carry example: 5176 * 9739 = 50409064-> [0, 1, 1, 1, 1, 1, 1, 1]
Figure 5. Residual stream at block 3 for examples with (e.g. 1021 * 1022) and (e.g. 5176 * 9739). The same prediction slots form arcs when every carry-in is zero and nearly closed rings when carry-ins vary widely.
4.5. The carry-in is causally used at the prediction slot
The ring geometry shows a correlation between prediction-slot states and the carry-in. To test whether the model uses these states, we apply matched patching (Section 3) to output column 3, with source carry-in 5 and target carry-in 10 (Figure 7). In blocks 0–1 the effect is small (0.05–0.11) and spread over input digits and answer positions. From block 2 it concentrates on the prediction slot of column 3: reaches 0.46, 0.67 and 0.84 after blocks 2, 3 and 4, with every other position near zero. Replacing this single vector at an intermediate layer, while later layers can still read the rest of the sequence, is enough to make the model answer as if the carry were different.
We repeat layer-by-layer patching of each column's prediction slot for columns 1–7 and three seeds (Figure 9). Two boundary columns behave differently from the interior ones. Column 1, whose carry-in depends on a single upstream product, and column 7, which has no partial product of its own ( ), reach their plateau (0.78 and 1.00) by block 1 in all three seeds. For the interior columns 2–6, whose carry-in accumulates a chain of upstream columns, the effect rises only in later blocks, with an onset that varies modestly across seeds.
Separators Make Carry Propagation Learnable: The Geometry of Latent Carry in a Multiplication Transformer.
Diffusion eigenvectors — thousands,


L3
L5
Figure 6. Diffusion map ( vs ) of the column-3 prediction slot after blocks 3 (top) and 5 (bottom), for 7-event carry examples, on seed 10. Left: colored by output digit (0–9). Right: colored by carry-in (0–30). After block 3, the carry-in is encoded by the angle on the ring decodable by the carry-in amount. At block 5 the ring of carry-in dissolves and the shape becomes decodable by digit, as the slot turns the carry into the output digit.

Figure 7. Matched activation patching for output column 3 (target carry-in 10, source carry-in 5). Each cell is the fraction of target examples whose digit changes to the source-carry value when the hidden state at that (block, position) is replaced by that of the matched source example. In blocks 0–1, patching operand and answer positions changes the column-3 digit only weakly ( ). From block 2, the effect concentrates at the column-3 prediction slot. The block-5 row is a sanity check (see Section 3).

Figure 8. Fraction of patched examples whose digit follows , for several carry differences , averaged over two model seeds (10 and 123). The separator tokens just before column-3 digit is patched at every block except the last (blocks 0–4); the last block and all other token positions keep the target's states. Matched patching; row L5 is a sanity check
To test whether the slot carries the carry value, we vary the carry difference and patch only the prediction slot up to block 4 (equivalent to patching it at block 4), leaving the last block free to read the rest of the sequence. If the slot holds the carry, the digit should become by Equation (1). For column 3 it does in 95–100% of cases for every tested (Figure 8), as for column 1,2, 7 (Figure 12). For columns 4–6 the shift is only partial, consistent with their carry still being held at the neighboring slot at block 4. At the target digit is unchanged, so this point does not discriminate. Because pairs are matched on , a pass is also consistent with the slot holding the column result rather than alone.

Figure 9. Matched patching of the prediction slot of each output column (colors, columns 1–7), one block at a time (x-axis; “all”: every block at once, which includes the last block). Line style: seed. Values at block 5 and “all” are sanity checks.
The route to the prediction slot differs between columns. For column 4 (Section A.2), patching the column's own prediction slot has no effect up to block 3; at blocks 2–3 the effect sits instead at the prediction slot of the preceding, higher-order column ( ), which also needs to predict its own digit, before moving to the column-4 slot (0.15 after block 4). The carry is thus assembled at the neighboring answer slot and relayed to its own slot, rather than accumulated in place.
4.6. Errors are off by one
The errors that remain at convergence concentrate at positions 3 and 4 and are almost always off by (Figure 10). Two readings are possible, and both point to the carry. By Equation (1), a carry estimated one unit too high or too low shifts the digit by exactly one. And since digits are represented on a circle (Section 4.2), a small angular error also yields a neighboring digit.
5. Conclusions
Separators make carry computation learnable: with a space token between digits, a small transformer reaches 89% on answer-only multiplication; without it, 1%. In the
Separators Make Carry Propagation Learnable: The Geometry of Latent Carry in a Multiplication Transformer.

Figure 10. Distribution of prediction errors (prediction – ground truth) at digit positions 5, 4 and 3 (LSB-indexed), with the prediction-vs-ground-truth confusion matrices. Positions 3 and 4 accumulate the most errors, almost always off by .
models that learn the task, the carry-in of each column is encoded as an angle on a ring at the position that predicts the digit, and examples with more distinct carries fill more of the ring. Matched activation patching shows that this state is causally used at intermediate layers and that for columns 4 and 5 the carry is first assembled at the neighboring answer slot before reaching its own. These results complement, rather than contradict, the “bag of heuristics” found in pretrained LLMs (Nikankin et al., 2025), which were never trained on a format that gives the carry a dedicated slot.
Limitations. The main spaced configuration is trained with three seeds, but the compact configuration uses a single run, and we use a single model size and architecture. All results concern multiplication with one tokenization. The geometric analysis uses one seed per figure, and the dependence of the ring on the carry count reflects how many distinct carry values a group covers, not a change in the encoding itself. On the causal side, patching measures whether a single site is sufficient to change the digit, not whether information is present there: for columns 4–6 the carry is represented at the prediction slot but patching it alone transfers it only partially. Because pairs are matched on , a successful patch cannot separate the carry from the column result ; pairs with differing modulo 10 would. Finally, patching locates where the carry is held, not how it is computed: the attention heads that perform the relay are not identified.
6. Future work
First, testing why separators help: spaces only in the answer versus only in the operands, a different filler token, and multiple seeds per format at matched compute would separate the “free prediction slot” explanation from extra computation positions or column alignment. Second, tracking the ring during training alongside per-position error would show whether the carry dial forms before the hard columns are solved. Third, attention-head-level analysis of the relay from the neighboring slot to the prediction slot would connect the representational findings to a circuit-level account.
References
Arditi, A., Obeso, O., Syed, A., Paleka, D., Panickssery, N., Gurnee, W., and Nanda, N. Refusal in language models is mediated by a single direction. In Advances in Neural Information Processing Systems (NeurIPS), 2024. arXiv:2406.11717.
Baeumel, T., van Genabith, J., and Ostermann, S. The lookahead limitation: Why multi-operand addition is hard for LLMs. In Proceedings of the 8th BlackboxNLP Workshop, pp. 250–262. Association for Computational Linguistics, 2025. doi: 10.18653/v1/2025.blackboxnlp-1.15.
Bai, X., Pres, I., Deng, Y., Tan, C., Shieber, S., Viégas, F., Wattenberg, M., and Lee, A. Why can’t transformers learn multiplication? Reverse-engineering reveals long-range dependency pitfalls. arXiv preprint arXiv:2510.00184, 2025.
Cox, K., Kianersi, D., and Garriga-Alonso, A. Post-hoc reasoning in chain of thought: Decoding and steering pre-committed answers. arXiv preprint arXiv:2603.01437, 2026.
Engels, J., Michaud, E. J., Liao, I., Gurnee, W., and Tegmark, M. Not all language model features are one-dimensionally linear. In International Conference on Learning Representations (ICLR), 2025. arXiv:2405.14860.
Gambardella, A., Iwasawa, Y., and Matsuo, Y. Language models do hard arithmetic tasks easily and hardly do easy arithmetic tasks. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pp. 85–91. Association for Computational Linguistics, 2024. doi: 10.18653/v1/2024.acl-short.8.
Goyal, S., Ji, Z., Rawat, A. S., Menon, A. K., Kumar, S., and Nagarajan, V. Think before you speak: Training language models with pause tokens. In International Conference on Learning Representations (ICLR), 2024. arXiv:2310.02226.
Gurnee, W. and Tegmark, M. Language models represent space and time. In International Conference on Learning Representations (ICLR), 2024. arXiv:2310.02207.
Separators Make Carry Propagation Learnable: The Geometry of Latent Carry in a Multiplication Transformer.
Kantamneni, S. and Tegmark, M. Language models use trigonometry to do addition. arXiv preprint arXiv:2502.00873, 2025.
London, C. and Kanade, V. Pause tokens strictly increase the expressivity of constant-depth transformers. In Advances in Neural Information Processing Systems (NeurIPS), 2025. arXiv:2505.21024.
Marks, S. and Tegmark, M. The geometry of truth: Emergent linear structure in large language model representations of true/false datasets. In Conference on Language Modeling (COLM), 2024. arXiv:2310.06824.
Nanda, N., Chan, L., Lieberum, T., Smith, J., and Steinhardt, J. Progress measures for grokking via mechanistic interpretability. In International Conference on Learning Representations (ICLR), 2023. arXiv:2301.05217.
Nikankin, Y., Reusch, A., Mueller, A., and Belinkov, Y. Arithmetic without algorithms: Language models solve math with a bag of heuristics. In International Conference on Learning Representations (ICLR), 2025. arXiv:2410.21272.
Park, K., Choe, Y. J., Jiang, Y., and Veitch, V. The geometry of categorical and hierarchical concepts in large language models. In International Conference on Learning Representations (ICLR), 2025. arXiv:2406.01506.
Pfau, J., Merrill, W., and Bowman, S. R. Let's think dot by dot: Hidden computation in transformer language models. In Conference on Language Modeling (COLM), 2024. arXiv:2404.15758.
Qiu, L., Li, J., Su, C., Zhang, C. J., and Chen, L. Dissecting multiplication in transformers: Insights into LLMs. arXiv preprint arXiv:2407.15360, 2024.
Quirke, P. and Barez, F. Understanding addition in transformers. In International Conference on Learning Representations (ICLR), 2024. arXiv:2310.13121.
Quirke, P., Neo, C., and Barez, F. Understanding addition and subtraction in transformers. arXiv preprint arXiv:2402.02619, 2024.
Saxton, D., Grefenstette, E., Hill, F., and Kohli, P. Analysing mathematical reasoning abilities of neural models. In International Conference on Learning Representations (ICLR), 2019. arXiv:1904.01557.
Shai, A. S., Marzen, S. E., Teixeira, L., Gietelink Oldenziel, A., and Riechers, P. M. Transformers represent belief state geometry in their residual stream. In Advances in Neural Information Processing Systems (NeurIPS), 2024. arXiv:2405.15943.
Yan, Y., Lu, Y., Xu, R., and Lan, Z. Do large language models truly grasp addition? A rule-focused diagnostic using two-integer arithmetic. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pp. 13467–13483. Association for Computational Linguistics, 2025. doi:10.18653/v1/2025.emnlp-main.681.
Separators Make Carry Propagation Learnable: The Geometry of Latent Carry in a Multiplication Transformer.
A. Additional figures
A.1. Ring coverage varies with the column
The clearest rings appear at positions 3–7, whose carry-in takes a wide range of values. Low-order positions (0–2), whose carry-in takes only a few values, form arcs or partial structures even under heavy carry load (Figure 11), consistent with the reading of the ring as a carry dial.

Figure 11. Prediction slots of positions 0 and 4 vs. 1 and 4 across layers. Position 4 forms a clear ring; positions 0 and 1 do not.
A.2. Relay through the neighboring slot (different columns)
Digit shift under activation patching: cols 1, 2, 3, 4, 5, 6, 7, source carry 1 (layers 0-4 of 6 patched; mean ± 1 std over sampling seeds 123, 10)

Figure 12. Fraction of patched examples whose digit follows , for several carry differences , averaged over two model seeds (10 and 123). The separator tokens just before each column digit is patched at every block except the last (blocks 0–4); the last block and all other token positions keep the target's states. Matched patching; row L5 is a sanity check
Separators Make Carry Propagation Learnable: The Geometry of Latent Carry in a Multiplication Transformer.

Carry-in signal | col=2 carry=5→10 (logit at pos30=-2)
Carry-in signal | col=3 carry=5→10 (logit at pos28=-3)
Carry-in signal | col=4 carry=5→10 (logit at pos26=-4)
Carry-in signal | col=5 carry=5→10 (logit at pos24=-5)
Figure 13. Activation patching for output columns 1 to 5. Each cell is the fraction of target examples whose digit changes to the source-carry value when the hidden state at that (layer, position) is replaced. Matched patching; row L5 is a sanity check