Perplexity-aware Correction for Robust Alignment with Noisy Preferences

Keyi Kong, Xilie Xu, Di Wang, Jingfeng Zhang, Mohan Kankanhalli

TL;DR

Aligning Large Language Models (LLMs) with human values usually fails when the preference data is "noisy" (i.e., the labels for "chosen" and "rejected" responses are flipped). PerpCorrect is a new data-centric framework that identifies and fixes these errors by analyzing the Perplexity Difference (PPLDiff) between response pairs. By flipping incorrect labels before training, PerpCorrect allows standard alignment algorithms to remain highly effective even when up to 40% of the training data is corrupted.

What Problem Does This Paper Address?

To make LLMs helpful and harmless, researchers use "alignment" techniques like Reinforcement Learning from Human Feedback (RLHF) or Direct Preference Optimization (DPO). These methods rely on datasets where a human (or another model) picks a "chosen" response over a "rejected" one.

However, these datasets are often "noisy." Annotators make mistakes, or malicious actors might inject "poisoned" preferences to make the model behave poorly. When an alignment algorithm sees a harmful response labeled as "chosen," it learns the wrong lessons. Existing solutions try to fix this from a loss perspective—essentially telling the model to "trust the data less" if it seems noisy. The authors of this paper argue for a data perspective: instead of just ignoring the noise, why not detect it and fix the labels?

Methods

The core of the paper is a metric called PPLDiff (Perplexity Difference). Perplexity measures how "surprised" a model is by a sequence of text. In a clean dataset, an aligned model should find the "chosen" (helpful) response much more natural (lower perplexity) than the "rejected" (unhelpful) one. Therefore:

$$PPLDiff = \log PPL(\text{chosen}) - \log PPL(\text{rejected})$$

Intuitively, if $PPLDiff$ is high, it means the model is much more surprised by the "chosen" response than the "rejected" one—a huge red flag that the labels might be flipped.

PerpCorrect follows a three-stage pipeline:

  1. Surrogate Alignment: Since a raw, unaligned model can't distinguish between good and bad responses, the authors first train a "surrogate" LLM on a tiny, clean validation set (~50 samples).
  2. Iterative Refinement: The surrogate model is further refined by looking at the noisy training set. It picks samples with extremely low PPLDiff (highly likely to be clean) and extremely high PPLDiff (highly likely to be noisy and thus corrected) to boost its own discriminatory power.
  3. Gaussian Denoising: The authors fit two normal distributions to the PPLDiff scores of the entire training set—one representing "clean" data and one representing "noisy" data. They find the intersection of these two curves and use it as a threshold. Any data point on the "noisy" side of the threshold has its labels flipped, resulting in a "denoised" dataset ready for final alignment.
Evolution of PPLDiff distributions showing how PerpCorrect separates clean and noisy preferences.

Datasets

The researchers evaluated PerpCorrect using two primary benchmarks:

  • Golden HH (Helpful and Harmless): A standard dataset for safety and utility alignment.
  • OASST1 (OpenAssistant): A more complex, multi-lingual conversation dataset.
  • Noise Injection: They simulated real-world corruption by randomly flipping labels in these datasets at rates of 10%, 20%, 30%, and 40%.

Key Insights and Ideas

  • Perplexity as a Proxy for Truth: The most elegant insight is that an aligned model’s "internal logic" (its probability distribution) is a better judge of preference than a noisy label. If the model thinks a "rejected" response is much more likely than a "chosen" one, the label is probably wrong.
  • The Bimodal Distribution: The authors discovered that while an unaligned model sees a single blob of PPLDiff scores, an aligned model sees two distinct "humps" (a bimodal distribution). This mathematical separation is what makes automated correction possible.
  • Algorithm Agnostic: Because PerpCorrect fixes the data rather than the math of the alignment, it works as a "plug-and-play" pre-processing step for DPO, PPO, IPO, and other popular alignment methods.

Key Results

The performance gains are most dramatic at high noise levels.

Performance comparison of DPO and PPO alignment methods across different proportions of noisy preferences.

On the Golden HH dataset with 40% noisy preferences:

  • Vanilla DPO crashed to a reward accuracy of 53.15% (barely better than a coin flip).
  • PerpCorrect-DPO maintained a staggering 94.92% accuracy.
  • It consistently outperformed existing robust methods like cDPO and rDPO, which only adjust the loss function.

The method is also remarkably efficient; it achieves these results using as few as 50 clean validation samples, making it practical for researchers who don't have the budget for massive human-verified datasets.

Limitations and Future Work

The authors identify two main hurdles:

  1. Computational Cost: To calculate PPLDiff for every sample in every epoch of the surrogate training, you have to run many forward passes. For very large datasets, this adds significant "wall-clock" time to the pipeline.
  2. Validation Dependency: While the clean validation set required is small, the method still depends on having some perfectly labeled data to start the surrogate alignment.

Future work involves optimizing the efficiency of the PPLDiff calculations and exploring "zero-shot" ways to distinguish clean and noisy distributions without needing a validation set at all.

Summary updated

BibTeX
@inproceedings{kong2024perplexity,
  author = {Keyi Kong and Xilie Xu and Di Wang and Jingfeng Zhang and Mohan Kankanhalli},
  title = {{Perplexity-aware Correction for Robust Alignment with Noisy Preferences}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=OUXnnPJzXJ},
}
Figure