A Language Model with Limited Memory Capacity Captures Interference in Human Sentence Processing
Authors: William Timkey
Tal Linzen
Venue: EMNLP 2023 Findings (2023)
Keywords: cue-based retrieval
working memory
interference
attention
agreement attraction
neural networks
cognitive modeling
surprisal
attention

Abstract: Two of the central factors believed to underpin human sentence processing difficulty are expectations and retrieval from working memory. A recent attempt to create a unified cognitive model integrating these two factors have relied on the parallels between the self-attention mechanism of transformer language models and cue-based retrieval theories of working memory in human sentence processing (Ryu and Lewis 2021). While the authors show that attention patterns in specialized attention heads of GPT-2 are consistent with a key prediction of cue-based retrieval models, similarity-based interference effects, their method requires the identification of syntactically specialized attention heads, and makes an cognitively implausible implicit assumption that hundreds of memory retrieval operations take place in parallel. In the present work, we develop a recurrent neural language model with a single self-attention head, which more closely parallels the memory system assumed by cognitive theories. We show that our model’s single attention head can capture semantic and syntactic interference effects observed in human experiments.

A Language Model with Limited Memory Capacity Captures Interference in Human Sentence Processing
William Timkey
Tal Linzen
New York University wpt201 @@ny.. edu
New York University linzen@nyu. edu
Abstract
Low Interference
Cuaddwod peeneval Modete
Two the central factors believed to underpin human sentence processing difficulty are pectations and retrieval from working memory. recent attempt to create a unified cognitive model integrating these two factors relied on the parallels between the self-attention mecha- nism of transformer language models and cue- based retrieval theories of working memory in human sentence processing (Ryu and Lewis, 2021). While Ryu and Lewis show that at- tention patterns in specialized attention heads GPT-2 are consistent with similarity-be based interference, key prediction of cue-based re-
Neunal
A
100
FM/
10:
PWN
High Interference
Noural Quachene Retreral
KEY
CAGINETS
ARE
trieval models, their method requires identify- ing syntactically specialized attention heads, and makes the cognitively implausible assump- tion that hundreds memory retrieval oper- ations take place in parallel. In the present work, we develop recurrent neural language model with single self-attention head, which closely parallels the memory system as- sumed by cognitive theories. We show that our model's single attention head captures seman- tic and syntactic interference effects observed in human experiments.
Figure I: A demonstration of how the CBR-RNN can model similarity- interference at the verb "are", compared to cue-based retrieval theories. While cue- based retrieval theories traditionally stipulate retrieval cue features, the neural model learns cue and target features through next word and syntactic prediction objective. The model retrieves weighted representations based on their similarity to the verb's s cuelquery feature vector. The retrieved representation is used to predict the next word in the sequence.
1 Introduction
of past
Theories of human sentence processing can be di- vided into two broad categories. Expectation--asse theories like surprisal theory (Hale, 2001; Levy, 2008; Smith and Levy, 2013) ascribe processing difficulty to a word's predictability. Memory-based theories, such as cue-based retrieval (Van Dyke and Lewis, 2003; Lewis and Vasishth, 2005; Lewis et al., 2006; Wagers et al., 2009; Vasishth and En- gelmann, 2021), account for processing difficulty incurred due to limitations on working memory coding and retrieval. Integrating these approaches has become a major goal of sentence processing research (Demberg and Keller, 2009; Levy, 2013; Campanelli et al., 2018; Futrell et al., 2020; Hahn et al., 2022).
Surprisal theory argues that the processing diffi- culty associated with a word is linearly related to its negative log probability, or surprisal, in context. Surprisal theory is agnostic by design to the pre- cise mechanisms underlying sentence processing; models with drastically different representational assumptions can be used to obtain surprisal esti- mates (Levy, 2008, 2013). The advent of neural network language models (NLMs), in particular, has broadened surprisal theory's empirical cover- age to a wide range of phenomena (van Schijn-

---

del and Linzen, 2018; Archalli and Linzen, 2020; Wilcox et al., 2021). However, NLMs' opaque internal representations make it difficult to relate them to theories of how language is represented and retrieved from memory by humans (though see Lakretz et al. 2019, 2021).
interference explanations of sentence processing difficulty. Crucially, in their model, all of the fea- tures used to compute attention scores were implic- itly learned through the model's next word predic- tion training objective; no linguistic features need to be hand-picked.
By contrast, sue-based retrieval theories make explicit claims about how working memory is struc- tured and accessed during language comprehen- sion. According to these theories, humans have a narrow attentional focus, and therefore must re- trieve items from working memory to resolve long- distance linguistic dependencies. Items in working memory are accessed by matching a set of featu- ral retrieval cues provided by the current word in parallel against the features of all items in working memory. The item which best matches the cue fea- tures is retrieved and used parse the current word. The speed and accuracy of retrieval is affected by the number of items in memory that match the re- trieval cue features. The effect of similarity of the target and distractor items on retrieval difficulty, referred to as similarity- key prediction of aue-based retrieval models, and has been used explain various phenomena in the sentence processing literature (Vasishth and Engel- mann, 2021).
Despite some parallels between transformers like GPT-2 and cue-based retrieval models, how- ever, there are crucial differences in their working memory limitations. The smallest GPT-2 model has 1 44 attention heads. Under the view of self- attention as cue-based retrieval, this would mean that 144 distinct retrievals from working memory take place at each timestep. By contrast, cue-based retrieval theories argue that working memory is highly constrained; very limited number of items can be retrieved from memory within the time it takes to process a single word. If an NLM is truly integrate expectation and memory- the- ories, then must be consistent with assumptions about human working memory.
In this work, we present a recurrent NLM with memory limitations that are more closely aligned with cue-based retrieval theories. Figure 1 shows how we conceptualize memory retrieval in our model. We use self-attention implement cue- based memory retrieval, but employ only a single attention head, limiting the model to a single re- trieval operation per timestep. In contrast to prior approaches, we do not need to rely on post-hoc identification of syntactically specialized attention heads.
interference, is
Despite their empirical successes, implemented models of cue- sue-based retrieval traditionally employ only small set of hand-picked linguistic features, such as [+/-subject] or sinnulaar] This limits model coverage, increases modeler degrees of freedom and decreases theoretical parsimony (Smith and Vasishth, 2020). By contrast, NLMs learn all of their linguistic features implicitly as they optimize a word prediction training objective.
In our first experiment, confirm that our model's single attention head learns to track subject-verb dependencies without direct supervi- sion. In our main experiment, we show that mea- sures of memory retrieval difficulty derived from our model's attention mechanism capture both se- mantic and syntactic retrieval interference effects from a human experiment (Laurinavichyute and von der Malsburg, 2022), without the need to hand- pick any linguistic features in existing cue-based retrieval theories.
Leveraging this ability of NLMs, Ryu and Lewis (2021) propose synthesis of surprisal and cue- based retrieval thcories. They note the parallels be- tween eue- bue-based retrieval and neural self- attention in transformer NLMs (Vaswani et al., 2017). To generate a contextualized representation of the cur- rent word, self-attention heads score the represen- tations of all context words against query gener- ated at the current word, and sum the context word representations weighted by these attention scores. Transformer NLMs, such as GPT-2 (Radford et al., 2019), use many attention heads simultancously. arranged into multiple layers. Ryu and Lewis show that attention patterns in a vyntactically-speciaaiii head in GPT-2 are consistent with similarity-bart based
Background: Attraction and Similarity-Based Interference
2.1 Agreement Attraction
In Mainstream English, the subject of a sentence must agree with its corresponding verb in num-
All model and analysis code is available at: tit com/ wtwp:///uteebaebbrreeeeeeeeeeeee

---

