[Paper Review] Training Data Leakage Analysis in Language Models
This paper proposes a methodology to detect and quantify user-level data leakage in language models under a strong black-box threat model, where attackers only access top-k predictions. It introduces two novel metrics to measure a model's ability to reproduce unique sentence fragments from training data, enabling privacy comparison across models and evaluation of mitigations like differential privacy and API hardening.
Recent advances in neural network based language models lead to successful deployments of such models, improving user experience in various applications. It has been demonstrated that strong performance of language models comes along with the ability to memorize rare training samples, which poses serious privacy threats in case the model is trained on confidential user content. In this work, we introduce a methodology that investigates identifying the user content in the training data that could be leaked under a strong and realistic threat model. We propose two metrics to quantify user-level data leakage by measuring a model's ability to produce unique sentence fragments within training data. Our metrics further enable comparing different models trained on the same data in terms of privacy. We demonstrate our approach through extensive numerical studies on both RNN and Transformer based models. We further illustrate how the proposed metrics can be utilized to investigate the efficacy of mitigations like differentially private training or API hardening.
Motivation & Objective
- Investigate the risk of privacy leakage in language models trained on confidential user content, particularly rare or sensitive sequences.
- Address the challenge of quantifying user-level privacy leakage in a way that is actionable for model developers and deployers.
- Develop metrics that allow fair comparison of privacy properties between different models trained on the same data, such as differentially private vs. standard models.
- Evaluate the effectiveness of privacy-preserving techniques like differential privacy and API hardening using the proposed metrics.
- Provide a practical framework for privacy assessment during the deployment lifecycle of language models in real-world systems.
Proposed method
- Define a strong black-box threat model where an adversary can only access the model’s top-k token predictions for a given input prefix.
- Design a probing procedure that reconstructs unique sentence fragments from training data by iteratively prompting the model with context from the training data.
- Introduce two metrics: (1) the probability of recovering a unique fragment from a given context, and (2) the average number of unique fragments recoverable per context.
- Apply the method to both RNN and Transformer-based language models using real-world datasets to evaluate privacy leakage.
- Use the metrics to compare models trained with and without differential privacy, and to assess the impact of API hardening on leakage.
- Leverage the metrics to analyze model behavior across different model architectures and data distributions, focusing on rare or sensitive training sequences.
Experimental results
Research questions
- RQ1To what extent can a language model reconstruct unique sentence fragments from its training data when prompted with the original context?
- RQ2How does the model’s ability to reconstruct rare or sensitive training sequences vary across different architectures (e.g., RNN vs. Transformer)?
- RQ3How effective are differential privacy and API hardening in reducing the model’s capacity to leak user-level data?
- RQ4Can the proposed metrics reliably compare the privacy properties of different models trained on the same dataset?
- RQ5What is the relationship between model memorization and the likelihood of user re-identification under realistic threat models?
Key findings
- The proposed metrics successfully quantify user-level data leakage in language models, with measurable differences between models trained with and without differential privacy.
- Models trained with differential privacy show significantly reduced ability to reconstruct unique sentence fragments compared to non-private baselines, confirming the effectiveness of DP in mitigating leakage.
- Even under a strong black-box threat model (top-k access only), many models can still reconstruct rare training fragments, indicating persistent privacy risks.
- The framework demonstrates that API hardening—by limiting access to only top-k predictions—can reduce leakage, but does not eliminate it entirely, especially for highly memorizing models.
- The metrics reveal that RNN and Transformer models exhibit different leakage patterns, with Transformers showing higher memorization capacity for rare sequences.
- The study confirms that existing metrics like exposure are insufficient for user-level privacy assessment; the proposed metrics provide a more direct and actionable measure of privacy leakage risk.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.