Skip to main content

Attention Masking and Human Reading Times

Psycholinguistics
Interpretability
Language Models
Evaluating how masking attention to specific linguistic word categories across 18 language models affects alignment with human reading times.
Author

Abderrahmane Issam

Published

November 28, 2026

While reading, humans do not keep every earlier word in working memory. Transformer-based language models, on the other hand, can attend directly to any prior token in their context window when predicting the next word. This contrast has motivated work on imposing a recency bias on the Transformer’s attention mechanism to make its predictions more human-like (Kuribayashi et al., 2022; de Varda & Marelli, 2024; Clark et al., 2025). While this was shown to be successful at improving fit to reading times, it assumes that recency is imposed equally across words regardless of their linguistic category. Here, we question this assumption by masking attention to specific word categories (such as rare versus frequent words, or nouns versus verbs) and measuring the change in reading-time fit compared to the standard unmasked model.

Our analysis of 18 models across four families and multiple scales shows that word categories play a crucial role in reading-time fit. While masking certain categories hurts fit (e.g., verbs and frequent words), masking others improves it significantly (e.g., nouns and rare words), an effect that generally strengthens with model scale. Overall, this analysis hints at which word categories make language model predictions less human-like, and which are essential for human-like predictions.

Code to reproduce the results is available on GitHub.

Data and Linguistic Categories

We use the Natural Stories self-paced reading corpus (Futrell et al., 2021), which contains 10 English stories (10,256 words across 485 sentences). It ships with gold-aligned Penn Treebank and Universal Dependencies (UD) parses, which lets us assign words to linguistic categories.

Following standard preprocessing, we exclude participants who answered three or fewer comprehension questions correctly, drop reading times outside [100, 3000] ms, and remove sentence-initial and sentence-final words. This leaves 180 readers, which we split into exploratory (382,152 observations across 180 readers) and held-out (382,477 observations across 178 readers) sets. All numbers below are from the held-out split.

We annotate every word across 25 masking conditions in five groups. To compute the surprisal of \(w_{i+1}\) under a given condition, we mask attention to all previous words belonging to that category except the current input word \(w_i\).

Group Condition Words Masked (% Corpus) Definition
Broad Class Content words 5,380 (52.5%) Open-class UPOS (NOUN, PROPN, VERB, ADJ, ADV)
Function words 4,876 (47.5%) All non-content, non-punctuation words
Part of Speech Nouns 2,432 (23.7%) Common and proper nouns (common nouns \(\cup\) proper nouns)
Common nouns 2,075 (20.2%) Penn tags NN, NNS
Proper nouns 357 (3.5%) Penn tags NNP, NNPS
Verbs 2,061 (20.1%) Main and auxiliary verbs (lexical verbs \(\cup\) aux verbs)
Lexical verbs 1,435 (14.0%) VERB excluding aux / auxpass / cop
Aux verbs 626 (6.1%) AUX, MD, or aux / auxpass / cop dependents
Determiners 1,327 (12.9%) DET (DT, WDT, PDT)
Prepositions 937 (9.1%) ADP or IN with case dependency
Pronouns 858 (8.4%) PRON (PRP, PRP$, WP, WP$)
Adjectives 821 (8.0%) ADJ (JJ*)
Adverbs 692 (6.7%) ADV (RB*, WRB)
Conjunctions 650 (6.3%) CCONJ and SCONJ
Dependency Role Syntactic heads 3,827 (37.3%) Words governing \(\ge 1\) non-punctuation dependent
Modifiers 2,357 (23.0%) deprel \(\in \{\text{amod}, \text{advmod}, \text{nmod}, \text{advcl}\}\)
Subjects 1,199 (11.7%) deprel \(\in \{\text{nsubj}, \text{nsubjpass}, \text{csubj}, \text{csubjpass}\}\)
Objects 526 (5.1%) deprel \(\in \{\text{dobj}, \text{iobj}, \text{obj}\}\)
Syntactic roots 485 (4.7%) Sentence root heads (deprel == root)
Tree Depth Deep tree 2,650 (25.8%) UD tree depth \(\ge 4\)
Shallow tree 2,486 (24.2%) UD tree depth \(\le 1\)
Frequency & Meaning Rare words 2,053 (20.0%) Bottom 20% corpus frequency (wordfreq)
Frequent words 2,066 (20.1%) Top 20% corpus frequency (wordfreq)
Abstract words 1,534 (15.0%) Content words with Brysbaert concreteness \(\le 2.5\)
Concrete words 1,075 (10.5%) Content words with Brysbaert concreteness \(\ge 4.0\)

Note that some categories overlap and their sizes vary widely (3.5% to 52.5%), which we return to in the analysis below.

Models

