Skip to main content
QUICK REVIEW

[Paper Review] Memorization Without Overfitting: Analyzing the Training Dynamics of Large Language Models

Kushal Tirumala, Aram Markosyan|arXiv (Cornell University)|May 22, 2022
Topic ModelingComputer Science45 citations
TL;DR

The paper empirically analyzes how memorization unfolds during training in causal and masked language models across model sizes, datasets, and training conditions, showing that larger models memorize faster and memorize more before overfitting, with distinct memorization dynamics across parts of speech and forgetting behavior.

ABSTRACT

Despite their wide adoption, the underlying training and memorization dynamics of very large language models is not well understood. We empirically study exact memorization in causal and masked language modeling, across model sizes and throughout the training process. We measure the effects of dataset size, learning rate, and model size on memorization, finding that larger language models memorize training data faster across all settings. Surprisingly, we show that larger models can memorize a larger portion of the data before over-fitting and tend to forget less throughout the training process. We also analyze the memorization dynamics of different parts of speech and find that models memorize nouns and numbers first; we hypothesize and provide empirical evidence that nouns and numbers act as a unique identifier for memorizing individual training examples. Together, these findings present another piece of the broader puzzle of trying to understand what actually improves as models get bigger.

Motivation & Objective

  • Understand how memorization evolves during training across model sizes and datasets.
  • Quantify how dataset size, learning rate, and model size affect memorization dynamics.
  • Identify which linguistic components (parts of speech) are memorized faster and why.
  • Characterize forgetting dynamics during training and its relation to model scale.

Proposed method

  • Define exact memorization M(f) as the proportion of contexts where the model's argmax matches the ground-truth token.
  • Train Transformer LMs of sizes 125M to 13B on causal and masked LM tasks using WikiText-103 and RoBERTa datasets.
  • Measure T(N, τ): minimal times each training example must be seen for memorization to reach τ, and T_update(N, τ) for per-update memorization.
  • Conduct controlled experiments by varying model size, dataset size, learning rate, and introducing unique identifiers to training examples to study memorization speed.
  • Analyze forgetting through a forgetting baseline by inserting a validation batch as a “special batch” and tracking memorization degradation over training.
  • Examine part-of-speech-specific memorization using POS tagging to compare R(p) and R_mem(p).
  • Explore the impact of dictionary size and unique identifiers on memorization dynamics.

Experimental results

Research questions

  • RQ1How does model size affect the speed and extent of memorization during training?
  • RQ2How do dataset size and learning rate influence memorization dynamics across causal and masked language models?
  • RQ3Do nouns and numbers memorize faster, and does introducing unique identifiers accelerate memorization?
  • RQ4What are the forgetting dynamics during training and how does the forgetting baseline scale with model size?
  • RQ5How do parts of speech relate to memorization rates in language models?

Key findings

  • Larger models memorize training data faster, with T(N, τ) decreasing as N increases across τ values.
  • On RoBERTa-scale datasets, T_update(N, τ) also decreases with model size for both causal and masked models.
  • Memorization before overfitting increases with model size, indicating memorization is not solely due to overfitting.
  • Introducing unique identifiers to training examples (or enlarging the dictionary) accelerates memorization, with explicit identifiers further boosting speed.
  • Nouns and numerals are memorized faster than other parts of speech, suggesting unique identifiers and noun/number proxies facilitate memorization.
  • Forgetting curves converge to a baseline that increases with model scale, indicating larger models forget less over training; forgetting baseline is robust to data batch order and is affected by repetition strategies.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.