paper-with-me

홈 › Papers

Positional Attention: Expressivity and Learnability of Algorithmic Computation

2024-10-02 · Artur Back de Luca, George Giapitzakis, Shenghao Yang, Petar Veličković, 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.

📄 PDF Abstract BibTeX arXiv:2410.01686

Code (1)

opallab/positional_attention 공식 구현 pytorch

Tasks

Out-of-Distribution Generalization

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음
Focus 설명 없음

Similar Papers 제목 키워드 기반

Learning Linear Attention in Polynomial Time

2024-10-14 · Morris Yau, Ekin Akyürek, Jiayuan Mao, Joshua B. Tenenbaum 외

Previous research has explored the computational expressivity of Transformer models in simulating Boolean circuits or Turing machines. However, the learnability of these simulators from observational data has remained an…

Learning to ExecutePAC learning

Generalizable Insights for Graph Transformers in Theory and Practice

2025-11-11 · Timo Stoll, Luis Müller, Christopher Morris arxiv

Graph Transformers (GTs) have shown strong empirical performance, yet current architectures vary widely in their use of attention mechanisms, positional embeddings (PEs), and expressivity. Existing expressivity results a…

Molecular Property PredictionObject Detection

RL Grokking Recipe: How Does RL Unlock and Transfer New Algorithms in LLMs?

2025-09-25 · Yiyou Sun, Yuhan Cao, Pohao Huang, Haoyue Bai 외 arxiv

It remains an open question whether LLMs can acquire or generalize genuinely new reasoning strategies, beyond the sharpened skills encoded in their parameters during pre-training or post-training. To attempt to answer th…

Reinforcement Learning

Distinguished In Uniform: Self Attention Vs. Virtual Nodes

2024-05-20 · Eran Rosenbluth, Jan Tönshoff, Martin Ritzert, Berke Kisin 외

Graph Transformers (GTs) such as SAN and GPS are graph processing models that combine Message-Passing GNNs (MPGNNs) with global Self-Attention. They were shown to be universal function approximators, with two reservation…

What makes Models Compositional? A Theoretical View: With Supplement

2024-05-02 · Parikshit Ram, Tim Klinger, Alexander G. Gray

Compositionality is thought to be a key component of language, and various compositional benchmarks have been developed to empirically probe the compositional generalization of existing sequence processing models. These …

Systematic Generalization