Accounting for Agreement Phenomena in Sentence Comprehension with Transformer Language Models: Effects of Similarity-based Interference on Surprisal and Attention

Soo-Hyun Ryu, Richard L. Lewis

Introduction: The Puzzle of Similarity-Based Interference

In human sentence processing, "similarity-based interference" occurs when a non-target word disrupts the relationship between a subject and its verb. A classic example is "agreement attraction" in ungrammatical sentences. Consider the sentence: "The slogan on the posters were designed to get attention."

Even though "slogan" (singular) is the true subject and "were" (plural) is incorrect, humans often read this faster than a version where the distractor is also singular ("The slogan on the poster were..."). This counter-intuitive speed-up is known as facilitatory interference.

Experimental design for testing similarity-based interference in grammatical and ungrammatical contexts, illustrating how distractors can lead to full or partial matches with retrieval cues.

This paper investigates whether Large Language Models (LLMs), specifically GPT-2, exhibit these same psychological quirks. If they do, it suggests that Transformer attention mechanisms might naturally mirror human memory retrieval processes.

Methodology: Probing GPT-2

The researchers analyzed GPT-2 (medium) using three primary metrics to compare its internal states with human behavioral data:

  1. Surprisal: The negative log probability of a word. In psycholinguistics, higher surprisal correlates with slower human reading times.
  2. Attention Entropy: A measure of how "diffuse" or "focused" attention is. High entropy indicates the model is distributing its "gaze" across multiple words.
  3. Attention to Target: The specific weight assigned to the grammatical subject versus a distractor noun.

The study utilized sentence sets from landmark human studies (Wagers et al., 2009; Dillon et al., 2013) to see if the model's surprisal values would replicate human reading patterns.

Key Findings: Emergent Human-Like Biases

The results demonstrate that GPT-2's surprisal values remarkably mirror human "errors."

Facilitatory Interference in Ungrammatical Sentences

In ungrammatical sentences, GPT-2 showed significantly lower surprisal when a distractor noun matched the verb's number (the "interfering" condition). This matches the facilitatory effect seen in human eye-tracking data, where a matching distractor makes an error "easier" to process.

Surprisal values for GPT-2 across different experimental datasets, showing significant facilitatory effects (lower surprisal) in ungrammatical conditions when a distractor is present.

Grammatical Stability and Specialized Heads

Conversely, in grammatical sentences, the presence of a distractor did not significantly alter surprisal. This "grammatical immunity" also aligns with human data. Furthermore, the authors identified "specialized heads" within GPT-2 that evolved to handle subject-verb agreement. When a distractor was present, these heads showed higher entropy, suggesting the model's "confusion" directly mirrors human similarity-based interference.

Conclusion: Attention as Retrieval

This research provides strong evidence that Transformers—trained solely on next-word prediction—naturally develop a "cue-based retrieval" strategy similar to human memory. The "surprisal bottleneck" explains why internal confusion only manifests as a reading time effect in specific contexts (like ungrammaticality). These findings suggest that the architectural biases of Transformers may be more aligned with human cognitive architecture than previously thought.

Summary updated

BibTeX
@inproceedings{ryu2021accounting,
  author = {Soo-Hyun Ryu and Richard L. Lewis},
  title = {{Accounting for Agreement Phenomena in Sentence Comprehension with Transformer Language Models: Effects of Similarity-based Interference on Surprisal and Attention}},
  booktitle = {CMLS},
  year = {2021},
  doi = {10.18653/v1/2021.cmcl-1.6},
}
Figure