Entropy- and Distance-Based Predictors From GPT-2 Attention Patterns Predict Reading Times Over and Above GPT-2 Surprisal

Byung-Doh Oh, William Schuler
12/21/2022
cs.CL
transformer-attention

Official code: byungdoh/attn_dist (5 stars, Python, Apache-2.0, last commit 2024-08-30).

Abstract

Transformer-based large language models are trained to make predictions about the next word by aggregating representations of previous tokens through their self-attention mechanism. In the field of cognitive modeling, such attention patterns have recently been interpreted as embodying the process of cue-based retrieval, in which attention over multiple targets is taken to generate interference and latency during retrieval.

Show full abstract

Under this framework, this work first defines an entropy-based predictor that quantifies the diffuseness of self-attention, as well as distance-based predictors that capture the incremental change in attention patterns across timesteps. Moreover, following recent studies that question the informativeness of attention weights, we also experiment with alternative methods for incorporating vector norms into attention weights. Regression experiments using predictors calculated from the GPT-2 language model show that these predictors deliver a substantially better fit to held-out self-paced reading and eye-tracking data over a rigorous baseline including GPT-2 surprisal. Additionally, the distance-based predictors generally demonstrated higher predictive power, with effect sizes of up to 6.59 ms per standard deviation on self-paced reading times (compared to 2.82 ms for surprisal) and 1.05 ms per standard deviation on eye-gaze durations (compared to 3.81 ms for surprisal).

View on arXivView PDF

Code Implementations(1)

byungdoh/attn_distOfficial100%
Apache-2.0

Norm-aware versions of GPT-2 attention and predictors of processing difficulty calculated from them ("Entropy- and Distance-Based Predictors From GPT-2 Attention Patterns Predict Reading Times Over and Above GPT-2 Surprisal," EMNLP22)

50Python, MDXJun 6, 20222 years agoApache-2.0

Similar Papers

Cite this paper

@article{oh2022entropy,
  title  = {Entropy- and Distance-Based Predictors From GPT-2 Attention Patterns Predict Reading Times Over and Above GPT-2 Surprisal},
  author = {Byung-Doh Oh and William Schuler},
  year   = {2022},
  eprint = {2212.11185},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.11185}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2212.11185.svg)](https://codeofpaper.com/paper/2212.11185)

Discussion