Fifty shapes of BL i MP : syntactic learning curves in language models are not uniform, but sometimes unruly (2024)

Abstract: Syntactic learning curves in LMs are usually reported as relatively stable and power law-shaped. By analyzing the learning curves of different LMs on various syntactic phenomena using both small self-trained llama models and larger pre-trained pythia models, we show that while many phenomena do follow typical power law curves, others exhibit S-shaped, U-shaped, or erratic patterns. Certain syntactic paradigms remain challenging even for large models, resulting in persistent preference for ungrammatical sentences. Most phenomena show similar curves for their paradigms, but the existence of diverging patterns and oscillations indicates that average curves mask important developments, underscoring the need for more detailed analyses of individual learning trajectories.

## introduction the training goal of modern neural language models is simple: optimizing the prediction of the next (or a masked) token. during optimization over enormous numbers of such tokens, complex linguistic knowledge emerges as a "side effect". but how is this knowledge and its learning trajectory characterized? existing empirical evidence seems to suggest that morphological, syntactic and basic semantic knowledge in language models is acquired quite early during pre-training, normally with a power-law like increase over the first 5-15% of the first training epoch (inter alia @xcite @xcite . however, evaluation protocols that assess concrete learning trajectories of lms are only beginning to emerge. current probing approaches often mask developmental difficulties by reporting averaged scores over large and varied evaluation data sets, although, as @xcite veraging can mask important aspects of learning". the learning curves -plots of task performance over the training period -are frequently assessed in a purely qualitative way, with little common best practices as to which training phases and how many epochs are to be described @xcite . in this paper, we take first steps towards a more systematic analysis of the concrete learning curves for a variety of linguistic phenomena. we train a suite of small lms, checkpointing them logarithmically during their first training epoch, test them on the blimp probing suite @xcite and compare them to recent larger lms that provide similarly-spaced checkpoints. we analyze the resulting learning curves qualitatively (in more detail than previous research), but also quantitatively (by categorizing and clustering shapes). in doing so, we are able to discern which phenomena are easier to learn and how trajectories differ between smaller and larger language models. moreover, we investigate whether similar phenomena also exhibit similar trajectories or whether averaged learning curves obstruct some of the underlying trade-offs and instabilities of linguistic learning in lms. we find that when looking at the individual blimp paradigms and their learning curves, a more nuanced picture of how they are (not) learned emerges. while most curves do follow the prototypical power law, completely stable curves and to a lesser degree s-and u-shaped curves are also frequent. however, many paradigms also feature illbehaved curves that never converge to stable performance or decrease over training. inside the broader phenomenon sets, we find sheaves of curves for those mastered earlier, whereas the curves for hardly mastered phenomena exhibit strong differences. moreover, larger models generally converge towards more power-law curves. as such, our study puts some previous results into question -certain syntactic phenomena seem to be hardly learnable even by large language models trained on massive amounts of data, and even good performance at early training stages can deteriorate again after the model is confronted with more linguistic data. ## related work learning curves in ml and humans every ml training run has a learning curve (target function or loss function over time), but these curves have not received much scrutiny and are often assumed to follow a power law, despite varying significantly depending on the task @xcite . @xcite review the variety of learning curve shapes, identifying both well-behaved, steadily increasing curves and ill-behaved curves that show degrading performance or oscillation. well-behaved, monotonic curves are the common targets of ml research @xcite , often categorized using power law or exponential functions. in reality, not every learning curve is monotonically increasing. exceptions include phase transitions with sudden performance boosts @xcite , peaks @xcite , dips @xcite , and curves that oscillate through several maxima and plateaus @xcite . thus, the space of possible curve shapes is empirically much wider than often theoretically assumed. human learning can also be characterized by learning curves, abstracted to measurable performance on a task, with most empirical studies showing that human learning typically follows power laws @xcite . in language acquisition, some phenomena deviate from typical patterns. for example, past tense acquisition often follows a u-shaped curve: initially, children correctly produce high-frequency irregular and regular past forms item-based @xcite . as they abstract rules, they overregularize, applying regular rules to irregular verbs previously produced correctly @xcite . performance then gradually recovers to adult-like levels. another common shape is the s-shaped logistic curve, where slow initial learning is followed by a rapid onset and then slow final gains. examples are, e.g., vocabulary acquisition @xcite or the production frequency of non-finite sentences @xcite . however, evidence on the prevalence of and the complex trade-offs between such curves is still rather meagre. due to a lack of empirical data, combined with small sample sizes, limited cross-linguistic studies, and the study of very narrowly defined phenomena, some scholars argue that these effects are much weaker than assumed (e.g. @xcite . learning trajectories in lms in their seminal paper on neural networks learning the english past tense, @xcite report u-shaped learning over one epoch of training (although this development was mostly caused by their specific re-ordering of training instances, cf. @xcite . in a modern follow-up, @xcite find a more oscillating pattern in their lstm-model for past-tense acquisition, although they report scores across several epochs, which hinders comparability. shifting the attention to the current standard in nlp, language models, it becomes apparent that investigations into learning curves are not (yet) standard practice in evaluating language models, (primarily due to the need for fine-grained checkpointing, which only few lms provide). the more general practice of probing over time, however, is somewhat established. @xcite and @xcite show that when comparing a variety of probing benchmarks on masked language models, syntactic information is generally acquired earlier than semantic, pragmatic and commonsense knowledge (cf. also @xcite . besides, syntactic information is also commonly located in earlier layers of llms @xcite . @xcite analyze multiple checkpoints of the multibert lms @xcite . they also find that morphological and syntactic structure is acquired very early by the models (after ~10% of the first training epoch), whereas semantic, pragmatic and general world knowledge emerge later. their logarithmicallyscaled curves still exhibit interesting, mostly sshaped curves with a rapid take-off after a period of little learning. this is also in line with @xcite , who find a sudden drop in training loss in masked lm training which aligns with the emergence of syntactic attention structure in attention heads. turning to the focus of our experiments, minimal pair tests, several additional empirical studies can be reported. @xcite derive their own "zorro" benchmark from blimp by excluding phenomena not found in child-directed speech. they test an extremely small (5m parameters) masked lm and show that, generally, scores improve across training. they mostly show power law-like development, with the greatest improvements occurring in early stages of training. yet, this does not apply to all included phenomena -some are never learned well (e.g. island effects or anaphor agreement). these show diminishing accuracy after early performance peaks -a fact not further discussed. @xcite also examine blimp development during the training of a masked lm and find that their curves, which categorize phenomena more coarsely, converge to stable performance quickly, approximating power-law curves after about 20% of pre-training. morphological and short-distance syntactic phenomena are mastered fastest, while more complex syntactic aspects, like island effects, take longer. this pattern holds for other linguistic probes, but benchmarks testing common sense or reasoning exhibit unstable behavior with oscillating curves and performance dips. @xcite take a similar approach with autoregressive lms (gpt-2, trans-formerxl). they find that grammatical phenomena are acquired in a stable order along classical linguistic layers. however, not all curves show monotonic improvement; some syntax and morphology paradigms never reach stable performance and deteriorate over training. this behavior is consistent across different initializations of both architectures but does not apply to phenomena involving semantic knowledge. ## discussion our results indicate that larger models perform better, exhibiting higher blimp scores, fewer illbehaved curves, and more power-law curves, aligning with existing literature on scaling dynamics @xcite . in our self-trained llama models, improvements are seen both with increased parameters and more data, with the combination leading to even greater enhancement. interestingly, the smallest pythia model, despite being trained on significantly more tokens compared to the llama models, performs worse on blimp. this suggests that in the very small pythia model, the real learning of linguistic features only begins after a large number of tokens are seen, whereas in our smaller llama models, this learning occurs much earlier. a possible explanation for this discrepancy could be the higher quality of the datasets used to train our llama models (babylm 10m and 100m), which offer a wider variety of genres and registers, compared to the web-sourced "the pile" dataset used for all pythia models. our findings largely confirm, but also revise and expand upon, earlier reports of rapid syntax learning in language models. many phenomena are acquired quickly (as in @xcite some peculiarities found in our analyses might be caused by blimp itself. for example, the principle_a_case_1 paradigm, which exhibits almost only stable and perfect learning curves, always features a possessive pronoun (e.g. her) in the grammatical sentence and a reflexive (e.g. herself ) in its ungrammatical counterpart. however, possessives are much more frequent in language than reflexives (e.g. her: 1.517.948 tokens vs. herself 56.741 tokens in ukwac, @xcite , so it is reasonable to assume that a sentence containing a reflexive always has a higher perplexity. for a randomly shuffled training corpus that is representative and balanced (in the sense of @xcite , these patterns should be learned very quickly from little data and thus have such a stable learning curve, whereas other phenomena that are less tied to frequence differences might not use such easy surface heuristics. similar criticisms, e.g. about problems with the quality of example sentences, have been put forward by, inter alia, vazquez martinez et al. ( 2023 ). an ml-based explanation for such peculiarities is that models pick up orthogonal features -features that improve performance on some paradigms within a phenomenon but degrade performance on others -during the learning process @xcite . it remains open whether ml features must necessarily correspond to those considered important in linguistic theory. the presence of mirrored curves/turning points also supports the hypothesis of orthogonal features. finally, blimp's choice of target phenomena is heavily influenced by generative, syntax-centric linguistics. other contemporary linguistic theories (e.g. usage-based linguistics, construction grammar) might not find these phenomena particularly meaningful. in construction grammar, argument structure is determined by constructional patterns, allowing verbs to take new arguments and convey new meanings @xcite . therefore, perfect performance on blimp may not necessarily be a desirable goal, as it might not reflect the flexible and creative language use characteristic of humans. additionally, grammaticality is a contested notion, difficult to measure, often gradient, and strongly influenced by socio-cultural factors @xcite . consequently, stable curves might only be desirable for phenomena that exhibit less gradience in human evaluation, whereas worse scores and eternal oscillations might entail better linguistic generalizations for less clear-cut paradigms. ## conclusion our study set out to characterize linguistic learning in language models through an analysis of learning curves. we conclude that while the rapid syntax learning assumption from earlier studies generally holds, it also needs revision. when averaging across many phenomena and paradigms, performance gains appear to follow a prototypical power law. however, this is not true when examining individual phenomena, many of which exhibit illbehaved curves. stability in blimp performance is often an illusion; stable average curves are based on oscillating and heavily changing minimal pair paradigms within them. with larger models and more data, there is a general shift towards greater stability and more power law curves, but even in very large models, not everything works perfectly. on a meta-level, our study demonstrates that analyzing learning curves is a powerful tool for better characterizing learning processes. many benchmarks include systematically organized subphenomena, and our methodology can illuminate specific performance developments and complex trade-offs during the learning process. this highlights the need for the community to develop best practices for reporting learning curves, categorizing their shapes, and determining the appropriate granularity for analysis across one or several epochs. researchers should be cautious with their interpretations, as the complexity and variety of learning curves suggest a more nuanced approach is necessary. future work could expand on our findings by exploring how controlling for distributions of linguistic data, like @xcite describe, changes the curves and learning success, which would further enhance our understanding of language model learning dynamics in a more restricted setting.