mlsanityData to 14 Oct 2026

Characterizing the Expressivity of Local Attention in Transformers

arXiv 2605.00768 ↗First posted 1 May 2026cs.CLcited by 3

Not on the map. Why?

Abstract (arXiv)

The transformer is the most popular neural architecture for language modeling. The cornerstone of the transformer is its global attention mechanism, which lets the model aggregate information from all preceding tokens before generating the next token. One common variant of attention is called local attention, which restricts each token to aggregating information from a bounded window of predecessors, reducing the quadratic cost of global attention to linear. Although this restriction is usually motivated by efficiency, it has also been found to improve model quality, a phenomenon that has so far lacked a satisfactory explanation. We provide a formal account of this phenomenon in terms of recognizer expressivity. It has been shown that fixed-precision transformers with global attention correspond to a fragment of linear temporal logic containing a single past operator. We additionally prove that adding local attention introduces a second temporal operator, strictly enlarging the class of recognizable regular languages. Moreover, global and local attention are expressively complementary: neither subsumes the other, and combining them yields the richest fragment. Experiments on formal language recognition and natural language modeling corroborate the theory, showing that hybrid global--local transformers outperform their global-only counterparts.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 17 of its 40 references that are in the map. First posted on arXiv 1 May 2026.

Builds on

17 of 40 references.

References · 17

  1. 2017Attention Is All You Needcited by 60,361
  2. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2016Layer Normalizationcited by 5,669
  5. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  6. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
  7. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  8. 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,026
  9. 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problemscited by 260
  10. 2022Neural Networks and the Chomsky Hierarchycited by 217
  11. 2023Tighter Bounds on the Expressivity of Transformer Encoderscited by 66
  12. 2020RNNs can generate bounded hierarchical languages with optimal memorycited by 59
5 more
  1. 2023Masked Hard-Attention Transformers Recognize Exactly the Star-Free Languagescited by 49
  2. 2024Training Neural Networks as Recognizers of Formal Languagescited by 24
  3. 2024Simulating Hard Attention Using Soft Attentioncited by 15
  4. 2025Characterizing the Expressivity of Fixed-Precision Transformer Language Modelscited by 14
  5. 2025Knee-Deep in C-RASP: A Transformer Depth Hierarchycited by 12

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 3.

3 papers.