Positional Attention: Expressivity and Learnability of Algorithmic Computation
Artur Back de Luca, George Giapitzakis, Shenghao Yang, Petar Velickovic, Kimon Fountoulakis
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Rethinking Addressing in Language Models via Contextualized Equivariant Positional Encoding 引用了 The Impact of Positional Encoding on Length Generalization in Transformers
- Learning to Execute Graph Algorithms Exactly with Graph Neural Networks 引用了 What graph neural networks cannot learn: depth vs width
- Learning to Execute Graph Algorithms Exactly with Graph Neural Networks 引用了 Neural Execution of Graph Algorithms
- Learning to Execute Graph Algorithms Exactly with Graph Neural Networks 引用了 Tropical Attention: Neural Algorithmic Reasoning for Combinatorial Algorithms
- Which Algorithms Can Graph Neural Networks Learn? 引用了 What graph neural networks cannot learn: depth vs width
- Which Algorithms Can Graph Neural Networks Learn? 引用了 What Can Neural Networks Reason About?
- Which Algorithms Can Graph Neural Networks Learn? 引用了 Neural Execution of Graph Algorithms
- Tropical Attention: Neural Algorithmic Reasoning for Combinatorial Algorithms 引用了 Neural Execution of Graph Algorithms
引用它的顶会 Paper5
- Tropical Attention: Neural Algorithmic Reasoning for Combinatorial AlgorithmsBaran Hashemi, Kurt Pasque, Christopher Teska, Ruriko YoshidaNeurIPS 2025 · 14 次引用
- A Capacity-Based Rationale for Multi-Head AttentionMicah AdlerICML 2026 · 2 次引用
- Rethinking Addressing in Language Models via Contextualized Equivariant Positional EncodingJiajun Zhu, Peihao Wang, Ruisi Cai, Jason D. Lee 等ICML 2025
- Learning to Execute Graph Algorithms Exactly with Graph Neural NetworksMuhammad Fetrat Qharabagh, Artur Back de Luca, George Giapitzakis, Kimon FountoulakisICML 2026
- Which Algorithms Can Graph Neural Networks Learn?Solveig Wittig, Antonis Vasileiou, Robert R. Nerem, Timo Stoll 等ICML 2026
它引用的 Paper27
- The Impact of Positional Encoding on Length Generalization in TransformersAmirhossein Kazemnejad, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Payel Das 等NeurIPS 2023 · 444 次引用
- Sparse Sinkhorn AttentionYi Tay, Dara Bahri, Liu Yang, Donald Metzler 等ICML 2020 · 391 次引用
- What graph neural networks cannot learn: depth vs widthAndreas LoukasICLR 2020 · 336 次引用
- What Can Neural Networks Reason About?Keyulu Xu, Jingling Li, Mozhi Zhang, Simon S. Du 等ICLR 2020 · 281 次引用
- Neural Execution of Graph AlgorithmsPetar Velickovic, Rex Ying, Matilde Padovano, Raia Hadsell 等ICLR 2020 · 192 次引用
相关 Paper
- Transformers, parallel computation, and logarithmic depthClayton Sanford, Daniel Hsu, Matus TelgarskyICML 2024 · 64 次引用
- Are Transformers universal approximators of sequence-to-sequence functions?Chulhee Yun, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank J. Reddi 等ICLR 2020 · 481 次引用
- On Expressive Power of Floating-Point TransformersSejun Park, Yeachan Park, Geonho HwangICML 2026 · 2 次引用
- Looped Transformers as Programmable ComputersAngeliki Giannou, Shashank Rajput, Jy-yong Sohn, Kangwook Lee 等ICML 2023 · 175 次引用
- From Shortcut to Induction Head: How Data Diversity Shapes Algorithm Selection in TransformersRyotaro Kawata, Yujin Song, Alberto Bietti, Naoki Nishikawa 等NeurIPS 2025 · 7 次引用
