Risk-aware Direct Preference Optimization under Nested Risk Measure

Lijun Zhang, Lin Li, Yajie Qi, Huizhong Song, Yaodong Yang, Jun Wang, Wei Wei

Introduction

Aligning Large Language Models (LLMs) with human preferences is a critical step in making these models helpful and safe. While techniques like Reinforcement Learning from Human Feedback (RLHF) and Direct Preference Optimization (DPO) have become standard, they primarily operate on a risk-neutral basis. These methods aim to maximize the expected reward, often overlooking the variance or risk associated with specific token sequences. This focus on average performance can lead to "reward hacking" or "model drift," where a model deviates significantly from its pre-trained state, potentially sacrificing its underlying reasoning capabilities to chase higher reward scores.

The Challenge: Beyond Risk-Neutral Alignment

The fundamental issue with existing alignment methods is their inability to precisely control the trade-off between reward maximization and model stability. Standard DPO uses a KL-divergence penalty to keep the policy close to a reference model, but this global constraint often fails to address the sequential nature of text generation. In an auto-regressive setting, a single high-risk token choice early in a sequence can derail the entire output.

To address this, the authors introduce Risk-aware Direct Preference Optimization (Ra-DPO). Ra-DPO moves beyond simple expectation-based optimization by incorporating nested risk measures into the alignment process.

Methodology: Nested Risk and Sequential Control

Ra-DPO's innovation lies in how it treats risk at the token level. Instead of evaluating the risk of a complete sentence, it applies risk measures recursively through the Bellman equation.

1. Nested Risk Measures

The framework utilizes a class of nested risk measures, such as Conditional Value-at-Risk (CVaR) and the Entropic Risk Measure (ERM). By applying these measures at each step of the generation process, the model can account for the cumulative risk of its token choices.

2. Token-Level Advantage

Building upon Token-level DPO (TDPO), Ra-DPO decomposes sentence-level rewards into a sequence of token-level advantages. This allows for a more granular optimization that identifies exactly which parts of a response contribute to high reward or high risk.

3. Sequential Risk Ratio

The core of the Ra-DPO loss function is the "sequential risk ratio." This term acts as a sophisticated "brake" on the optimization process. It weights the gradients based on how risky a token choice is relative to the reference model's distribution. If a token offers a high reward but carries significant risk (high deviation from the stable reference), the risk ratio suppresses the update, preventing the model from making "wild bets."

The authors propose two variants:

  • Ra-DPO1: The standard risk-aware formulation.
  • Ra-DPO2: Incorporates a "stop-gradient" operator to treat specific risk terms as a baseline, enhancing training stability.

Experimental Evaluation

The researchers evaluated Ra-DPO using GPT-2 Large, Pythia-1.4B, and Pythia-2.8B across three benchmarks:

  • IMDb Dataset: For sentiment alignment.
  • Anthropic HH (Helpful and Harmless): For general safety and alignment.
  • AlpacaEval: For instruction-following capabilities.

Key Findings

  • Mitigating Model Drift: In IMDb experiments, Ra-DPO1 achieved reward accuracy comparable to state-of-the-art methods like TDPO but with significantly lower sequential KL divergence. This demonstrates that Ra-DPO achieves alignment while staying much closer to the original model's distribution.
  • Superior Performance: On AlpacaEval, Ra-DPO1 achieved a 53.5% winrate against GPT-4, outperforming standard DPO (51.1%).
  • Quality over Verbosity: A common pitfall in alignment is models learning to generate longer responses to "trick" reward models. Ra-DPO2 achieved the highest Length-Controlled (Lc) winrate (55.7%), suggesting its gains are rooted in response quality rather than length.
  • Robustness: The model's performance remained consistent across various risk-aversion levels (μ), allowing for fine-tuned control over how conservative the model should be.

Conclusion

Ra-DPO provides a robust framework for LLM alignment that prioritizes stability alongside performance. By treating risk as a sequential, token-level property, it effectively suppresses model drift and reward hacking. While the current work focuses on preference-based alignment, the authors suggest that future iterations could integrate explicit safety costs, moving toward a comprehensive "Safe RLHF" framework.

Summary updated

BibTeX
@inproceedings{zhang2025risk,
  author = {Lijun Zhang and Lin Li and Yajie Qi and Huizhong Song and Yaodong Yang and Jun Wang and Wei Wei},
  title = {{Risk-aware Direct Preference Optimization under Nested Risk Measure}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=V4oTkK7cQz},
}
Figure