TL;DR
Property inference attacks (PIAs) can expose sensitive dataset-level statistics from fine-tuned LLMs, posing a major confidentiality risk. This paper introduces a novel defense using post-training alignment (DPO and GRPO) to steer the model's output distribution toward a safe target ratio. This approach successfully protects data confidentiality without needing access to the original training data or sacrificing model utility.
What Problem Does This Paper Address?
When an LLM is fine-tuned on specialized datasets (like medical or financial records), it implicitly encodes global statistical properties of that data—such as the proportion of female patients or the prevalence of a specific disease. Property Inference Attacks (PIAs) exploit this behavior: an adversary queries the model, analyzes its outputs, and reverse-engineers these sensitive dataset-level statistics.
Existing defenses are highly restrictive. They either require modifying the training data and completely retraining the model (such as data re-sampling), which is impractical for already-deployed models, or they rely on inference-time controls like temperature scaling, which severely degrades text generation quality. This paper addresses the need for a practical, post-training defense that protects confidentiality without requiring original data access or destroying model utility.
Methods
The authors propose a clever shift in perspective: using reinforcement learning from human feedback (RLHF) frameworks not for safety or style, but as a privacy defense. They adapt two popular alignment methods to reshape the model's output distribution post-training:
- Direct Preference Optimization (DPO) Defense: The authors construct preference pairs on the fly. If the model's current generation ratio for a property is lower than a safe target ratio, responses containing that property are labeled as "preferred," forcing the model to increase its frequency (and vice versa if the ratio is too high).
- Group Relative Policy Optimization (GRPO) Defense: This on-policy method uses a dynamic reward function. At each iteration, a group of outputs is sampled, and rewards are assigned based on whether an individual output moves the batch's empirical ratio closer to the target ratio.
The authors also extend both techniques to handle multi-class alignment, allowing the defense to protect multiple attributes simultaneously by weighting adjustments based on how far each attribute deviates from its target.
Datasets
The defense was evaluated across two open-source models and datasets:
- ChatDoctor: A medical question-answering dataset used with LLaMA-1-7B. The target property is patient gender, where the defense attempts to obscure the true proportion of female samples.
- MedCalc-Bench: A benchmark for medical calculations requiring precise numerical reasoning, evaluated using Qwen-2.5-7B-Instruct. The target property is the presence of a specific medical calculation term ("CKD-EPI Equations"). This dataset represents a more challenging reasoning setting newly introduced to property inference evaluation.
Key Insights and Ideas
- Alignment as a Privacy Shield: RLHF isn't just for making models polite; it can precisely control and reshape the global statistical properties of an LLM's output distribution.
- The Cross-Attack Bonus: Even though the defense explicitly targets generation-based attacks (where attackers look at direct outputs), it implicitly breaks shadow-model attacks (where attackers train meta-models on word-frequency features). Aligning the generation ratio naturally reweights the marginal frequencies of correlated keywords, disrupting the shadow model's features without needing explicit optimization for them.
- On-Policy Superiority: GRPO achieves tighter alignment to the target ratio than DPO. Because GRPO relies on on-policy updates, it can iteratively adjust outputs based on the model's immediate generation behavior.
Key Results
- Strong Utility-Confidentiality Trade-off: Both DPO and GRPO successfully reduce the attacker's ability to infer properties, bringing the Mean Absolute Error (MAE) close to a blind random guess. Crucially, they do this while maintaining high utility (measured via F1 score on ChatDoctor and accuracy on MedCalc-Bench).
- Outperforming Baselines: Traditional defenses like data subsampling and temperature scaling caused a massive drop in model performance. For instance, on MedCalc-Bench, standard fine-tuning achieves ~37% accuracy, but temperature scaling drops it to ~31%. In contrast, GRPO maintains the full 37% accuracy while providing a robust defense.
- Multi-Attribute Success: The multi-class defense effectively balanced multiple attributes simultaneously, making larger adjustments for attributes far from the target while leaving already-aligned attributes untouched.
Limitations and Future Work
- Scope of Attacks: The evaluation is restricted to generation-based and shadow-model word-frequency attacks, as they are currently the only demonstrated effective PIAs against LLMs. Future work must test robustness against emerging attack paradigms.
- Potential Dual-Use Risk: There is a potential negative impact: malicious actors could use this alignment defense to intentionally obscure demographic biases or imbalances in their training data that should be transparent to the public.
Summary updated