Positional Attention: Expressivity and Learnability of Algorithmic Computation
Not on the map. Why?
Abstract (arXiv)
There is a growing interest in the ability of neural networks to execute algorithmic tasks (e.g., arithmetic, summary statistics, and sorting). The goal of this work is to better understand the role of attention in Transformers for algorithmic execution. Its importance for algorithmic execution has been studied theoretically and empirically using parallel computational models. Notably, many parallel algorithms communicate between processors solely using positional information. Inspired by this observation, we investigate how Transformers can execute algorithms using positional attention, where attention weights depend exclusively on positional encodings. We prove that Transformers with positional attention (positional Transformers) maintain the same expressivity of parallel computational models, incurring a logarithmic depth cost relative to the input length. We analyze their in-distribution learnability and explore how parameter norms in positional attention affect sample complexity. Our results show that positional Transformers introduce a learning trade-off: while they exhibit better theoretical dependence on parameter norms, certain tasks may require more layers, which can, in turn, increase sample complexity. Finally, we empirically explore the out-of-distribution performance of positional Transformers and find that they perform well in tasks where their underlying algorithmic solution relies on positional information.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). First posted on arXiv 2 Oct 2024.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2025: 5; 2026: 2.
7 papers.
- 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encodingcited by 4
- 2025Learning to Add, Multiply, and Execute Algorithmic Instructions Exactly with Neural Networkscited by 4
- 2025From Small to Large: Generalization Bounds for Transformers on Variable-Size Inputscited by 1
- 2026Algorithmic Task Capture, Computational Complexity, and Inductive Bias of Infinite Transformerscited by 1
- 2025KNARsack: Teaching Neural Algorithmic Reasoners to Solve Pseudo-Polynomial Problemscited by 0
- 2025A Unified Geometric Space for Topological Alignment Between Transformer-Based Models and Human Brain Networkscited by 0
- 2026Why Code, Why Now: An Information-Theoretic Perspective on the Limits of Machine Learningcited by 0
- 2026Algorithmic Task Capture, Computational Complexity, and Inductive Bias of Infinite Transformers11 Mar 2026
- 2026Why Code, Why Now: An Information-Theoretic Perspective on the Limits of Machine Learning15 Feb 2026
- 2025From Small to Large: Generalization Bounds for Transformers on Variable-Size Inputs14 Dec 2025
- 2025A Unified Geometric Space for Topological Alignment Between Transformer-Based Models and Human Brain Networks28 Oct 2025
- 2025KNARsack: Teaching Neural Algorithmic Reasoners to Solve Pseudo-Polynomial Problems17 Sep 2025
- 2025Learning to Add, Multiply, and Execute Algorithmic Instructions Exactly with Neural Networks24 Feb 2025
- 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encoding1 Jan 2025