The Surprising Effectiveness of Membership Inference with Simple N-Gram Coverage
On the map: LLM safety and security → Membership inference attacks
Abstract (arXiv)
Membership inference attacks serves as useful tool for fair use of language models, such as detecting potential copyright infringement and auditing data leakage. However, many current state-of-the-art attacks require access to models' hidden states or probability distribution, which prevents investigation into more widely-used, API-access only models like GPT-4. In this work, we introduce N-Gram Coverage Attack, a membership inference attack that relies solely on text outputs from the target model, enabling attacks on completely black-box models. We leverage the observation that models are more likely to memorize and subsequently generate text patterns that were commonly observed in their training data. Specifically, to make a prediction on a candidate member, N-Gram Coverage Attack first obtains multiple model generations conditioned on a prefix of the candidate. It then uses n-gram overlap metrics to compute and aggregate the similarities of these outputs with the ground truth suffix; high similarities indicate likely membership. We first demonstrate on a diverse set of existing benchmarks that N-Gram Coverage Attack outperforms other black-box methods while also impressively achieving comparable or even better performance to state-of-the-art white-box attacks - despite having access to only text outputs. Interestingly, we find that the success rate of our method scales with the attack compute budget - as we increase the number of sequences generated from the target model conditioned on the prefix, attack performance tends to improve. Having verified the accuracy of our method, we use it to investigate previously unstudied closed OpenAI models on multiple domains. We find that more recent models, such as GPT-4o, exhibit increased robustness to membership inference, suggesting an evolving trend toward improved privacy protections.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Placed in Membership inference attacks, one of 12 directions in LLM safety and security. Builds on 44 of its 58 references that are in the map. First posted on arXiv 13 Aug 2025.
Builds on
44 of 58 references.
Closest ancestors · 6
Same direction, newest first
- 2024Membership Inference Attacks Cannot Prove that a Model Was Trained On Your Data29 Sep
- 2024Do Membership Inference Attacks Work on Large Language Models?12 Feb
- 2023Membership Inference Attacks against Language Models via Neighbourhood Comparison29 May
- 2022Quantifying Privacy Risks of Masked Language Models Using Membership Inference Attacks8 Mar
- 2021Enhanced Membership Inference Attacks against Machine Learning Models18 Nov
- 2021Mitigating Membership Inference Attacks by Self-Distillation Through a Novel Ensemble Architecture15 Oct
Other references · 38
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2016Deep Learning with Differential Privacycited by 2,728
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
- 2016Membership Inference Attacks against Machine Learning Modelscited by 2,281
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,218
- 2020Extracting Training Data from Large Language Modelscited by 2,189
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
- 2022Quantifying Memorization Across Neural Language Modelscited by 763
26 more
- 2024OLMo: Accelerating the Science of Language Modelscited by 613
- 2024Dolma: an Open Corpus of Three Trillion Tokens for Language Model Pretraining Researchcited by 483
- 2023Scalable Extraction of Training Data from (Production) Language Modelscited by 434
- 2023How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resourcescited by 408
- 2023Detecting Pretraining Data from Large Language Modelscited by 387
- 2021Remember What You Want to Forget: Algorithms for Machine Unlearningcited by 371
- 2020Auditing Differentially Private Machine Learning: How Private is Private SGD?cited by 218
- 2019MemGuard: Defending against Black-Box Membership Inference Attacks via Adversarial Examplescited by 197
- 2023Emergent and Predictable Memorization in Large Language Modelscited by 148
- 2023Speak, Memory: An Archaeology of Books Known to ChatGPT/GPT-4cited by 125
- 2023Privacy Auditing with One (1) Training Runcited by 123
- 2023Foundation Models and Fair Usecited by 116
- 2023Copyright Violations and Large Language Modelscited by 108
- 2024Min-K%++: Improved Baseline for Detecting Pre-Training Data from Large Language Modelscited by 103
- 2024DE-COP: Detecting Copyrighted Content in Language Models Training Datacited by 74
- 2019Membership Inference Attacks on Sequence-to-Sequence Models: Is My Data In Your Machine Translation System?cited by 71
- 2024PAPILLON: Privacy Preservation from Internet-based and Local Language Model Ensemblescited by 57
- 2024AI as Humanity's Salieri: Quantifying Linguistic Creativity of Language Models via Systematic Attribution of Machine Text against Web Textcited by 42
- 2024CopyBench: Measuring Literal and Non-Literal Reproduction of Copyright-Protected Text in Language Model Generationcited by 35
- 2023Memorization Through the Lens of Curvature of Loss Function Around Samplescited by 27
- 2024Exploring Memorization and Copyright Violation in Frontier LLMs: A Study of the New York Times v. OpenAI 2023 Lawsuitcited by 18
- 2024Special Characters Attack: Toward Scalable Training Data Extraction From Large Language Modelscited by 17
- 2024MIA-Tuner: Adapting Large Language Models as Pre-training Text Detectorcited by 15
- 2024Unveiling Privacy, Memorization, and Input Curvature Linkscited by 10
- 2024Measuring Copyright Risks of Large Language Model via Partial Information Probingcited by 9
- 2025Information-Guided Identification of Training Data Imprint in (Proprietary) Large Language Modelscited by 8
Built on by
Citing papers per year: 2025: 2; 2026: 5.
7 papers.
- 2026FormalTCS: Benchmarking End-to-End Frontier Formal Theoretical Computer Science Research of Large Language Modelscited by 2
- 2025f-INE: A Hypothesis Testing Framework for Estimating Influence under Training Randomnesscited by 0
- 2025FiMMIA: scaling semantic perturbation-based membership inference across modalitiescited by 0
- 2026Learning to Detect Language Model Training Data via Active Reconstructioncited by 0
- 2026Automated Membership Inference Attacks (AutoMIA): Discovering MIA Signal Computations using LLM Agentscited by 0
- 2026Boundary-targeted Membership Inference Attacks on Safety Classifierscited by 0
- 2026Phantoms and Disclosures: A Statistical Framework for Auditing Privacy in Synthetic Datacited by 0
- 2026FormalTCS: Benchmarking End-to-End Frontier Formal Theoretical Computer Science Research of Large Language Models20 Aug 2026
- 2026Phantoms and Disclosures: A Statistical Framework for Auditing Privacy in Synthetic Data15 Jun 2026
- 2026Boundary-targeted Membership Inference Attacks on Safety Classifiers21 May 2026
- 2026Automated Membership Inference Attacks (AutoMIA): Discovering MIA Signal Computations using LLM Agents19 Mar 2026
- 2026Learning to Detect Language Model Training Data via Active Reconstruction22 Feb 2026
- 2025FiMMIA: scaling semantic perturbation-based membership inference across modalities2 Dec 2025
- 2025f-INE: A Hypothesis Testing Framework for Estimating Influence under Training Randomness12 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2024A Statistical and Multi-Perspective Revisiting of the Membership Inference Attack in Large Language Models
- 2025Membership Inference Attacks on Tokenizers of Large Language Models
- 2024Scaling Up Membership Inference: When and How Attacks Succeed on Large Language Models
- 2026What Hard Tokens Reveal: Exploiting Low-confidence Tokens for Membership Inference Attacks against Large Language Models
- 2021Membership Inference on Word Embedding and Beyond
- 2025Exploring the limits of strong membership inference attacks on large language models
- 2024Order of Magnitude Speedups for LLM Membership Inference
- 2026Powerful Training-Free Membership Inference Against Autoregressive Language Models