Exposing Attention Glitches with Flip-Flop Language Modeling
Not on the map. Why?
Abstract (arXiv)
Why do large language models sometimes output factual inaccuracies and exhibit erroneous reasoning? The brittleness of these models, particularly when executing long chains of reasoning, currently seems to be an inevitable price to pay for their advanced capabilities of coherently synthesizing knowledge, pragmatics, and abstract thought. Towards making sense of this fundamentally unsolved problem, this work identifies and analyzes the phenomenon of attention glitches, in which the Transformer architecture's inductive biases intermittently fail to capture robust reasoning. To isolate the issue, we introduce flip-flop language modeling (FFLM), a parametric family of synthetic benchmarks designed to probe the extrapolative behavior of neural language models. This simple generative task requires a model to copy binary symbols over long-range dependencies, ignoring the tokens in between. We find that Transformer FFLMs suffer from a long tail of sporadic reasoning errors, some of which we can eliminate using various regularization techniques. Our preliminary mechanistic analyses show why the remaining errors may be very difficult to diagnose and resolve. We hypothesize that attention glitches account for (some of) the closed-domain hallucinations in natural LLMs.
Key facts. Cited by 74 papers in the map (data through 7 Oct 2026). Builds on 77 of its 109 references that are in the map. First posted on arXiv 1 Jun 2023.
Builds on
77 of 109 references.
References · 77
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2022LAION-5B: An open large-scale dataset for training next generation image-text modelscited by 4,131
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,201
- 2022Survey of Hallucination in Natural Language Generationcited by 2,056
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
38 more
- 2019Language Models as Knowledge Bases?cited by 1,922
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2020GLU Variants Improve Transformercited by 1,724
- 2016Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translationcited by 1,471
- 2020Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Stepscited by 1,259
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
- 2019Attention is not Explanationcited by 916
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 820
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 814
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
- 2014Neural Turing Machinescited by 630
- 2018Universal Transformerscited by 613
- 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 495
- 2023TinyStories: How Small Can Language Models Be and Still Speak Coherent English?cited by 425
- 2023Resurrecting Recurrent Neural Networks for Long Sequencescited by 397
- 2016Assessing the Ability of LSTMs to Learn Syntax-Sensitive Dependenciescited by 350
- 2021Entity-Based Knowledge Conflicts in Question Answeringcited by 349
- 2022Language Models Are Greedy Reasoners: A Systematic Formal Analysis of Chain-of-Thoughtcited by 334
- 2022Selection-Inference: Exploiting Large Language Models for Interpretable Logical Reasoningcited by 331
- 2023How Language Model Hallucinations Can Snowballcited by 310
- 2020ProofWriter: Generating Implications, Proofs, and Abductive Statements over Natural Languagecited by 309
- 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 286
- 2020ToTTo: A Controlled Table-To-Text Generation Datasetcited by 267
- 2022Transformers Learn Shortcuts to Automatacited by 260
- 2021LongT5: Efficient Text-To-Text Transformer for Long Sequencescited by 232
- 2022Memorizing Transformerscited by 219
- 2022Exploring Length Generalization in Large Language Modelscited by 204
- 2022Hidden Progress in Deep Learning: SGD Learns Parities Near the Computational Limitcited by 184
- 2022Transformer Language Models without Positional Encodings Still Learn Positional Informationcited by 148
- 2023Progressive-Hint Prompting Improves Reasoning in Large Language Modelscited by 147
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
- 2022On the Origin of Hallucinations in Conversational Models: Is it the Datasets or the Models?cited by 137
- 2021Investigating the Limitations of Transformers with Simple Arithmetic Taskscited by 136
- 2023Unlimiformer: Long-Range Transformers with Unlimited Length Inputcited by 127
50 most cited of 77 All 77 (JSON)
Built on by
Citing papers per year: 2023: 9; 2024: 26; 2025: 27; 2026: 12.
74 papers.
Sort:
By area:
- 2023A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questionscited by 1,582
- 2024Hallucination is Inevitable: An Innate Limitation of Large Language Modelscited by 329
- 2023Challenges and Applications of Large Language Modelscited by 251
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
- 2024The Emerged Security and Privacy of LLM Agent: A Survey with Case Studiescited by 127
- 2023Teaching Arithmetic to Small Transformerscited by 121
- 2023Mechanistically analyzing the effects of fine-tuning on procedurally defined taskscited by 110
- 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Taskscited by 104
- 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 82
- 2024Can large language models explore in-context?cited by 75
- 2024We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMscited by 61
- 2024Contextual Position Encoding: Learning to Count What's Importantcited by 53
38 more
- 2024Internal Consistency and Self-Feedback in Large Language Models: A Surveycited by 49
- 2024The Expressive Capacity of State Space Models: A Formal Language Perspectivecited by 45
- 2025Large Language Models Hallucination: A Comprehensive Surveycited by 45
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformationscited by 32
- 2024Understanding Finetuning for Factual Knowledge Extractioncited by 31
- 2024Separations in the Representational Capabilities of Transformers and Recurrent Architecturescited by 29
- 2024ICT: Image-Object Cross-Level Trusted Intervention for Mitigating Object Hallucination in Large Vision-Language Modelscited by 28
- 2024A Percolation Model of Emergence: Analyzing Transformers Trained on a Formal Languagecited by 26
- 2025Long-Context Generalization with Sparse Attentioncited by 18
- 2024Selective Attention: Enhancing Transformer through Principled Context Controlcited by 16
- 2024Simulating Hard Attention Using Soft Attentioncited by 15
- 2023Butterfly Effects of SGD Noise: Error Amplification in Behavior Cloning and Autoregressioncited by 14
- 2024Transformer-Based Models Are Not Yet Perfect At Learning to Emulate Structural Recursioncited by 14
- 2023In-Context Learning Dynamics with Random Binary Sequencescited by 13
- 2025Knee-Deep in C-RASP: A Transformer Depth Hierarchycited by 12
- 2024Explicitly Encoding Structural Symmetry is Key to Length Generalization in Arithmetic Taskscited by 10
- 2025Smoothing Out Hallucinations: Mitigating LLM Hallucination with Smoothed Knowledge Distillationcited by 10
- 2025On the Query Complexity of Verifier-Assisted Language Generationcited by 10
- 2025Unique Hard Attention: A Tale of Two Sidescited by 10
- 2025Mitigating Hallucination in Multimodal LLMs with Layer Contrastive Decodingcited by 10
- 2026Procedural Pretraining: Warming Up Language Models with Abstract Datacited by 10
- 2023An Investigation of LLMs' Inefficacy in Understanding Converse Relationscited by 9
- 2024A Survey on Responsible Generative AI: What to Generate and What Notcited by 8
- 2025The Role of Sparsity for Length Generalization in Transformerscited by 8
- 2023Prospective Role of Foundation Models in Advancing Autonomous Vehiclescited by 7
- 2024Addressing Image Hallucination in Text-to-Image Generation through Factual Image Retrievalcited by 6
- 2025Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilitiescited by 6
- 2026ErrorMap and ErrorAtlas: Charting the Failure Landscape of Large Language Modelscited by 6
- 2023Recursion in Recursion: Two-Level Nested Recursion for Length Generalization with Scalabilitycited by 5
- 2024Investigating Recurrent Transformers with Dynamic Haltcited by 5
- 2024Mitigating Covariate Shift in Misspecified Regression with Applications to Reinforcement Learningcited by 4
- 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encodingcited by 4
- 2024Transformer Mechanisms Mimic Frontostriatal Gating Operations When Trained on Human Working Memory Taskscited by 3
- 2024CogMG: Collaborative Augmentation Between Large Language Model and Knowledge Graphcited by 3
- 2025Recency Biased Causal Attention for Time-series Forecastingcited by 3
- 2025LayerCake: Token-Aware Contrastive Decoding within Large Language Model Layerscited by 3
- 2026On the Spatiotemporal Dynamics of Generalization in Neural Networkscited by 3
- 2025Attend or Perish: Benchmarking Attention in Algorithmic Reasoningcited by 2
50 most cited of 74 All 74 (JSON)
- 2026Length-Independent State Tracking Under a Parallel Scan26 Sep 2026
- 2026Larger Context Window, Fewer Overcorrections: Optimizing Prompts and Batching for Minimal-Edit Grammatical Error Correction9 Sep 2026
- 2026Disentangling the Expressivity of RoPE12 Aug 2026
- 2026On Subquadratic Architectures: From Applications to Principles10 Jun 2026
- 2026Refit the Probe: Single-Direction Ablation Is Not a Necessity Test30 May 2026
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)28 Apr 2026
- 2026The UNDO Flip-Flop: A Controlled Probe for Reversible Semantic State Management in State Space Model7 Apr 2026
- 2026On the Ability of Transformers to Verify Plans20 Mar 2026
- 2026Synthesis and Verification of Transformer Programs (Technical Report)18 Feb 2026
- 2026On the Spatiotemporal Dynamics of Generalization in Neural Networks2 Feb 2026
- 2026Procedural Pretraining: Warming Up Language Models with Abstract Data29 Jan 2026
- 2026ErrorMap and ErrorAtlas: Charting the Failure Landscape of Large Language Models22 Jan 2026
38 more
- 2025An Empirical Study of Sample Selection Strategies for Large Language Model Repair23 Oct 2025
- 2025Addressing the ID-Matching Challenge in Long Video Captioning8 Oct 2025
- 2025Large Language Models Hallucination: A Comprehensive Survey5 Oct 2025
- 2025Mitigating Hallucination in Multimodal LLMs with Layer Contrastive Decoding29 Sep 2025
- 2025An empirical study on the limitation of Transformers in program trace generation29 Sep 2025
- 2025Review of Hallucination Understanding in Large Language and Vision Models26 Sep 2025
- 2025InTraVisTo: Inside Transformer Visualisation Tool18 Jul 2025
- 2025LayerCake: Token-Aware Contrastive Decoding within Large Language Model Layers6 Jul 2025
- 2025mGRADE: Minimal Recurrent Gating Meets Delay Convolutions for Lightweight Sequence Modeling2 Jul 2025
- 2025HIDE and Seek: Detecting Hallucinations in Language Models via Decoupled Representations21 Jun 2025
- 2025Long-Context Generalization with Sparse Attention19 Jun 2025
- 2025Knee-Deep in C-RASP: A Transformer Depth Hierarchy19 Jun 2025
- 2025Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilities27 May 2025
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformations22 May 2025
- 2025TRA: Better Length Generalisation with Threshold Relative Attention29 Mar 2025
- 2025Unique Hard Attention: A Tale of Two Sides18 Mar 2025
- 2025When Do Transformers Outperform Feedforward and Recurrent Networks? A Statistical Perspective14 Mar 2025
- 2025Can Memory-Augmented Language Models Generalize on Reasoning-in-a-Haystack Tasks?10 Mar 2025
- 2025Three tiers of computation in transformers and in brain architectures5 Mar 2025
- 2025Attend or Perish: Benchmarking Attention in Algorithmic Reasoning28 Feb 2025
- 2025The Role of Sparsity for Length Generalization in Transformers24 Feb 2025
- 2025On the Query Complexity of Verifier-Assisted Language Generation17 Feb 2025
- 2025Smoothing Out Hallucinations: Mitigating LLM Hallucination with Smoothed Knowledge Distillation16 Feb 2025
- 2025Transformers Provably Learn Sparse XOR with Polylogarithmic Parameters11 Feb 2025
- 2025IRepair: An Intent-Aware Approach to Repair Data-Driven Errors in Large Language Models10 Feb 2025
- 2025Recency Biased Causal Attention for Time-series Forecasting10 Feb 2025
- 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encoding1 Jan 2025
- 2024Simulating Hard Attention Using Soft Attention13 Dec 2024
- 2024ICT: Image-Object Cross-Level Trusted Intervention for Mitigating Object Hallucination in Large Vision-Language Models22 Nov 2024
- 2024Selective Attention: Enhancing Transformer through Principled Context Control19 Nov 2024
- 2024Can Custom Models Learn In-Context? An Exploration of Hybrid Architecture Performance on In-Context Learning Tasks6 Nov 2024
- 2024A Percolation Model of Emergence: Analyzing Transformers Trained on a Formal Language22 Aug 2024
- 2024The Emerged Security and Privacy of LLM Agent: A Survey with Case Studies28 Jul 2024
- 2024Reorganizing attention-space geometry with expressive attention26 Jul 2024
- 2024Internal Consistency and Self-Feedback in Large Language Models: A Survey19 Jul 2024
- 2024Addressing Image Hallucination in Text-to-Image Generation through Factual Image Retrieval15 Jul 2024
- 2024CogMG: Collaborative Augmentation Between Large Language Model and Knowledge Graph25 Jun 2024
- 2024Understanding Finetuning for Factual Knowledge Extraction20 Jun 2024
50 newest of 74 All 74 (JSON)
- 2024Internal Consistency and Self-Feedback in Large Language Models: A Surveycited by 49
- 2024Explicitly Encoding Structural Symmetry is Key to Length Generalization in Arithmetic Taskscited by 10
- 2025On the Query Complexity of Verifier-Assisted Language Generationcited by 10
- 2025Mitigating Hallucination in Multimodal LLMs with Layer Contrastive Decodingcited by 10
- 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encodingcited by 4
- 2025Attend or Perish: Benchmarking Attention in Algorithmic Reasoningcited by 2
- 2025Can Memory-Augmented Language Models Generalize on Reasoning-in-a-Haystack Tasks?cited by 2
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)cited by 1
- 2025InTraVisTo: Inside Transformer Visualisation Toolcited by 0
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)28 Apr 2026
- 2025Mitigating Hallucination in Multimodal LLMs with Layer Contrastive Decoding29 Sep 2025
- 2025InTraVisTo: Inside Transformer Visualisation Tool18 Jul 2025
- 2025Can Memory-Augmented Language Models Generalize on Reasoning-in-a-Haystack Tasks?10 Mar 2025
- 2025Attend or Perish: Benchmarking Attention in Algorithmic Reasoning28 Feb 2025
- 2025On the Query Complexity of Verifier-Assisted Language Generation17 Feb 2025
- 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encoding1 Jan 2025
- 2024Internal Consistency and Self-Feedback in Large Language Models: A Survey19 Jul 2024
- 2024Explicitly Encoding Structural Symmetry is Key to Length Generalization in Arithmetic Tasks4 Jun 2024
- 2023A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questionscited by 1,582
- 2024Hallucination is Inevitable: An Innate Limitation of Large Language Modelscited by 329
- 2023Challenges and Applications of Large Language Modelscited by 251
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
- 2023Teaching Arithmetic to Small Transformerscited by 121
- 2023Mechanistically analyzing the effects of fine-tuning on procedurally defined taskscited by 110
- 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 82
- 2024Can large language models explore in-context?cited by 75
- 2024We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMscited by 61
- 2024Contextual Position Encoding: Learning to Count What's Importantcited by 53
- 2024The Expressive Capacity of State Space Models: A Formal Language Perspectivecited by 45
- 2025Large Language Models Hallucination: A Comprehensive Surveycited by 45
12 most cited of 60 All 60 (JSON)
- 2026Length-Independent State Tracking Under a Parallel Scan26 Sep 2026
- 2026Larger Context Window, Fewer Overcorrections: Optimizing Prompts and Batching for Minimal-Edit Grammatical Error Correction9 Sep 2026
- 2026Disentangling the Expressivity of RoPE12 Aug 2026
- 2026On Subquadratic Architectures: From Applications to Principles10 Jun 2026
- 2026Refit the Probe: Single-Direction Ablation Is Not a Necessity Test30 May 2026
- 2026The UNDO Flip-Flop: A Controlled Probe for Reversible Semantic State Management in State Space Model7 Apr 2026
- 2026On the Ability of Transformers to Verify Plans20 Mar 2026
- 2026Synthesis and Verification of Transformer Programs (Technical Report)18 Feb 2026
- 2026On the Spatiotemporal Dynamics of Generalization in Neural Networks2 Feb 2026
- 2026Procedural Pretraining: Warming Up Language Models with Abstract Data29 Jan 2026
- 2026ErrorMap and ErrorAtlas: Charting the Failure Landscape of Large Language Models22 Jan 2026
- 2025An Empirical Study of Sample Selection Strategies for Large Language Model Repair23 Oct 2025
12 newest of 60 All 60 (JSON)