Abstract
Large Language Models (LLMs) have shown greatly enhanced performance in recent years, attributed to increased size and extensive training data. This advancement has led to widespread interest and adoption across industries and the public. However, training data memorization in Machine Learning models scales with model size, particularly concerning for LLMs. Memorized text sequences have the potential to be directly leaked from LLMs, posing a serious threat to data privacy. Various techniques have been developed to attack LLMs and extract their training data. As these models continue to grow, this issue becomes increasingly critical. To help researchers and policymakers understand the state of knowledge around privacy attacks and mitigations, including where more work is needed, we present the first SoK on data privacy for LLMs. We (i) identify a taxonomy of salient dimensions where attacks differ on LLMs, (ii) systematize existing attacks, using our taxonomy of dimensions to highlight key trends, (iii) survey existing mitigation strategies, highlighting their strengths and limitations, and (iv) identify key gaps, demonstrating open problems and areas for concern.
Introduction
As Large Language Models (LLMs) grow in size and are trained on increasingly massive datasets—often scraped from the internet or containing sensitive records like healthcare data—they develop a tendency to memorize specific text sequences. This phenomenon is not merely a learning quirk but a significant privacy liability. This paper provides the first Systematization of Knowledge (SoK) regarding data privacy in LLMs, mapping out how these models inadvertently memorize sensitive training data and categorizing the evolving landscape of privacy-leaking attacks and defensive strategies.
The Problem of Memorization
The core issue addressed is "training data leakage," where an attacker can prompt a model to output verbatim snippets of its training set. This can reveal Personally Identifiable Information (PII), private medical notes, or proprietary code. While individual studies have explored these risks, this survey synthesizes the field to help stakeholders understand which model architectures and development phases (such as fine-tuning versus pre-training) are most vulnerable.
A Taxonomy of Privacy Risks
The authors introduce a multi-dimensional taxonomy to classify the research landscape, considering architectures (Encoder, Decoder, Encoder-Decoder), development phases, and attack types.
Threats are categorized into three primary types:
- Membership Inference (MI): Determining if a specific text was present in the training set.
- Attribute Inference (AI): Deducing sensitive traits about a user from model outputs.
- Data Extraction (E): Reconstructing verbatim training data through strategic prompting.
Datasets and Evaluation Metrics
Privacy research utilizes a variety of benchmarks to test vulnerabilities. These range from sensitive medical datasets like MIMIC-III and i2b2 to general web text such as The Pile and Common Crawl. Evaluation metrics often focus on the success rate of attacks, such as the Area Under the Curve (AUC) for membership inference or the "Extracted Sequences Count" for data extraction.
Key Insights and Findings
Model Characteristics and Vulnerabilities
- Scale and Alignment: While larger models generally have a higher capacity for memorization, "model alignment" (e.g., RLHF) can reduce the likelihood of a model emitting memorized strings compared to raw base models.
- Fine-Tuning Risks: Fine-tuning only the last layer of a model on private data makes it significantly more susceptible to Membership Inference Attacks (MIAs) than fine-tuning all layers or using adapters.
- In-Context Learning (ICL): Interestingly, ICL (providing examples within a prompt) can be more vulnerable to privacy leaks than traditional fine-tuning in certain controlled environments.
Attack and Defense Trends
- The Reference Model Advantage: Attacks that utilize a "reference model" (a second model trained on similar but non-private data) to calibrate guesses are significantly more effective than reference-free attacks.
- Data Extraction Success: Attackers have recovered up to 47% of code used in training for certain code-generation models. Even in aligned models like ChatGPT, roughly 0.852% of generated tokens were found to be part of verbatim 50-token sequences from pre-training data when prompted to "diverge."
- Deduplication: Removing duplicate sequences from training data can reduce memorization by up to 10x, but "approximate" memorization still occurs, meaning models may still leak the essence of private data.
- Defense Trade-offs: Differential Privacy (DP) provides the strongest formal guarantees but often results in a 10% drop in accuracy and significant computational overhead, making it difficult to apply to the largest training runs.
Future Directions
The survey highlights several "open frontiers" where current knowledge is limited:
- Multimodal Risks: Research is needed on privacy leaks in models handling both images and text (e.g., GPT-4V).
- Side Channels: System-level components like tokenizers can inadvertently create channels for attackers to infer training data.
- Machine Unlearning: Efficiently making a model "forget" specific data points to comply with regulations like GDPR remains an unsolved challenge.
- Emergent Abilities: Trillion-parameter models may develop unforeseen ways to memorize or infer private information that current taxonomies do not yet cover.
Summary updated