Lune

USENIX Security2024Top-tier venue

Did the Neurons Read your Book? Document-level Membership Inference for Large Language Models

Matthieu Meeus, Shubham Jain, Marek Rei, Yves-Alexandre de Montjoye

Abstract

With large language models (LLMs) poised to become embedded in our daily lives, questions are starting to be raised about the data they learned from. These questions range from potential bias or misinformation LLMs could retain from their training data to questions of copyright and fair use of humangenerated text. However, while these questions emerge, developers of the recent state-of-the-art LLMs become increasingly reluctant to disclose details on their training corpus. We here introduce the task of document-level membership inference for real-world LLMs, i.e. inferring whether the LLM has seen a given document during training or not. First, we propose a procedure for the development and evaluation of document-level membership inference for LLMs by leveraging commonly used data sources for training and the model release date. We then propose a practical, black-box method to predict document-level membership and instantiate it on OpenLLaMA-7B with both books and academic papers. We show our methodology to perform very well, reaching an AUC of 0.856 for books and 0.678 for papers (Fig. 1 ). We then show our approach to outperform the sentence-level membership inference attacks used in the privacy literature for the documentlevel membership task. We further evaluate whether smaller models might be less sensitive to document-level inference and show OpenLLaMA-3B to be approximately as sensitive as OpenLLaMA-7B to our approach. Finally, we consider two mitigation strategies and find the AUC to slowly decrease when only partial documents are considered but to remain fairly high when the model precision is reduced. Taken together, our results show that accurate document-level membership can be inferred for LLMs, increasing the transparency of technology poised to change our lives. 1 1 While the results we report are technically correct, recent research indicates that the high MIA performance observed might not be due to LLM memorization but rather results from a distribution shift in the collected member and non-member data. For more details, we refer to our recent results [43] . 10 2 10 1 10 0 False positive rate 10 2 10 1 10 0 True positive rate AUC = 0.86 Random guess baseline 10 2 10 1 10 0 False positive rate 10 2 10 1 10 0 True positive rate AUC = 0.68 Random guess baseline

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.

24 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

  • High-Resolution Image Synthesis with Latent Diffusion Models cites Zero-Shot Text-to-Image Generation
  • High-Resolution Image Synthesis with Latent Diffusion Models cites Extracting Training Data from Large Language Models
  • Exploring the limits of strong membership inference attacks on large language models cites Membership Inference Attacks Against Machine Learning Models
  • Exploring the limits of strong membership inference attacks on large language models cites ReCaLL: Membership Inference via Relative Conditional Log-Likelihoods
  • Exploring the limits of strong membership inference attacks on large language models cites Copyright Traps for Large Language Models
  • Exploring the limits of strong membership inference attacks on large language models cites Extracting Training Data from Large Language Models
  • Cascading and Proxy Membership Inference Attacks cites Membership Inference Attacks Against Machine Learning Models
  • Cascading and Proxy Membership Inference Attacks cites Extracting Training Data from Large Language Models
  • Chasing Shadows: Pitfalls in LLM Security Research cites Language Models are Few-Shot Learners
  • ReCaLL: Membership Inference via Relative Conditional Log-Likelihoods cites Membership Inference Attacks Against Machine Learning Models
  • ReCaLL: Membership Inference via Relative Conditional Log-Likelihoods cites Language Models are Few-Shot Learners
  • ReCaLL: Membership Inference via Relative Conditional Log-Likelihoods cites Extracting Training Data from Large Language Models
  • Copyright Traps for Large Language Models cites Membership Inference Attacks Against Machine Learning Models
  • Copyright Traps for Large Language Models cites Language Models are Few-Shot Learners
  • Copyright Traps for 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 Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers24

  1. Copyright Traps for Large Language ModelsMatthieu Meeus, Igor Shilov, Manuel Faysse, Yves-Alexandre de MontjoyeICML 2024 · 39 citations
  2. Exploring the limits of strong membership inference attacks on large language modelsJamie Hayes, Ilia Shumailov, Christopher A. Choquette-Choo, Matthew Jagielski et al.NeurIPS 2025 · 26 citations
  3. Chasing Shadows: Pitfalls in LLM Security ResearchJonathan Evertz, Niklas Risse, Nicolai Neuer, Andreas Müller et al.NDSS 2026 · 17 citations
  4. Cascading and Proxy Membership Inference AttacksYuntao Du, Jiacheng Li, Yuetian Chen, Kaiyuan Zhang et al.NDSS 2026 · 8 citations
  5. ReCaLL: Membership Inference via Relative Conditional Log-LikelihoodsRoy Xie, Junlin Wang, Ruomin Huang, Minxing Zhang et al.EMNLP 2024 · 8 citations

Builds on18

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
  3. Zero-Shot Text-to-Image GenerationAditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray et al.ICML 2021 · 6,356 citations
  4. Membership Inference Attacks Against Machine Learning ModelsReza Shokri, Marco Stronati, Congzheng Song, Vitaly ShmatikovS&P 2017 · 5,137 citations
  5. Extracting Training Data from Large Language ModelsNicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski et al.USENIX Security 2021 · 2,866 citations

Related papers

  1. LLM Dataset Inference: Did you train on my dataset?Pratyush Maini, Hengrui Jia, Nicolas Papernot, Adam DziedzicNeurIPS 2024 · 162 citations
  2. Order of Magnitude Speedups for LLM Membership InferenceRongting Zhang, Martin Bertran Lopez, Aaron RothEMNLP 2024 · 1 citation
  3. Was My Data Used for Training? Membership Inference in Open-Source LLMs via Neural ActivationsXue Tan, Hao Luan, Mingyu Luo, Zhuyang Yu et al.NDSS 2026 · 2 citations
  4. Sampling-based Pseudo-Likelihood for Membership Inference AttacksMasahiro Kaneko, Youmi Ma, Yuki Wata, Naoaki OkazakiACL Findings 2025 · 6 citations
  5. Assessing Privacy Risks in Language Models: A Case Study on Summarization TasksRuixiang Tang, Gord Lueck, Rodolfo Quispe, Huseyin A. Inan et al.EMNLP Findings 2023 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines