What Makes Language Models Good-enough? (2024)

Abstract: Psycholinguistic research suggests that humans may build a representation of linguistic input that is ‘good-enough’ for the task at hand. This study examines what architectural features make language models learn human-like good-enough language processing. We focus on the number of layers and self-attention heads in Transformers. We create a good-enough language processing (GELP) evaluation dataset (7,680 examples), which is designed to test the effects of two plausibility types, eight construction types, and three degrees of memory cost on language processing. To annotate GELP, we first conduct a crowdsourcing experiment whose design follows prior psycholinguistic studies. Our model evaluation against the annotated GELP then reveals that the full model as well as models with fewer layers and/or self-attention heads exhibit a good-enough performance. This result suggests that models with shallower depth and fewer heads can learn good-enough language processing.

## introduction language models exhibit impressive performance in various natural language understanding tasks @xcite @xcite , but one common concern is that they often rely on heuristics @xcite . for instance, bert @xcite makes predictions based on surface features, which leads to poor results in adversarial examples @xcite . large language models such as gpt-2 @xcite also adopt fallible heuristics in in-context learning @xcite . however, it is too hasty to view models' reliance on heuristics as a flaw. according to a 'goodenough' theory of human sentence processing @xcite @xcite , humans also adopt some types of heuris1 our dataset and codebase for dataset creation are available at https://github.com/nii-cl/gelp . ## human experiment to annotate the gelp dataset and probe humans' language processing, we conduct a crowdsourcing experiment. we explore to what extent plausibility types, construction types, and degrees of memory load lead to good-enough language processing. ## model evaluation against the annotated gelp, we evaluate models with different architectural features. assuming that a good-enough model neither engages in a detailed syntactic analysis nor needs a strong working memory, we hypothesize that our aimed model has (i) a shallow architecture and (ii) a small number of self-attention heads relative to the full model. ## discussion does a shallow architecture lead to good-enough language processing? our first hypothesis is that a good-enough model requires a shallow architecture because it does not have to make a detailed syntactic representation of linguistic input. we confirm this hypothesis by finding that the shallow models exhibit a human-like good-enough performance in a way similar to their deeper version. specifically, increasing the number of layers from 8 to 12 does not improve the models' human-like performance considerably. our results shed light on whether language models can learn the dissociation between formal linguistic competence-knowledge of grammar-and functional linguistic competence-the ability to use language in real-world situations @xcite . the advent of seemingly well-behaved neural language models leads to an intensive investigation of their formal linguistic competence @xcite @xcite . @xcite conclude that language models show promising results in learning abstract linguistic rules and patterns, but it remains to be seen whether they can learn functional linguistic competence. our results point to the possibility that deep as well as shallow models can learn human-like language processing that is good-enough for simple language use. do fewer heads lead to good-enough language processing? our second hypothesis is that the aimed model requires fewer attention heads because it does not need a strong working memory system. we find that among our model set, the model with the largest number of heads (@xmath0, in a similar way as humans. this result does not confirm our hypothesis. we can explain this result if the parallelism between the self-attention mechanism in transformers and the human working memory system is specific to the retrieval phase. the human working memory system involves three phases, encoding, storage, and retrieval, at a coarse level of granularity @xcite . the models as well as humans achieve accuracy at the ceiling on items with correct entailment/yes labels, suggesting that they can store words that appear in contexts/premises. thus, the observed accuracy pattern might not have to do with the storage phase of the working memory. we then conjecture that good-enough language processing has to do with the encoding phase of the working memory: the detailed syntactic analysis does not take place in the first place due to a high memory load during this phase, and as a result, the working memory does not store the detailed syntactic representation. we leave open the exact mechanism of this process and its connection to the self-attention architecture in transformers for future research. ## conclusion from a cognitive perspective, we take language models' heuristic performance as their potential to learn human-like good-enough performance in language processing. this study creates a goodenough language processing evaluation dataset, gelp. we explore what architectural features contribute to models' good-enough language processing, focusing on the numbers of layers and selfattention heads. the model evaluation reveals that models with fewer layers and/or heads exhibit a good-enough performance in a similar way as a full model. this result leads us to conclude that the shallow architecture makes the models engage in an underspecified syntactic analysis. in contrast, the role of the self-attention mechanism is unclear. we leave open its exact role in the model's good-enough language processing. we hope that this study will foster more psycholinguistically oriented research on language models' good-enough performance.