We evaluate 18 pretrained autoregressive Transformers from 70M to 8B parameters across four families, all run as base checkpoints without instruction tuning:

  • GPT-2 (124M, 355M, 774M, 1.5B).
  • Pythia (70M, 160M, 410M, 1.4B, 2.8B, 6.9B).
  • Qwen2.5 (0.5B, 1.5B, 3B, 7B).
  • Qwen3-Base (0.6B, 1.7B, 4B, 8B).

Mixed-Effects Model

To measure how well surprisal predicts reading times, we fit linear mixed-effects models predicting log reading time on the held-out split. For each model and condition, we compare a baseline model against a full model that adds current word surprisal. Both models control for current word log-frequency, character length, word position in the story, and spillover (log-frequency and character length) from the previous two words as fixed effects, along with random intercepts for readers, word types, and subject-by-sentence pairs.

Fit is measured as the log-likelihood gain over the baseline (\(\Delta LL = LL_{\text{full}} - LL_{\text{baseline}}\)), and we report each masking effect relative to the same model’s unmasked baseline:

\[\text{Masking Effect} = \Delta LL_{\text{masked}} - \Delta LL_{\text{unmasked}}\]

Because each condition adds a single surprisal predictor to the same baseline, this is a direct non-nested log-likelihood comparison between equal-complexity models (\(LL_{\text{masked}} - LL_{\text{unmasked}}\)). Positive values mean masking improves reading-time fit over unmasked attention, and negative values mean the masked words are needed for more human-like predictions.

Masking effects depend on linguistic category

The attention masking spectrum across 18 language models

The figure above shows the mean masking effect (\(\Delta LL_{\text{masked}} - \Delta LL_{\text{unmasked}} \pm 1\text{ SD}\)) across all 18 models for each of the 25 conditions, colored by the five groups in the table.

The biggest gains come from masking rare words (+18.4 \(\Delta LL\)), followed by prepositions (+12.2), adjectives (+10.9), determiners (+10.0), and nouns (+9.1). These categories are either low-frequency items (rare words and proper nouns, where unmasked attention might let models predict recurring entities too accurately) or local structural elements (determiners, adjectives, and prepositions that may not persist across longer spans in human memory).

On the other end, masking content words (-24.3), syntactic heads (-21.1), verbs (-18.6), or aux verbs (-10.0) hurts reading-time fit in all 18 models. Abstract words (-11.2), lexical verbs (-9.3), subjects (-8.6), and adverbs (-8.4) also degrade fit in almost every model. Verbs and syntactic heads carry clause-level structure that appears necessary for human-like expectations.

To contextualize the results, unmasked surprisal has a mean \(\Delta LL\) of 37.3 across the 18 models, ranging from 21.0 in Qwen2.5-7B to 68.9 in Pythia-70M. An average +18.4 gain from masking rare words is roughly half of the typical unmasked contribution, and more than doubles it in larger models such as Pythia-6.9B (26.6 to 60.2) and Qwen2.5-7B (21.0 to 46.4). Conversely, the -18.6 to -24.3 drops for verbs, syntactic heads, and content words wipe out most of it.

Effects are mostly consistent across models

Cross-model attention masking heatmap across 18 architectures

The ranking of categories is fairly consistent across all 18 models: computing Spearman’s rank correlation across the 25 masking conditions for every pair of models gives a mean of \(\rho = 0.80\) across all 153 model pairs. The top rows are mostly positive across architectures, and the bottom rows stay negative.

Reading left to right within each family shows a clear shift with scale. The smallest models (GPT-2 124M and Pythia-70M) still need almost all lexical context, so masking rare words, nouns, or modifiers hurts fit. In larger models, all three flip positive: rare words moves from -5.2 (GPT-2 124M) to +27.5 (GPT-2 XL) and from -13.2 (Pythia-70M) to +33.6 (Pythia-6.9B); nouns moves from -8.2/-31.1 to +14.2/+20.7; and modifiers moves from -7.2/-21.5 to +18.4/+13.4.

Penalties for masking core syntax also shrink in larger models. For instance, when masking syntactic heads, the drop narrows from -38.1 to -13.2 in GPT-2 (124M to 1.5B) and from -58.7 to -4.5 in Pythia (70M to 6.9B). This shows that larger models are more resilient to missing context, likely because they can recover more of the sentence structure from the remaining unmasked words.

Combining categories that led to positive effect

Several beneficial categories contain completely separate sets of words, which lets us test whether their effects add up when masked together. We test the three highest scoring POS categories: prepositions (9.1% of words, +12.2 mean), adjectives (8.0%, +10.9), and determiners (12.9%, +10.0). Because they do not overlap, any pair or triple masks the exact union of its parts:

Condition % Words Masked Mean Effect (\(\pm\) SD)
Prepositions 9.1% +12.2 \(\pm\) 7.3
Adjectives 8.0% +10.9 \(\pm\) 6.1
Determiners 12.9% +10.0 \(\pm\) 5.3
Prep + Adj 17.1% +19.9 \(\pm\) 10.9
Det + Adj 20.9% +19.5 \(\pm\) 10.3
Det + Prep 22.1% +21.3 \(\pm\) 12.0
Det + Prep + Adj 30.1% +25.2 \(\pm\) 15.0

