Privacy Issues in Large Language Models: A Survey

Seth Neel, Peter W. ChangarXiv 2023

TL;DR

This survey provides a comprehensive overview of the burgeoning research on privacy issues in Large Language Models (LLMs). It categorizes and synthesizes technical work addressing privacy risks like memorization and data extraction, explores privacy-preserving training techniques, and discusses the challenges of machine unlearning and copyright implications. This paper is crucial for understanding the current landscape of LLM privacy and guiding future research and development.

What Problem Does This Paper Address?

The rapid advancement and widespread adoption of Large Language Models (LLMs) have brought significant societal benefits, but also introduce substantial privacy risks. These models can inadvertently memorize and reveal sensitive information from their training data, leading to potential privacy violations. Furthermore, the legal and ethical implications of LLMs, particularly concerning copyright and data deletion, are complex and evolving. This survey aims to consolidate and structure the technical research addressing these multifaceted privacy challenges in LLMs, providing a unified view for researchers and practitioners.

Methods

The paper surveys a wide range of technical approaches to LLM privacy, broadly categorized into:

  • Red-teaming and Attack Methods: This includes techniques like membership inference attacks (MIAs), training data extraction attacks, and attribute inference attacks, which aim to identify vulnerabilities in LLMs that could expose private information.
  • Privacy-Preserving Training: This section covers methods to build privacy directly into the LLM training process. Key techniques discussed are:
  • Differential Privacy (DP): Injecting noise into training or inference to provide theoretical privacy guarantees. This includes DP-SGD and variations for private predictions.
  • Federated Learning (FL): Training models on decentralized data without central aggregation, enhancing privacy by keeping data local.
  • Efficient Data Deletion (Machine Unlearning): Techniques designed to remove the influence of specific data points from a trained model, crucial for complying with regulations like GDPR's "Right to be Forgotten." This includes methods like efficient LOO retraining, gradient-based updates, and in-context unlearning.
  • Copyright Mitigation: Technical approaches to address copyright infringement concerns, such as data filtering, measuring influence of training data, and formalizing novelty.

Datasets

The paper references numerous datasets commonly used in LLM research for training and evaluation. These include:

  • General Text Corpora: Common Crawl, OpenWebText, The Pile, Wikipedia, Wikicorpus, BookCorpus.
  • Domain-Specific Datasets: MIMIC-III (medical), AG News Corpus (news), Penn Treebank (linguistic), Stack Overflow (Q&A).
  • Specialized Datasets: CounterFact, zsRE (for specific attack evaluations), WIKIMIA (for MIA research).

The paper does not introduce new datasets but rather surveys existing work that utilizes these established benchmarks.

Key Insights and Ideas

  • Memorization is Inherent but Manageable: LLMs naturally memorize training data, but the type and extent of memorization matter. While some memorization is necessary for generalization, unintended memorization of sensitive data poses a significant risk.
  • Model Size and Data Duplication are Key Risk Factors: Larger models and duplicated data in training sets significantly increase the likelihood of memorization and subsequent privacy leakage.
  • Attacks are Evolving: While MIAs are less severe than data extraction, they can be a stepping stone for more potent attacks. Research is continuously developing more sophisticated attack methods tailored to LLMs.
  • DP and FL Offer Strong Privacy Guarantees: Differential Privacy and Federated Learning are foundational techniques for building privacy-preserving LLMs, though they often come with trade-offs in utility and computational cost.
  • Machine Unlearning is Crucial but Challenging: The "Right to be Forgotten" necessitates effective unlearning, but doing so for massive LLMs without retraining from scratch is a complex research area.
  • Copyright is a Major Legal and Technical Hurdle: LLMs' ability to memorize and generate content raises significant copyright questions, with ongoing legal debates and a need for technical solutions to ensure fair use and prevent infringement.

Key Results

  • Memorization: Studies show that larger models memorize more data, and data duplication drastically increases memorization rates. For instance, a sequence present 10 times in a dataset can be generated 1000 times more frequently.
  • Attacks: Membership Inference Attacks (MIAs) can achieve AUCs of .67-.72 on LLMs, and training data extraction attacks have successfully recovered sensitive information, with some methods extracting tens of millions of training examples.
  • Privacy-Preserving Training: Differentially private training can significantly reduce memorization and improve robustness against attacks, though it may lead to a drop in utility. For example, DP-SGD can achieve up to 60% accuracy on BERT-Large models, compared to 70% for non-private models.
  • Machine Unlearning: Efficient unlearning methods can reduce retraining time by orders of magnitude (e.g., 100x improvement) while maintaining reasonable performance.
  • Copyright: Research indicates that larger models are more susceptible to copyright violation, with popular books showing significant verbatim memorization.

