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

Cited 0 time in webofscience Cited 0 time in scopus
  • Hit : 149
  • Download : 2107
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–3× 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.
Publisher
International Conference on Learning Representations (ICLR)
Issue Date
2025-04-25
Language
English
Citation

13th International Conference on Learning Representations, ICLR 2025

URI
http://hdl.handle.net/10203/330431
Appears in Collection
AI-Conference Papers(학술대회논문)
Files in This Item
13776_Arithmetic_Transformers_.pdf(23.2 MB)Download

qr_code

  • mendeley

    citeulike


rss_1.0 rss_2.0 atom_1.0