Exposing Privacy Gaps: Membership Inference Attack on Preference Data for LLM Alignment

Qizhang Feng, Siva Rajesh Kasa, Santhosh Kumar Kasa, Hyokun Yun, Choon Hui Teo, Sravan Babu Bodapati

Abstract

Large Language Models (LLMs) have seen widespread adoption due to their remarkable natural language capabilities. However, when deploying them in real-world settings, it is important to align LLMs to generate texts according to acceptable human standards. Methods such as Proximal Policy Optimization (PPO) and Direct Preference Optimization (DPO) have enabled significant progress in refining LLMs using human preference data. However, the privacy concerns inherent in utilizing such preference data have yet to be adequately studied. In this paper, we investigate the vulnerability of LLMs aligned using two widely used methods—DPO and PPO—to membership inference attacks (MIAs). Our study has two main contributions: first, we theoretically motivate that DPO models are more vulnerable to MIA compared to PPO models; second, we introduce a novel reference-based attack framework specifically for analyzing preference data called PREMIA (Preference data MIA). Using PREMIA and existing baselines, we empirically show that DPO models have a relatively heightened vulnerability towards MIA.

Introduction

As Large Language Models (LLMs) become increasingly integrated into daily life, ensuring they align with human values and safety standards is paramount. This alignment process typically relies on human preference data, where models are trained on datasets containing ranked responses (e.g., "Response A is preferred over Response B"). While effective for performance, this preference data often contains sensitive, human-generated information.

A critical question arises: can an adversary determine if a specific piece of private preference data was used to train a model? This is the core of a Membership Inference Attack (MIA). While MIAs have been extensively studied in the context of general pre-training, their impact on the specific "preference tuples" used in alignment—such as those used in Direct Preference Optimization (DPO) and Proximal Policy Optimization (PPO)—remains largely unexplored. This research exposes a significant "privacy gap" between these two popular alignment methods.

Methodology: The PREMIA Framework

The researchers approach this vulnerability through both theoretical proof and a novel empirical framework called PREMIA (Preference data MIA).

Theoretical Motivation

The study mathematically demonstrates that DPO is inherently more prone to overfitting than PPO. Unlike PPO, which utilizes an intermediate reward model to guide the policy, DPO optimizes the model directly on the preference data. This direct optimization lacks the "buffer" provided by a reward model, leading the LLM to more aggressively memorize specific training samples.

PREMIA: Reference-Based Attack

PREMIA is a reference-based attack framework designed specifically for preference data. It compares the target aligned model ($\pi_\theta$) against a reference model ($\pi_{ref}$), typically the base model before alignment. The framework supports two types of attacks:

  1. Individual Response Attack ($MIA_{single}$): This checks if a specific prompt-response pair was part of the training set by analyzing the ratio of probabilities assigned by the aligned and reference models.
  2. Preference Tuple Attack ($MIA_{tuple}$): A more sophisticated attack that determines if a specific ranking (Response A > Response B) was used. It calculates the difference in probability ratios between the preferred and rejected responses.
The PREMIA framework for individual response and preference tuple membership inference attacks.

Experimental Setup

The study evaluated several model architectures, including Mistral-7B, Open-Llama (3B and 7B), Gemma-2-2B, and the GPT-2 family. These models were aligned using two primary datasets:

  • Stack Exchange-Paired (SE): Factual questions and answers where preferences are determined by community votes.
  • IMDB-RLHF-Pair: A sentiment-based dataset where responses are ranked by positive sentiment.

Key Results and Analysis

The effectiveness of the attacks was measured using the Area Under the Receiver Operating Characteristic curve (AUROC), where 0.5 represents random guessing and 1.0 indicates a perfect attack.

The DPO vs. PPO Privacy Gap

The most significant finding is the stark contrast in privacy leakage between DPO and PPO. PPO-aligned models demonstrated remarkable robustness, with AUROC scores hovering around 0.52, suggesting they are nearly "impregnable" to current MIA techniques. In contrast, DPO-aligned models showed high vulnerability.

AUROC scores for MIA pair detection, highlighting the significant vulnerability of DPO-aligned models compared to PPO.

On the Stack Exchange dataset, PREMIA achieved AUROC scores as high as 0.93 for DPO-aligned Mistral-7B models. This indicates that an attacker can identify training data with near-certainty in DPO models.

Factors Influencing Vulnerability

  • Task Complexity: Models trained on the Stack Exchange dataset (factual alignment) were more vulnerable than those trained on the IMDB sentiment task. This suggests that harder tasks requiring specific factual alignment lead to more memorization.
  • The Power of the Reference: Access to the "base" model provides a significant advantage to attackers, as it allows them to isolate the changes made during the alignment phase.
  • Model Size: While larger models generally generalize better, the preference tuple attack remained highly effective across all tested model sizes for DPO, frequently exceeding 0.90 AUROC.

Conclusion and Future Work

This research highlights a critical privacy trade-off in LLM alignment. While DPO is often favored for its simplicity and performance, it introduces substantial privacy risks compared to PPO. The direct optimization in DPO leads to the memorization of sensitive preference data, making it highly susceptible to membership inference.

Future research should focus on developing mitigation strategies, such as Differential Privacy (DP-SGD) or model pruning, to protect DPO models without compromising their alignment performance. Additionally, there is a need for MIA frameworks that can operate in black-box scenarios where internal model weights and base versions are not accessible.

Summary updated

BibTeX
@inproceedings{feng2025exposing,
  author = {Qizhang Feng and Siva Rajesh Kasa and Santhosh Kumar Kasa and Hyokun Yun and Choon Hui Teo and Sravan Babu Bodapati},
  title = {{Exposing Privacy Gaps: Membership Inference Attack on Preference Data for LLM Alignment}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2025},
  url = {https://openreview.net/forum?id=xtQZ5OhKvs},
}
Figure