Quantifying Memorization Across Neural Language Models
Nicholas Carlini, Daphne Ippolito, Matthew Jagielski, Katherine Lee, Florian Tramèr, Chiyuan Zhang
Abstract
Large language models (LMs) have been shown to memorize parts of their training data, and when prompted appropriately, they will emit the memorized training data verbatim. This is undesirable because memorization violates privacy (exposing user data), degrades utility (repeated easy-to-memorize text is often low quality), and hurts fairness (some texts are memorized over others). We describe three log-linear relationships that quantify the degree to which LMs emit memorized training data. Memorization significantly grows as we increase (1) the capacity of a model, (2) the number of times an example has been duplicated, and (3) the number of tokens of context used to prompt the model. Surprisingly, we find the situation becomes more complicated when generalizing these results across model families. On the whole, we find that memorization in LMs is more prevalent than previously believed and will likely get worse as models continues to scale, at least without active mitigations.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
347 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Membership Inference Attacks Against Machine Learning Models cites Deep Learning with Differential Privacy
- Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
- Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling cites Deduplicating Training Data Makes Language Models Better
- Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling cites Extracting Training Data from Large Language Models
- The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks cites Membership Inference Attacks Against Machine Learning Models
- The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks cites Deep Learning with Differential Privacy
- Scaling Data-Constrained Language Models cites Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling
- Scaling Data-Constrained Language Models cites Deduplicating Training Data Makes Language Models Better
- Scaling Data-Constrained Language Models cites Deduplicating Training Data Mitigates Privacy Risks in Language Models
- Deduplicating Training Data Makes Language Models Better cites Membership Inference Attacks Against Machine Learning Models
- Deduplicating Training Data Makes Language Models Better cites Extracting Training Data from Large Language Models
- Deduplicating Training Data Mitigates Privacy Risks in Language Models cites Membership Inference Attacks Against Machine Learning Models
- Deduplicating Training Data Mitigates Privacy Risks in Language Models cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
- Deduplicating Training Data Mitigates Privacy Risks in Language Models cites Deduplicating Training Data Makes Language Models Better
- Deduplicating Training Data Mitigates Privacy Risks in Language Models cites Extracting Training Data from Large Language Models
- Extracting Training Data from Large Language Models cites Membership Inference Attacks Against Machine Learning Models
- Extracting Training Data from Large Language Models cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
- Extracting Training Data from Large Language Models cites Deep Learning with Differential Privacy
- Erasing Concepts from Diffusion Models cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
Cited by top-tier papers347
- Solving Quantitative Reasoning Problems with Language ModelsAitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer et al.NeurIPS 2022 · 2,039 citations
- Pythia: A Suite for Analyzing Large Language Models Across Training and ScalingStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley et al.ICML 2023 · 1,822 citations
- Erasing Concepts from Diffusion ModelsRohit Gandikota, Joanna Materzynska, Jaden Fiotto-Kaufman, David BauICCV 2023 · 536 citations
- Scaling Data-Constrained Language ModelsNiklas Muennighoff, Alexander M. Rush, Boaz Barak, Teven Le Scao et al.NeurIPS 2023 · 475 citations
- Deduplicating Training Data Mitigates Privacy Risks in Language ModelsNikhil Kandpal, Eric Wallace, Colin RaffelICML 2022 · 395 citations
Builds on13
- Deep Learning with Differential PrivacyMartín Abadi, Andy Chu, Ian J. Goodfellow, H. Brendan McMahan et al.CCS 2016 · 7,620 citations
- Membership Inference Attacks Against Machine Learning ModelsReza Shokri, Marco Stronati, Congzheng Song, Vitaly ShmatikovS&P 2017 · 5,137 citations
- Extracting Training Data from Large Language ModelsNicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski et al.USENIX Security 2021 · 2,866 citations
- The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural NetworksNicholas Carlini, Chang Liu, Úlfar Erlingsson, Jernej Kos et al.USENIX Security 2019 · 1,386 citations
- Deduplicating Training Data Makes Language Models BetterKatherine Lee, Daphne Ippolito, Andrew Nystrom, Chiyuan Zhang et al.ACL 2022 · 844 citations
Related papers
- Unveiling Memorization in Code ModelsZhou Yang, Zhipeng Zhao, Chenyu Wang, Jieke Shi et al.ICSE 2024 · 33 citations
- Measuring Non-Adversarial Reproduction of Training Data in Large Language ModelsMichael Aerni, Javier Rando, Edoardo Debenedetti, Nicholas Carlini et al.ICLR 2025
- Counterfactual Memorization in Neural Language ModelsChiyuan Zhang, Daphne Ippolito, Katherine Lee, Matthew Jagielski et al.NeurIPS 2023 · 184 citations
- Quantifying and Analyzing Entity-Level Memorization in Large Language ModelsZhenhong Zhou, Jiuyang Xiang, Chaomeng Chen, Sen SuAAAI 2024 · 23 citations
- Emergent and Predictable Memorization in Large Language ModelsStella Biderman, USVSN Sai Prashanth, Lintang Sutawika, Hailey Schoelkopf et al.NeurIPS 2023 · 205 citations