ber. For example, "The keys are on the table" is grammatical, but "The key are on the table" is un- grammatical. Although, grammatically speaking, number marking on the verb should depend only on the number of the subject noun phrase, real-time production experiments have shown that humans sometimes produce verb forms agreeing with non- subject noun, called an attractor, instead of the true subject. For example, when prompted with a preamble such as "the key to the cabinets...", which contains a singular subject and a plural at- tractor noun, speakers often produce the plural verb "are" rather than the grammatically correct singu- lar form "is" (Bock and Miller, 1991). This phe- nomenon is referred to agreement aftraction. Similar phenomena have been observed in com- prehension (Pearlmutter et al., 1999; Wagers et al.. 2009). In general, readers slow down upon en- countering a verb which does not agree in number with the subject, suggesting they are able to detect the agreement error. However, this slowdown is attenuated in the presence of an attractor, indicat- ing the the attractor interferes with readers' ability to detect the agreement error. For example, the verb "are" is read faster in sentences like (2) than sentences like (1).
[+puura]] retrieve the subject. In (I), only one item in memory, the "key" noun phrase, matches any of the retrieval cues (specifically, [+ [+subject]]) In (2), "key" matches one cue, [+subject], but "cabinets" matches the other cue, [+plural]. In this case, both items are possible candidates for retrieval, leading to speedup in processing (Fig- ure 1).
There several explanations for this speedup (Wagers et al., 2009). We adopt the following ex- planation: In trials where the subject is correctly retrieved, the number-mismateh is detected, trig- gering a costly reanalysis process. This is the only expected outcome in (1), In (2), the non-subject, number-matching attractor can be mistakenly re- trieved. In these cases the number agreement er- goes unnoticed, and the reanalysis process is avoided.
2.2 Semantic Attraction
Attraction arises in the processing not only of syn- tactic constraints like subject-verb agreement, but also of semantic plausibility constraints (Cunnings and Sturt, 2018; Laurinavichyute and von der Mals- burg, 2022). For example, consider the following pair of sentences:
(3) The drawer with the handle cut the bread. (4) The drawer with the knife cut the bread.
(1) The key to the cabinet are on the table.
(2) The key to the cabinets are on the table.
Although both sentences involve semantically implausible scenario in which drawer is cutting bread, readers judge sentences like (4), which in- cludes the attractor "knife", as more plausible than sentences like (3).
2.1.1 Similarity-based Interference
Agreement attraction in comprehension has been taken as evidence for cue-based retrieval theories of sentence processing (Wagers et al., 2009; Va- sishth and Engelmann, 2021). These theories posit that humans have a sharply limited attentional fo- cus, and must resolve syntactic dependencies by retrieving items from working memory. Retrieval is carried out though parallel feature-matching process between items in memory and set of cues for retrieval provided by the current word. The item which best matches the retrieval cues retrieved and used to parse the current word.
The cue responsible for agreement attrac- tion is the same for any number-marked verb ([+/-plural], Semantic retrieval cues, by con- trast, can be lexically-specifie. For example, the verb "cut" in (3) and (4) uses the semantic [+can_cut when retrieving the subject (Lauri- navichyute and von der Malsburg, 2022). In (4), the attractor "knife" matches the [#can_cut] cue, while the true subject "drawer" matches only the [+sbbectt] cue, resulting in retrieval interference. While it is possible that an array of highly spe- cific features are used to access items in working memory, it is difficult to identify the right feature inventory in a principled way. Motivated by this problem, Smith and Vasishth (2020) showed that a cue-based retrieval model augmented with dis-
Memory retrieval in cue-based theories is an im- perfect process. The speed and accuracy of retrieval is affected by the number of items in memory that provide partial match to the retrieval cues. This is referred as similarity-based interference. If mul- tiple items partially match the retrieval cues, then retrieval will be faster, but may be erroneous. For example, when a reader reaches the plural verb "are" in (2) and (1), they use the cues [+subject]] and
tributed semantic features from static word em- beddings were able to capture semantic attraction

---

effects. In contrast their model, NLMs with self- attention implicitly learn features access past representations which are optimal for predicting upcoming words. In the present work, we evaluate whether such a model is sensitive to both semantic and syntactic interference.
Cutput Probebillies
k K V, Vi. = I
sottmex
Linwer
Key
3 Model
Feed Forward Layer
3.1 Motivation: Retrieval
Self-Attention Cue-Based
V
As Ryu and Lewis (2021) point out, self-attention (Luong et al., 2015; Vaswani et al., 2017) has key similarities to working memory in cue-based re- trieval models: The query vector resembles the set of cue features in cue-based retrieval models in that both are matched against items memory de- termine what should be retrieved; the key vectors correspond to the featural representation of mem- ory items in cue-based theories; and the attention score in self-attention and item activations in cue- based theories are both computed based on featural similarity.
Kg
Nitention FF
h1
Word Embedking
Input word
Figure 2: A schematic of the CBR-RNN Cell.
not be specialized any particular head at all, but rather distributed across multiple interacting heads, obscuring interference effects.
There are key differences between cue-based re- trieval theories and self self-attention transformers as well. The difference which motivates the present work the number of retrieval operations that take place at each word. Cue-based retrieval theories of sentence processing are built upon independently- motivated principles of human memory. One prin- ciple is that humans only keep one to three items in their attentional focus time (McElree, 2001). In order bring another item into focus, must be retrieved from working memory, which costly and imperfect. Minimizing the number of retrievals per word (to just one or two) is a guid- ing principle of the retrieval model proposed in (Lewis and Vasishth, 2005, p.412). The model Ryu and Lewis (2021) investigate, GPT-2 small, has 144 self-attention heads. Under the view that each head engages in cue-based retrieval, 144 distinct retrieval operations will take place at each word. our single-headed model, exactly one retrieval takes place at each word.
Even if multiple attention heads correlate with some dependency type, cach correlation could arise for different reasons. For example, we might find two heads whose attention patterns correlate with subject-verb dependencies in typical cases where the subject is semantically plausible and agrees in number with the verb. But one of these heads might identify the subject only by number marking, while the other uses only semantic information. One head would show only agreement interference, while the other shows only semantic interference. In human experiments, Laurinavichyute and von der Mals- burg (2022) show that both types of interference interact with another, producing additive effect. It is not clear how the individual effects of each heads could combined into a general mea- sure of processing difficulty (though see Oh and Schuler 2022). Our single-headed model obviates the need to identify or aggregate attention heads.
In addition to cognitive plausibility considera- tions, it is unclear how single measure of memory interference should be derived from model that uses multiple specialized attention heads simultane- ously. Ryu and Lewis (2021) identify and analyze a small subset of heads whose attention patterns correlated with subj and reflexive depen- dencies. Some syntactic dependency types may
3.2 Model Architecture
Our model, which refer to Cue-Based Re- trieval/Recurrent Neural Network (CBR-RNN), is simple recurrent neural network (SRNN) lan- guage model (Elman, 1990) augmented with self- attention (Bahdanau et al., 2015). At each timestep. the model retrieves a weighted sum of representa-

---

tions computed in previous timesteps. The weights of this sum are determined through self-attention. The model is similar to Single Head Attention RNNs (SHA-RNNs; Merity 2019), with two differ- ences motivated by cue-based retrieval theories.
of the 103M token WikiText-103 corpus (Merity et al., 2017). In contrast to many contemporary language models that use subword tokenization, we use a simpler word-level tokenization scheme, with a vocabulary pruned to the most frequent 50k word types from the training corpus.
First, in contrast with the SHA-RNN, which is based on long short-term memory (LSTM) units (Hochreiter and Schmidhuber, 1997), our model is based on an SRNN. LSTMs have memory cells designed explicitly to handle long-distance depen- dencies; by using the simpler SRNN architecture, which does not have this mechanism, we aim to limit model's ability to encode information in its hidden state over long distances, forcing it to rely on self-attention. Second, in GPT-2 and SHA- RNNs, attention spans over representations from both the current and all previous timesteps. In our model, only key and value vectors from previous timesteps are accessed by the attention mechanism. This is because in cue-based retrieval theories, the current word is already active, so it does not need be retrieved. This also allows us to generate key and value vectors for the current word that depend on the result of the current attention step. Likewise, in cue-based retrieval models, new items in work- ing memory are not generated at the same time as retrieval cues, but after the retrieval operations have taken place.
The second objective is Combinatory Categor- ical Grammar (CCG) supertagging (Steedman, 1987). Prior work has argued that humans weigh syntactic factors more heavily than NLMs do when making predictions (van Schijndel and Linzen, 2021; Archalli et al., 2022). Since we are inter- ested in modeling how humans use working mem- ory when processing syntactic dependencies, we aim to encourage our model to represent and use syntactic information its attention mechanism. The addition of CCG supertagging objective has been shown in prior work induce richer syntactic rep- resentations (Enguehard et al., 2017). We gener- ated CCG supertags for the entire WikiText-103 corpus using a state-of-the-arr CCG supertagger (Tian et al., 2020). 2 The global loss, L, is defined as:
-- + aLeca
(1)
where LLM is the language modeling loss. Looa is the CCG supertagging loss, and a is scaling factor. Of the 15 total random seeds of our model, five were trained with 5, five were trained with 1, and five random seeds were trained with next-word prediction loss only (a- =).
Figure provides a basic schematic of the model. At each timestep i, the embedding of the current word wy is concatenated with the previous hidden state, h4-1- The result passes through feedfor- ward layer to produce attention query vector 9i- Attention scores are generated by taking the dot product of qu and key vectors from all previous timesteps, KI..i-1, then applying the sofumax to produce attention weights. The result is the con- text vector a; an wetention-weighhee sum of value vectors Vi... Then, 9t. Wi, qi and 1/ are concate- nated and passed through two feedforward layers. The resulting vector is split into three smaller vec- tors of equal size: the key and value vectors for the current timestep (k; and vs respectively) and the hidden representation h4. We append i; and us the key and value caches, K and V. for use in future timesteps. We use hú for all predictions, and pass it to the following timestep.
3.4 Language Modeling and CCG Supertagging Performance
To test how well our model performs on its train- ing objectives relative to existing architectures, we trained LSTMs with similar number of parame- ters on the same data and objectives as the CBR- RNN models. We found that CBR-RNN mod- els have generally comparable, or even superior language modeling and CCG supertagging perfor- mance to the LSTMs.
To test whether the self-attention mechanism is essential for the model's language modeling and CCG supertagging performance, we trained 15 CBR-RNN models with ablated attention mech- anism. The language modeling perplexity was sig- nificantly higher in the ablated models. By contrast, CCG supertagging accuracy did not significantly
3.3 Model Training
We trained our model on two objectives. The first is next-word prediction on a lowercased version
'The accuracy of this tagger on the CCGBank corpus (Hockenmaier and Steedman, 2007) is 96.1 %..

---

Attention to Subject Dependency Lengtn
Altention to Subject by
ing the spaCy dependency parser from the spaCy en_core_web_tre pipeline 3. We extracted all examples of subject-verb dependencies (approx- imately 17k in total) along with their length and the number of nouns that intervened between the subject and the verb.
100
%6 eismmles moos atteroto taken subelc:
30-
62-
40-
We evaluate the percentage of examples where the models assigns greater attention weight to the subject than any other words upon encountering the verb. We report this percentage as a function of both dependency length and the number of inter- vening nouns between the verb and its subject. We compare these percentages to two baselines: ran- domly selecting any context token, and randomly selecting any noun within the dependency span.
20-
20-
chanc runder wnr dupTEOiy Sp11)
Degendency Length
Number Intarvening Nouns
Figure 3: Percentage of items in the subject-verb de- pendency corpus in which the subject representation has the largest attention weight upon encountering the verb, plotted by dependency length (left) and number of intervening nouns (right). Chance is given by dashed lines. The darker dashed line is chance when picking any left-context token at random, the lighter dashed line is picking any noun within the span of the dependency at random. a is the weight of the CCG supertagging objective.
4.1.1 Results
Models pay significantly more attention to the cur- rent verb's 's subject than chance would predict (Fig- ure 3). Models trained with the additional CCG supertagging objective attended to the subject more often than models trained without it. This suggests that the auxiliary syntactic objective is useful for inducing syntax-sensitive behavior in the model's s attention mechanism.
decrease in the ablated models. Detailed results for both experiments are reported in Appendix B.
4 Experiments
4.2
Do Models Capture Agreement Attraction and Semantic Attraction?
We first examined whether the attention mechanism in trained CBR-RNN models is sensitive long- distance subject-verb dependencics, even though does not receive direct supervision in training as to the words that should be attended to. Then, in our main experiment, we evaluated whether language model surprisal and a measure of similarity baased interference from model's attention mechanism capture semantic and agreement attraction effects using experimental stimuli from Laurinavichyute and von der Malsburg (2022).
In the following section, we evaluate whether our model captures agreement and semantic attraction, and their interaction with one another. We exam- ine surprisal and measure of similarity-based in- terference from our model's attention head. We also evaluate the GPT-2 model used by Ryu and Lewis on both measures, using the syntactically- specialized heads the authors identify, referred to by their location as head4_3, head3_6, head6_0. and head2_9.
4.1 Does Self-Attention Track Subject- Verb Dependencies?
4.2.1 Materials
We evaluate our models on experimental stimuli from Laurinavichyute and von der Malsburg (2022) Experiment 3. We made some minor modifica- tions to the stimuli to eliminate potential confounds specific to our model (seeAppendix A for details), Examples of cach condition are given in Table 1. All conditions violate either subject-verb agree- ment (A, B), semantic plausibility (C, D) or both constraints simultaneously (E-H). Each violation type has a bascline condition with no attractor, and
Cue based retrieval models of sentence process- ing assume that items are retrieved from working memory to guide parsing and to form syntactic de- pendencies. In this experiment, we verify that the behavior of our models attention mechanism is gen- erally consistent with this this goal. We investigate whether attention pattemss from our model reflect sensitivity subject-verb dependencies of varying lengths and number of intervening nouns.
We generated a dependency corpus from the test and validation portions of our training corpus us-
'The accuracy of this parser on the Penn Trechank is
95.1%. %..

---

Condition
Violation
Attractor
Prefix
Verb
Agreement
None
drawer with the handle really
OPEN
B.
Agreement
Agreement
The drawer with the handles really
OPEN
C.
Semantic
None
drawer with handle really
CUTS
D.
Semantic
Semantic
The drawer with the knife really
CUTS
Double
None
drawer with the handle really
CUT
F.
Double
Double
The drawer with the knives really
CUT
Double
Semantic
drawer with the knife really
CUT
H.
Double
Agreement
The drawer with the handles really
CUT
Table 1: Example stimuli from Experiment of Laurinavichyute and von der Malsburg (2022).
Human Plausibiliit Ratinga
CBR-ANN Surprisal
GPT--2 Surprisal
Supers BMM
Axbi
MD
Agreemont
Semanto
Doublo
Agrecment
Semaniic
Double
Agrcement
Semanio
Double
CBR-RNN Relative Attention
GPT-2 Relative Attention (head 4,
GPT-2 Relative Attention (head a.
Deate Mad
Re0 Worgs
mhe Jile mine Wegge
0.82
2:25
2.46
Agnnomment
Semantc
Doublo
Agreoment
Somantic
Double
Agrcement
Semanto
Double
Figure 4: Simulation results for Experiment 3 of Laurinavichyute and von der Malsburg (2022). Human results (top left) are the percentage of participants who (correctly) ruled the verb as an implausible continuation. Error bars indicate 95% confidence intervals.
a condition with attractor which matches the verb in the violated feature(s). For example, in the double-violation, no-attraction condition (D), both the subject "drawer" and the attractor "handle" are semantically implausible and do not match the number marking of the verb "cut". the double- violation, semantic-attraction condition (G), the attractor "knife" is a semantically plausible subject but does not match the number marking of the verb. In the double-violation. double- tion (F), the attractor "knives" is both semantically plausible and matches the verb's number marking. Participants in Laurinavichyute and von der Malsburg's 's human study were asked to first memo- rize the verb before seeing a preamble. They were then asked to rate the plausibility of the verb as a continuation of the preamble. If items with an agrcement attractor (B) are rated more plausible than items without agreement attractor (A), then this taken evidence for agreement attraction. If items with semantic attractor (D) are rated more plausible than items without semantic attractor (C), then this is evidence for semantic attraction.
items with simultaneous agreement and semantic attractor (F) rated more plausible than items with a semantic agreement-onle attractor (G.H). this evidence that that semantic and agreement attraction can occur simultaneously.
Laurinavichyute and von der Malsburg found that participants were more likely to rate the con- tinuation as plausible if distractor agreed in semantic number feature with the verb. Ad- ditionally, the effects of agreement and semantic attraction were generally additive in the case of double violations. This provides evidence both for the existence of semantic attraction effects, and for cue-hased retrieval models more generally, which can account for both types of attraction and their additive effects if semantic and agreement features are used simultaneously retrieval cues.
condi-
4.2.2 Linking Hypothesis for Plausibility Ratings
each word, our model calculates attention weights between the current word and all past repre- sentations. This is measure the relative strength

---

of association between the current word's query vector and past representations in working memory. These weights sum to and can be thought of as modeling the distribution of retrieval probabilities for items in working memory.
Single Violation: Relative attention and surprisal were significantly lower in both the agreement (B) and semantic attractor (D) conditions than in the no attraction conditions (A) and (C). Consistent with the human pattern, this demonstrates both semantic and syntactic attraction. In the human experiment, there was no difference in the size of the attrac- tion effect between the agreement and semantic conditions. Surprisal from our model replicated this finding but relative attention did not; when computed using relative attention, the agreement attraction effect was stronger than the semantic attraction effect.
If the true subject has high retrieval probability, then it will be retrieved often, and participants will be more likely to notice the semantic plausibility agreement violation. The higher the retrieval probability of the non-subject noun, the more likely the violation is to go unnoticed. We model the probability of a human judging the sentence as implausible as the attention weight assigned to the subject, normalized by the total attention weight of the subject and non-subject nouns:
Double Violation: We found a significant attrac- tion effect each of the single-feature attraction conditions in both relative target attention and sur- prisal, consistent with the human data. There was no significant difference in the size of agreement and semantic attraction effects in the human data. This was replicated in the surprisal estimates, but was not replicated in relative attention. There was no significant interaction between semantic and agreement attraction (E-H G-F)) in either surprisal or relative attention. In other words, the effect of attraction was additive, which is consistent with the human pattern.
Attn(u, RelAttn(e, s) Attn(u, s) + Attn(v, n)
(2)
Where Alln(a, b) denotes the attention weight of b in memory when word a is the query. The subject is denoted as s, v denotes the subject's verb, and n denotes the non-subject noun. This linking hy- pothesis differs from that of Laurinavichyute and von der Malsburg (2022), which relates rating a sen- tence as implausible to retrieval failure, in which no item in memory receives sufficient activation above some threshold. The retrieval threshold and activation noise are hyperperameters that must be fit the experimental data. We chose our link- ing hypotheses because is simpler, requiring no hyperparameter fitting.
In both the single and double vi- olation conditions, the GPT-2 surprisal pattern was consistent both with the human data and surprisal from our model. However, in relative attention, one attention head, head4_3 exhibited an agreement at- traction effect, but no semantic attraction effect, while another attention head, head3_6 6 showed the opposite pattern. These results show that different attention heads exhibit complementary inter- ference effects for single dependency type, high- lighting the practical difficulty of deriving single attention-based measure of interference when a model has multiple attention heads. Results from the other two heads are reported in Appendix C.
GPT-2 Results:
We also report surprisal estimates from the CBR- RNN models. Our linking hypothesis between sur- prisal and plausibility ratings is simply that more surprising continuations should be judged implausi- ble more often than less surprising ones. We see the goal of the present work capturing the qualitative direction of the effect, and leave the construction of linking hypotheses with precise quantitative pre- dictions of processing difficulty for future work.
4.2.3 Results
Results are summarized graphically in Figure 4. All significance tests were conducted using linear mixed-effects models with random intercepts for model instances and experimental items, and are re- ported in Appendix C. The qualitative pattern of at- traction effects did not differ across the three CCG
5 Discussion
5.1 Discrepancies Between Model Predictions and Human Behavior
While relative attention correctly predicted the di- rection of both semantic and syntactic attraction in subject-verb dependencies, there were few quan- titative discrepancies between the model and hu- man results. First, human plausibility ratings the "no attractor" conditions were higher across
supertagging loss weights (a- 0, a 1, 5).
Therefore, we report results from all models to- gether. Results from each training condition are reported graphically in Appendix D.

---

the board (75-90%) than relative attention would predict (0.53-0.56). Even when there was no at- tractor present, the attention weight of the subject remained slightly above 50%. An inspection of the attention weights showed that the models often attend broadly to many past memory representa- tions, rather than only attending to the subject and attractor nouns. Our models retrieve weighted sum over past representations, rather than single item. Attending broadly may be the most useful strategy for the prediction objective, and there is no constraint preventing models from doing so. This tendency may be counteracted by incorporating an attention sparsity regularization term in training (Zhang et al., 2019). This type of regularization can be thought of as encouraging the model to be more certain about which past representation will be most useful for next word prediction.
model must learn retrieve items from memory which are optimal for prediction, and will learn a set of latent features which enable this optimal re- trieval. For example, when the model encounters a verb, its subject may be the best item to retrieve in order to predict the verb's continuation. To reliably retrieve subjects, the model would need to learn a latent [+/-subject] feature.
The account proposed by Hahn et al. (2022) is computational level theory (MaIT, 1982), meaning specifies the computational problem the human parser is solving, but is agnostic to how the theory is implemented in a model or the mind. A central motivation of the present work is to combine the computational goal outlined by resource-rational models (updating one's beliefs about a sentence by making rational use of finite memory resources), with a well-established, independently motivated algorithmic level level theory of working memory access.
Relative attention from our model also predicts a smaller effect for semantic attraction than agree- ment attraction, while difference was observed in the human study. This discrepancy appeared in models trained with and without the syntactic aux- iliary objective. One possibility is that semantic attraction effects are better explained by expecta- tion violation than retrieval interference. Surprisal measures more closely matched the semantic at- traction patterns. Evidence from agreement attrac- tion studies suggests that memory retrieval may be initiated part of an error-driven repair process when expectations are violated (Wagers et al., 2009; Schlueter et al., 2019). Campanelli et al. (2018) also show that retrieval interference is modulated by the predictability of the word at the retrieval site. Future work should explore how measures of retrieval difficulty might be more explicitly aug- mented by predictability.
Conclusion
In this work, proposed neural model which in- corporates memory constraints from cue-based re- trieval theories. We showed that the model's atten- tion mechanism tracks subject- verb dependencies over long distances and with intervening distractor nouns. Finally, we evaluated whether the model's ss attention component tracks similarity-basee inter- ference effects found in human attraction experi- ments. We showed that both model surprisal esti- mates and relative attention from our model's self- attention mechanism both predicted the presence of semantic and agreement attraction, without the need to explicitly stipulate any linguistic features in the model. However, relative attention generally underepredicted plausibility ratings and the rela- tive size of the semantic attraction effect. Taken together, we showed that mechanistic explanations of processing difficulty rooted in memory retrieval constraints emerge by-product of minimiz- ing the surprisal of upcoming words.
5.2 Relationship to Resource-Rationa. Models
Our model can be related resource rational theo- ries of cognition (Lieder and Griffiths, 2020), and especially the model of sentence processing pro- posed by Hahn et al. (2022), who propose a unifi- cation of expectation and memory-based theories under the hypothesis that limited memory resources are optimally allocated to maximize the predictabil- ity of future material. Consistent with this account, our model has the computational goal of maximiz- ing predictability. The model accomplishes this goal in part by utilizing its memory retrieval mech- anism. Given that retrieval capacity is limited, the
Ethics Statement
The authors foresee no ethical concerns with the present work.
Acknowledgements
This material is based upon work supported by the National Science Foundation (NSF) under Grant No. BCS-2020945, and in part through the NYU

---

High Performance Computing resources, services, and staff expertise. We would also like thank Suhas Arehalli and members of the NYU Compu- tation and Psycholinguisties lab for their insightful feedback and thought-provoking discussion.
this by implicitly learning features corresponding to those posited in existing cue-based retrieval mod- els like [+/-subject] or [+/-animate]] Causal representational probing methods may prove use- ful for determining whether our models implicitly represent and use features which are consistent with existing theories (Elazar et al., 2021; Ravfogel et al., 2021).
Limitations
6.1 Dependency Types
In this work, we investigated interference effects in subject-verb dependencies. We chose this depen- dency type because it is one of the most widely studied, but it is far from the only dependency type. In future work, we aim to evaluate our model on various dependency types, such as reflexive anaphora (Dillon et al., 2013), and filler-gan gap de- pendencies (McElree, 2001).
6,4 Training Data Limitations
While we train our models on developmentally- plausible amount of text, our training corpus con- sists entirely of articles from Wikipedia, which is quite different from the data children receive when acquiring language. Mueller and Linzen (2023) show that training language models on child- directed speech leads to more rapid humanlike gen- eralization. Future work could investigate whether training CBR-RNNS on more developmentally- plausible corpora leads more humanlike memory retrieval behaviors.
6.2 Assumptions About Working Memory
While our model address a major assumption of cue-based retrieval models, limited retrieval capac- ity, there remain several key differences between the two. We describe some of these differences and how they may be addressed in this section.
Unlike humans, our model learn from text alone. Lexical features implicated in seman- tic attraction experiments, like [+/-canccut] or [+/=satterablee are likely learned by humans with the help of visual information and interaction with the world, sources of information which are not available our model.
Cue-based retrieval theories typically assume that items stored in working memory are individual syntactic constituents (Lewis and Vasishth, 2005; Lewis et al., 2006; Dotlačil, 2021), while our model assumes items in working memory are representa- tions of previous timesteps. One potential direction for future work is forcing models to explicitly rep- resent syntactic structure in short-term memory. This could be achieved through syntactic atten- tion masking mechanism similar that of Sartran et al. (2022).
References
Suhas Arehalli, Brian Dillon, and Tal Linzen. 2022. Syntactic Surprisal From Neural Models Predicts, But Underestimates, Human Processing Difficulty From Syntactic Ambiguities. In Proceedings of the 26th Conference on Computational Natural Lan- guage Learning (CoNLL), pages 301-313, Abu Dhabi, United Arab Emirates (Hybrid). Association for Computational Linguistics.
Some cuc-based retrieval models assume that items in working memory decay over time, making retrieval of older material more difficult than newer material. Decay effects can explain findings like Van Dyke and Lewis (2003), in which the difficulty of ambiguity resolution in garden path sentences is modulated by the length of the ambiguous re- gion. Recent work has also found that limiting context length neural language models improves their to human reading data (Kuribayashi et al., 2022). In future work, graded memory decay could be incorporated into the model by applying a soft attention mask to older material.
Suhas Arehalli and Tal Linzen. 2020. Neural Language Models Capture Some, But Not All Agreement At- traction Effects. In Proceedings of the 42th Annual Meeting of the Cognitive Science Society Devel- oping a Mind: Learning in Humans, Animals, and Machines, CogSci 2020, virtual, July 29. August 1, 2020. cognitiveeciencesscieey..gg
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Ben- gio. 2015. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations. ICLR 2015, San Diego CA, USA, May 7-9, 2015, Conference Track Proceedings.
6.3 Interpretable Linguistic Features
While the CBR-RNN RNNN may capture similarity -based interference effects, is not clear it accomplishes
Kathryn Bock and Carol A Miller. 1991. Broken agree- ment. Cognitive Psychology, 23(1):45-93.

---

Luca Campanelli, Julie Van Dyke, and Klara Marton. 2018. Investigating the modulatory effect of expec- tations on memory retrieval during sentence compre- hension. In Proceedings of the 40th Annual Confer- ence of the Cognitive Science Society, pages 1436- 1441.
Tatsuki Kuribayashi, Yohei Oseki, Ana Brassard, and Kentaro Inui 2022. Context limitations make neural language models more human-like. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 10421-10436, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
Tan Cunnings and Patrick Sturt. 2018. Retrieval interfer- ence and semantic interpretation. Journal of Memory and Language, 102:16-27.
Yair Lakretz, Dieuwke Hupkes, Alessandra Vergallito, Marco Marelli, Marco Baroni, and Stanislas Dehaene. 2021. Mechanisms for handling nested dependen- cies in neural-network language models and humans. Cognition, 213:104699.
Vera Demberg and Frank Keller. 2009. A Computa-
tional Model of Prediction in Human Parsing: Uni-
fying Locality and Surprisal Effects. Proceedings of the Annual Meeting of the Cognitive Science Society, (31).
Yair Lakretz, German Kruszewski, Theo Desbordes, Dieuwke Hupkes, Stanislas Dehaene, and Marco Ba- roni. 2019. The emergence of number and syntax units in LSTM language models. In Proceedings of the 2019 Conference of the North American Chap- ter of the Association for Computational Linguistics: Human Language Technologies, Volume I (Long and Short Pupers), pages 11-20, Minneapolis, Minnesota. Association for Computational Linguisties.
Brian Dillon, Alan Mishler, Shayne Sloggett, and Colin Phillips. 2013. Contrasting intrusion profiles for agreement and anaphora: Experimental and mod- cling evidence. Journal of Memory and Language, 69(2):85-103 103.
Jakub Dotlaäil. 2021. Parsing as a Cue-Based Retrieval Model. Cognitive Science, 45(8);e1 13020.
Anna Laurinavichyute and Titus von der Malsburg. 2022. Semantic Attraction in Sentence Comprehen- sion. Cognitive Science, 46(2)=
Yanai Elazar, Shauli Ravfogel, Alon Jacovi, and Yoav Goldberg. 2021. Amnesic probing: Behavioral expla- nation with amnesic counterfactuals. Transactions of the Association for Computational Linguistics, 9:160- 175.
Roger Levy. 2008. Expectation bbased syntactic compre- hension. Cognition, 19663):1126-111
Roger Levy. 2013, Memory and surprisal in human sentence comprehension. In Sentence Processing. Psychology Press. Num Pages: 37.
Jeffrey L. Elman. 1990. Finding Structure in Time. Cognitive Science, 1412)1199-211.
Émile Enguehard, Yoav Goldberg, and Tal Linzen. 2017. Exploring the syntactic abilities of RNNs with multi- task learning. In Proceedings of the 21st Confer- ence on Computational Natural Language Learning (017)).2017), pages 3-14, Vancouver, Canada. As- sociation for Computational Linguistics.
Richard L. Lewis and Shravan Vasishth. 2005. An Activation Based Model of Sentence Processing as Skilled Memory Retrieval. Cognitive Science, 29(3):375-419.
Richard L. Lewis, Shravan Vasishth, and Julie A. Van Dyke. 2006. Computational principles of work- ing memory in sentence comprehension. Trends in cognitive sciences, 10(10):447-44.
Richard Futrell, Edward Gibson, and Roger P. Levy. 2020. Lossy-context surprisal: An information- theoretic model of memory effects in sentence pro- cessing. Cognitive Science, 44(3)
Falk Lieder and Thomas L. Griffiths. 2020. Resource- rational analysis: Understanding human cognition as the optimal use of limited computational resources. Behavioral and Brain Sciences, 43:e1. Publisher: Cambridge University Press
Michael Hahn, Richard Futrell, Roger Levy, and Ed- ward Gibson. 2022. A resource-rational model of
human processing of recursive linguistic structure. Proceedings of the National Academy of Sciences. 119(43):21122602113
Thang Luong, Hieu Pham, and Christopher D. Manning. 2015. Effective approaches to attention- based neural machine translation. In Proceedings of the 2015 Con- ference on Empirical Methods in Natural Language Processing, pages 1412-1421, Lisbon, Portugal. As- sociation for Computational Linguistics.
John Hale. 2001. A probabilistic Farley parser as psy- cholinguistic model. In Second Meeting of the North American Chapter of the Association for Computa- fional Linguistics.
Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long Short-Term Memory. Neural Computation. 1755
David Marr. 1982 Vision: A Computational Investiga- tion into the Human Representation and Processing of Visual Information. Henry Holt and Co., Inc., New York, NY, USA.
Julia Hockenmaier and Mark Steedman. 2007. CCG- bank: A corpus of CCG derivations and dependency structures extracted from the Penn Treebank. Com- putational Linguistics, 3353):355-396.
Brian McElree. 2001. Working Memory and Focal At- tention. Journal of experimental psychology. Learn- ing, memory, and cognition, 27(3)8117-83