Combining these categories compounds their gains. Each pair recovers almost the full sum of its individual effects (e.g., det + prep reaches +21.3 compared to +22.2 summed). Masking all three together pushes the mean gain further to +25.2, below the +33.1 sum of the three parts as returns begin to taper off.

The inverse scaling paradox

Inverse scaling and rare-word masking across 18 language models

As prior work has shown (Oh & Schuler, 2023; de Varda & Marelli, 2023), unmasked models follow an inverse scaling trend in reading-time prediction: larger, lower-perplexity models align worse with human reading times. As shown in the figure above, unmasked attention models follow this exact pattern, where as a model variant grows larger, it’s unmasked \(\Delta LL\) drops, especially GPT-2 and Pythia families.

Masking rare words increases \(\Delta LL\) across all 18 models, though the effect on scaling differs across families. In GPT-2 and Pythia, rare-word masking flattens and slightly reverses the downward slope (lifting Pythia-6.9B by +33.6 \(\Delta LL\)). In Qwen2.5 and Qwen3, it adds a large boost at every size (for instance, raising Qwen2.5-7B from 21.0 to 46.4), but the within family curves keep almost the same shape as before masking.

Conditioning on rare prior words may therefore account for part of the inverse scaling drop in GPT-2 and Pythia (models with sharp inverse scaling), while the unchanged curve shapes in Qwen2.5 and Qwen3 point to other factors beyond rare-word attention.

Perplexity and masking percentage analysis

Perplexity vs reading-time alignment across 18 language models

One simple explanation for these gains could be that masking just degrades stronger models back toward weaker ones. If so, higher perplexity should go with higher reading-time fit (\(\Delta LL\)). That is not what we see in the figure above.

Pooled across all 18 models and 25 masked conditions (\(N = 450\)), perplexity and \(\Delta LL\) show no clear relationship (Spearman \(\rho = +0.078\), \(p = 0.096\)). Computing correlations within each model separately (26 conditions including unmasked) yields a statistically significant correlation (\(p < 0.05\)) in only 5/18 models: GPT-2 124M, GPT-2 Medium, and Pythia 70M to 410M (\(\rho\) between -0.41 and -0.76). These significant correlations are negative, and all of the 5 models are small. This means that masking hurts perplexity of small models in a way that deteriorates rather than improves their reading-time fit.

Masking percentage does not explain the results either. Larger masks often hurt (content words at 52.5% gives -24.3, function words at 47.5% gives -5.1, and syntactic heads at 37.3% gives -21.1), giving a small negative correlation overall (Spearman \(\rho = -0.216\), \(p < 10^{-5}\)). Yet masking det + prep + adj hides 30.1% of words and improves fit by +25.2. More directly, four categories that each mask roughly 20% of the corpus span almost the whole range of outcomes: rare words (20.0%, +18.4), frequent words (20.1%, +2.4), common nouns (20.2%, -0.8), and verbs (20.1%, -18.6). What gets masked seems to matter much more than how much gets masked or what happens to perplexity.

Conclusion

Across 18 models from four families, masking attention by linguistic category reveals a consistent pattern in reading-time fit. Masking rare words, prepositions, adjectives, determiners, and nouns tends to improve alignment with human reading times, whereas masking verbs, syntactic heads, and content words consistently hurts it. These gains also strengthen with model scale: as models grow larger, masking rare words, nouns, and modifiers flips from harmful to beneficial, penalties for masking core syntactic structure shrink, and rare-word masking flattens the inverse scaling drop in GPT-2 and Pythia. Moreover, beneficial masks combine cleanly, with determiners, prepositions, and adjectives together improving fit further in nearly every model (17/18).

These findings do not rule out that recency plays a role in making language models more human-like, but they suggest that recency constraints may apply differently across word categories.

Limitations

There are four main limitations of this work:

  1. All experiments use a single dataset and reading measure: English self-paced reading times from Natural Stories.
  2. Several of the 25 categories overlap and cover very different shares of the corpus (3.5% to 52.5%), which partially confounds category identity with mask size.
  3. Several category thresholds are arbitrary and were not ablated (for example, the top and bottom 20% cutoffs for frequent and rare words, as well as the tree-depth and concreteness thresholds).
  4. Comparisons across masks are non-nested log-likelihood differences without pairwise significance tests.

Citation

BibTeX citation:
@online{issam2026,
  author = {Issam, Abderrahmane},
  title = {Attention {Masking} and {Human} {Reading} {Times}},
  date = {2026-11-28},
  url = {https://issam9.github.io/posts/attention-masking-reading-times/},
  langid = {en}
}
For attribution, please cite this work as:
Issam, Abderrahmane. 2026. “Attention Masking and Human Reading Times.” November 28. https://issam9.github.io/posts/attention-masking-reading-times/.