mlsanityData to 7 Oct 2026

Arithmetic Transformers Can Length-Generalize in Both Operand Length and Count

arXiv 2410.15787 ↗First posted 21 Oct 2024cs.LG cs.AIcited by 18

Not on the map. Why?

Abstract (arXiv)

Transformers often struggle with length generalization, meaning they fail to generalize to sequences longer than those encountered during training. While arithmetic tasks are commonly used to study length generalization, certain tasks are considered notoriously difficult, e.g., multi-operand addition (requiring generalization over both the number of operands and their lengths) and multiplication (requiring generalization over both operand lengths). In this work, we achieve approximately 2-3x length generalization on both tasks, which is the first such achievement in arithmetic Transformers. We design task-specific scratchpads enabling the model to focus on a fixed number of tokens per each next-token prediction step, and apply multi-level versions of Position Coupling (Cho et al., 2024; McLeish et al., 2024) to let Transformers know the right position to attend to. On the theory side, we prove that a 1-layer Transformer using our method can solve multi-operand addition, up to operand length and operand count that are exponential in embedding dimension.

Key facts. Cited by 18 papers in the map (data through 7 Oct 2026). First posted on arXiv 21 Oct 2024.

Builds on

0 of 0 references.

No references here yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 8; 2026: 10.

18 papers.

Sort:

By area:

  1. 2025Lower Bounds for Chain-of-Thought Reasoning in Hard-Attention Transformerscited by 28
  2. 2025The Role of Sparsity for Length Generalization in Transformerscited by 8
  3. 2025Quantitative Bounds for Length Generalization in Transformerscited by 8
  4. 2025Beyond Single-Task: Robust Multi-Task Length Generalization for LLMscited by 7
  5. 2025Circuit Stability Characterizes Language Model Generalizationcited by 6
  6. 2025Learning to Add, Multiply, and Execute Algorithmic Instructions Exactly with Neural Networkscited by 4
  7. 2025Language Models, Graph Searching, and Supervision Adulteration: When More Supervision is Less and How to Make More Morecited by 3
  8. 2026On the Spatiotemporal Dynamics of Generalization in Neural Networkscited by 3
  9. 2025Exact Learning of Arithmetic with Differentiable Agentscited by 1
  10. 2026Length Generalization with Log-Depth Recurrent Unitscited by 1
  11. 2026Breaking the Data Barrier in Learning Symbolic Computation: A Case Study on Variable Ordering Suggestion for Cylindrical Algebraic Decompositioncited by 0
  12. 2026Arithmetic OOD Failure Unfolds in Stages in Minimal GPTscited by 0
6 more
  1. 2026On the Mirage of Long-Range Dependency, with an Application to Integer Multiplicationcited by 0
  2. 2026Globally Optimal Training of Spiking Neural Networks via Parameter Reconstructioncited by 0
  3. 2026How Should Transformers Encode Numeric Values in Electronic Health Records?cited by 0
  4. 2026Universal Transformers for Circuit Computations: Perfect Length Generalization in Tiny Transformerscited by 0
  5. 2026Distance generalization in transformers: why bother with positional encoding?cited by 0
  6. 2026The Geometry of Logic: Stratification Induces Semantic Structure and Robust Reasoningcited by 0