Introduction
Privacy research in Large Language Models (LLMs) has traditionally focused on Membership Inference Attacks (MIAs), which seek to determine if a specific sentence was used during model training. However, MIAs often require the attacker to possess the exact text used in the training set, a high bar for real-world scenarios.
This paper introduces a more realistic and broader threat: User Inference Attacks (UIAs). In a UIA, the adversary aims to determine if any data from a specific user was used to fine-tune a model. This is particularly relevant for personalized AI services, such as email autocompletion or code assistants, which are frequently fine-tuned on user-specific data. A successful UIA can reveal a user's participation in sensitive datasets or de-anonymize training sets using only a few examples of the user's general writing style.
Methodology
The authors propose a black-box attack based on a likelihood ratio test. The attack assumes the adversary has access to a small set of "fresh" samples ($m$) from the target user—samples that were never seen by the model during training.
As shown in Figure 1, the attack follows four steps:
- Sampling: The attacker collects samples $x^{(1)}, ..., x^{(m)}$ from the target user's distribution $D_U$.
- Computation: For each sample, the log-likelihood is computed under the fine-tuned model $p_\theta$.
- Test Statistic: The attacker calculates a ratio comparing the fine-tuned model's likelihood to a reference model $p_{ref}$ (typically the pre-trained base model). This normalization calibrates for the inherent difficulty of predicting specific sequences, isolating the signal added during fine-tuning.
- Inference: If the average log-likelihood ratio exceeds a threshold $\tau$, the attacker concludes the user was in the training set.
Experimental Setup
The attack was evaluated across four diverse, user-stratified domains:
- Enron Emails: 136 users (professional correspondence).
- Reddit Comments: 5,194 users (social media).
- CC News: 2,839 "users" (grouped by web domain).
- ArXiv Abstracts: 16,511 users (grouped by first author).
Experiments were conducted using the GPT-Neo family (125M and 1.3B parameters) to assess how model scale impacts vulnerability.
Analysis: User-Level Overfitting
A key finding is that LLMs do not just overfit to specific training sentences; they overfit to a user's overall distribution, including their unique writing style, vocabulary, and common topics. This "user-level overfitting" explains why the attack succeeds even with data the model has never encountered.
As illustrated in Figure 5, there is a clear correlation between the decrease in validation loss for "held-in" users and the increase in Attack AUROC. This trend is most pronounced in the Enron dataset, where users often contribute a high volume of distinct, personal data.
Key Results and Insights
- Attack Performance: The attack achieved an 88% AUROC on Enron Emails, 66% on CC News, and 56% on Reddit. The lower success on Reddit is attributed to the shorter sample lengths and the massive number of users, which dilutes the model's adaptation to any single individual.
- Vulnerability Factors: Users with a distinct "voice" or those who contribute more data are significantly more vulnerable. Furthermore, "canary" features—like a unique email signature—dramatically amplify the privacy leak.
- Scale and Generalization: Interestingly, larger models (1.3B) were not significantly more vulnerable to user inference than smaller ones (125M). The generalization gap at the user level remained relatively constant across scales.
- Defense Limitations: Standard example-level Differential Privacy (DP) proved to be an ineffective defense. While it protects individual sentences, it does not prevent the model from learning the aggregate stylistic patterns of a user who contributes many examples.
Conclusion
User Inference Attacks represent a significant and realistic privacy risk for personalized LLMs. While User-level DP provides a theoretical safeguard, its implementation remains challenging due to the massive scale of data required to maintain model utility. Future work must explore more efficient defenses and investigate whether these attacks can be executed in "label-only" settings where the adversary does not have access to model log-probabilities.
Summary updated