---

Stephen Merity, 2019. Single Headed Attention RNN: Stop Thinking With Your Head. ArX1v:1911.11423 [es].
Mark Steedman. 1987. Combinatory Grammars and Parasitic Gaps. Natural Language & Linguistic The- ory, 5(3):403-439. Publisher: Springer.
Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2017. Pointer Sentinel Mixture Mod-
Yuanhe Tian, Yan Song, and Fei Xia. 2020. Supertag- ging Combinatory Categorial Grammar with attentive graph convolutional networks. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6037-6044, Online. Association for Computational Linguistics.
els.
Aaron Mueller and Tal Linzen, 2023, How to Plant
Trees in Language Models: Data and Architectural liffects on the Emergence of Syntactic Inductive Bi- ases. ArXiv:2305. 19905 [es].
Julie A Van Dyke and Richard L Lewis. 2003. Distin- guishing effects of structure and decay on attachment and repair: A cue-based parsing account of recovery from misanalyzed ambiguities. Journal of Memory and Language, 49(3):285-315
Byung-Doh Oh and William Schuler. 2022. Entropy- and Distance- Bassd Predictors From GPT-2 Atten- tion Patters Predict Reading Times Over and Above GPT-2 Surprisal. In Proceedings of the 2022 Con- ference Empirical Methods in Natural Language Processing, pages 9324-9334, Abu Dhabi, United Arab Emirates. Association for Computational Lin-
Marten van Schijndel and Tal Linzen. 2018. Model- ing garden path effects without explicit hierarchical syntax: 40th Annual Meeting of the Cognitive Sci- ence Society: Changing Minds, CogSei 2018. Pro- ceedings of the 40th Annual Meeting of the Cogni- live Science Society, CogSci 2018, pages 2603-2608. Publisher: The Cognitive Science Society.
guistics.
Neal J. Pearlmutter, Susan M. Garnsey, and Kathryn Bock. 1999. Agreement Processes in Sentence Com- prehension. Journal of Memory and Language, 41(3):22-4466
Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners.
Marten van Schijndel and Tal Linzen. 2021. Single- Stage Prediction Models Do Not Explain the Magni- tude of Syntactic Disambiguation Difficulty. Cogni- tive Science, 12
Shauli Ravfogel, Grusha Prasad, Tal Linzen, and Yoav Goldberg. 2021. Counterfactual interventions re- veal the causal effect of relative clause representa- tions on agreement prediction. In Proceedings of the 25th Conference on Computational Natural Lan- guage Learning. pages 194-209, Online, Association for Computational Linguistics.
Shravan Vasishth and Felix Engelmann. 2021. Sentence Comprehension as Cognitive Process: A Computa- tional Approach. Cambridge University Press, Cam- bridge.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones. Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is All you Need. In Advances in Neural Information Pro- cessing Systems, volume 30. Curran Associates, Inc.
Soo Hyun Ryu and Richard Lewis. 2021. Accounting for Agreement Phenomena in Sentence Comprehen- sion with Transformer Language Models: Effects of Similarity- based Interference on Surprisal and Atten- tion. In Proceedings of the Workshop on Cognitive Modeling and Computational Linguistics, pages 61- 71, Online. Association for Computational Linguis- tics.
Matthew W. Wagers, Ellen F. Lau, and Colin Phillips. 2009. Agreement attraction in comprehension: Rep- resentations and processes. Journal of Memory and Language, 61 (22:)226-2337
Laurent Sartran, Samuel Barrett, Adhiguna Kuncoro, Miloš Stanojevié, Phil Blunsom, and Chris Dyer. 2022. Transformer Grammars: Augmenting Trans- former Language Models with Syntactic Inductive Biases at Scale. Transactions of the Association for Computational Linguistics, 10: 123-1499.
Ethan Wilcox, Pranali Vani, and Roger Levy. 2021. A Targeted Assessment of Incremental Processing Neural Language Models and Humans. In Proceed- ings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joini Conference on Natural Language Processing (Volume 1: Long Papers), pages 939-952. Online. Association for Computational Linguisties.
Zoe Schlucter, Dan Parker, and Ellen Lau. 2019, Error- Driven Retrieval in Agreement Attraction Rarely Leads to Misinterpretation. Frontiers in Psychology. 10.
Garrett Smith and Shravan Vasishth. 2020. A Principled Approach to Feature Selection in Models of Sentence Processing. Cognitive Science, 44(12)xe12918.
Jiajun Zhang, Yang Zhao, Haoran Li, and Chengqing Zong. 2019. Attention With Sparsity Regulariza- tion for Neural Machine Translation and Summariza- tion. IEEF/ACM Transactions on Audio, Speech, and Language Processing, 27(3):007-518 Conference Name: IEEE/ACM Transactions on Audio, Speech, and Language Processing.
Nathaniel J. Smith and Roger Levy. 2013. The effect of word predictability on reading time is logarithmic. Cognition, 128(3)3002-399

