The Grammar-Learning Trajectories of Neural Language Models

Leshem Choshen, Guy Hacohen, Daphna Weinshall, Omri Abend

Abstract

The learning trajectories of linguistic phenomena in humans provide insight into linguistic representation, beyond what can be gleaned from inspecting the behavior of an adult speaker. To apply a similar approach to analyze neural language models (NLM), it is first necessary to establish that different models are similar enough in the generalizations they make. In this paper, we show that NLMs with different initialization, architecture, and training data acquire linguistic phenomena in a similar order, despite their different end performance. These findings suggest that there is some mutual inductive bias that underlies these models' learning of linguistic phenomena. Taking inspiration from psycholinguistics, we argue that studying this inductive bias is an opportunity to study the linguistic representation implicit in NLMs. Leveraging these findings, we compare the relative performance on different phenomena at varying learning stages with simpler reference models. Results suggest that NLMs exhibit consistent "developmental" stages. Moreover, we find the learning trajectory to be approximately one-dimensional: given an NLM with a certain overall performance, it is possible to predict what linguistic generalizations it has already acquired. Initial analysis of these stages presents phenomena clusters (notably morphological ones), whose performance progresses in unison, suggesting a potential link between the generalizations behind them.

Introduction

In human development, children acquire linguistic skills in a surprisingly predictable order. However, in the world of AI, neural language models (NLMs) are often treated as "black boxes" evaluated only on their final performance. This research addresses a fundamental question: Do different NLMs learn language in the same way? If models share a consistent "learning trajectory," we can begin to understand the inherent inductive biases of neural architectures and identify stages of "cognitive" development.

To investigate this, the researchers adopted a behavioral approach, tracking model progress through "checkpoints" during training. For each checkpoint, they calculated a 67-dimensional performance vector based on the BLIMP (Benchmark of Linguistic Minimal Pairs) dataset, which contains 67,000 pairs of sentences testing specific grammatical rules. By comparing these trajectories across different initializations, architectures (such as GPT-2 and TransformerXL), and training datasets (WikiBooks, GigaWord, etc.), the study reveals the underlying patterns of machine language acquisition.

Universal Learning Trajectories

The most striking finding is the consistency of the learning order. Different initializations of the same model (varying only the random seed) correlate at levels greater than 0.9 after a brief warmup period. While the training dataset has some influence early on, its effect decreases as training progresses, and the architecture's internal learning dynamics eventually dominate the trajectory.

Correlation of learning trajectories across different initializations (Init) and training datasets (Data).

This consistency suggests that learning is largely one-dimensional. If a model's average score on a grammar benchmark is known, one can accurately predict which specific linguistic generalizations it has already acquired. Models typically progress from mastering phenomena solvable with simple word frequency (unigrams) to local context (bag-of-words), before finally developing sensitivity to complex hierarchical syntax.

Comparative Analysis and Human Alignment

While NLMs become more similar to humans as they improve, the correlation remains relatively low, saturating at under 0.5. NLMs are significantly more similar to each other than they are to human learners. This implies a shared inductive bias inherent to transformer-based architectures that differs from human biological biases.

Comparison of learning trajectories across various off-the-shelf models and human learners (a), alongside the consistency of GPT-2 checkpoints at different training stages (b).

Interestingly, the study observed "U-shaped" learning curves for certain tasks, where performance temporarily decreases as the model improves overall. This suggests that as models move from simple heuristics to more complex patterns, they may temporarily "unlearn" certain rules or develop new biases. Spectral clustering further revealed that certain phenomena, particularly morphological ones, progress in unison, suggesting the model utilizes shared latent representations to solve related linguistic challenges.

Conclusion and Future Work

This work establishes that NLMs follow a remarkably stable developmental path. Future research should expand this analysis to morphologically richer languages beyond English and explore how different training objectives, such as masked language modeling, might alter these trajectories. Understanding the mechanics of "harmful generalizations" that cause temporary performance deterioration remains a key area for developing a broader theory of neural linguistic development.

Summary updated

BibTeX
@inproceedings{choshen2022grammar,
  author = {Leshem Choshen and Guy Hacohen and Daphna Weinshall and Omri Abend},
  title = {{The Grammar-Learning Trajectories of Neural Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.acl-long.568},
}
Figure