Curriculum learning for language modeling

Daniel CamposarXiv 2021

Abstract

This paper investigates the efficacy of Curriculum Learning (CL) in the context of language model pre-training. By training models on progressively difficult linguistic examples, the authors explore whether "starting simple" improves efficiency or performance. While CL offers marginal gains on small datasets, it fails to outperform standard random sampling as data scales, suggesting that stochastic sampling remains the most robust strategy for large-scale language modeling.

Introduction

Training state-of-the-art language models (LMs) like BERT or GPT is notoriously expensive and computationally demanding. Most research focuses on scaling—simply adding more data and more parameters—but this paper explores efficiency through Curriculum Learning (CL).

CL is a training strategy inspired by human education where a student starts with simple concepts and progresses to complex ones. While CL has been a "silver bullet" for improving speed and performance in Computer Vision and Neural Machine Translation, its impact on the general-purpose pre-training of language models has remained an open question.

Methodology

The researchers implemented a Competence-Based Curriculum (CBC) framework. In this setup, the model has a "competence" score that increases over time. At any given training step, the model only samples data from a subset of the corpus that matches its current "reading level."

To define what makes a sentence "easy" or "hard," they tested eight different linguistically motivated difficulty proxies:

  • Sentence Length: Shorter is easier.
  • N-gram Difficulty (Unigram, Bigram, Trigram): Sentences with rare words or unusual sequences are harder.
  • Part-of-Speech (POS) Diversity: Sentences with a wider variety of word types are more complex.
  • Dependency Tree Depth (DEP): Sentences with complex grammatical structures are harder.
  • Random Curriculum: Difficulty scores are assigned randomly to test if the structure of the curriculum matters more than the content.
  • No Curriculum: A baseline where the model can see any data from the start.

Datasets

The models were trained and evaluated on corpora of varying sizes to observe how curriculum benefits scale with data volume.

Corpus statistics for Wikitext-2, Wikitext-103, and the 1B Word Benchmark.
  • Wikitext-2: A small dataset (2.5 million tokens) used to test CL in data-constrained environments.
  • Wikitext-103: A larger, more standard benchmark (103 million tokens).
  • GLUE Benchmark: A collection of diverse natural language understanding tasks used to measure transfer performance.

Key Results

The study revealed a stark contrast between small-scale and large-scale training regimes.

Small Scale (Wikitext-2)

On the small Wikitext-2 dataset, curriculum methods showed a clear advantage. Strategies using Dependency Tree depth (DEP), Unigrams, Trigrams, and Sentence Length all achieved an overall GLUE score of 0.63, outperforming the standard baseline of 0.59.

GLUE benchmark results for various curriculum methods trained on Wikitext-2.

Large Scale (Wikitext-103)

The benefits of curriculum learning effectively disappeared as the dataset grew. On Wikitext-103, the unmodified baseline achieved the highest overall GLUE score of 0.67. All curriculum-based methods lagged behind, scoring between 0.64 and 0.66. This suggests a "scaling wall" where the diversity and volume of data in larger corpora naturally provide the necessary training signals, making artificial ordering redundant or even harmful.

Discussion

Perplexity vs. Transfer Performance

A surprising finding was the massive disconnect between pre-training performance and transfer ability. No implementation of CBC was able to match the low perplexity (next-word prediction loss) of standard stochastic sampling. On Wikitext-103, the baseline reached a perplexity of 36, while CL methods often struggled to get below 1,000. Despite this "failure" in pre-training loss, CL models often performed comparably or better on GLUE tasks at small scales, suggesting that optimizing for perplexity isn't the only path to learning useful features.

The Role of Randomness

Interestingly, a "random curriculum"—where the training regime has a structured progression but difficulty assignments are arbitrary—was often just as effective as linguistically motivated ones. This implies that the benefit seen in small datasets might stem from the sampling mechanics of the curriculum (e.g., repeating certain subsets of data) rather than the linguistic "easiness" of the sentences.

Conclusion and Future Work

Curriculum learning is highly sensitive to hyperparameters, such as the initial competence level and the rate of increase. The "distribution shift" caused by CL—where the model sees a biased subset of data early on—seems to hinder its ability to minimize loss on the full dataset. While CL shows promise for low-resource settings, standard random sampling remains the superior choice for large-scale pre-training. Future research may explore if CL is more effective for model compression or if scaling model architecture alongside data difficulty yields better results.

Summary updated

BibTeX
@misc{campos2021curriculum,
  author = {Daniel Campos},
  title = {{Curriculum learning for language modeling}},
  year = {2021},
  eprint = {2108.02170},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.02170},
}
Figure