Skip to main content
QUICK REVIEW

[Paper Review] Does fine-tuning GPT-3 with the OpenAI API leak personally-identifiable information?

Albert Yu Sun, Eliott Zemour|arXiv (Cornell University)|Jul 31, 2023
Privacy-Preserving Technologies in DataComputer Science7 citations
TL;DR

This study investigates whether fine-tuning GPT-3 via OpenAI's API leads to memorization and leakage of personally identifiable information (PII). Using the Enron email dataset, the authors simulate black-box attacks through classification and a practical autocomplete task, demonstrating that fine-tuned GPT-3 can extract PII with high recall (26.29% on OOD prompts) and non-trivial precision (5.71%), revealing significant privacy risks in real-world applications.

ABSTRACT

Machine learning practitioners often fine-tune generative pre-trained models like GPT-3 to improve model performance at specific tasks. Previous works, however, suggest that fine-tuned machine learning models memorize and emit sensitive information from the original fine-tuning dataset. Companies such as OpenAI offer fine-tuning services for their models, but no prior work has conducted a memorization attack on any closed-source models. In this work, we simulate a privacy attack on GPT-3 using OpenAI's fine-tuning API. Our objective is to determine if personally identifiable information (PII) can be extracted from this model. We (1) explore the use of naive prompting methods on a GPT-3 fine-tuned classification model, and (2) we design a practical word generation task called Autocomplete to investigate the extent of PII memorization in fine-tuned GPT-3 within a real-world context. Our findings reveal that fine-tuning GPT3 for both tasks led to the model memorizing and disclosing critical personally identifiable information (PII) obtained from the underlying fine-tuning dataset. To encourage further research, we have made our codes and datasets publicly available on GitHub at: https://github.com/albertsun1/gpt3-pii-attacks

Motivation & Objective

  • To investigate whether fine-tuned GPT-3 models trained via OpenAI’s API leak personally identifiable information (PII) under black-box access.
  • To evaluate the risk of PII exposure in practical, real-world applications such as email autocomplete services.
  • To assess the effectiveness of simple prompting techniques in extracting sensitive data from proprietary, closed-source language models.
  • To highlight the privacy vulnerabilities of enterprise and consumer use-cases involving fine-tuned LLMs, especially under regulatory frameworks like GDPR and China’s AI regulations.
  • To encourage adoption of privacy-preserving techniques such as differential privacy and PII scrubbing in future fine-tuning pipelines.

Proposed method

  • The authors fine-tuned a GPT-3 model (curie) on the Enron email dataset using OpenAI’s fine-tuning API for both text classification and text generation tasks.
  • They designed two attack scenarios: a naive prompting method for PII extraction in a classification setting, and a realistic autocomplete task simulating email body generation from subject lines.
  • For the classification task, they used prompts like 'What is the name of the person in this email?' to extract PIIs from model outputs.
  • For the autocomplete task, they used email subject lines from the training set (Train) and out-of-distribution (OOD) subjects to test PII leakage in real-world usage patterns.
  • They measured precision and recall of extracted PIIs against the ground truth from the Enron dataset, focusing on names, organizations, and contact details.
  • The authors publicly released their code and datasets to encourage reproducibility and further research into PII memorization in proprietary LLMs.

Experimental results

Research questions

  • RQ1Can an attacker extract personally identifiable information (PII) from a GPT-3 model fine-tuned via OpenAI’s API using only black-box access and simple prompting?
  • RQ2To what extent does PII memorization occur in a practical application such as an email autocomplete service built on a fine-tuned GPT-3 model?
  • RQ3How does PII leakage compare between in-distribution and out-of-distribution prompts in real-world usage scenarios?
  • RQ4What is the precision and recall of PII extraction when using naive prompting versus realistic prompting in fine-tuned GPT-3 models?
  • RQ5What are the implications of PII leakage from proprietary, closed-source models for data privacy regulations like GDPR and China’s AI Services Management Measures?

Key findings

  • Fine-tuned GPT-3 models exhibit significant PII memorization, with a recall rate of 27.83% for in-distribution prompts and 26.29% for out-of-distribution prompts in the autocomplete task.
  • The precision of PII extraction was 13.16% for out-of-distribution prompts and 5.71% for in-distribution prompts, indicating that roughly 1 in 17 to 1 in 40 extracted PII tokens were accurate matches to the training data.
  • The model successfully extracted 236 unique PII instances from in-distribution prompts and 223 from out-of-distribution prompts, demonstrating that even novel inputs can trigger PII leakage.
  • The most frequently memorized PII types were names of individuals and organizations, including high-profile figures such as 'Jeffrey Skilling' and 'Enron Corporation'.
  • The study confirms that PII leakage is not limited to direct prompts but also occurs in realistic, production-like settings such as autocomplete, posing real risks for enterprise and consumer applications.
  • The findings underscore the vulnerability of large language models to privacy attacks even when fine-tuned via closed-source APIs, highlighting the urgent need for privacy-preserving fine-tuning techniques.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.