---

A Modification to Stimuli
We made some minor modifications to the ma- terials of Laurinavichyute and der Malsburg (2022) make them compatible with our model. Firstly, some words the stimuli were outside of the model's vocabulary. We replaced all such words with synonyms. Additionally, we replaced all noun-noun compounds with either a single-word synonym just the head noun of the compound. This was because our model often distributed attention across both nouns in the compound, artificially de- flating the level of attraction in certain conditions. Synonym replacements are reported in Table 2, noun-noun compound replacements are reported Table 3.
Original
Replacement
landscape(s)
mountain(s)
highrise
apartment
crackle
warm
loft(s)
balcony/ie(s)
dent(s)
scratch(es)
glow(s)
shine(s)
dribble
drip
soothingly
comfortably
B Perplexity and CCG Supertagging Performance
Table 2: Replacement of out-of-vocabulay tokens with synonyms.
Baseline models are matched to the three syntac- tic conditions (a 0, a a = 5). For the first baseline, we ablate the attention mechanism from the CBR-RNN during training. For the sec- ond baseline, we train single-layer LSTM (with no attention) whose hidden dimensionality (256) matches that of the CBR-RNN models. For the third baseline, train two-layer LSTM (with attention) whose parameter count (14.9M) approxi- mately matches that of the CBR-RNN.
We evaluated the perplexity of all models on the test portion of WikiText- 103. Matched for auxiliary objective weight, CBR-RNN models all achieved lower perplexity than both the parameter-mater and hidden dimensionality LSTM models (Table 4).
Original
Replacement
tram stop
stop
wall calendar
calendar
chocolate fountain
fountain
CCG supertagging accuracy was evaluated on the test portion of the CCGBank dataset. All models achieve relatively high accuracy in CCG tagging, with similar accuracies across all condi- tions. CBR-RNN models have generally compara- ble, even superior language modeling and CCG supertagging performance parameter-matchhe LSTM language models (Table 5).
winter garden
garden
coffee shop
cafe
towel hook
mirror
light switch
switch
license plate
plate
walkie talkie(s)
radio(s)
Table 3: Replacement of noun-noun compounds with single nouns.
C Statistical Analysis
We conduct significance tests for agreement and semantic attraction effects and their interaction in each violation conditions, using both of our models measures, surprisal and relative attention. We use linear mixed effects models from the 1mer package in with random intercepts for items and model

