Lune

ICML2022Top-tier venue

Deduplicating Training Data Mitigates Privacy Risks in Language Models

Nikhil Kandpal, Eric Wallace, Colin Raffel

Abstract

Past work has shown that large language models are susceptible to privacy attacks, where adversaries generate sequences from a trained model and detect which sequences are memorized from the training set. In this work, we show that the success of these attacks is largely due to duplication in commonly used web-scraped training sets. We first show that the rate at which language models regenerate training sequences is superlinearly related to a sequence's count in the training set. For instance, a sequence that is present 10 times in the training data is on average generated 1000 times more often than a sequence that is present only once. We next show that existing methods for detecting memorized sequences have near-chance accuracy on non-duplicated training sequences. Finally, we find that after applying methods to deduplicate training data, language models are considerably more secure against these types of privacy attacks. Taken together, our results motivate an increased focus on deduplication in privacy-sensitive applications and a reevaluation of the practicality of existing privacy attacks.

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.

122 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Proving Test Set Contamination in Black-Box Language Models cites Membership Inference Attacks Against Machine Learning Models
  • Proving Test Set Contamination in Black-Box Language Models cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
  • Proving Test Set Contamination in Black-Box Language Models cites Language Models are Few-Shot Learners
  • Proving Test Set Contamination in Black-Box Language Models cites Extracting Training Data from Large Language Models
  • Large Language Models Struggle to Learn Long-Tail Knowledge cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
  • Large Language Models Struggle to Learn Long-Tail Knowledge cites Language Models are Few-Shot Learners
  • Large Language Models Struggle to Learn Long-Tail Knowledge 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
  • Membership Inference Attacks From First Principles cites Membership Inference Attacks Against Machine Learning Models
  • Membership Inference Attacks From First Principles cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
  • Membership Inference Attacks From First Principles cites Extracting Training Data from Large Language Models
  • Scaling Data-Constrained Language Models cites Language Models are Few-Shot Learners
  • Poisoning Language Models During Instruction Tuning cites Language Models are Few-Shot Learners
  • Poisoning Language Models During Instruction Tuning cites Extracting Training Data from Large Language Models
  • Detecting Pretraining Data from Large Language Models cites Membership Inference Attacks Against Machine Learning Models
  • Detecting Pretraining Data from Large Language Models cites Membership Inference Attacks From First Principles
  • Detecting Pretraining Data from Large Language Models cites Language Models are Few-Shot Learners
  • Detecting Pretraining Data from Large 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 Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers122

  1. Large Language Models Struggle to Learn Long-Tail KnowledgeNikhil Kandpal, Haikang Deng, Adam Roberts, Eric Wallace et al.ICML 2023 · 623 citations
  2. Scaling Data-Constrained Language ModelsNiklas Muennighoff, Alexander M. Rush, Boaz Barak, Teven Le Scao et al.NeurIPS 2023 · 475 citations
  3. Detecting Pretraining Data from Large Language ModelsWeijia Shi, Anirudh Ajith, Mengzhou Xia, Yangsibo Huang et al.ICLR 2024 · 365 citations
  4. Poisoning Language Models During Instruction TuningAlexander Wan, Eric Wallace, Sheng Shen, Dan KleinICML 2023 · 319 citations
  5. Proving Test Set Contamination in Black-Box Language ModelsYonatan Oren, Nicole Meister, Niladri S. Chatterji, Faisal Ladhak et al.ICLR 2024 · 220 citations

Builds on17

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Membership Inference Attacks Against Machine Learning ModelsReza Shokri, Marco Stronati, Congzheng Song, Vitaly ShmatikovS&P 2017 · 5,137 citations
  3. Extracting Training Data from Large Language ModelsNicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski et al.USENIX Security 2021 · 2,866 citations
  4. 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
  5. Membership Inference Attacks From First PrinciplesNicholas Carlini, Steve Chien, Milad Nasr, Shuang Song et al.S&P 2022 · 1,049 citations

Related papers

  1. Quantifying Memorization Across Neural Language ModelsNicholas Carlini, Daphne Ippolito, Matthew Jagielski, Katherine Lee et al.ICLR 2023 · 158 citations
  2. Deduplicating Training Data Makes Language Models BetterKatherine Lee, Daphne Ippolito, Andrew Nystrom, Chiyuan Zhang et al.ACL 2022 · 844 citations
  3. Private Memorization Editing: Turning Memorization into a Defense to Strengthen Data Privacy in Large Language ModelsElena Sofia Ruzzetti, Giancarlo A. Xompero, Davide Venditti, Fabio Massimo ZanzottoACL 2025 · 9 citations
  4. Near-Duplicate Sequence Search at Scale for Large Language Model Memorization EvaluationZhencan Peng, Zhizhi Wang, Dong DengSIGMOD 2023 · 11 citations
  5. Scalable Extraction of Training Data from Aligned, Production Language ModelsMilad Nasr, Javier Rando, Nicholas Carlini, Jonathan Hayase et al.ICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines