Prior Constraints-Based Reward Model Training for Aligning Large Language Models

Hang Zhou, Chenglong Wang, Yimin Hu, Tong Xiao, Chunliang Zhang, Jingbo Zhu

Abstract

Standard reward models used in Reinforcement Learning from Human Feedback (RLHF) often suffer from "uncontrolled scaling," where the model assigns disproportionately large reward margins to responses that are semantically similar. This paper introduces the Prior Constraints-based Reward Model (PCRM), a framework that incorporates task-specific priors—such as text length and semantic similarity—to regulate reward score margins. By dynamically capping these margins, PCRM prevents the reward landscape from becoming overly sensitive to minor variations, leading to more stable alignment. Experimental results on dialogue and summarization tasks show that PCRM consistently outperforms traditional reward models and Direct Preference Optimization (DPO) variants, achieving higher reward accuracy and significantly improved win rates against GPT-4.

Introduction

The alignment of Large Language Models (LLMs) with human preferences typically relies on a Reward Model (RM) trained via a ranking loss. This loss function encourages the RM to assign a higher score to a human-preferred response than to a dispreferred one. However, standard ranking loss lacks an upper bound, often pushing the scores apart indefinitely.

This "uncontrolled scaling" creates a significant challenge during the subsequent reinforcement learning phase (e.g., PPO). If the RM encounters two nearly identical responses and assigns them wildly different scores, the resulting noisy signal can lead to training instability and sub-optimal alignment. This paper addresses this issue by proposing PCRM, which uses similarity-based priors to constrain the reward margin, ensuring that similar responses receive similar rewards.

Methodology

The PCRM Framework

The core innovation of PCRM is the introduction of a maximum margin constraint, denoted as $\Delta^*$. Instead of allowing the reward difference between a preferred response ($y_w$) and a dispreferred response ($y_l$) to grow without limit, PCRM dynamically calculates a ceiling based on the similarity between the two samples.

Mathematically, the loss function is modified such that if the predicted margin exceeds $\Delta^*$, the gradient direction reverses. This mechanism effectively pushes the scores back toward a reasonable distance if the model becomes "overconfident" about a preference between two very similar items.

Similarity Priors

The authors explore two primary metrics to define the constraint $\Delta^*$:

  1. Length Ratio: A surface-level metric comparing the token counts of the two responses. This addresses the common "verbosity bias" where longer responses are often unfairly favored.
  2. Cosine Similarity: A semantic metric utilizing embeddings from a pre-trained model (such as BERT). This captures the actual meaning of the text, ensuring that different phrasings of the same information do not result in divergent reward scores.

Notably, this rank-based constraint is versatile; it can be applied to standard Reward Modeling or integrated directly into Direct Preference Optimization (DPO), a variant the authors term PCDPO.

Experimental Setup

The researchers evaluated the effectiveness of PCRM across two distinct domains:

  • Dialogue: Utilizing the AlpacaFarm dataset, which consists of 10,000 preference pairs designed to simulate real-world user interactions.
  • Summarization: Utilizing the TL;DR dataset (OpenAI's filtered version), containing approximately 93,000 training pairs of human-judged summaries.

Results and Analysis

Performance Gains

PCRM demonstrated consistent improvements over vanilla alignment methods across all benchmarks. In the Dialogue task, the PCRM-Cosine variant achieved a reward accuracy of 56.53%, surpassing the 54.93% accuracy of the standard RM. More importantly, this translated to a +2.48% increase in the GPT-4 win rate compared to traditional RLHF.

Integration with DPO

The benefits of prior constraints extended to DPO. The PCDPO-Cosine model saw a +2.95% increase in GPT-4 win rate over standard DPO, suggesting that the problem of uncontrolled scaling is inherent to the ranking loss itself, regardless of the specific optimization algorithm used.

Summarization Task

In the TL;DR summarization benchmark, PCRM-Cosine outperformed standard RLHF by +0.87 points on ROUGE-L and achieved a +1.99% boost in the GPT-4 win rate. These results confirm that semantic regularization helps the model focus on content quality rather than superficial differences.

Discussion and Limitations

While PCRM provides a robust solution to reward instability, it introduces new considerations for practitioners:

  • Hyperparameter Tuning: The method relies on three hyperparameters ($\beta_1, \beta_2, \beta_3$) to define the constraint curve. These currently require task-specific tuning, which may increase the complexity of the training pipeline.
  • Manual vs. Learned Priors: The current implementation uses manually selected priors (length and cosine similarity). The authors suggest that future iterations could involve learning these constraints automatically from the data to improve adaptability.
  • Computational Cost: Calculating BERT-based embeddings for large datasets adds a pre-processing overhead, though the authors maintain that this cost is negligible compared to the overall expense of training LLMs.

Conclusion

PCRM offers a principled approach to taming the reward curve in LLM alignment. By enforcing the intuitive prior that similar responses should have similar rewards, the framework prevents over-optimization and produces more reliable reward signals. The success of PCRM-Cosine across both RLHF and DPO pipelines highlights the importance of semantic regularization in creating models that are truly aligned with human intent.

Summary updated

BibTeX
@inproceedings{zhou2024prior,
  author = {Hang Zhou and Chenglong Wang and Yimin Hu and Tong Xiao and Chunliang Zhang and Jingbo Zhu},
  title = {{Prior Constraints-Based Reward Model Training for Aligning Large Language Models}},
  booktitle = {CCL},
  year = {2024},
  doi = {10.1007/978-981-97-8367-0\_33},
}
Figure