mlsanityData to 7 Oct 2026

How Language Models Prioritize Contextual Grammatical Cues?

arXiv 2410.03447 ↗First posted 4 Oct 2024cs.CLcited by 1

Not on the map. Why?

Abstract (arXiv)

Transformer-based language models have shown an excellent ability to effectively capture and utilize contextual information. Although various analysis techniques have been used to quantify and trace the contribution of single contextual cues to a target task such as subject-verb agreement or coreference resolution, scenarios in which multiple relevant cues are available in the context remain underexplored. In this paper, we investigate how language models handle gender agreement when multiple gender cue words are present, each capable of independently disambiguating a target gender pronoun. We analyze two widely used Transformer-based models: BERT, an encoder-based, and GPT-2, a decoder-based model. Our analysis employs two complementary approaches: context mixing analysis, which tracks information flow within the model, and a variant of activation patching, which measures the impact of cues on the model's prediction. We find that BERT tends to prioritize the first cue in the context to form both the target word representations and the model's prediction, while GPT-2 relies more on the final cue. Our findings reveal striking differences in how encoder-based and decoder-based models prioritize and use contextual information for their predictions.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 32 of its 44 references that are in the map. First posted on arXiv 4 Oct 2024.

Builds on

32 of 44 references.

References · 32

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2022Locating and Editing Factual Associations in GPTcited by 2,609
  5. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
  6. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
  7. 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,046
  8. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
  9. 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 934
  10. 2020Quantifying Attention Flow in Transformerscited by 759
  11. 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 700
  12. 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
20 more
  1. 2019BLiMP: The Benchmark of Linguistic Minimal Pairs for Englishcited by 553
  2. 2019What do you learn from context? Probing for sentence structure in contextualized word representationscited by 436
  3. 2021Causal Abstractions of Neural Networkscited by 401
  4. 2016Assessing the Ability of LSTMs to Learn Syntax-Sensitive Dependenciescited by 350
  5. 2023In-Context Learning Creates Task Vectorscited by 302
  6. 2018Targeted Syntactic Evaluation of Language Modelscited by 239
  7. 2024How to use and interpret activation patchingcited by 191
  8. 2020Causal Mediation Analysis for Interpreting Neural NLP: The Case of Gender Biascited by 183
  9. 2023Localizing Model Behavior with Path Patchingcited by 182
  10. 2023Quantizable Transformers: Removing Outliers by Helping Attention Heads Do Nothingcited by 147
  11. 2018Under the Hood: Using Diagnostic Classifiers to Investigate and Improve how Language Models Track Agreement Informationcited by 97
  12. 2022Measuring the Mixing of Contextual Information in the Transformercited by 63
  13. 2021Incorporating Residual and Normalization Layers into Analysis of Masked Language Modelscited by 50
  14. 2022GlobEnc: Quantifying Global Token Attribution by Incorporating the Whole Encoder Layer in Transformerscited by 44
  15. 2022PERFECT: Prompt-free and Efficient Few-shot Learning with Language Modelscited by 40
  16. 2019Correlating neural and symbolic representations of languagecited by 32
  17. 2020Do Neural Language Models Show Preferences for Syntactic Formalisms?cited by 30
  18. 2022How Much Does Attention Actually Attend? Questioning the Importance of Attention in Pretrained Transformerscited by 20
  19. 2021Not All Models Localize Linguistic Knowledge in the Same Place: A Layer-wise Probing on BERToids' Representationscited by 16
  20. 2023Homophone Disambiguation Reveals Patterns of Context Mixing in Speech Transformerscited by 13

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.