Tracking Memorization without Validation Data

Bruno Athie Teruel, Travis Dick, Alex Kulesza, Mónica Ribero, Yuyan Wang, Royce WilsonInfPriv @ NeurIPS 2026

TL;DR

When fine-tuning large language models on small datasets, setting aside a validation set to watch for overfitting eats up precious training data. This paper introduces a simulated holdout metric that estimates validation loss using only the training batches already in memory. It reliably spots the exact moment a model shifts from generalizing to memorizing sensitive training data—before verbatim regurgitation begins.

What Problem Does This Paper Address?

Large language models (LLMs) are notorious for sometimes memorizing rare training sequences verbatim. If those sequences contain sensitive information—like Social Security Numbers or personal user details—the model can leak them at inference time.

Normally, practitioners catch this transition from generalization to memorization by watching the loss on a separate validation (or "holdout") dataset. When training loss keeps dropping while holdout loss flattens or rises, the model is overfitting.

In data-constrained settings like supervised fine-tuning, however, you're stuck in a bind:

  • Allocate a large holdout set, and you starve the model of training data, hurting accuracy.
  • Allocate a small holdout set, and your validation loss becomes so noisy that you can't tell real memorization apart from random fluctuation.

The authors ask: Can we track generalization and detect memorization during training without any holdout data at all?

Methods

Ideally, at any training step $t$, we would like to know the counterfactual leave-one-out loss: what would the model's loss on the current batch $B_t$ be if it had never been trained on those examples? Computing this exactly requires training many parallel copies of the model, which is wildly impractical for LLMs.

Instead, the authors propose a lightweight approximation called the simulated holdout:

  1. Track the direct effect of each example: For every training example $z$, the authors maintain a single running scalar: the cumulative change in loss on $z$ caused by past gradient updates in which $z$ participated. Specifically, if $\Delta_s(z) = \ell(\theta_s, z) - \ell(\theta_{s-1}, z)$ is the loss change on $z$ from step $s$, they track $\sum_{s=1}^t \mathbb{I}\{z \in B_s\} \Delta_s(z)$.
  2. Subtract it out: To approximate the leave-$z$-out loss at step $t$, they simply subtract this accumulated direct effect from the current loss $\ell(\theta_t, z)$. Averaging this over the current batch $B_t$ gives the simulated holdout loss $\hat{L}_{s,t}$.

What's the cost? - Memory: $O(n)$—just one extra floating-point number per training example. - Compute: One extra forward pass per training step (to measure $\ell(\theta_t, z)$ after the update). Because a backward pass costs roughly twice as much as a forward pass, this adds about 1/3 to the per-step training cost—the exact same overhead as evaluating a real holdout batch every step, but without needing any holdout data.

Datasets

The authors fine-tuned Gemma 3 1B IT for 50 epochs (batch size 128, Adafactor optimizer, learning rate $0.001$) on three benchmark datasets, each using a fixed prompt template:

  • Synthetic Social Security Numbers (SSNs): 6,400 training and 1,024 holdout examples pairing "Write an SSN number:" with a random 9-digit XXX-XX-XXXX string. Notably, Gemma 3 1B initially refuses this prompt due to built-in safety training.
  • Fantastic Animals: 6,400 training and 1,024 holdout examples pairing "A fantastic animal is the " with a random 32-character alphanumeric string. Similar in structure to SSNs, but without any built-in safety aversion.
  • PANORAMA-Plus: 7,732 training and 1,932 holdout synthetic user profiles, each containing 36 demographic, financial, and personal attributes (e.g., age, salary, birth city). In addition to whole-sequence evaluation, the authors ran a targeted audit on the birth_city field given all preceding profile fields.

Key Insights and Ideas

  • Loss separation precedes verbatim memorization: Across all tasks, the simulated holdout separates from the training loss before the model starts regurgitating training examples verbatim (measured via normalized edit distance on sampled completions). This gives practitioners an actionable early-warning window to halt training.
  • You don't need a perfect loss match to catch the transition: On Fantastic Animals, the simulated holdout didn't climb as steeply as the true holdout loss, yet it still diverged from the training loss at the exact same critical moment.
  • Whole-sequence audits can hide targeted risks: On PANORAMA-Plus, memorizing an entire ~450-token profile took much longer than memorizing a short SSN. However, when auditing just the birth_city field, verbatim memorization happened much earlier—right around the time the simulated and training losses separated.

Key Results

Loss and memorization audit results for fine-tuning Gemma 3 1B on each dataset.

Figure 1: Loss and memorization audit results for fine-tuning Gemma 3 1B on each dataset.
  • Tracking real holdout loss: On Synthetic SSN and PANORAMA-Plus, the simulated holdout tracked the measured holdout loss closely, tending toward a slight overestimate.
  • Anticipating memorization: In every experiment, the normalized edit distance between model outputs and training examples dropped sharply toward zero after the simulated holdout diverged from training loss, while the edit distance to holdout examples remained flat.

Limitations and Future Work

  • Approximation assumptions: The simulated holdout removes the direct effect of training on an example $z$, while assuming the indirect optimization trajectory (how $z$ influenced updates to other examples) remains unchanged. As seen in Fantastic Animals, this can cause the magnitude of the simulated holdout to diverge from the true holdout later in training.
  • Compute overhead: While it eliminates the need for validation data, it still requires one extra forward pass per step (~33% compute overhead).
  • Principled early stopping: The authors note that the simulated holdout can be paired with sequential testing by betting (using supermartingales) to create statistically principled early-stopping rules with controlled false-positive rates, which they point to in their appendix.

Summary updated

BibTeX
@inproceedings{teruel2026tracking,
  author = {Bruno Athie Teruel and Travis Dick and Alex Kulesza and Mónica Ribero and Yuyan Wang and Royce Wilson},
  title = {{Tracking Memorization without Validation Data}},
  booktitle = {InfPriv @ NeurIPS},
  year = {2026},
  url = {https://openreview.net/forum?id=MiwraACsDA},
}
Figure