Entrenchment Matters: Investigating Positional and Constructional Sensitivity in Small and Large Language Models (2023)

Abstract: The success of large language models (LMs) has also prompted a push towards smaller models, but the differences in functionality and encodings between these two types of models are not yet well understood. In this paper, we employ a perturbed masking approach to investigate differences in token influence patterns on the sequence embeddings of larger and smaller RoBERTa models. Specifically, we explore how token properties like position, length or part of speech influence their sequence embeddings. We find that there is a general tendency for sequence-final tokens to exert a higher influence. Among part-of-speech tags, nouns, numerals and punctuation marks are the most influential, with smaller deviations for individual models. These findings also align with usage-based linguistic evidence on the effect of entrenchment. Finally, we show that the relationship between data size and model size influences the variability and brittleness of these effects, hinting towards a need for holistically balanced models.

## motivation for usage-based approaches to lms established evaluation suites for grammatical abilities @xcite @xcite often work by focusing on models' preferences for grammatical utterances over their ungrammatical counterparts. these techniques are inspired by a rather strict generative view of language, which assumes a pre-endowed human language faculty that generates grammatical strings of words from a hypothesized mental hierarchical structure @xcite . if the goal of neural language modelling was to recreate this, then only testing on phenomena like binding or filler-gap relations would be sufficient. however, alternative approaches to linguistic theory question these notions. the usage-based approach sees grammar as a fuzzy mental model of language that is constantly shaped and re-shaped by domain-general cognitive mechanisms, such as automatization, entrenchment or analogy, through input and usage @xcite . the resulting mental representations in the form of linguistic constructions are influenced by frequency effects. for example, forms that are perceived and produced more often are more deeply entrenched in mental grammar @xcite . on the syntactic level, such effects have syntagmatic and paradigmatic dimensions. the syntagmatic dimension refers to which elements occur sequentially, whereas the paradigmatic dimensions is concerned with the variation possible for certain positions/slots in syntagms. constructions exhibit different levels of such variation. for example, whquestions like where is the butter? only have a limited number of options for the question word (first slot) or the auxiliary (second slot), whereas the last slot can be filled by any noun. these variation effects manifest in different phenomena. research from child-directed speech shows that spoken language is organized around lexical frames, lexically restricted sentence beginnings that occur with a much higher frequency than their lexically diverse counterparts, and which differ for syntactic construction types @xcite . while the possible linguistic variation in language production is quasi-infinite, speakers rely on highly frequent, mentally automatized combinations to initiate utterances. this preference is commonly related to ease of production, a factor that is also realized in phonetic reduction or syntactic contraction of high frequency units @xcite . such producer-oriented factors grounded in automatization and entrenchment are, however, not the only usage-based variables shaping variation in utterance production. for example, the information weight principle @xcite @xcite posits that new information and longer, "heavier" constituents in english are commonly placed at the end of utterances, which facilitates communicative ease from a hearer-oriented perspective. such aspects only play a very minor role in current approaches to evaluating the grammatical abilities and behaviour of lms, although they share many underlying concepts these models. consequently, a new, usage-based paradigm to the evaluation and analysis of llms is needed, as it enables new insights that are not derivable from current approaches. ## related work although perturbed masking, the analysis of model architecture or size, and contructionist/usage-based approaches to nlp have had little to no overlap in previous research, they have been used for insightful analyses on their own. the following paragraphs offer a short review of the current literature in these research directions. perturbed masking @xcite show that perturbed masking can be used to retrieve dependency trees, constituency trees and document-level discourse structures by inducing tree structures from influence matrices, based on tokens connected by higher influence values. while not as exact as other parsing approaches, they showed that bert-based representations already encode syntactic structure. @xcite investigate the influence of syntactic perturbations through position shifts of syntactically grouped n-grams and clauses inside sentences for english, swedish and russian bert models. they find that the perturbation patterns vary for languages with different degrees of word order flexibility and that syntactic representations can be better restored from languages with fixed word order (e.g. english). in an earlier approach, the nlize @xcite system visualized perturbation-based changes in attention heads and output weights for natural language inference tasks. the approach has not yet been used for construction-oriented analyses or the investigation of smaller models. model size differences between smaller and larger models have only begun to get systematically investigated, and existing studies have arrived at somewhat contradictory conclusions. @xcite trained a variety of roberta models with growing amounts of data, ranging from 1m to 1b tokens. they show that only larger models begin to exhibit preferences for linguistic generalizations over surface generalizations. the additional amount of data appears crucial for this difference. in contrast, the babyberta model @xcite restricts the model size, number of intermediate layers and attention heads. its training data is comparably small and was sampled from child-directed speech from the childes corpora. despite these limitations, its performance across their own evaluation suite, zorro, is similar to the much larger roberta-base model, questioning if ever larger amounts of data are actually needed, or whether the combination of hyperparameters and training data is actually responsible for emergent generalizations. construction grammar more recently, llms have also begun to be investigated from a construction grammar viewpoint. tayyar madabushi et al. ## discussion the present analysis in section 5.1 has shown that token position, word length and sequence length strongly affect sequence embeddings in terms of the influence of their lexical elements (viz. tokens). the general effect of token position on token influence is positive and stable across seven different roberta models. all models exhibit a sequenceending bias for the influence values. however, the effects exhibit variable strength. one reason for this could lie in the model size (training data, hyperparameters and model internals) -the effects (and the absolute influence values) are higher for smaller models but also for the largest model. apart from the token position, word length also has a constantly positive effect on the influence value. longer words are thus more influential. the zipfian law @xcite posits an inverse relationship between word frequency and length. as the most frequent words tend to be function words, the positive effect of word length on the influence value could also hint towards the higher informational content of longer words. @xcite find a high correlation between word length and informational content for words in english, swedish and german. the negative impact of the sentence length could be caused by more tokens having to "share" the informational content of the whole sequence, which is then divided between all of them. the positive influence of the non-imperative sentences allows a ranking of construction type influence, where the effect is the weakest for imperatives, stronger for transitives and the strongest for wh-questions. from a linguistic point-of-view, the reasons for this remain elusive. wh-questions and imperatives have more syntactically and lexically-fixed constructional schemas than transitive sentences. there is a possible connection between the functional aspects of imperatives and their reduced influence values, because they usually trigger realworld actions. in contrast, the information-driven functions of (information-demanding) questions and (information-conveying) regular transitive sen-tences could impact their tokens' influence values positively. when directly comparing the parts of speech, construction types do not seem to hold much explanatory value either. there is no systematic variation between their preferred parts of speech. in contrast, nouns, proper nouns, numerals and punctuation marks are consistently important across the types. outliers are sporadic, only the higher influence of verbs in transitive sentences embedded through models with more training data is somewhat systematic. importantly, including positional information is an active research topic in contemporary nlp (see @xcite for a survey). the present results suggest that the token influence patterns already encode positional information, although transformers are theoretically invariant to the reordering of tokens in a sequence. comparing the data from a model-oriented perspective yields interesting, although ambiguous and inconclusive results. the smallest models (in terms of architecture and training data), as well as the largest models (in terms of training data) stabilize in different ways with regard to their most influential parts of speech. the medium-sized models (in terms of training data) exhibit more variation, focus on more exotic parts of speech and the corresponding linear regressions have a somewhat lower goodness-of-fit as well as lower overall regression coefficients. crucially, it seems that for a stable and predictable functionality, a certain match between model size in terms of internal architecture (hidden layers, attention heads, etc.) is needed. small data needs smaller models, and large data needs larger models. if these factors do not match, the representations become brittle and potentially less useful for downstream tasks. the concrete make-up of such matching combinations still needs more empirical scrutiny. for example, the model with the highest r 2 , roberta-base-10m, also features the highest regression coefficients for the construction types. this relationship does not stabilize across the other model-data combinations, with no discernible reasons identifiable from the present analysis. also, as further empirical results show that the processing in lms mirrors traditional nlp pipelines along the layers of linguistic processing @xcite , the value of lms for studies of linguistic processing has been put to question @xcite . @xcite ar-gue that neural networks should also be used to investigate usage-based theories of language. the present study has added to this emergent field by showing that findings from usage-based linguistics on the importance of sequence order to language use are indeed mirrored in transformer-based lms. however, the construction-level effects proposed in linguistic literature could not be completely verified. this might be due to the very different nature of language acquisition in humans and the training procedure in anns. training only mirrors the frequency-driven aspect of usage-based linguistics. other aspects like embodied cognition or the functional dimension of language, which can also be linked to construction types (e.g. in cameron-faulkner and hickey (2011)), are missing. remarkably, function words are not as influential as lexical words. their structural predictability could be an influence factor in this case. constructions are usually conceptualized as structures with open slots. here, paradigmatic variation is much higher for lexical words, which are also more influential for models. however, the great amount of variation suggests that not all lms learn the exact same structures, with inadequate data/model matchings leading to more brittle representations. d ąbrowska (2012) argues that the grammatical systems of adult speakers do not completely align with each other -they are only similar enough to enable effective communication. judging from our results, the grammatical systems in language also feature different sensitivities to factors like word length or sequence length. this could point to learning with fitting parameter combinations being more human-adequate, as the linguistic and architectural effects on lms are gradient in nature (a feature they share with human language processing and usage). most importantly, this analysis has shown that the trade-offs between data size, model internals, and stable performance deserve further recognition and investigation, because mismatched combinations may lead to unstable or brittle representations. ## conclusion our investigation shed light on the functionality of lms from a usage-based perspective, and has shown that concepts from usage-based linguistics, like entrenchment, can be used fruitfully in the analysis of such lms. we discovered that frequencydriven factors, as well as information weight, play a significant role in these models' encodings. no-tably, the models exhibit a bias towards the ends of sequences, with the influence of tokens positively correlated with their length and information-rich parts of speech, such as nouns. however, these effects weaken in longer sequences. the high variation across our statistical models' r 2 -values hints at additional factors beyond entrenchment being at play when determining token influence on sequence embeddings. still, our findings suggest that human learners and artificial learners share similarities, as both processes are influenced by frequency and information effects. significant differences in influence values between construction types indicate a need for further research to interpret these differences linguistically. additionally, our study explored the similarities and differences between models trained with varying amounts of data. while general effects remain similar, there is increased volatility, especially in preferred parts of speech, with shrinking data size. a non-linear relationship between the amount of training data, model architecture, and effect sizes/goodness-of-fit was observed. this highlights the need for deeper investigations into the optimal combinations of data and other hyperparameters.