Reverse Preference Optimization for Complex Instruction Following

Xiang Huang, Ting-En Lin, Feiteng Fang, Yuchuan Wu, Hangyu Li, Yuzhong Qu, Fei Huang, Yongbin Li

Abstract

Instruction following (IF) is a critical capability for large language models (LLMs). However, handling complex instructions with multiple constraints remains challenging. Previous methods typically select preference pairs based on the number of constraints they satisfy, introducing noise where chosen examples may fail to follow some constraints and rejected examples may excel in certain respects over the chosen ones. To address the challenge of aligning with multiple preferences, we propose a simple yet effective method called Reverse Preference Optimization (RPO). It mitigates noise in preference pairs by dynamically reversing the constraints within the instruction to ensure the chosen response is perfect, alleviating the burden of extensive sampling and filtering to collect perfect responses. Besides, reversal also enlarges the gap between chosen and rejected responses, thereby clarifying the optimization direction and making it more robust to noise. We evaluate RPO on two multi-turn IF benchmarks, Sysbench and Multi-IF, demonstrating average improvements over the DPO baseline of 4.6 and 2.5 points (on Llama-3.1 8B), respectively. Moreover, RPO scales effectively across model sizes (8B to 70B parameters), with the 70B RPO model surpassing GPT-4o.

Introduction

Aligning Large Language Models (LLMs) with complex, multi-constraint instructions is often compared to judging a gymnastics routine: if one athlete nails the flip but stumbles on the landing, and another sticks the landing but misses the flip, determining a clear winner is difficult. In current alignment techniques like Direct Preference Optimization (DPO), winners are typically chosen by simply counting the total number of satisfied constraints. However, researchers from Alibaba’s Tongyi Lab and Nanjing University argue that this "total score" approach is inherently noisy and confusing for models. Their solution, Reverse Preference Optimization (RPO), effectively changes the rules of the game so that every training response becomes a perfect example for its respective prompt.

The Challenge of Noisy Preference Pairs

Instruction following is the cornerstone of modern LLM utility. As user queries evolve from simple requests to complex, multi-turn prompts with numerous constraints (e.g., "Write a 200-word summary, use no adverbs, and end with a joke"), models frequently struggle to satisfy every requirement simultaneously.

The standard alignment process involves showing the model preference pairs: a chosen response (which followed more rules) and a rejected response (which followed fewer). This method introduces several types of noise that can degrade learning:

  1. The "Better but not Perfect" Problem: If a chosen response still fails a specific constraint, the model may inadvertently learn that failing that rule is acceptable.
  2. The Overlap Problem: If a rejected response follows a rule that the chosen one missed, the model receives conflicting signals about which behaviors to prioritize.
Taxonomy of issues in standard preference pair construction, highlighting noise in non-dominated and dominated pairs.

Collecting truly "perfect" responses that satisfy every constraint is computationally expensive and often beyond the capabilities of smaller models during the training phase, leading to the prevalence of these noisy pairs.

Reverse Preference Optimization (RPO)

The core innovation of RPO is the "Reversal Trick." Instead of discarding imperfect responses or attempting to fix them through intensive sampling, RPO dynamically modifies the instruction to match the model's actual output.

The Reversal Mechanism

If a model is asked to "use at least three emojis" but provides a response with none, RPO does not simply label it as a failure. Instead, it generates a new instruction: "Do not use any emojis." Under this modified prompt, the original response is now a perfect example. By reversing the constraints the model failed, RPO ensures that the chosen response is always 100% compliant with its prompt. This transformation amplifies the gap between chosen and rejected responses, providing a much clearer gradient for the model to learn from.

Comparison of standard preference pairs versus RPO-transformed pairs, where reversing constraints creates perfect chosen responses.

Adaptive Margin

Beyond prompt reversal, the authors introduced an adaptive margin ($\gamma_g$) in the loss function. This margin scales based on the number of differences between the two responses. If two responses differ across five constraints, the model is pushed more aggressively to distinguish between them than if they only differed on a single aspect.

Evaluation and Results

The researchers evaluated RPO using a robust pipeline and diverse datasets, including SysBank, a new corpus of 30,000 system prompts curated from real-world data. Evaluations were conducted on Sysbench (multi-turn system prompts) and Multi-IF (a multilingual extension of IFEval).

Key Findings

  • Performance Gains: On Llama-3.1 8B, RPO outperformed the DPO baseline by 4.6 points on Sysbench and 2.5 points on Multi-IF.
  • Surpassing GPT-4o: A Llama-3.1 70B model trained with RPO surpassed GPT-4o on the Sysbench average score (77.83 vs 77.65).
  • Scalability: The method showed consistent improvements across different model families (Llama-3.1 and Qwen-2.5) and sizes ranging from 7B to 72B parameters.
  • Capability Preservation: Unlike some alignment methods that degrade general reasoning, RPO maintained or improved performance on general benchmarks like GSM8K and HumanEval.

Conclusion

Reverse Preference Optimization offers a clever, low-cost solution to the noise problem in preference alignment. By turning negative learning into positive learning through prompt reversal, RPO allows models to learn from their own "almost right" outputs without the need for expensive rejection sampling. This approach pushes the boundaries of how well open-source models can navigate complex, multi-constraint instructions, rivaling the performance of the most advanced proprietary models.

Summary updated

BibTeX
@inproceedings{huang2025reverse,
  author = {Xiang Huang and Ting-En Lin and Feiteng Fang and Yuchuan Wu and Hangyu Li and Yuzhong Qu and Fei Huang and Yongbin Li},
  title = {{Reverse Preference Optimization for Complex Instruction Following}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
  url = {https://openreview.net/forum?id=Os1zRxdPkY},
}
Figure