Do Membership Inference Attacks Work on Large Language Models?

Michael Duan, Anshuman Suri, Niloofar Mireshghallah, Sewon Min, Weijia Shi +5 more
2/12/2024
cs.CL

No official code found. Best implementation: iamgroot42/mimir (192 stars, MIT, last commit 2025-07-16).

Abstract

Membership inference attacks (MIAs) attempt to predict whether a particular datapoint is a member of a target model's training data. Despite extensive research on traditional machine learning models, there has been limited work studying MIA on the pre-training data of large language models (LLMs). We perform a large-scale evaluation of MIAs over a suite of language models (LMs) trained on the Pile, ranging from 160M to 12B parameters. We find that MIAs barely outperform random guessing for most settings across varying LLM sizes and domains. Our further analyses reveal that this poor performance can be attributed to (1) the combination of a large dataset and few training iterations, and (2) an inherently fuzzy boundary between members and non-members. We identify specific settings where LLMs have been shown to be vulnerable to membership inference and show that the apparent success in such settings can be attributed to a distribution shift, such as when members and non-members are drawn from the seemingly identical domain but with different temporal ranges. We release our code and data as a unified benchmark package that includes all existing MIAs, supporting future work.

View on arXivView PDF

Code Implementations(1)

iamgroot42/mimirCommunity100%
MIT

Python package for measuring memorization in LLMs.

19230Mako, ShellAug 31, 20231 years agoMIT
llm-privacymembership-inference

Similar Papers

Cite this paper

@article{duan2024membership,
  title  = {Do Membership Inference Attacks Work on Large Language Models?},
  author = {Michael Duan and Anshuman Suri and Niloofar Mireshghallah and Sewon Min and Weijia Shi and Luke Zettlemoyer and Yulia Tsvetkov and Yejin Choi and David Evans and Hannaneh Hajishirzi},
  year   = {2024},
  eprint = {2402.07841},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.07841v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.07841.svg)](https://codeofpaper.com/paper/2402.07841)

Discussion