mlsanityData to 14 Oct 2026

Garden-Path Traversal in GPT-2

arXiv 2205.12302 ↗First posted 24 May 2022cs.CLcited by 4

Not on the map. Why?

Abstract (arXiv)

In recent years, large-scale transformer decoders such as the GPT-x family of models have become increasingly popular. Studies examining the behavior of these models tend to focus only on the output of the language modeling head and avoid analysis of the internal states of the transformer decoder. In this study, we present a collection of methods to analyze the hidden states of GPT-2 and use the model's navigation of garden path sentences as a case study. To enable this, we compile the largest currently available dataset of garden path sentences. We show that Manhattan distances and cosine similarities provide more reliable insights compared to established surprisal methods that analyze next-token probabilities computed by a language modeling head. Using these methods, we find that negating tokens have minimal impacts on the model's representations for unambiguous forms of sentences with ambiguity solely over what the object of a verb is, but have a more substantial impact of representations for unambiguous sentences whose ambiguity would stem from the voice of a verb. Further, we find that analyzing the decoder model's hidden states reveals periods of ambiguity that might conclude in a garden path effect but happen not to, whereas surprisal analyses routinely miss this detail.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 13 of its 33 references that are in the map. First posted on arXiv 24 May 2022.

Builds on

13 of 33 references.

References · 13

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,059
  3. 2020A Primer in BERTology: What we know about how BERT workscited by 815
  4. 2019How Contextual are Contextualized Word Representations? Comparing the Geometry of BERT, ELMo, and GPT-2 Embeddingscited by 784
  5. 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 722
  6. 2019What do you learn from context? Probing for sentence structure in contextualized word representationscited by 438
  7. 2019Linguistic Knowledge and Transferability of Contextual Representationscited by 383
  8. 2019Revealing the Dark Secrets of BERTcited by 301
  9. 2019Visualizing and Measuring the Geometry of BERTcited by 216
  10. 2020A Systematic Assessment of Syntactic Generalization in Neural Language Modelscited by 165
  11. 2021All Bark and No Bite: Rogue Dimensions in Transformer Language Models Obscure Representational Qualitycited by 156
  12. 2019Neural Language Models as Psycholinguistic Subjects: Representations of Syntactic Statecited by 138
1 more
  1. 2021The Language Model Understood the Prompt was Ambiguous: Probing Syntactic Uncertainty Through Generationcited by 15

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 1; 2024: 2; 2025: 0; 2026: 1.

4 papers.