Don't Forget! Decomposing the Training Dynamics of Memorization in Language Models

Florian Eichin, Philipp Mondorf, Andrei Mircea, Yupei Du, Barbara Plank, Michael A. HeddericharXiv 2026

TL;DR

Researchers have developed a fine-grained way to "deconstruct" how Large Language Models (LLMs) memorize data during training. They discovered that most memorization happens incredibly early—within the first 1% of training—and is localized primarily in the model's lower layers. By identifying specific influential parameters, they were even able to surgically "delete" specific memories without damaging the model's overall performance.

What Problem Does This Paper Address?

Language models are notorious for verbatim memorization of training data, which poses significant risks for privacy and data security. While we know that larger models and duplicated data increase memorization, the actual mechanics—the when, where, and why—have remained a "black box."

Specifically, the authors investigate the difference between recitation (memorizing highly frequent sequences) and recollection (memorizing rare sequences). Why do some sequences need to be seen hundreds of times to stick, while others are remembered after just a few exposures? Understanding these dynamics is the first step toward building models that can learn to generalize without "over-memorizing."

Methods

The authors utilize and extend a framework called ExPLAIND, which decomposes a model's loss trajectory into contributions from specific training samples, parameters, and training steps.

Key methodological innovations include:

  • Polar Decomposition of Influence: They break down the influence of a training update into three intuitive factors:
  • Test Sensitivity: How much the loss changes when parameters move.
  • Update Magnitude: How much the parameters actually moved.
  • Directional Alignment: The cosine similarity between the update direction and the gradient needed to improve the prediction for a specific sequence.
  • Layer-wise Localization: They map these influences across different model layers and component types (e.g., MLP vs. Attention).
  • Causal Ablation: To prove their findings weren't just correlations, they identified the most "influential" parameters for a specific memory and zeroed them out to see if the model "forgot" that specific sequence.

Datasets

The study focuses on the Pythia model family, ranging from 160M to 6.9B parameters, trained on the Pile dataset.

  • Memorized Sequences: Sampled from an existing exhaustive dataset of 32-token sequences that Pythia models can reproduce verbatim.
  • Control Groups: They used "control" and "control-duplicated" sequences—data that appeared in the training set with similar frequencies to the memorized ones but were not successfully memorized by the final model.
  • BLiMP: Used as a benchmark to track the model's general linguistic competence and generalization during training.

Key Insights and Ideas

  • Memorization is an Early-Bird Phenomenon: A massive 80% of memorization occurs in the very early stages of pretraining, often before the model has even achieved basic linguistic generalization.
  • The "Forgetting" Problem in Recitation: Recited (frequent) sequences are actually in a constant state of being "forgotten." The rest of the training data pushes the model parameters in directions that conflict with these sequences (negative alignment). They require high duplication just to "repair" the memory faster than it degrades.
  • Recollection is "Quiet": Rare sequences that get memorized tend to exist in parts of the parameter space that are orthogonal (unrelated) to the rest of the training influences. Because they aren't being "attacked" by other data, they stay memorized even with low duplication.
  • Lower Layers are the Memory Bank: Memorization is not evenly distributed. It is heavily concentrated in the lower layers of the model, specifically within the MLP layers and certain early attention heads.
Figure 1: Pythia-1B training dynamics. We plot the loss and extractability of our sampled sequences over time and find that a lot of memorization happens early in training. Other models in App. Fig. 9.

Key Results

  • Superior Prediction: Using features from their decomposition (like self-alignment and sensitivity) allowed the researchers to predict which sequences would be memorized much more accurately than using standard cross-entropy loss alone, especially in larger models.
  • Surgical Ablation: By zeroing out a tiny fraction of parameters (as few as 0.02% of the model), they could completely ablate specific memorized sequences.
  • Single Head Impact: In smaller models, they found that intervening on a single attention head in the very first layer could significantly reduce memorization while leaving the rest of the model's capabilities intact.
Figure 2: Decomposition of update magnitude, sensitivity, and alignment. Note how recited instances show the highest self-alignment but also suffer from negative alignment with the rest of the training data.

Limitations and Future Work

While powerful, the ExPLAIND method is computationally expensive, making it difficult to run across an entire massive training dataset. The authors also noted that their current implementation omits certain optimizer states (like the first moment in AdamW), which might introduce minor biases.

Future work could look into whether these "memorization parameters" are also responsible for other behaviors, like factual recall or reasoning. Additionally, the authors suggest that finding ways to prevent this early-stage gradient alignment during training could be a path toward "privacy-by-design" for future LLMs.

Summary updated

BibTeX
@misc{eichin2026don,
  author = {Florian Eichin and Philipp Mondorf and Andrei Mircea and Yupei Du and Barbara Plank and Michael A. Hedderich},
  title = {{Don't Forget! Decomposing the Training Dynamics of Memorization in Language Models}},
  year = {2026},
  eprint = {2609.34933},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.34933},
}
Figure