Do Attention Heads in BERT Track Syntactic Dependencies?
Not on the map. Why?
Abstract (arXiv)
We investigate the extent to which individual attention heads in pretrained transformer language models, such as BERT and RoBERTa, implicitly capture syntactic dependency relations. We employ two methods---taking the maximum attention weight and computing the maximum spanning tree---to extract implicit dependency relations from the attention weights of each layer/head, and compare them to the ground-truth Universal Dependency (UD) trees. We show that, for some UD relation types, there exist heads that can recover the dependency type significantly better than baselines on parsed English text, suggesting that some self-attention heads act as a proxy for syntactic structure. We also analyze BERT fine-tuned on two datasets---the syntax-oriented CoLA and the semantics-oriented MNLI---to investigate whether fine-tuning affects the patterns of their self-attention, but we do not observe substantial differences in the overall dependency relations extracted using our methods. Our results suggest that these models have some specialist attention heads that track individual dependency types, but no generalist head that performs holistic parsing significantly better than a trivial baseline, and that analyzing attention weights directly may not reveal much of the syntactic knowledge that BERT-style models are known to learn.
Key facts. Cited by 87 papers in the map (data through 7 Oct 2026). First posted on arXiv 27 Nov 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 23; 2022: 19; 2023: 15; 2024: 19; 2025: 7; 2026: 4.
87 papers.
Sort:
By area:
- 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
- 2021Pre-Trained Models: Past, Present and Futurecited by 319
- 2021Causal Analysis of Syntactic Agreement Mechanisms in Neural Language Modelscited by 127
- 2021Knowledgeable or Educated Guess? Revisiting Language Models as Knowledge Basescited by 107
- 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understandingcited by 85
- 2022Same Pre-training Loss, Better Downstream: Implicit Bias Matters for Language Modelscited by 84
- 2024A Primer on the Inner Workings of Transformer-based Language Modelscited by 83
- 2024On the Role of Attention Heads in Large Language Model Safetycited by 70
- 2023Attention Satisfies: A Constraint-Satisfaction Lens on Factual Errors of Language Modelscited by 67
- 2022Mixture of Attention Heads: Selecting Attention Heads Per Tokencited by 58
- 2024Explainable and Interpretable Multimodal Large Language Models: A Comprehensive Surveycited by 52
- 2021Incorporating Residual and Normalization Layers into Analysis of Masked Language Modelscited by 50
38 more
- 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
- 2021Artificial Text Detection via Examining the Topology of Attention Mapscited by 49
- 2022GlobEnc: Quantifying Global Token Attribution by Incorporating the Whole Encoder Layer in Transformerscited by 44
- 2023Quantifying Context Mixing in Transformerscited by 43
- 2022Grad-SAM: Explaining Transformers via Gradient Self-Attention Mapscited by 42
- 2021Sparse Attention with Linear Unitscited by 41
- 2023The Impact of Depth on Compositional Generalization in Transformer Language Modelscited by 37
- 2023AlignAtt: Using Attention-based Audio-Translation Alignments as a Guide for Simultaneous Speech Translationcited by 35
- 2022Attention as a Guide for Simultaneous Speech Translationcited by 32
- 2023Transformers are uninterpretable with myopic methods: a case study with bounded Dyck grammarscited by 30
- 2024Mechanistic?cited by 25
- 2024Language Models as Models of Languagecited by 24
- 2021The Case for Translation-Invariant Self-Attention in Transformer-Based Language Modelscited by 23
- 2023The Life Cycle of Knowledge in Big Language Models: A Surveycited by 23
- 2024Relational Composition in Neural Networks: A Survey and Call to Actioncited by 23
- 2021Attention Can Reflect Syntactic Structure (If You Let It)cited by 22
- 2021Learning Relation Alignment for Calibrated Cross-modal Retrievalcited by 21
- 2022How Much Does Attention Actually Attend? Questioning the Importance of Attention in Pretrained Transformerscited by 20
- 2021Interpreting Deep Learning Models in Natural Language Processing: A Reviewcited by 19
- 2022Acceptability Judgements via Examining the Topology of Attention Mapscited by 19
- 2021Of Non-Linearity and Commutativity in BERTcited by 16
- 2021Enjoy the Salience: Towards Better Transformer-based Faithful Explanations with Word Saliencecited by 16
- 2021The heads hypothesis: A unifying statistical approach towards understanding multi-headed attention in BERTcited by 15
- 2021Probing for Bridging Inference in Transformer Language Modelscited by 14
- 2025LLMs as a synthesis between symbolic and distributed approaches to languagecited by 13
- 2021On-the-Fly Attention Modulation for Neural Generationcited by 12
- 2025Learning Task Representations from In-Context Learningcited by 11
- 2021Linguistic Dependencies and Statistical Dependencecited by 10
- 2021Shaking Syntactic Trees on the Sesame Street: Multilingual Probing with Controllable Perturbationscited by 10
- 2022What does Transformer learn about source code?cited by 9
- 2023Probing LLMs for Joint Encoding of Linguistic Categoriescited by 9
- 2021Breaking Down Multilingual Machine Translationcited by 8
- 2023Morphosyntactic probing of multilingual BERT modelscited by 8
- 2024Concentrate Attention: Towards Domain-Generalizable Prompt Optimization for Language Modelscited by 7
- 2024Dependency Transformer Grammars: Integrating Dependency Structures into Transformer Language Modelscited by 7
- 2025Linguistic Interpretability of Transformer-based Language Models: a systematic reviewcited by 7
- 2021Schr"odinger's Tree -- On Syntax and Neural Language Modelscited by 6
- 2024Word Importance Explains How Prompts Affect Language Model Outputscited by 6
50 most cited of 87 All 87 (JSON)
- 2026CodeTD: Topology of Attention Detects Hallucinations in Code LLMs7 Sep 2026
- 2026A Circuit for Plural Reference: How LLMs Represent and Retrieve Singular and Plural Entities3 Sep 2026
- 2026A Unifying Perspective on Language Model Representations: From Filler-Role Structure to Mechanistic Interpretability29 Aug 2026
- 2026The Grammar of Transformers: A Systematic Review of Interpretability Research on Syntactic Knowledge in Language Models9 Jan 2026
- 2025FrugalPrompt: Reducing Contextual Overhead in Large Language Models via Token Attribution18 Oct 2025
- 2025SSA: Improving Performance With a Better Scoring Function20 Aug 2025
- 2025Linguistic Interpretability of Transformer-based Language Models: a systematic review9 Apr 2025
- 2025Hallucinated Span Detection with Multi-View Attention Features6 Apr 2025
- 2025AxBERT: An Interpretable Chinese Spelling Correction Method Driven by Associative Knowledge Network4 Mar 2025
- 2025LLMs as a synthesis between symbolic and distributed approaches to language17 Feb 2025
- 2025Learning Task Representations from In-Context Learning8 Feb 2025
- 2024Incremental Sentence Processing Mechanisms in Autoregressive Transformer Language Models6 Dec 2024
38 more
- 2024Explainable and Interpretable Multimodal Large Language Models: A Comprehensive Survey3 Dec 2024
- 2024On the Role of Attention Heads in Large Language Model Safety17 Oct 2024
- 2024Linguistically Grounded Analysis of Language Models using Shapley Head Values17 Oct 2024
- 2024Mechanistic?7 Oct 2024
- 2024Language Models as Models of Language13 Aug 2024
- 2024Dependency Transformer Grammars: Integrating Dependency Structures into Transformer Language Models24 Jul 2024
- 2024Relational Composition in Neural Networks: A Survey and Call to Action19 Jul 2024
- 2024Are there identifiable structural parts in the sentence embedding whole?24 Jun 2024
- 2024Concentrate Attention: Towards Domain-Generalizable Prompt Optimization for Language Models15 Jun 2024
- 2024Disentangling and Integrating Relational and Sensory Information in Transformer Architectures26 May 2024
- 2024A Primer on the Inner Workings of Transformer-based Language Models30 Apr 2024
- 2024More Room for Language: Investigating the Effect of Retrieval on Language Models16 Apr 2024
- 2024Dissecting Paraphrases: The Impact of Prompt Syntax and supplementary Information on Knowledge Retrieval from Pretrained Language Models2 Apr 2024
- 2024Can AI Models Appreciate Document Aesthetics? An Exploration of Legibility and Layout Quality in Relation to Prediction Confidence27 Mar 2024
- 2024A Study on How Attention Scores in the BERT Model are Aware of Lexical Categories in Syntactic and Semantic Tasks on the GLUE Benchmark25 Mar 2024
- 2024Embedded Named Entity Recognition using Probing Classifiers18 Mar 2024
- 2024Word Importance Explains How Prompts Affect Language Model Outputs5 Mar 2024
- 2024Inducing Systematicity in Transformers by Attending to Structurally Quantized Embeddings9 Feb 2024
- 2023Dynamic Syntax Mapping: A New Approach to Unsupervised Syntax Parsing18 Dec 2023
- 2023Transformers are uninterpretable with myopic methods: a case study with bounded Dyck grammars3 Dec 2023
- 2023Probabilistic Transformer: A Probabilistic Dependency Model for Contextual Word Representation26 Nov 2023
- 2023Syntactic Inductive Bias in Transformer Language Models: Especially Helpful for Low-Resource Languages?1 Nov 2023
- 2023The Impact of Depth on Compositional Generalization in Transformer Language Models30 Oct 2023
- 2023Probing LLMs for Joint Encoding of Linguistic Categories28 Oct 2023
- 2023Is Probing All You Need? Indicator Tasks as an Alternative to Probing Embedding Spaces24 Oct 2023
- 2023Disentangling the Linguistic Competence of Privacy-Preserving BERT17 Oct 2023
- 2023Attention Satisfies: A Constraint-Satisfaction Lens on Factual Errors of Language Models26 Sep 2023
- 2023Morphosyntactic probing of multilingual BERT models9 Jun 2023
- 2023GATology for Linguistics: What Syntactic Dependencies It Knows22 May 2023
- 2023AlignAtt: Using Attention-based Audio-Translation Alignments as a Guide for Simultaneous Speech Translation19 May 2023
- 2023The Life Cycle of Knowledge in Big Language Models: A Survey14 Mar 2023
- 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understanding7 Mar 2023
- 2023Quantifying Context Mixing in Transformers30 Jan 2023
- 2022Reconstruction Probing21 Dec 2022
- 2022Attention as a Guide for Simultaneous Speech Translation15 Dec 2022
- 2022Syntactic Substitutability as Unsupervised Dependency Syntax29 Nov 2022
- 2022The Architectural Bottleneck Principle11 Nov 2022
- 2022Improving word mover's distance by leveraging self-attention matrix11 Nov 2022
50 newest of 87 All 87 (JSON)
- 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
- 2021Pre-Trained Models: Past, Present and Futurecited by 319
- 2021Causal Analysis of Syntactic Agreement Mechanisms in Neural Language Modelscited by 127
- 2021Knowledgeable or Educated Guess? Revisiting Language Models as Knowledge Basescited by 107
- 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understandingcited by 85
- 2022Same Pre-training Loss, Better Downstream: Implicit Bias Matters for Language Modelscited by 84
- 2024A Primer on the Inner Workings of Transformer-based Language Modelscited by 83
- 2023Attention Satisfies: A Constraint-Satisfaction Lens on Factual Errors of Language Modelscited by 67
- 2021Incorporating Residual and Normalization Layers into Analysis of Masked Language Modelscited by 50
- 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
- 2021Artificial Text Detection via Examining the Topology of Attention Mapscited by 49
- 2022GlobEnc: Quantifying Global Token Attribution by Incorporating the Whole Encoder Layer in Transformerscited by 44
12 most cited of 82 All 82 (JSON)
- 2026CodeTD: Topology of Attention Detects Hallucinations in Code LLMs7 Sep 2026
- 2026A Circuit for Plural Reference: How LLMs Represent and Retrieve Singular and Plural Entities3 Sep 2026
- 2026A Unifying Perspective on Language Model Representations: From Filler-Role Structure to Mechanistic Interpretability29 Aug 2026
- 2026The Grammar of Transformers: A Systematic Review of Interpretability Research on Syntactic Knowledge in Language Models9 Jan 2026
- 2025FrugalPrompt: Reducing Contextual Overhead in Large Language Models via Token Attribution18 Oct 2025
- 2025SSA: Improving Performance With a Better Scoring Function20 Aug 2025
- 2025Linguistic Interpretability of Transformer-based Language Models: a systematic review9 Apr 2025
- 2025Hallucinated Span Detection with Multi-View Attention Features6 Apr 2025
- 2025AxBERT: An Interpretable Chinese Spelling Correction Method Driven by Associative Knowledge Network4 Mar 2025
- 2025LLMs as a synthesis between symbolic and distributed approaches to language17 Feb 2025
- 2025Learning Task Representations from In-Context Learning8 Feb 2025
- 2024Incremental Sentence Processing Mechanisms in Autoregressive Transformer Language Models6 Dec 2024
12 newest of 82 All 82 (JSON)