LRHP: Learning Representations for Human Preferences via Preference Pairs

Chenglong Wang, Yang Gan, Yifu Huo, Yongyu Mu, Qiaozhi He, Murun Yang, Tong Xiao, Chunliang Zhang, Tongran Liu, Jingbo ZhuarXiv 2024

Abstract

To improve human-preference alignment training, current research has developed numerous preference datasets consisting of preference pairs labeled as "preferred" or "dispreferred". These preference pairs are typically used to encode human preferences into a single numerical value through reward modeling, which acts as a reward signal during reinforcement learning from human feedback (RLHF). However, representing these human preferences as a numerical value complicates the analysis of these preferences and restricts their broader applications other than RLHF. In contrast, in this work, we introduce a preference representation learning task that aims to construct a richer and more structured representation of human preferences. We further develop a more generalizable framework, Learning Representations for Human Preferences via preference pairs (namely LRHP), which extends beyond traditional reward modeling to tackle this task. We verify the utility of preference representations in two downstream tasks: preference data selection and preference margin prediction. Building upon the human preferences in representations, we achieve strong performance in both tasks, significantly outperforming baselines.

Introduction

Aligning Large Language Models (LLMs) with human values typically involves Reinforcement Learning from Human Feedback (RLHF). In this pipeline, a "Reward Model" is trained to evaluate two responses and output a single scalar value representing human preference. However, this scalar approach is often too reductive. It acts as a "black box," failing to explain why a response was preferred (e.g., helpfulness vs. safety), and its utility is largely restricted to the RLHF process itself.

This paper introduces LRHP, a framework designed to learn high-dimensional vector representations of preferences. By moving beyond simple scalars to rich embeddings, LRHP enables more sophisticated data analysis, targeted data selection, and more precise model tuning.

Methodology

Overview of the LRHP framework illustrating the learning of preference representations and their application in downstream tasks like data selection and margin prediction.

The LRHP framework transforms the preference learning task from scalar regression to representation learning.

The LRHP Architecture

The authors utilize existing LLMs (such as LLaMA-3 or Mistral) as a backbone. The model is fed a sequence containing an instruction followed by two candidate responses (A and B). A special token, <|PREFERENCE|>, is introduced at the end of the sequence. The final hidden state of this token serves as the preference representation.

Training Objective

The model is trained on a classification task to determine which response is preferred. By forcing the model to distinguish between preferred and dispreferred responses, the <|PREFERENCE|> token learns to capture the underlying criteria humans use for judgment. These learned embeddings can then be applied to two primary downstream tasks:

  1. Preference Data Selection (PDS): Using embeddings to identify data in a large pool that matches specific target preferences (e.g., "harmlessness").
  2. Preference Margin Prediction (PMP): Quantifying the degree of preference (on a scale of 1 to 4) to improve Direct Preference Optimization (DPO) training.

Experimental Setup and Datasets

The study utilized a massive fusion of nine preference datasets, totaling over 849,000 preference pairs. This includes general preference data (Anthropic Helpful&Harmless, Alpacafarm, SHP, UltraFeedback) and task-specific data (WebQA, Summarization, Math Reasoning, Code Generation, and Machine Translation).

Key Results and Insights

Performance comparison of LRHP against various baselines (Vanilla, Emb, Random) across Best-of-n sampling and Reinforcement Learning, showing superior alignment in helpfulness and harmlessness.

Superior Alignment and Data Selection

LRHP demonstrates significant improvements in model alignment. On the LLaMA-3 model, LRHP-based data selection improved reward model accuracy by 4.57 points on helpfulness tasks compared to random selection. Furthermore, by using LRHP to predict preference margins for DPO training, the authors achieved a 3.3-point win-rate increase on the AlpacaEval2 benchmark compared to the SimPO baseline.

Preference "Arithmetic" and Layer-wise Nuance

Because preferences are represented as vectors, researchers can use cosine similarity to navigate preference space, querying datasets for specific feedback types without manual labels. Analysis revealed that shallow model layers are better at task-level distinction (e.g., math vs. code), while deeper layers are required to capture nuanced preference types like helpfulness versus harmlessness.

Human Correlation

The Preference Margin Prediction (PMP) task achieved a Spearman correlation of 0.604 with human labels using only 3,000 training samples, significantly outperforming standard supervised fine-tuning (SFT) baselines.

Conclusion and Future Work

LRHP successfully moves preference modeling from a reductive scalar to a multi-dimensional representation. While currently tested on models up to 8B parameters and requiring response pairs, future work will explore scaling to larger models (70B+) and learning representations from single demonstrations. The ultimate goal is to integrate these embeddings directly into the LLM's generation process for real-time alignment refinement.

Summary updated

BibTeX
@misc{wang2024lrhp,
  author = {Chenglong Wang and Yang Gan and Yifu Huo and Yongyu Mu and Qiaozhi He and Murun Yang and Tong Xiao and Chunliang Zhang and Tongran Liu and Jingbo Zhu},
  title = {{LRHP: Learning Representations for Human Preferences via Preference Pairs}},
  year = {2024},
  eprint = {2410.04503},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.04503},
}
Figure