Cited by 47semigroups and automata theoryNatural Language Processing TechniquesTopic Modeling

Overcoming a Theoretical Limitation of Self-Attention

Open access
Chiang, David, Cholak, Peter·2022·Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)

Abstract

Although transformers are remarkably effective for many tasks, there are some surprisingly easy-looking regular languages that they struggle with.Hahn shows that for languages where acceptance depends on a single input symbol, a transformer's classification decisions become less and less confident (that is, with crossentropy approaching 1 bit per string) as input strings get longer and longer.We examine this limitation using two languages: PAR-ITY, the language of bit strings with an odd number of 1s, and FIRST, the language of bit strings starting with a 1.We demonstrate three ways of overcoming the limitation suggested by Hahn's lemma.First, we settle an open question by constructing a transformer that recognizes PARITY with perfect accuracy, and similarly for FIRST.Second, we use layer normalization to bring the cross-entropy of both models arbitrarily close to zero.Third, when transformers need to focus on a single position, as for FIRST, we find that they can fail to generalize to longer strings; we offer a simple remedy to this problem that also improves length generalization in machine translation.

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.18653/v1/2022.acl-long.527

Cites

16 of 16 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?

  • Models trained from scratch show little to no length generalization on parity.

    “and parity (Bhattamishra et al., 2020;Chiang & Cholak, 2022;Ruoss et al., 2023;Delétang et al., 2023)”

    From What Algorithms can Transformers Learn? A Study in Length Generalization (2023) · cites this paper as Chiang & Cholak, 2022

    Section 5.1 reports that standard transformers trained from scratch were unable to learn PARITY. It does not report a parity-specific test of generalization from shorter to longer strings; the length-generalization results in that section concern FIRST. Thus the paper supports poor learning on parity, but not the claim’s specific length-generalization finding. (LLM, conf=0.85)

    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 [52]

    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 log n attention scaling was proposed by Chiang & Cholak (2022) and Nakanishi (2025), used in practice in Qwen (Bai et al., 2023), and given additional theoretical justification by Chen et al. (2026).

    “The log n factor was proposed by Chiang & Cholak (2022) and Nakanishi (2025) and has been used in practice in Qwen (Bai et al., 2023).Chen et al. (2026) provide additional theoretical justification for this choice.”

    From Exact-Solution Volume and Length Generalization in Transformers (2026) · cites this paper as Chiang & Cholak (2022)

  • Chiang & Cholak (2022) construct exact transformers for FIRST and PARITY, but report that standard training fails on PARITY, and that FIRST does not necessarily extrapolate to longer inputs without log n-scaling.

    “Chiang & Cholak (2022) construct exact transformers for FIRST (whether the first symbol is a 1) and PARITY (whether the number of 1's is odd), but report that standard training fails on PARITY, and that FIRST does not necessarily extrapolate to longer inputs without log n-scaling.”

    From Exact-Solution Volume and Length Generalization in Transformers (2026) · cites this paper as Chiang & Cholak (2022)

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

Research works printed but not linked: 1

  1. Toan Q. Nguyen and Julian Salazar. 2019. Transform- ers without tears: Improving the normalization of self-attention. In Proc. International Workshop on Spoken Language Translation. · DOI

Cited by

Sorted by citations

Authors
Chiang, D., & Cholak, P.
Affiliations
University of Notre Dame (US)
Venue
Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Published
2022
Pages
7654-7664
ISSN
0736-587X (ISSN-L)
OpenAlex
W4285206226
Cited by
39
References
16
Citations by year
2026: 8 · 2025: 9 · 2024: 8 · 2023: 11 · 2022: 3
FWCI
10.66
Type
conference paper
Language
en
Open access
Licence
cc-by
Locations
  • Proceedings of the conference - Association for Computational Linguistics. Meeting (publishedVersion, cc-by)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Funders
  • Office of the Director of National Intelligence (FA8650-17-C-9116)
  • Intelligence Advanced Research Projects Activity
  • NIH Office of the Director
Topics
  • Physical Sciences › Computer Science › Computational Theory and Mathematics › semigroups and automata theory
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
Keywords
self-attention, transformer models, regular languages, mother tongue, cross-entropy, length generalization, layer normalization, machine translation

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