BERT Shows Garden Path Effects (2023)

Abstract: Garden path sentences (i.e. “the horse raced past the barn fell”) are sentences that readers initially incorrectly parse, requiring partial or total re-analysis of the sentence structure. Given human difficulty in parsing garden paths, we aim to compare transformer language models’ performance on these sentences. We assess a selection of models from the BERT family which have been fine-tuned on the question-answering task, and evaluate each model’s performance on comprehension questions based on garden path and control sentences. We then further investigate the semantic roles assigned to arguments of verbs in garden path and control sentences by utilizing a probe task to directly assess which semantic role(s) the model assigns. We find that the models have relatively low performance in certain instances of question answering based on garden path contexts, and the model incorrectly assigns semantic roles, aligning for the most part with human performance.

## introduction the field of natural language processing was revolutionized by the introduction of transformers. models such as bert and gpt (and successors) have vastly improved performance on a variety of tasks compared to previous models such as lstms. one reason for this improvement was the introduction of attention @xcite , which allows subparts of sentences to be weighted (and attended to) differently. another advance in these models was having all input processed simultaneously rather than sequentially. these changes and subsequent advancements have resulted in a large amount of interest in how exactly transformer models process language and to what extent it mirrors human performance @xcite . in terms of syntactic information, investigations have found that bert represents a variety of phenomena that are presumed to be relevant for human language processing such as parts of speech, roles, and syntactic chunks @xcite . furthermore, this information seems to be organized hierarchically @xcite , and the majority of the syntactic information is within the token embeddings @xcite . probing tasks have revealed that bert contains semantic information as well. roles, proto-roles, entity types, and relations are contained in token representations in addition to syntactic information @xcite . because much of the syntactic and semantic knowledge that humans are presumed to have and use is also present in bert, it is potentially useful to compare the two in linguistic tasks and see if their performance is also similar. in this study, we compare the performance of humans and four bert-style foot_1 models in a question answering task. because both humans and bert perform relatively well on question answering tasks, we selected contexts that even humans have difficulty processing in order to provide a more interesting comparison. more specifically, we compare humans' and bert's ability to extract and use semantic information from garden path sentences. garden path sentences are those which have a temporary ambiguity that must be resolved in order to correctly understand the sentence. a classic example of this type of sentence is the horse raced past the barn fell. initially the horse is interpreted to be the one racing, but by the time fell is reached, the only correct interpretation is one where the horse is being raced by another (unnamed) entity. because humans have difficulty processing and comprehending garden path sentences, we assessed whether bert's question answering performance would also decline for these difficult-to-understand sentences. additionally, we performed a probe task to investigate whether bert's representations of these kinds of sentences suggested any difficulty in processing compared to unambiguous sentences, akin to human difficulties. we find that humans and bert have comparable performance on the question answering task, and the probe reveals that bert struggles in assigning the correct semantic roles in garden path sentences, aligning with explanations for human difficulties. ## garden path sentence processing extensive research in human sentence processing has probed structures in which readers must reevaluate their initial understanding of sentence meaning after receiving additional information. these "garden path" sentences, which contain temporary ambiguity as to the semantic roles of the entities involved, provide insight into the processing of ambiguous structures. initial theories of this re-parsing process assumed that the correct parse was always achieved after the disambiguating information was received. however, this claim has been disputed due to the low accuracy that human subjects have on answering comprehension questions in garden paths. this gives rise to two alternatives: either the correct syntactic structure is never built @xcite , or the semantic roles from the misparsed structure introduce interference in the correctly parsed sentence @xcite . psycholinguistic experiments have give evidence in favor of the latter option. @xcite performed a study where participants read sentences such as: ## related work previous research has addressed the ways in which various models process garden path sentences, although none up to this point has examined bert specifically, to our knowledge. utilizing the metric of surprisal extracted from various models, van schijndel and linzen (2018) modeled garden path effects in human self-paced reading. they compared probabilistic context-free grammars (pcfg) with explicit hierarchical syntax to recurrent neural network (rnn) models trained on text without syntactic annotation. both the pcfgs and rnns under-predicted the extent to which human readers slowed down in response to np/z type ambiguities, showing that these types of models may find garden path sentences less challenging than human readers. moving away from human comparisons, @xcite evaluated a number of models' surprisal in garden path sentences, including three lstm models and a rnn grammar trained on a small dataset. all models evaluated showed increase in surprisal values at the disambiguating regions of the np/z garden path sentences, but they found that only the larger lstm models evaluated utilized verb argument structure in their predictions, showing that explicit syntax training is not needed to model garden path effects. @xcite similarly investigated gpt-2's ability to navigate different types of garden paths. they evaluated the change in gpt-2's hidden states before and after the disambiguating component of a garden path sentence. utilizing manhattan distances and consine similarities, they found a larger difference before and after the disambiguating token in garden paths compared to unambiguous sentences. both @xcite and @xcite were able to find garden path effects, but neither explicitly compares these results with human performance. ## conclusion overall, bert-style transformer models do not perform significantly better than humans on garden path sentences in question answering. this suggests that, despite the temporal amodality of bert's language processing, it still faces the same issues of misinterpretation that human speakers do in online sentence processing. additionally, probe results suggest that bert fails to assign the correct semantic roles to the entities in garden path sentences, despite showing successful assignments on other corpus sentences. this error is similar to human-style garden path misinterpretations, despite the many differences between human and model language processing (i.e. temporality, working memory demands). additionally, we observe differences in semantic role representations between the models tested-bert models seem to make similar role predictions regardless of model size, while roberta base makes different predictions than roberta large . furthermore, both roberta models seem to have different semantic representations than the original bert models, suggesting that particular training procedures and tasks can lead to widely different internal model states yet still show negligble impact on performance of downstream tasks.