Limitations and Future Work

  • Fast-Paced Research: The field is moving incredibly quickly, and the authors acknowledge that some recent work may have been missed. They maintain a GitHub repository to keep the survey updated.
  • Trade-offs: Many privacy-preserving techniques (DP, FL, unlearning) involve trade-offs between privacy, utility, and computational cost. Future work needs to balance these factors effectively.
  • Theoretical vs. Practical Attacks: While theoretical attacks exist, their practical effectiveness against real-world LLMs and the extent of actual privacy leakage remain areas of active investigation.
  • Unlearning Evaluation: Evaluating the true success of unlearning algorithms is challenging, and current methods may provide a false sense of security. More robust evaluation metrics and techniques are needed.
  • Copyright Nuances: The legal landscape of AI and copyright is still developing, and technical solutions need to align with evolving legal interpretations and fair use principles.
  • Scalability: Many proposed solutions, especially for unlearning and certain attack defenses, face scalability challenges when applied to the massive scale of modern LLMs.

Summary updated

Abstract

This is the first survey of the active area of AI research that focuses on privacy issues in Large Language Models (LLMs). Specifically, we focus on work that red-teams models to highlight privacy risks, attempts to build privacy into the training or inference process, enables efficient data deletion from trained models to comply with existing privacy regulations, and tries to mitigate copyright issues. Our focus is on summarizing technical research that develops algorithms, proves theorems, and runs empirical evaluations. While there is an extensive body of legal and policy work addressing these challenges from a different angle, that is not the focus of our survey. Nevertheless, these works, along with recent legal developments do inform how these technical problems are formalized, and so we discuss them briefly in Section 1. While we have made our best effort to include all the relevant work, due to the fast moving nature of this research we may have missed some recent work. If we have missed some of your work please contact us, as we will attempt to keep this survey relatively up to date. We are maintaining a repository with the list of papers covered in this survey and any relevant code that was publicly available at https://github.com/safr-ml-lab/survey-llm.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Reddit profiles · Custom database of 520 Reddit profilesGPT-4 attribute inferenceTop-1 accuracy across all attributes84.6%Attribute Inference
Source quote
L483: \pc{Attribute inference attacks are another potential privacy risk for large language models, albeit with less research compared to membership inference and training data extraction attacks. \cite{staab2023memorization} presented the first work to comprehensively study the risks of this attack. Outlined in Figure~\ref{fig:staab_inference}, this attack works by leveraging public data written by the user, such as posts on online social forums. These posts are fit into a prompt template which asks an LLM to identify the personal attributes of a person who made those posts. \cite{staab2023memorization} tested this attack using multiple LLMs (including GPT-4, Llama, PaLM, and Claude) for inference and used a custom database of 520 Reddit profiles, which were manually annotated to include age, education, sex, occupation, relationship status, location, birth place, and income. Using the comments made by these profiles, GPT-4 achieved an 84.6% Top-1 accuracy across all attributes. While these attacks present a privacy risk, this experiment was done in comparison to a human's time and accuracy performance, meaning this risk is not unique to LLMs, but can rather just be expedited by them. }
BERT-Large pre-trainingBERT-Large trained using DP-SGDAccuracy60%Language Modeling · pre-trained · backbone=BERT-Large · model=BERT-Large · privacy=DP-SGD · batch-size=2 million
Source quote
L611: \caption{From \cite{anil2021largescale}. The accuracy of the BERT-Large model as the batch size varies. The non-private model achieves an accuracy of 70% while the private model achieves up to 60% when using a batch size of 2 million.}
BERT-Large pre-trainingNon-private BERT-LargeAccuracy70%Language Modeling · pre-trained · backbone=BERT-Large · model=BERT-Large · privacy=non-private
Source quote
L611: \caption{From \cite{anil2021largescale}. The accuracy of the BERT-Large model as the batch size varies. The non-private model achieves an accuracy of 70% while the private model achieves up to 60% when using a batch size of 2 million.}
Reddit · posts; next-word predictionDP-FedAvgTop 1 accuracy17.49%Next Word Prediction · model=LSTM · privacy=differential privacy · training-rounds=5000
Source quote
L664: \hfil \textcolor{blue}{0.003} │ \hfil 15 │ \hfil 763430 │ \hfil 5000 │ \hfil 4.634 │ \hfil 17.49%
BibTeX
@misc{neel2023privacy,
  author = {Seth Neel and Peter W. Chang},
  title = {{Privacy Issues in Large Language Models: A Survey}},
  year = {2023},
  eprint = {2312.06717},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.06717},
}
Figure