How (Non-)Optimal is the Lexicon? (2021)

Abstract: The mapping of lexical meanings to wordforms is a major feature of natural languages. While usage pressures might assign short words to frequent meanings (Zipf’s law of abbreviation), the need for a productive and open-ended vocabulary, local constraints on sequences of symbols, and various other factors all shape the lexicons of the world’s languages. Despite their importance in shaping lexical structure, the relative contributions of these factors have not been fully quantified. Taking a coding-theoretic view of the lexicon and making use of a novel generative statistical model, we define upper bounds for the compressibility of the lexicon under various constraints. Examining corpora from 7 typologically diverse languages, we use those upper bounds to quantify the lexicon’s optimality and to explore the relative costs of major constraints on natural codes. We find that (compositional) morphology and graphotactics can sufficiently account for most of the complexity of natural codes—as measured by code length.

## introduction communication through language can be modeled under shannon's classic communication framework @xcite . under this perspective, linguistic utterances are codes-which need to be decoded by a receiver (listener) who is interested in the message (meaning) they encode. famously, @xcite posited that language users shape these codes so to accommodate the principle of least effort. the most widely discussed and investigated empirical evidence for this feature is the so-called law of abbreviation, an ostensive negative correlation between word frequency and word length @xcite . communication effort decreases by encoding frequent messages in shorter words. @xcite . the distance between the baselines can be thought of as the cost of each constraint added to the system. this correlation, however, is characteristically modest. there are many instances of short lowfrequency words, like wen and jib in english, 1 and long frequent words, like happiness and anything. while the lexicon might be shaped by economy of expression, it is clearly not fully optimized for it. there are multiple-possibly competing-reasons why this could be the case. first of all, the sequence of speech sounds, signs, or orthographic characters that serve as building blocks in a language comply with specific rules. these are referred to as phonotactics (in the case of speech sounds) and graphotactics (in written language). 2 on top of these constraints, the lexicons of many languages of the world re-use subparts of words; these sub-parts can be productively composed to produce new meanings-which is referred to as morphological composition. this largely determines the family of wordforms associated with a given basic meaning-for instance, given the wordform health and its meaning, the nominal morphology of english readily provides the forms for many of its derived meanings, including healthy, unhealthy, healthier, etc. beyond these well-attested constraints, it might be argued that the negative correlation between the length of a word and its frequency is not the locus of optimization given the economy of expression pressure. instead, wordforms might be efficiently encoding meanings based on their contextual surprise rather than frequency @xcite . finally, there is no reason to expect lexicons to be fully optimized for the economy of expression-this factor might steer languages in a given direction, but there is certainly room for non-compliance. languages are, after all, not engineered systems but cultural artifacts. in this paper, we examine how marginally nonoptimal the lexicon is by taking the vantage point of the law of abbreviation. we develop a method to quantify the role of different linguistic constraints on determining wordforms, and we produce estimates on how compressible the lexicon could be in their absence (including morphology and phonotactics/graphotactics). we thus define an upper bound for the compressibility of a lexicon optimized purely for word length efficiency. ## (non-)optimality in the lexicon as stated above, our notion of optimality is derived from zipf's principle of least effort in the form of the law of abbreviation @xcite @xcite . however, this is by no means the only theory under which wordforms are optimized for encoding their messages. one influential hypothesis is that languages optimize for uniform information density @xcite @xcite )-roughly keeping the amount of information conveyed in a unit of time constant. in an information-theoretic setting, this would be equivalent to maximizing the use of a noisy channel between the speaker and an audience-keeping the transmission rate close to the channel capacity. under this view, it is not necessarily the case that words should be as short as possible. rather, words that are infrequent or typically less predictable in context should be longer and take more time to produce-perhaps because the increased duration makes them more robust to noise. consistent with this perspective, it has been shown that, in production, words with higher information content take longer to pronounce @xcite @xcite . additionally, words which are typically predictable in context are shorter than words which are less predictable in context @xcite . on another note, a purely coding-theoretically efficient language could make the lexical codes context dependent @xcite , since context often disambiguates words @xcite . additionally, the meaning or message being conveyed by a given word might bias its form. within languages, there seems to be a pressure for more semantically similar words to also be more phonologically similar @xcite @xcite . across languages, words for the same referents exhibit detectable patterns in term of their phonological makeup @xcite , phonotactics @xcite , as well as word length @xcite -this is driven by semantic features such as size, quality or complexity. finally, there is a cross-linguistic tendency for lexicons to place higher surprisal in word-initial segments @xcite @xcite ) making words more constrained in their choice of final segments. these aspects of language might also collide with a purely zipfian conception of lexicon optimality. in this work, however, we consider optimality exclusively in the zipfian sense of compressibility, and we ask how far natural language lexicons are from accommodating to this paradigm. we build a number of models that differ in relation to whether they accommodate to the law of abbreviation, to compositional morphology and to graphotactics. the comparison among these systems allows us to explore the extent to which each part of the linguistic system contributes to the overall cost of the linguistic code. it should be noted, though, that the consequences of unmodeled sources of structure in the lexicon (such as persistent sound-meaning associations or the adaptation of the code to surprisal effects) will forcibly be confounded with the overall lack of fit between our models and the data. the morphological cost -i.e. the cost of morphology to a code's length-is associated with the fact that, across many languages, words are often constructed of meaningful sub-parts that are productively reused across the lexicon. practically, this means that the wordforms of different meanings might not be independent if they overlap in a partic-ular dimension that is captured by the morphology of the language. for instance, most wordforms that express two or more referents of a kind share a word-final suffix -s in english (towers, cats, ideas, etc). we treat this cost by considering optimal codes where the basic unit in the lexicon is not the word but sub-pieces, as determined by the unsupervised morphological parser morfessor @xcite . 3 under this regime, a word like unmatched is parsed into the tokens un, match, and ed. the graphotactic cost concurrently imposes a set of additional constraints, determining which sequences of grapheme segments can constitute a valid wordform in a given language. while the main driver of these lexical constraints is actually phonotactics-which imposes rules dictating the possible phoneme sequences-we focus on graphotactics because our object of study is written language corpora. the degree to which phonotactics and graphotactics mirror each other vary substantially across languages; thus, in this work (which uses corpora from wikipedia) we make our claims about language in the written modality and leave it to future work to generalize this work to the phonological domain. this could be done by applying the same method to phonemic representations of words. ## a coding-theoretic view of the lexicon this paper treats the lexicon, which we define as a set of pairs: @xmath0, w n )} n @xmath1. in general, this set will be infinite; m n refers to a lexical meaning, taken from an abstract set m, and w n refers to a wordform, taken from σ * , the kleene closure of a grapheme alphabet σ. 4 when the exact index is unnecessary in context, we will drop the subscripted n; and we make use of uppercase letters to refer to random variables (e.g. m or w ) where necessary. we will write meanings in typewriter font, e.g. cat, and wordforms in italics: cat (english), kissa (finnish). viewing the lexicon from a coding-theoretic perspective, we consider the mapping from meaning to form as a code: c : @xmath2. every language comes endowed with a natural code c nat , which is the observed mapping from lexical meanings to forms. as an example, consider the meaning cat and its finnish form: we have c nat (cat) = kissa. the topic of interest in this paper is the efficiency of language's natural codes. the space of meanings and lexical ambiguity. the space of meanings m is non-trivial to define, but could be operationalized as r d , which is infinite, continuous and uncountable (pilehvar and camacho-collados, 2020). meanwhile, the space of wordforms σ * is also infinite, but discrete and countable. as such, many meanings m n must be mapped to the same form, resulting in lexical ambiguity. see @xcite for a longer discussion on these operationalizations. in this work, though, we do not engage with such ambiguity, considering m as an abstract set of meanings, each of which defined by a distinct wordform-i.e. the code c nat is a bijection. a consequence of this strategy is that we take the space of meanings to be infinite, but discrete and countable; we only distinguish as many meanings as there are words, therefore, we end up with a countable number of meanings. additionally, by considering a distinct meaning m n for each wordform w n in the lexicon, we only consider codes with as much lexical ambiguity as in the original language. 5 ## modeling the unigram distribution and its challenges zipf's (1935) law states that the frequency of a word in a corpus is inversely proportional to its rank, resulting in a power-law distribution where a small subset of the words dominate the corpus. as such, naïvely training a character-level model on a language's tokens (i.e. predicting non-contextual wordforms with their natural corpus frequencies) would be unlikely to capture morphological regularities @xcite . furthermore, it would burden the model to learn a mostly arbitrary assignment between form and frequency. as an example, the english verb make is much more common than the nouns cake and lake, even if graphotactically they may be equally probable. a closer inspection of english shows that most frequent words tend to come from closed lexical classes including articles, pronouns, prepositions, and auxiliaries, such as the, of, it and be @xcite . these words tend to be short and manifest fossilized graphotactics (and phonotactics) as well as a more abundant prevalence of otherwise rare segments, such as the voiced and voiceless dental fricatives (orthographically expressed with th). these rare segments would be overrepresented in such a naïve training regime, making it hard for the character-level model to correctly represent the language's graphotactics. in order to address the problem of skewed frequencies, we use a novel neuralization of @xcite two-stage model to capture the unigram distribution. this model consists of two components: a wordform generator and a token frequency adaptor. the generator is a characterlevel model which produces wordforms, for which we use an lstm; foot_5 this model should place similar probability mass on graphotactically "good" wordforms, such as make, cake, and lake. meanwhile, the adaptor sets the frequency with which these wordforms will appear as tokens. following goldwater et al., we base our adaptor on the pitman-yor chinese restaurant process (pycrp; @xcite , which allows the adaptor to model a power-law distribution; this model is then responsible for capturing the fact that make is a more frequent token than cake, and lake. ## results the average length for each considered code is presented in fig. 3 and tab. 1. as expected, we find that the average code length across natural languages is shorter than the shuffle condition and longer than the optimal condition. interestingly, the codes produced by the other conditions investigated here also have the same identical order across all analyzed languages. adding morphological constraints on the code incurs no more than one extra character over the optimal condition-except for finnish, for which the cost of morphology is slightly above one character. notably, the use of unsupervised morphological segmentation may introduce some noise into our measurements. consistently with our expectations, though, yoruba (a morphologically poor language) pays the smallest cost for its morphology, while finnish (a morphologically rich one) pays the largest. bpe and wordpiece systematically produce shorter codes than morfessor. this is sensible, since the first two would keep most frequent wordforms intact, generating a unique code for each of them. this would lead to codes in which the morphological productivity of frequent and infrequent words differ, amplifying frequency effects encountered in natural languages @xcite . the graphotactic condition yields systematically longer codes than the morphological one, although here there are important differences between languages: english, hebrew and indonesian have similar code lengths for both code constraints; in the other languages the graphotactic code is substantially longer than the morphological one. in all cases, the natural code is longer than the one with both graphotactic and morphological constraints-suggesting languages are not optimally compressed, even when accounting for these constraints. that said, all of the natural languages are considerably more compressed than a lexicon produced by randomly reassigning wordforms. ## discussion and conclusion in this paper, we introduced a model-based strategy to assess the relative contribution of different constraints on word (code) length at large. in particular, we evaluated how much natural languages differ from systems optimized for zipf's law of abbreviation. our proposed model improves upon an old method used to consider the efficiency of the lexicon: random typing models @xcite @xcite . miller introduced the idea of monkeys typing randomly on a keyboard and analyzed the properties of its resulting language. the monkeys' text, however, has no morphological or graphotactic constraints (but see @xcite and does not follow a language's unigram distribution @xcite . as such, it cannot directly encode the same meanings or messages as the original language. our results show that, while natural languages do tend to map frequent messages to shorter words, the magnitude of this effect varies widely across our set of diverse languages. notably, the distance between natural languages and the optimal codes is larger than the distance between natural languages and their corresponding shuffled code (see fig. 4 ). in other words, natural codes are closer to not being optimized (in the zipfian sense) than to being maximally compressed. that said, our morphological and graphotactic baselines, when combined, yield codes that display mean code lengths that are (in most cases) closer to the natural code than to the optimal (see fig. 5 ). if our models are indeed able to capture the true patterns in our data, then this means that (compositional) morphology and graphotactics, along with the law of abbreviation, are sufficient to account for most of the length of natural codes-as observed in real languages. graphotactic (primarily) and morphological constraints are enough to derive a code with a similar complexity to that of natural languages, which suggests the other factors discussed above (associated with, e.g., surprisal and non-arbitrary form-meaning mappings) likely play a more modest role in pushing natural languages away from the optimal zipfian code. the optimality of the lexicon occupies a major place in the scientific study of the structure and functional evolution of languages @xcite @xcite . we hope that the method presented here-which allows for a more precise quantification of the (non-)optimality of lexiconswill be used to further the goal of understanding why languages are structured in the ways that they are, while offering insight into the functional tradeoffs that underlie language variation and change.