IN THIS BREAKDOWN · 10 SECTIONS
You can read 22% of this breakdown.
The paper in one minute
Language models trained on web text were widely assumed not to memorize individual documents. They train for about one epoch on deduplicated data, and their training loss and test loss are almost equal, which is the usual sign that a model has not overfit. This paper shows that the average hides the worst case: a small number of training examples are stored verbatim and can be recovered by anyone who can query the model.
The authors studied GPT-2, whose weights and training source were public, and checked their findings with OpenAI against the original training set. They generated 200,000 samples of 256 tokens with each of three sampling setups, then ranked the samples by six scores. The best scores compare GPT-2's confidence on a sample with a reference that should not have memorized it: a smaller GPT-2, the zlib compressor, or GPT-2 itself on the lowercased text. Text that the large model finds much more predictable than the reference does is a likely memory. For each of the 18 combinations they sent 100 candidates for manual checking.
Of the 1,800 candidates, 604 were verbatim training text. Most were common material such as news, license text and log files. Some were not: 46 contained named individuals, 32 contained contact details, 35 contained random high-entropy strings such as UUIDs, and one sample reproduced a person's name, address, email, phone and fax number. Several came from a single training document.
A controlled test on Reddit URLs that appeared in exactly one document measured how much repetition memorization needs. GPT-2 XL (1.5 billion parameters) emitted every URL repeated 33 times or more, the 345-million-parameter model fewer, and the 117-million-parameter model only one, with help. Larger models memorized more. The paper closes with mitigations: differentially private training, careful deduplication and data sourcing, filtering outputs, and auditing models with methods like these.
Research notes: the problem, approach and results
inspected candidates confirmed as verbatim training data, across 18 search configurations (Section 6)
fewest repeats, all inside one document, after which GPT-2 XL emitted a URL unaided (Table 4)
share memorized when candidates are ranked by the zlib ratio vs by raw perplexity, 300 each (our sum of Table 2)
Large language models are trained once on huge, deduplicated datasets and show almost no gap between training and test loss, so the common assumption was that they do not memorize individual training examples in a way anyone could recover.
Query GPT-2 as a black box: generate 600,000 samples, rank them by how much more likely GPT-2 finds them than a reference (a smaller model, zlib compression, the lowercased text), and check the top candidates against the training data with the model's creators.
604 of 1,800 inspected candidates were verbatim training text, including names, phone numbers, email addresses, code and 128-bit UUIDs, some from a single document. The largest model memorized URLs that appeared 33 times in one page; smaller models needed more repeats or none.
Why it matters to an FDE
Whatever you train on can come back out. Customers fine-tune models on support tickets, contracts, chat logs and code. This paper is the standard evidence that a model can reproduce a training record verbatim, to anyone who can query it, without any overfitting showing up in the loss curve. If the training set holds personal data or secrets, treat the model weights as holding them too.
Repetition is the variable you control. The striking examples were repeated many times inside one document: a forum dump that listed the same links dozens of times, a page with a UUID 10 to 311 times. Document-level deduplication keeps all of those repeats because they sit in one document. Before a fine-tune, count repeated spans inside documents, not only duplicate documents.
The audit is cheap and runs before release. Plant a few fake records (canaries) in the training data, train, and measure how highly the model ranks each one among all strings of the same format. Our toy run shows the pattern: a fake five-digit pin went from a random rank to the model's first guess after appearing four times. That is an audit you can show a security reviewer.
Clean the data first; it is the control that works. The paper is direct that sanitizing data is imperfect and that differential privacy is hard to apply to scraped text. For an FDE, the practical stack is: remove or tokenize personal fields before training, deduplicate within and across documents, keep secrets out of corpora entirely, and add an output filter for known sensitive patterns as a second line.
Larger models raise the risk. The 1.5-billion-parameter model needed 33 repeats where the smaller ones failed entirely. Moving a customer to a bigger base model for quality also moves them toward more memorization of the same data.
Understand the mechanism. Try it on a real problem.
Unlock this breakdown and 290 more papers.
Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.
6 months · One payment · No auto-renewal
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦2 results tables
- ?5 interview questions with answers
- 03Key takeaways
Definitions, the search-and-rank method, what was found, the repetition test and the mitigations
Free account - 04How it works
The generate-rank-verify pipeline, the six scores, deduplication and the URL repetition test
Premium - 05The numbers that matter
Table 2 per configuration and per score, Table 4's repetition grid, and the categories that leaked
Premium - 06Try it yourself
Recompute Table 2 and Table 4, then run a canary audit and watch per-document repeat caps undo it
Premium - 07Where it breaks
One public model, manual checks, a loose lower bound, and defenses that were not tested
Premium - 08Using it on a deployment
Data hygiene before fine-tuning, a canary audit before release, output checks, access limits
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
