Language Models May Verbatim Complete Text They Were Not Explicitly Trained On
Ken Liu, Christopher A. Choquette-Choo, Matthew Jagielski, Peter Kairouz, Sanmi Koyejo, Percy Liang, Nicolas Papernot
Abstract
An important question today is whether a given text was used to train a large language model (LLM). A completion test is often employed: check if the LLM completes a sufficiently complex text. This, however, requires a ground-truth definition of membership; most commonly, it is defined as a member based on the n-gram overlap between the target text and any text in the dataset. In this work, we demonstrate that this n-gram based membership definition can be effectively gamed. We study scenarios where sequences are non-members for a given n and we find that completion tests still succeed. We find many natural cases of this phenomenon by retraining LLMs from scratch after removing all training samples that were completed; these cases include exact duplicates, near-duplicates, and even short overlaps. They showcase that it is difficult to find a single viable choice of n for membership definitions. Using these insights, we design adversarial datasets that can cause a given target sequence to be completed without containing it, for any reasonable choice of n. Our findings highlight the inadequacy of n-gram membership, suggesting membership definitions fail to account for auxiliary information available to the training algorithm.
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.
10 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
- Distributional Machine Unlearning via Selective Data Removal cites Membership Inference Attacks Against Machine Learning Models
- What Really is a Member? Discrediting Membership Inference via Poisoning cites Membership Inference Attacks Against Machine Learning Models
- ML-Leaks: Model and Data Independent Membership Inference Attacks and Defenses on Machine Learning Models cites Membership Inference Attacks Against Machine Learning 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 ML-Leaks: Model and Data Independent Membership Inference Attacks and Defenses on Machine Learning Models
- Membership Inference Attacks From First Principles cites The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networks
- Train Once, Answer All: Many Pretraining Experiments for the Cost of One cites Membership Inference Attacks Against Machine Learning Models
- Train Once, Answer All: Many Pretraining Experiments for the Cost of One cites Membership Inference Attacks From First Principles
- Antidistillation Fingerprinting cites Membership Inference Attacks Against Machine Learning Models
Cited by top-tier papers10
- FlexOLMo: Open Language Models for Flexible Data UseWeijia Shi, Akshita Bhagia, Kevin Farhat, Niklas Muennighoff et al.NeurIPS 2025 · 16 citations
- What Really is a Member? Discrediting Membership Inference via PoisoningNeal Mangaokar, Ashish Hooda, Zhuohang Li, Bradley A. Malin et al.NeurIPS 2025 · 6 citations
- Train Once, Answer All: Many Pretraining Experiments for the Cost of OneSebastian Bordt, Martin PawelczykICLR 2026 · 6 citations
- Distributional Machine Unlearning via Selective Data RemovalYoussef Allouah, Rachid Guerraoui, Sanmi KoyejoICLR 2026 · 5 citations
- Antidistillation FingerprintingYixuan Xu, John Kirchenbauer, Yash Savani, Asher Trockman et al.ICML 2026 · 4 citations
Builds on23
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Membership Inference Attacks Against Machine Learning ModelsReza Shokri, Marco Stronati, Congzheng Song, Vitaly ShmatikovS&P 2017 · 5,137 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
- ML-Leaks: Model and Data Independent Membership Inference Attacks and Defenses on Machine Learning ModelsAhmed Salem, Yang Zhang, Mathias Humbert, Pascal Berrang et al.NDSS 2019 · 1,141 citations
- Membership Inference Attacks From First PrinciplesNicholas Carlini, Steve Chien, Milad Nasr, Shuang Song et al.S&P 2022 · 1,049 citations
Related papers
- LLM Dataset Inference: Did you train on my dataset?Pratyush Maini, Hengrui Jia, Nicolas Papernot, Adam DziedzicNeurIPS 2024 · 162 citations
- Watermarking Makes Language Models RadioactiveTom Sander, Pierre Fernandez, Alain Durmus, Matthijs Douze et al.NeurIPS 2024 · 68 citations
- Context-Aware Membership Inference Attacks against Pre-trained Large Language ModelsHongyan Chang, Ali Shahin Shamsabadi, Kleomenis Katevas, Hamed Haddadi et al.EMNLP 2025 · 19 citations
- Sampling-based Pseudo-Likelihood for Membership Inference AttacksMasahiro Kaneko, Youmi Ma, Yuki Wata, Naoaki OkazakiACL Findings 2025 · 6 citations
- Deduplicating Training Data Mitigates Privacy Risks in Language ModelsNikhil Kandpal, Eric Wallace, Colin RaffelICML 2022 · 395 citations