---

Supertagging objective weight:
-==
CBR-RNN (d = 256)
61.8 +0.4
63.3 +0.3
75.1 #0.5
CBR-RNN = 256, no attention)
75.1 1111
76.2 11.2
92.3 #111
LSTM (d = 256, single-layer)
66.0 +227
67.6 1.3
79.4 +0.6
LSTM (d = 271, two-layer)
61.2 #1.3
65.3 #7.1
77.6 #3.0
Table Perplexity (with standard deviations) on Wikitext- 103 test set averaged across random seeds. 2-4 are the three sets of baseline models.
Supertagging obj. weight:
= 1
= 5
CBR-RNN (d 256)
84.4 0:0.
86.0 +0.1
CBR-RNN (d=256, no attention)
83.9 +1.5
85.1 #1.2
LSTM (d=256.1=1)
84.5 #0.7
85.7 #0.9
LSTM (d=271,1=2)
85.1 #333
86.2 +:26
Table 5: CCG supertagging accuracies (with standard deviations) on the test position of CCGBank averaged across random sceds. The first row results are the models under investigation in this study, rows 2-4 are the three sets baseline models.
Single Violation (A, B, C. D)
Effect
Surprisal
Relative Target Attention
Agreement Attraction
0.46, p < 0.001
-0.07, p 0.001 /
Semantic Attraction
C-D
8
-0.40, p < 0.001 /
B +0.03, 0.001 /
Interaction of Attraction Type
(A B) (C-D) D)
B +0.06, p 0.721
B +0.04, < 0.001 X
Double Violation (E, F, G, H)
Double Attraction
E-F
B 0.88, p < 0.001 /
3 -0.11, 0.001 /
Agreement Attraction
E-H
3 = -0.99, p < 0.001 /
3 = -0.08, < 0.001 /
Semantic Attraction Interaction
E-G
= -0335, p < 0.001
= +0.05, < 0.001 /
(E- GB- (H-
-0.03, p 0.645 B +0.02, 0.053 /
Table 6: Linear mixed effects modeling results for all combined CBR-RNN models (ax 0, a = 1, 5) on Experiment 3 of Laurinavichyute and von der Malsburg (2022). Results marked with a are consistent with the human results, while results marked with X are inconsistent with the human results.
seeds. Results from linear mixed effects model- ing of CBR-RNN results are reported Table Results from GPT-2 are reported in Table 7. Re- sults from additional GPT-2 heads are visualized in Figure 6.
D
Attraction Results by Syntactic Objective Weight
Figure 5, we visualize results from the attraction experiments split across the three CCG supertag-
ging training conditions (alpha = 0, alpha = 1, alpha 5).

---

Single Violation (A, B. C.
Effect
Surprisal
Relative Attention (head4_3 33
(head3_6)
Agreement Attraction
A-B
0.77, < 0.001 /
-..9. < 0.001 /
B +0.00. 0.619
Semantic Attraction
C-D
-0.99, < 0.001 /
8 ++0.22, 0.672
$ -0.09. p 0.018
Interaction of Attraction Type
(A (C-
0.22, 0.729 / 3 10.11. 0.076 /
8 +0.08.
0.069 /
Double Violation (E, G. HD
Double Attraction
E
= 1.70, p < 0.001 /
= -0.13, 0.024 /
A= -0.08, P = 0.015
Agreement Attraction
E-H
= -0.61, < 0.001 /
-0.11, 0.001
8 -0.01, 0.577
Semantic Attraction
E-G
1108, < 0.001 /
+0.00, 0.914
5 -0.06,
0.072 X
Interaction
(E-G) (H F)
3= -0.01, 0.977 /
8 = 0.02, 0.787 /
3 -0.01, 0.805 /
Single Violation (A, B,C,
Effect
(head6_0)
(head2_9)
Agreement Attraction
A-B
5 = -..13, 0.001 /
8 -0011 = 0.034
Semantic Attraction
C-D
5= = +0.01. x
3= +0.00. = 0.743 X
Interaction of Attraction Type
(A B)- (C- D)
3= +0.14, 0.018x
3= +0.00, 0.787 /
Double Violation G. H)
Double Attraction
F-F
= 0..14 p = 0.005 /
-0.03, p= 0.015 /
Agreement Attraction
E-H
0.11, < 0.001 /
-0.02, < 0.001 /
Semantic Attraction Interaction
E-G
= -0.01. 0.856
3 -0.01, 0.668
(E-G)- (H F)
3 -0.03. 0.516
$= -0.00, 0.603 /
Table 7: Linear mixed effects modeling results for surprisal and relative attention (by head) from GPT-2 on Experiment 3 of Laurinavichyute and von der Malshurg (2022). Results marked with a are consistent with the human results, while results marked with are inconsistent with the human results.

---

CBR-RNN Surprisal (a 0)
CBR-RNN Relative Attention (a 0)
12.0
0.56
Relative Attention Weight
Surprisa (bits)
0.52
10.0
0.48
9.0
A Agreement
D
E F G H Double
C Semantic
F G H Double
Semantic
Agreement
CBR-RNN Surprisal (a 1)
CBR-RNN Relative Attention (a 1)
0.56
Relative Attention Weight
Surprisal (bits)
11.0
10.0
0.48
9.0
0.44
A
B
D
E F G H Double
A Agreement
C
D
E
F G H Double
Agreement
Semantic
Semantic
CBR-RNN Surprisal (a 5)
CBR-RNN Relative Attention (a = 5)
12.0
0.60
relstive Attention Weight
Surprisal (bits)
11.0
0.55
10.0
0.50
9.0
0.45
F G H
C Semantic
F G Double
H
Agreement
Semantic
Double
Agreement
Figure 5: Surprisal and relative attention results each of the three CCG supertagging conditions.
GPT-2 Relative Attention (head 6 0)
GPT-2 Relative Attention (head 2 9)
0.14
Relative Attention Weight
0.70
Relative Atteniion AttemtionWeiiee Weight
0.12
0.60
0.10
0.50
0.08
C
B Agreement
Agreement
Semantic
Double
Semantic
Double
Figure Surprisal and relative attention results from two additional GPT-2 heads.


Reviews:
[{"review_id": "shkq4vXMId", "reviewer": "Reviewer_mtFz", "summary": "", "questions": "This is a small point but given the large number of agreement attraction data that are available for re-analysis it is a shame that only a single data-set was compared to the model here. Even while I note this, I expect that a broader evaluation is already on the authors' agenda.\n\n", "limitations": "", "rating": 4, "confidence": 4, "soundness": 5, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "*Comparison to a Transformer Baseline*\n* Thank you for the great suggestion to compare results from the CBRNN model to a transformer model. We will include comparisons to attention and surprisal measures from a transformer model in the final paper. However, we believe that results from multi-headed models would come with a couple of caveats, which we include in a response to another reviewer with a similar suggestion:\n    * The more attention heads a model has, the more likely it will be for at least one head to closely match the human pattern. At the same time, more attention heads will likely mean each individual head plays a less direct causal role in the behavior of the model on the prediction objective.\n    * We argue in the paper that models with a large number of attention heads are inconsistent with the way cognitive scientists think about working memory within cue-based retrieval theories. These theories emphasize a working memory system which is highly constrained in the number of retrieval operations that can take place during processing. If we are to view neural attention as a cognitive model of cue-based memory retrieval, multi-headed models do not transparently reflect individual retrieval processes. Regardless, if we find that attention measures in multi-headed transformer models fail to replicate the human patterns, then this provides an additional empirical argument for our model. If a measure from some multi-headed model does provide an equally good or better fit to the human data, then our argument on the grounds of cognitive plausibility would still hold.\n---\n*Investigating other dependency types/other datasets*\n* This is indeed an exciting avenue of future work that we are actively pursuing. Given space limitations, the focus of the paper is on motivating and presenting the model itself. We include one well studied dependency type (and two types of attraction) to demonstrate the model's effectiveness, and we will include additional dependency types in future a conference submission and a longer journal version of this work.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "- Pursues an exciting link between cognitive science approaches to memory during language processing, and key developments in neural language modeling\n- Likely of interest to psycholinguists, cognitive scientists, and neural network modelers comparing recurrent and transformer approaches for language.\n- Clear theoretical motivation to address limitations of prior work\n- Interesting evaluations in terms of language-modeling performance, sensitivity to dependencies, and match to human data\n- Evaluation of adding supertagging training target along-side language modeling is a nice bonus", "reasons_to_reject": "- Models are compared to a LSTM baseline, but given the incorporation of attention, would a (similarly-sized) Transformer baseline also be appropriate?\n- It will be exciting to see the same method applied to other dependencies associated with cue-based retrieval (e.g. relative clause, ellipsis etc.) The focus here on subject-verb agreement alone certainly reflects the bulk of the literature but limits - at least to me -  the generalizability of the model presented here", "questions_to_authors": "This is a small point but given the large number of agreement attraction data that are available for re-analysis it is a shame that only a single data-set was compared to the model here. Even while I note this, I expect that a broader evaluation is already on the authors' agenda.\n\n", "paper_topic_and_main_contributions": "This paper evaluates a neural language model that integrates a recurrent structure with a very narrow (size=1) self-attention. The theoretical target is to model the role of cue-based memory retrieval during sentence comprehension. The model is evaluated in terms of whether it is sensitive to syntactic dependencies, and whether the attention distribution or next-word predictability match human sentence processing results from \"agreement attraction\" sentences that motivate relevant cue-based retrieval theories. The key contribution is that the single-unit attention mechanism offers a reasonable match to the data presented here, advancing earlier accounts that relied on non-human-like multi-headed attention mechanisms (e.g. GPT-2.)", "excitement": 4, "reproducibility": 4, "ethical_concerns": "No", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "y4B8WSbR8S", "reviewer": "Reviewer_Cvhi", "summary": "", "questions": "Will the model/data be publicly available?\nAt first glance, the relative attention results in Figure 4 do not mirror the human data; for example, humans can better judge the implausibility of verbs in the \"double\" condition, but relative attention does not. Why not focus on that part in Section 4.3.3?", "limitations": "", "rating": 4, "confidence": 4, "soundness": 3, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "*Comparison to a transformer baseline*\n* Thank you for the great suggestion to compare results from the CBRNN model to a transformer model. We will include comparisons to attention and surprisal measures from a transformer model in the final paper. However, we believe that results from multi-headed models would come with a couple of caveats, which we include both here and in response to another reviewer with a similar suggestion:\n    * The more attention heads a model has, the more likely it will be for at least one head to closely match the human pattern. At the same time, more attention heads will likely mean each individual head plays a less direct causal role in the behavior of the model on the prediction objective.\n    * We argue in the paper that models with a large number of attention heads are inconsistent with the way cognitive scientists think about working memory within cue-based retrieval theories. These theories emphasize a working memory system which is highly constrained in the number of retrieval operations that can take place during processing. If we are to view neural attention as a cognitive model of cue-based memory retrieval, multi-headed models do not transparently reflect individual retrieval processes. Regardless, if we find that attention measures in multi-headed transformer models fail to replicate the human patterns, then this provides an additional empirical argument for our model. If a measure from some multi-headed model does provide an equally good or better fit to the human data, then our argument on the grounds of cognitive plausibility would still hold.\n---\n*Attention != faithful attention*\n* Thank you for the reference to Kobayashi et al. (2021). We agree with the reviewer that it will be useful to look at the weighted vector norms for each retrieved item. This would allow us to investigate whether context tokens which receive a large attention weight actually make up a large component of the resulting attention vector. We will include this analysis in the final paper. \n---\n*“...humans can better judge the implausibility of verbs in the \"double\" condition, but relative attention does not...”*\n* Thank you for pointing out this discrepancy between the human and model behavior. Assuming you are referring to the difference in plausibility rating accuracies between condition (e) and conditions (b, d), we did not analyze these effects in the paper because these were not a focus of analysis in the original human experiment conducted by Laurinavichyute and von der Malsburg (2022). Because the primary focus of our paper was attraction effects, we only analyzed effects of attraction, matched for the number of violations. In the final paper, we will include a more detailed discussion of other discrepancies between model and human behavior, namely the discrepancy the reviewer points out, and the discrepancy between surprisal, attention, and human plausibility ratings in each of the no attractor conditions.\n---\n*Releasing our model + data*\n* We regret that we were not able to release the model code and data in our initial submission. We will release all of the model and analysis code alongside the final version of the paper. For the full list of materials used in experiment 4.3, see Laurinavichyute and von der Malsburg (2022), who provide their data [here](https://onlinelibrary.wiley.com/action/downloadSupplement?doi=10.1111%2Fcogs.13086&file=cogs13086-sup-0001-SuppMat.pdf).", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "- The motivation for model design and experiments is clear. Integrating expectation and memory retrieval in cognitive modeling is generally an important topic.\n- The experimental design is well-controlled and adequate for evaluating the cue-based retrieval model.\n- The results seem positive; that is, the proposed model can (partially) replicate the human sentence processing load.", "reasons_to_reject": "- There is no comparison with baseline, e.g., multi-head attention Transformers, in main experiments; I'd like to know if the models' (partially) human-like behaviors (e.g., results in Figure 4) stem from the intended, special characteristics of CBRNN, such as RNN with memory-limited attention or not.\n- Attention does not always reflect faithful attention. For example, if a particular value vector is close to zero, the corresponding attention is canceled [Kobayashi+,21]. Observing the attention weight would be a good starting point, but I'm afraid that the experiments missed some important aspects of the model's context retrieval beyond attention weight.", "questions_to_authors": "Will the model/data be publicly available?\nAt first glance, the relative attention results in Figure 4 do not mirror the human data; for example, humans can better judge the implausibility of verbs in the \"double\" condition, but relative attention does not. Why not focus on that part in Section 4.3.3?", "paper_topic_and_main_contributions": "Aiming for a cognitively plausible model of human sentence processing, this study introduces a model named CBRNN, which integrates forward-looking expectation and backward-looking memory constraints. Then, its human-like behaviors against context interference are tested on controlled sentences involving subject-verb agreement. The experiments show that (i) the CBRNN model trained with syntactic auxiliary objective assigns larger attention to a proper subject when processing the verb and (ii) the CBRNN model's attention and surprisal generally mirrors the human processing difficulty of the controlled sentences.", "excitement": 4, "reproducibility": 4, "ethical_concerns": "No", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"Typos_Grammar_Style_and_Presentation_Improvements": "From which model were the results in figure4 obtained?"}, "extra_text": {}}, {"review_id": "EPiy6oQM3R", "reviewer": "Reviewer_jZo2", "summary": "", "questions": "", "limitations": "", "rating": 3, "confidence": 3, "soundness": 3, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "*“...[the paper] contains typos...”*\n* Thank you for identifying some typos and a missing figure reference in the paper. We will correct these in the final paper.\n---\n*“...the introduction and related work sections are very long...”*\n* We feel that the introduction, which runs just over one page in total, is standard for EMNLP submissions. The paper does not contain a related work section; related work was incorporated into the introduction and background sections. In the camera-ready version of the paper, we will make the background more concise. However, because the paper is primarily concerned with connecting cognitive theories to computational modeling, some amount of theoretical discussion is unavoidable. \n---\n*“...I have never heard about an English variant where number agreement is not an issue... subject-verb agreement is common of many many languages...”*\n* There are several varieties of English which have different agreement patterns than Mainstream English. One example is varieties of Northern British English with the Northern Subject Rule. In these varieties, both singular and plural non-pronominal subjects may take the -s verbal ending [1]. Another example is varieties of African American Vernacular English, in which there is no subject verb agreement, with the exception of the copula [2]. We will make this point clearer in the camera-ready version.\n* It is true that many languages have subject-verb agreement. While we only focused on agreement in Mainstream English in the paper, we will adjust the wording of line 138 to reflect the fact that agreement is pervasive across the world’s languages.\n---\n*“...it sounds as 'surprisal' may be the name of the theory...”*\n* Surprisal theory is indeed a theory which characterizes the relationship between the *measure* surprisal (the negative log probability of an event) and difficulty in sentence processing. The theory has been formalized and theoretically motivated in several ways, such as the cost of resource-reallocation in a fully-parallel parser [3]. We regret any confusion that may have arisen from our mention of surprisal in line 28. To avoid future confusion, we will replace “surprisal” in line 28 with “surprisal theory” in the final paper. \n---\n[1] Pietsch, L. 2005. *Variable Grammars: Verbal Agreement in Northern Dialects of English.* Berlin, Boston: Max Niemeyer Verlag. https://www.degruyter.com/document/doi/10.1515/9783110944556/html\n\n[2] Labov, W. 1998. *Coexistent systems in African-American vernacular English.* In Mufwene, S. S., Rickford, J. R., Bailey, G., & Baugh, J., editors, African-American English: Structure, history, and use, pages 110–153. Routledge, London, 1998.\n\n[3] Roger Levy. 2008. *Expectation-based syntactic comprehension.* Cognition, 106(3):1126–1177.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "One of the major contribution of the paper is to rely on both expectation- and cue-based serial processing.\nThese two features have often been considered as either principle inspiring model feature. \nInterestingly, the author(s) show(s) that both surprisal and memory interference help in predicting semantic or grammatical agreement violations in automatic sentence processing.", "reasons_to_reject": "The paper is not thoroughly well written: it contains typos, and the introduction and related work sections are very long.\nA more focussed reorganisation of the structure would be of great help for the reader.", "questions_to_authors": "", "paper_topic_and_main_contributions": "The paper proposes a recurrent neural network model augmented with a self-attention module for human-like sentence processing based on both expectation- and cue-based serial processing.\nResults support the author(s)’ claim, although the whole process seems to be far from being cognitively plausible.", "excitement": 3, "reproducibility": 2, "ethical_concerns": "No", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"Missing_References": "The reference list is sufficiently valid "}, "extra_text": {"Typos_Grammar_Style_and_Presentation_Improvements": "Abstract: an cognitively This should be “a cognitively”\nLine 124: post-doc ?? Did you mean post-hoc?\nLine 138: Mainstream English. I have never heard about an English variant where number agreement is not an issue. Moreover, subject-verb agreement is common of many many languages.\n\nLine 29: Expectation-based theories like surprisal. This is a bit odd since it sounds as “surprisal” may be the name of the theory. Surprisal is  a quantitative measure for evaluating the complexity/difficulty of serial processing based on accruing expectations.\n\nFigure 1 is not cited in the text."}}]

Author rebuttal:

Meta-review: The paper under review introduces and evaluates language models with respect to human-like sentence processing, specifically focusing on cue-based memory retrieval and cognitive plausibility. The models are assessed in terms of their sensitivity to syntactic dependencies and their alignment with human sentence processing data, particularly in sentences involving agreement attraction. While the paper has notable strengths, such as clear theoretical motivation and interesting evaluations, there are concerns regarding the choice of baselines, generalizability, and the paper's organization.

Pros from the reviews:

- A reviewer highlights the paper's clear theoretical motivation to address limitations in prior work, making it valuable for researchers in both cognitive science and neural network modeling.

- A reviewer appreciates the incorporation of both expectation- and cue-based serial processing, which is a significant contribution, and suggests that the results support the authors' claims.

- A reviewer acknowledges the well-controlled experimental design and positive results, indicating that the proposed models can replicate human sentence processing behavior.

Cons from the reviews:

- Two reviewers express concerns about the absence of comparisons with baseline models, such as multi-head attention Transformers, which would help contextualize the contributions of the proposed models.

- One reviewer suggests that the paper's focus on subject-verb agreement may limit the generalizability of the model, and encourages exploring other dependencies associated with cue-based retrieval.

- Another reviewer criticizes the paper's writing, pointing out typos and the need for a more focused reorganization of the structure to improve readability.

Given the strong paper, good reviews and comprehensive rebuttals, the soundness of the paper is quite clear. Yet, the authors often explain that they will include additional results, explanation, data etc. in the final version of the paper. For an excellent contribution, these additional resources would be essential. Given the overall favourable reviews, I would like to see the paper at EMNLP.
Decision: Accept-Findings