mlsanityData to 7 Oct 2026

Do Attention Heads in BERT Track Syntactic Dependencies?

arXiv 1911.12246 ↗First posted 27 Nov 2019cs.CLcited by 87

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

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 23; 2022: 19; 2023: 15; 2024: 19; 2025: 7; 2026: 4.

87 papers.

Sort:

By area:

  1. 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
  2. 2021Pre-Trained Models: Past, Present and Futurecited by 319
  3. 2021Causal Analysis of Syntactic Agreement Mechanisms in Neural Language Modelscited by 127
  4. 2021Knowledgeable or Educated Guess? Revisiting Language Models as Knowledge Basescited by 107
  5. 2023How Do Transformers Learn Topic Structure: Towards a Mechanistic Understandingcited by 85
  6. 2022Same Pre-training Loss, Better Downstream: Implicit Bias Matters for Language Modelscited by 84
  7. 2024A Primer on the Inner Workings of Transformer-based Language Modelscited by 83
  8. 2024On the Role of Attention Heads in Large Language Model Safetycited by 70
  9. 2023Attention Satisfies: A Constraint-Satisfaction Lens on Factual Errors of Language Modelscited by 67
  10. 2022Mixture of Attention Heads: Selecting Attention Heads Per Tokencited by 58
  11. 2024Explainable and Interpretable Multimodal Large Language Models: A Comprehensive Surveycited by 52
  12. 2021Incorporating Residual and Normalization Layers into Analysis of Masked Language Modelscited by 50
38 more
  1. 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
  2. 2021Artificial Text Detection via Examining the Topology of Attention Mapscited by 49
  3. 2022GlobEnc: Quantifying Global Token Attribution by Incorporating the Whole Encoder Layer in Transformerscited by 44
  4. 2023Quantifying Context Mixing in Transformerscited by 43
  5. 2022Grad-SAM: Explaining Transformers via Gradient Self-Attention Mapscited by 42
  6. 2021Sparse Attention with Linear Unitscited by 41
  7. 2023The Impact of Depth on Compositional Generalization in Transformer Language Modelscited by 37
  8. 2023AlignAtt: Using Attention-based Audio-Translation Alignments as a Guide for Simultaneous Speech Translationcited by 35
  9. 2022Attention as a Guide for Simultaneous Speech Translationcited by 32
  10. 2023Transformers are uninterpretable with myopic methods: a case study with bounded Dyck grammarscited by 30
  11. 2024Mechanistic?cited by 25
  12. 2024Language Models as Models of Languagecited by 24
  13. 2021The Case for Translation-Invariant Self-Attention in Transformer-Based Language Modelscited by 23
  14. 2023The Life Cycle of Knowledge in Big Language Models: A Surveycited by 23
  15. 2024Relational Composition in Neural Networks: A Survey and Call to Actioncited by 23
  16. 2021Attention Can Reflect Syntactic Structure (If You Let It)cited by 22
  17. 2021Learning Relation Alignment for Calibrated Cross-modal Retrievalcited by 21
  18. 2022How Much Does Attention Actually Attend? Questioning the Importance of Attention in Pretrained Transformerscited by 20
  19. 2021Interpreting Deep Learning Models in Natural Language Processing: A Reviewcited by 19
  20. 2022Acceptability Judgements via Examining the Topology of Attention Mapscited by 19
  21. 2021Of Non-Linearity and Commutativity in BERTcited by 16
  22. 2021Enjoy the Salience: Towards Better Transformer-based Faithful Explanations with Word Saliencecited by 16
  23. 2021The heads hypothesis: A unifying statistical approach towards understanding multi-headed attention in BERTcited by 15
  24. 2021Probing for Bridging Inference in Transformer Language Modelscited by 14
  25. 2025LLMs as a synthesis between symbolic and distributed approaches to languagecited by 13
  26. 2021On-the-Fly Attention Modulation for Neural Generationcited by 12
  27. 2025Learning Task Representations from In-Context Learningcited by 11
  28. 2021Linguistic Dependencies and Statistical Dependencecited by 10
  29. 2021Shaking Syntactic Trees on the Sesame Street: Multilingual Probing with Controllable Perturbationscited by 10
  30. 2022What does Transformer learn about source code?cited by 9
  31. 2023Probing LLMs for Joint Encoding of Linguistic Categoriescited by 9
  32. 2021Breaking Down Multilingual Machine Translationcited by 8
  33. 2023Morphosyntactic probing of multilingual BERT modelscited by 8
  34. 2024Concentrate Attention: Towards Domain-Generalizable Prompt Optimization for Language Modelscited by 7
  35. 2024Dependency Transformer Grammars: Integrating Dependency Structures into Transformer Language Modelscited by 7
  36. 2025Linguistic Interpretability of Transformer-based Language Models: a systematic reviewcited by 7
  37. 2021Schr"odinger's Tree -- On Syntax and Neural Language Modelscited by 6
  38. 2024Word Importance Explains How Prompts Affect Language Model Outputscited by 6

50 most cited of 87 All 87 (JSON)