Learning LLM-as-a-Judge for Preference Alignment

Ziyi Ye, Xiangsheng Li, Qiuchi Li, Qingyao Ai, Yujia Zhou, Wei Shen, Dong Yan, Yiqun Liu

TL;DR

Standard scalar reward models used to align Large Language Models (LLMs) lack interpretability and are highly susceptible to superficial dataset biases, such as favoring longer answers. This paper introduces Con-J, a method that trains an LLM to act as a judge by generating its own contrastive judgments and learning from them via Direct Preference Optimization (DPO). Con-J provides natural language rationales for its preferences, demonstrating superior accuracy and robustness against biases compared to traditional scalar models and even GPT-4o.

What Problem Does This Paper Address?

To align LLMs with human values (e.g., via Reinforcement Learning from Human Feedback or DPO), researchers typically rely on preference data (e.g., Answer A is better than Answer B). Conventionally, this data is used to train a Scalar Model (SM)—a neural network that outputs a single numerical score representing response quality.

However, scalar models have two major flaws:

  1. Lack of Interpretability: They spit out a number without explaining why one answer is better, making it hard for humans to audit them.
  2. Susceptibility to Bias: They easily overfit to superficial patterns in the dataset, such as verbosity (longer is better) or formatting, rather than capturing true human values.
Comparison between a traditional scalar reward model and the generative judge, Con-J.

While some researchers have started using LLMs as generative judges (e.g., prompting GPT-4 to evaluate outputs), training open-source models for this task usually requires expensive, high-quality instruction-tuning data generated by proprietary models. This paper asks: Can we bootstrap an open-source LLM to become a highly accurate, interpretable judge using only standard binary preference data?

Methods

The authors propose Con-J (learning LLM-as-a-Judge using self-generated Contrastive Judgments). Instead of relying on external GPT-4 data, Con-J bootstraps its own training data in three distinct steps:

The three-step training pipeline for Con-J: Judgments Sampling, Filtering, and Contrastive Training.
  1. Judgment Sampling: The researchers prompt a pre-trained LLM (Qwen2-7B-Instruct) to evaluate a pair of answers and output a JSON containing a natural language rationale and a binary preference prediction. To ensure the model generates diverse opinions, they use repeated sampling and "hint-driven" sampling (explicitly instructing the LLM to argue in favor of Answer A, then Answer B).
  2. Judgment Filtering: They compare the LLM's self-generated preferences against the ground-truth preference dataset. This allows them to pair a "positive" judgment (correct preference + rationale) with a "negative" judgment (incorrect preference + rationale) for the exact same prompt.
  3. Contrastive Training: They train the base LLM on these self-generated contrastive pairs using Direct Preference Optimization (DPO), mixed with a small amount of Supervised Fine-Tuning (SFT) loss to stabilize training.

Datasets

Training: * Self-built commercial datasets: ~220,000 preference samples across three domains: Text Creation, Math, and Code. * Public dataset (for the open-source release): Skywork-Reward-Preference-80K-v0.1.

Evaluation: * Public Benchmarks: Infinity-Preference, UltraFeedback, PKU-SafeRLHF, and Reward-Bench. * Adversarial Datasets: Synthetic datasets specifically injected with format bias and verbosity bias to test model robustness.

Key Insights and Ideas

  • Rationales act as a powerful regularizer: Forcing the model to generate a rationale before making a choice distributes the learning signal. Instead of just mapping "long text -> good score" (like a scalar model), the LLM has to find effective representations to explain why the text is good. This makes Con-J significantly more robust to dataset biases.
  • Self-evolution without explicit rationale supervision: Con-J's rationales become more factually correct and useful as training progresses, even though the training process is only supervised by binary preference labels (A > B).
  • The "Consistency Paradox": Interestingly, as Con-J gets better at predicting the correct preference, the consistency between its written rationale and its final binary choice sometimes slightly decreases. The model's binary prediction ability improves faster than its reasoning ability, occasionally leading to correct choices backed by vague or non-committal explanations.

Key Results

  • Beats Scalar Models: On the domain-specific datasets, Con-J consistently outperformed standard pointwise and pairwise scalar models (e.g., 72.4% vs 69.4% accuracy on Text Creation).
  • Rivals or Beats GPT-4o: Con-J significantly surpassed off-the-shelf GPT-4o on the domain-specific Math (85.0% vs 74.8%) and Code (70.1% vs 68.1%) datasets.
  • State-of-the-Art Open Source: On public benchmarks, the open-source version of Con-J outperformed existing generative judges like Auto-J, Prometheus 2, and Llama-3.1-70B. It even beat GPT-4o on the Infinity-Preference benchmark (81.0% vs 75.0%).
  • Bias Resistance: In adversarial tests where the "worse" answer was artificially lengthened to trick the model, Con-J maintained much higher accuracy than scalar models and a variant of Con-J trained without rationales.

Limitations and Future Work

  • Rationale Quality Bottlenecks: While Con-J makes accurate predictions, human evaluation revealed it sometimes struggles to articulate a clear, high-quality rationale when the decision is difficult.
  • Misinformation Risks: Because LLMs can hallucinate, there is a risk that Con-J might generate convincing but factually incorrect rationales. The authors note that human-in-the-loop verification is still necessary.
  • Future Directions: A pilot study in the paper suggests that filtering the training data to only include high-quality rationales further boosts preference prediction accuracy. Future work will explore how to explicitly control and optimize rationale quality during training.

Summary updated

BibTeX
@inproceedings{ye2025learning,
  author = {Ziyi Ye and Xiangsheng Li and Qiuchi Li and Qingyao Ai and Yujia Zhou and Wei Shen and Dong Yan and Yiqun LIU},
  title = {{Learning LLM-as-a-Judge for Preference Alignment}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=HZVIQE1MsJ},
}
Figure