Masked Hard-Attention Transformers Recognize Exactly the Star-Free Languages
Andy Yang, David Chiang, Dana Angluin
摘要
The expressive power of transformers over inputs of unbounded size can be studied through their ability to recognize classes of formal languages. In this paper, we establish exact characterizations of transformers with hard attention (in which all attention is focused on exactly one position) and attention masking (in which each position only attends to positions on one side). With strict masking (each position cannot attend to itself) and without position embeddings, these transformers are expressively equivalent to linear temporal logic (LTL), which defines exactly the star-free languages. A key technique is the use of Boolean RASP as a convenient intermediate language between transformers and LTL. We then take numerous results known for LTL and apply them to transformers, showing how position embeddings, strict masking, and depth all increase expressive power.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 25 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Characterizing the Expressivity of Fixed-Precision Transformer Language Models 引用了 The Expressive Power of Transformers with Chain of Thought
- Characterizing the Expressivity of Fixed-Precision Transformer Language Models 引用了 Logical Languages Accepted by Transformer Encoders with Hard Attention
- Characterizing the Expressivity of Fixed-Precision Transformer Language Models 引用了 Tighter Bounds on the Expressivity of Transformer Encoders
- Constant Bit-size Transformers Are Turing Complete 引用了 The Expressive Power of Transformers with Chain of Thought
- The Expressive Power of Transformers with Chain of Thought 引用了 Tighter Bounds on the Expressivity of Transformer Encoders
- Exact Expressive Power of Transformers with Padding 引用了 The Expressive Power of Transformers with Chain of Thought
- Exact Expressive Power of Transformers with Padding 引用了 Tighter Bounds on the Expressivity of Transformer Encoders
- Logical Languages Accepted by Transformer Encoders with Hard Attention 引用了 Thinking Like Transformers
- Logical Languages Accepted by Transformer Encoders with Hard Attention 引用了 Tighter Bounds on the Expressivity of Transformer Encoders
- Benefits and Limitations of Communication in Multi-Agent Reasoning 引用了 The Expressive Power of Transformers with Chain of Thought
- Learning Transformer Programs 引用了 Thinking Like Transformers
- Tighter Bounds on the Expressivity of Transformer Encoders 引用了 Thinking Like Transformers
引用它的顶会 Paper25
- Constant Bit-size Transformers Are Turing CompleteQian Li, Yuyi WangNeurIPS 2025 · 21 次引用
- Exact Expressive Power of Transformers with PaddingWilliam Merrill, Ashish SabharwalNeurIPS 2025 · 21 次引用
- Characterizing the Expressivity of Fixed-Precision Transformer Language ModelsJiaoda Li, Ryan CotterellNeurIPS 2025 · 18 次引用
- Type-Constrained Code Generation with Language ModelsNiels Mündler, Jingxuan He, Hao Wang, Koushik Sen 等PLDI 2025 · 10 次引用
- Benefits and Limitations of Communication in Multi-Agent ReasoningMichael Rizvi-Martel, Satwik Bhattamishra, Neil Rathi, Guillaume Rabusseau 等ICLR 2026 · 9 次引用
它引用的 Paper10
- The Expressive Power of Transformers with Chain of ThoughtWilliam Merrill, Ashish SabharwalICLR 2024 · 243 次引用
- Thinking Like TransformersGail Weiss, Yoav Goldberg, Eran YahavICML 2021 · 183 次引用
- Tighter Bounds on the Expressivity of Transformer EncodersDavid Chiang, Peter Cholak, Anand PillayICML 2023 · 80 次引用
- Learning Transformer ProgramsDan Friedman, Alexander Wettig, Danqi ChenNeurIPS 2023 · 59 次引用
- Logical Languages Accepted by Transformer Encoders with Hard AttentionPablo Barceló, Alexander Kozachinskiy, Anthony Widjaja Lin, Vladimir V. PodolskiiICLR 2024 · 36 次引用
相关 Paper
- The Power of Hard Attention Transformers on Data Sequences: A formal language theoretic perspectivePascal Bergsträßer, Chris Köcher, Anthony Widjaja Lin, Georg ZetzscheNeurIPS 2024 · 7 次引用
- Knee-Deep in C-RASP: A Transformer Depth HierarchyAndy Yang, Michaël Cadilhac, David ChiangNeurIPS 2025 · 15 次引用
- On the Expressiveness of State Space Models via Temporal LogicsEric Alsmann, Lowejatan Noori, Martin LangeICLR 2026 · 2 次引用
- Characterizing the Expressivity of Local Attention in TransformersJiaoda Li, Ryan CotterellACL 2026 · 2 次引用
- Transformers are Inherently SuccinctPascal Bergsträßer, Ryan Cotterell, Anthony W. LinICLR 2026 · 5 次引用
