Cited by 172Natural Language Processing Techniquessemigroups and automata theoryTopic Modeling

Theoretical Limitations of Self-Attention in Neural Sequence Models

Open access
Hahn, Michael·2020·Transactions of the Association for Computational Linguistics

Abstract

Transformers are emerging as the new workhorse of NLP, showing great success across tasks. Unlike LSTMs, transformers process input sequences entirely through self-attention. Previous work has suggested that the computational capabilities of self-attention to process hierarchical structures are limited. In this work, we mathematically investigate the computational power of self-attention to model formal languages. Across both soft and hard attention, we show strong theoretical limitations of the computational abilities of self-attention, finding that it cannot model periodic finite-state languages, nor hierarchical structure, unless the number of layers or heads increases with input length. These limitations seem surprising given the practical success of self-attention and the prominent role assigned to hierarchical structure in linguistics, suggesting that natural language can be approximated well with models that are too weak for the formal languages typically assumed in theoretical linguistics.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1162/tacl_a_00306

Cites

77 of 77 references verified0 citation errors · 0 not checkable

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • A Transformer cannot even fit the training set of parity sequences over some minimal length.

    “Many works have shown that a Transformer cannot even fit the training set of parity sequences over some minimal length (Hahn, 2020;Delétang et al., 2023).”

    From What Algorithms can Transformers Learn? A Study in Length Generalization (2023) · cites this paper as Hahn, 2020

    The Discussion says that any fixed transformer will make mistakes on PARITY when inputs are sufficiently long. It does not establish that a Transformer cannot fit a finite training set beyond a particular minimum length; the same section says a transformer can be constructed to achieve perfect accuracy on all examples up to any chosen finite length bound. (LLM, conf=0.88)

    Experimental — accuracy not yet measured
  • LLMs can occasionally exhibit unpredictable reasoning hallucinations spanning both long-range and short-range dependencies, which potentially arise from the limitations of soft attention, where attention becomes diluted across positions as sequence length increases.

    “Moreover, recent research has exposed that LLMs can occasionally exhibit unpredictable reasoning hallucinations spanning both long-range and short-range dependencies, which potentially arise from the limitations of soft attention [52, 111], where attention becomes diluted across positions as sequence length increases.”

    From A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questions (2025) · cites this paper as [111]

    Split into 2 atoms — 0 confirmed, 2 partially supported, 0 disputed, 0 misattributed, 0 unverifiable. Expand the claim to see per-atom verdicts.

    Experimental — accuracy not yet measured
  • The approach bypasses the limitations presented in Hahn (2020), which exploit non-saturating softmaxes.

    “This bypasses the limitations presented in Hahn (2020), which exploit non-saturating softmaxes.”

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

Flagged first, then by citations

1 of the 78 references couldn’t be matched to a known paper.

Research works printed but not linked: 4

  1. Austin, Texas. Association for Computational Linguistics.
  2. Robert McNaughton and Seymour A. Papert. 1971. Counter-Free Automata (MIT Research Monograph No. 65), The MIT Press.
  3. John Miller and Moritz Hardt. 2019. Stable recurrent models. In International Conference on Learning Representations.
  4. Dan Parker, Michael Shvartsman, and Julie A. Van Dyke. 2017. The cue-based retrieval theory of sentence comprehension: New findings and new challenges. Language Processing and Disorders, pages 121-144.

Cited by

Sorted by citations

Authors
Hahn, M.
Affiliations
Stanford University (US)
Corresponding author
Hahn, Michael
Venue
Transactions of the Association for Computational Linguistics
Publisher
MIT Press
Published
2020-12
Volume
8
Pages
156-171
ISSN
2307-387X (ISSN-L)
OpenAlex
W2952744660
Cited by
165
References
78
Citations by year
2026: 22 · 2025: 29 · 2024: 25 · 2023: 25 · 2022: 16 · 2021: 30 · 2020: 17 · 2019: 1
FWCI
8.65
Type
journal article
Language
en
Open access
Licence
cc-by
Locations
  • Transactions of the Association for Computational Linguistics (publishedVersion, cc-by)
  • arXiv (Cornell University) (submittedVersion)
  • DOAJ (DOAJ: Directory of Open Access Journals) (submittedVersion, cc-by-sa)
  • arXiv (Cornell University)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
  • Physical Sciences › Computer Science › Computational Theory and Mathematics › semigroups and automata theory
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
Keywords
self-attention, transformer models, computational power, formal languages, hierarchy, soft attention, hard attention, sequence models, theoretical limitations, natural language

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review