Formal Language Recognition by Hard Attention Transformers: Perspectives from Circuit Complexity
Not on the map. Why?
Abstract (arXiv)
This paper analyzes three formal models of Transformer encoders that differ in the form of their self-attention mechanism: unique hard attention (UHAT); generalized unique hard attention (GUHAT), which generalizes UHAT; and averaging hard attention (AHAT). We show that UHAT and GUHAT Transformers, viewed as string acceptors, can only recognize formal languages in the complexity class AC0, the class of languages recognizable by families of Boolean circuits of constant depth and polynomial size. This upper bound subsumes Hahn's (2020) results that GUHAT cannot recognize the DYCK languages or the PARITY language, since those languages are outside AC0 (Furst et al., 1984). In contrast, the non-AC0 languages MAJORITY and DYCK-1 are recognizable by AHAT networks, implying that AHAT can recognize languages that UHAT and GUHAT cannot.
Key facts. Cited by 93 papers in the map (data through 14 Oct 2026). Builds on 7 of its 11 references that are in the map. First posted on arXiv 13 Apr 2022.
Builds on
7 of 11 references.
References · 7
- 2017Attention Is All You Needcited by 60,361
- 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,026
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 406
- 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 288
- 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 139
- 2019On the Turing Completeness of Modern Neural Network Architecturescited by 129
- 2021Self-Attention Networks Can Process Bounded Hierarchical Languagescited by 105
Built on by
Citing papers per year: 2022: 6; 2023: 14; 2024: 27; 2025: 27; 2026: 19.
93 papers.
Sort:
By area:
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 294
- 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problemscited by 260
- 2022Neural Networks and the Chomsky Hierarchycited by 217
- 2022The Parallelism Tradeoff: Limitations of Log-Precision Transformerscited by 193
- 2024The Illusion of State in State-Space Modelscited by 187
- 2023Representational Strengths and Limitations of Transformerscited by 133
- 2023What Formal Languages Can Transformers Express? A Surveycited by 124
- 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
- 2024Why are Sensitive Functions Hard for Transformers?cited by 74
- 2022Simplicity Bias in Transformers and their Ability to Learn Sparse Boolean Functionscited by 70
- 2022A Logic for Expressing Log-Precision Transformerscited by 67
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithmscited by 67
38 more
- 2023Tighter Bounds on the Expressivity of Transformer Encoderscited by 66
- 2024RNNs are not Transformers (Yet): The Key Bottleneck on In-context Retrievalcited by 64
- 2023The Expressive Power of Transformers with Chain of Thoughtcited by 50
- 2023Masked Hard-Attention Transformers Recognize Exactly the Star-Free Languagescited by 49
- 2023Are Transformers with One Layer Self-Attention Using Low-Rank Weight Matrices Universal Approximators?cited by 47
- 2022Autoregressive Structured Prediction with Language Modelscited by 43
- 2023Learning Transformer Programscited by 41
- 2024Memory3: Language Modeling with Explicit Memorycited by 40
- 2023Logical Languages Accepted by Transformer Encoders with Hard Attentioncited by 38
- 2025Between Circuits and Chomsky: Pre-pretraining on Formal Languages Imparts Linguistic Biasescited by 37
- 2023Sparse Universal Transformercited by 32
- 2024Transformers Can Represent n-gram Language Modelscited by 32
- 2024Separations in the Representational Capabilities of Transformers and Recurrent Architecturescited by 29
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecturecited by 26
- 2024Language Models Need Inductive Biases to Count Inductivelycited by 25
- 2025Can Language Models Learn Typologically Implausible Languages?cited by 23
- 2024Provably learning a multi-head attention layercited by 21
- 2024The Computational Limits of State-Space Models and Mamba via the Lens of Circuit Complexitycited by 21
- 2023Practical Computational Power of Linear Transformers and Their Recurrent and Self-Referential Extensionscited by 20
- 2024Do Efficient Transformers Really Save Computation?cited by 20
- 2025Exact Expressive Power of Transformers with Paddingcited by 19
- 2025Characterizing the Expressivity of Fixed-Precision Transformer Language Modelscited by 14
- 2025The Serial Scaling Hypothesiscited by 13
- 2025Depth-Width tradeoffs in Algorithmic Reasoning of Graph Tasks with Transformerscited by 11
- 2024Ask, and it shall be given: On the Turing completeness of promptingcited by 10
- 2025Circuit Complexity Bounds for Visual Autoregressive Modelcited by 10
- 2025Unique Hard Attention: A Tale of Two Sidescited by 10
- 2024Fundamental Limitations on Subquadratic Alternatives to Transformerscited by 9
- 2025The Counting Power of Transformerscited by 9
- 2024Transformers as Transducerscited by 8
- 2025Meta-Learning Neural Mechanisms rather than Bayesian Priorscited by 8
- 2025Pause Tokens Strictly Increase the Expressivity of Constant-Depth Transformerscited by 8
- 2026Why Are Linear RNNs More Parallelizable?cited by 8
- 2024Transformers are Expressive, But Are They Expressive Enough for Regression?cited by 6
- 2025Ehrenfeucht-Haussler Rank and Chain of Thoughtcited by 6
- 2025Compositional Reasoning with Transformers, RNNs, and Chain of Thoughtcited by 6
- 2025The Transformer Cookbookcited by 6
- 2025Diffusion Language Models are Provably Optimal Parallel Samplerscited by 6
50 most cited of 93 All 93 (JSON)
- 2026From Transformers to Weighted Automata: Towards the Verification of Large Language Models3 Oct 2026
- 2026Beyond Parallel Blindness: Information Floors and Model Gaps in Block Drafting27 Aug 2026
- 2026On the Expressive Power of Transformers13 Aug 2026
- 2026Disentangling the Expressivity of RoPE12 Aug 2026
- 2026Attention-based representations for multi-task computation4 Aug 2026
- 2026Transcript-Managed Transformers: Monotone Multi-Agent Collapse and Universality with Two Pop-Enabled Transcripts31 Jul 2026
- 2026An expressivity analysis of hierarchical modelling in deep transformers via bounded-depth grammars16 Jun 2026
- 2026Revisiting Padded Transformer Expressivity: Which Architectural Choices Matter and Which Don't28 May 2026
- 2026Certification from Examples is Hard for Circuits and Transformers under Minimal Overparametrization21 May 2026
- 2026Lost in Tokenization: Fundamental Trade-offs in Graph Tokenization for Transformers21 May 2026
- 2026Provably Shorter Scratchpads in Hybrid DeltaNet-Attention Decoders15 May 2026
- 2026Average Attention Transformers and Arithmetic Circuits6 May 2026
38 more
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)28 Apr 2026
- 2026Why Are Linear RNNs More Parallelizable?4 Mar 2026
- 2026Parity, Sensitivity, and Transformers5 Feb 2026
- 2026Every Bit Counts: A Theoretical Study of Precision-Expressivity Tradeoffs in Quantized Transformers2 Feb 2026
- 2026On the Expressiveness of State Space Models via Temporal Logics27 Jan 2026
- 2026Barriers to Discrete Reasoning with Transformers: A Survey Across Depth, Exactness, and Bandwidth19 Jan 2026
- 2026Context-Free Recognition with Transformers5 Jan 2026
- 2025Diffusion Language Models are Provably Optimal Parallel Samplers31 Dec 2025
- 2025Transformers are Inherently Succinct22 Oct 2025
- 2025The Transformer Cookbook1 Oct 2025
- 2025Efficient Turing Machine Simulation with Transformers28 Sep 2025
- 2025The Role of Logic and Automata in Understanding Transformers28 Sep 2025
- 2025From Neural Networks to Logical Theories: The Correspondence between Fibring Modal Logics and Fibring Neural Networks28 Sep 2025
- 2025Is In-Context Learning Learning?12 Sep 2025
- 2025Fast attention mechanisms: a tale of parallelism10 Sep 2025
- 2025The Serial Scaling Hypothesis16 Jul 2025
- 2025On the Existence of Universal Simulators of Attention23 Jun 2025
- 2025Propositional Logic for Probing Generalization in Neural Networks10 Jun 2025
- 2025Comparison of different Unique hard attention transformer models by the formal languages they can recognize3 Jun 2025
- 2025Characterizing the Expressivity of Fixed-Precision Transformer Language Models29 May 2025
- 2025Pause Tokens Strictly Increase the Expressivity of Constant-Depth Transformers27 May 2025
- 2025Exact Expressive Power of Transformers with Padding25 May 2025
- 2025The Counting Power of Transformers16 May 2025
- 2025Generative Linguistics, Large Language Models, and the Social Nature of Scientific Success25 Mar 2025
- 2025Meta-Learning Neural Mechanisms rather than Bayesian Priors20 Mar 2025
- 2025Unique Hard Attention: A Tale of Two Sides18 Mar 2025
- 2025Language Models, Graph Searching, and Supervision Adulteration: When More Supervision is Less and How to Make More More13 Mar 2025
- 2025Depth-Width tradeoffs in Algorithmic Reasoning of Graph Tasks with Transformers3 Mar 2025
- 2025Compositional Reasoning with Transformers, RNNs, and Chain of Thought3 Mar 2025
- 2025Between Circuits and Chomsky: Pre-pretraining on Formal Languages Imparts Linguistic Biases26 Feb 2025
- 2025Can Language Models Learn Typologically Implausible Languages?17 Feb 2025
- 2025Learning Model Successors31 Jan 2025
- 2025Ehrenfeucht-Haussler Rank and Chain of Thought22 Jan 2025
- 2025Circuit Complexity Bounds for Visual Autoregressive Model8 Jan 2025
- 2024Lower bounds on transformers with infinite precision28 Dec 2024
- 2024The Computational Limits of State-Space Models and Mamba via the Lens of Circuit Complexity9 Dec 2024
- 2024Circuit Complexity Bounds for RoPE-based Transformer Architecture12 Nov 2024
- 2024Overcoming a Learning Bottleneck in Impartial Games: A Circuit Complexity Approach10 Nov 2024
50 newest of 93 All 93 (JSON)
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 294
- 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problemscited by 260
- 2022A Logic for Expressing Log-Precision Transformerscited by 67
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithmscited by 67
- 2023The Expressive Power of Transformers with Chain of Thoughtcited by 50
- 2025Exact Expressive Power of Transformers with Paddingcited by 19
- 2025Ehrenfeucht-Haussler Rank and Chain of Thoughtcited by 6
- 2025Compositional Reasoning with Transformers, RNNs, and Chain of Thoughtcited by 6
- 2025Efficient Turing Machine Simulation with Transformerscited by 4
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)cited by 1
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)28 Apr 2026
- 2025Efficient Turing Machine Simulation with Transformers28 Sep 2025
- 2025Exact Expressive Power of Transformers with Padding25 May 2025
- 2025Compositional Reasoning with Transformers, RNNs, and Chain of Thought3 Mar 2025
- 2025Ehrenfeucht-Haussler Rank and Chain of Thought22 Jan 2025
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithms28 May 2024
- 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problems20 Feb 2024
- 2023The Expressive Power of Transformers with Chain of Thought11 Oct 2023
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective24 May 2023
- 2022A Logic for Expressing Log-Precision Transformers6 Oct 2022
- 2023Learning Transformer Programscited by 41
- 2023Learning Transformer Programs1 Jun 2023
- 2023Sparse Universal Transformercited by 32
- 2023Sparse Universal Transformer11 Oct 2023
- 2024Memory3: Language Modeling with Explicit Memorycited by 40
- 2024Memory3: Language Modeling with Explicit Memory1 Jul 2024
- 2022Neural Networks and the Chomsky Hierarchycited by 217
- 2022The Parallelism Tradeoff: Limitations of Log-Precision Transformerscited by 193
- 2024The Illusion of State in State-Space Modelscited by 187
- 2023Representational Strengths and Limitations of Transformerscited by 133
- 2023What Formal Languages Can Transformers Express? A Surveycited by 124
- 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
- 2024Why are Sensitive Functions Hard for Transformers?cited by 74
- 2022Simplicity Bias in Transformers and their Ability to Learn Sparse Boolean Functionscited by 70
- 2023Tighter Bounds on the Expressivity of Transformer Encoderscited by 66
- 2024RNNs are not Transformers (Yet): The Key Bottleneck on In-context Retrievalcited by 64
- 2023Masked Hard-Attention Transformers Recognize Exactly the Star-Free Languagescited by 49
- 2023Are Transformers with One Layer Self-Attention Using Low-Rank Weight Matrices Universal Approximators?cited by 47
12 most cited of 76 All 76 (JSON)
- 2026From Transformers to Weighted Automata: Towards the Verification of Large Language Models3 Oct 2026
- 2026Beyond Parallel Blindness: Information Floors and Model Gaps in Block Drafting27 Aug 2026
- 2026On the Expressive Power of Transformers13 Aug 2026
- 2026Disentangling the Expressivity of RoPE12 Aug 2026
- 2026Attention-based representations for multi-task computation4 Aug 2026
- 2026Transcript-Managed Transformers: Monotone Multi-Agent Collapse and Universality with Two Pop-Enabled Transcripts31 Jul 2026
- 2026An expressivity analysis of hierarchical modelling in deep transformers via bounded-depth grammars16 Jun 2026
- 2026Revisiting Padded Transformer Expressivity: Which Architectural Choices Matter and Which Don't28 May 2026
- 2026Certification from Examples is Hard for Circuits and Transformers under Minimal Overparametrization21 May 2026
- 2026Lost in Tokenization: Fundamental Trade-offs in Graph Tokenization for Transformers21 May 2026
- 2026Provably Shorter Scratchpads in Hybrid DeltaNet-Attention Decoders15 May 2026
- 2026Average Attention Transformers and Arithmetic Circuits6 May 2026
12 newest of 76 All 76 (JSON)