Fine-Tuning with Preferences Rather Than Labels

#fine-tuning #preference learning #human feedback #reward modeling #proximal policy optimization #supervised learning #machine learning #nlp #ai

1. The Shift from Labeled Data to Preferences

The Shift from Labeled Data to Preferences

Traditional supervised learning relies on labeled datasets, where each input x is paired with a ground-truth label y. The model learns by minimizing a loss function L(y, f(x)), where f(x) is the model's prediction. However, this paradigm assumes that labels are unambiguous and easily obtainable, which is often not the case in complex real-world tasks like natural language generation, recommendation systems, or autonomous driving.

Limitations of Labeled Data

Labeled datasets suffer from several key limitations:

Preference-Based Learning

Preference learning shifts the paradigm by using relative comparisons between outputs rather than absolute labels. Given an input x and two candidate outputs y1 and y2, a human (or another model) provides a preference y1 ≻ y2 indicating which output is better. The model then learns to predict these preferences.

$$ P(y_1 \succ y_2 | x) = \sigma(r(x, y_1) - r(x, y_2)) $$

where r(x, y) is a learned reward function and σ is the logistic sigmoid. This formulation derives from the Bradley-Terry model for pairwise comparisons.

Advantages of Preference Learning

Preference-based methods offer several advantages over traditional labeling:

Practical Implementation

Modern implementations often use reinforcement learning from human feedback (RLHF), where:

  1. A base model generates candidate outputs
  2. Human raters provide pairwise preferences
  3. A reward model is trained to predict these preferences
  4. The base model is fine-tuned using reinforcement learning to maximize the learned reward
$$ \nabla_\theta J(\theta) = \mathbb{E}_{x \sim \mathcal{D}} \left[ \mathbb{E}_{y \sim \pi_\theta(\cdot|x)} \left[ r_\phi(x, y) \nabla_\theta \log \pi_\theta(y|x) \right] \right] $$

where πθ is the policy (language model) and rϕ is the learned reward model.

The Shift from Labeled Data to Preferences – Fine-Tuning with Preferences Rather Than Labels – Tutorial Diagram
Diagram Description: The diagram would show the comparison between traditional supervised learning (input-label pairs) and preference-based learning (input-output pairs with preference relations), including the RLHF pipeline stages.

Key Advantages of Preference-Based Learning

Scalability in Human Feedback Collection

Traditional supervised learning relies on large-scale labeled datasets, which are expensive and time-consuming to curate. Preference-based learning circumvents this bottleneck by leveraging relative comparisons, which are often easier for humans to provide. For instance, in reinforcement learning from human feedback (RLHF), annotators only need to rank responses rather than generate precise labels. This reduces cognitive load and enables faster data collection.

$$ \mathcal{L}(\theta) = \mathbb{E}_{(x,y_w,y_l)\sim D}[\log \sigma(r_\theta(x,y_w) - r_\theta(x,y_l))] $$

Here, rθ(x,y) represents the reward model's scoring function, and yw, yl denote the preferred and dispreferred outputs respectively. The Bradley-Terry model converts pairwise comparisons into a differentiable objective, enabling gradient-based optimization.

Alignment with Complex Human Values

Crisp labels often fail to capture nuanced human preferences, especially in subjective domains like creative writing or ethical decision-making. Preference learning allows for:

Robustness to Label Noise

Human annotators exhibit higher consistency when comparing outputs rather than assigning absolute scores. The pairwise comparison paradigm induces a form of noise reduction through:

$$ P(y_i \succ y_j) = \frac{\exp(f_\theta(x,y_i))}{\exp(f_\theta(x,y_i)) + \exp(f_\theta(x,y_j))} $$

This softmax formulation makes the learning process more tolerant to individual annotation errors compared to hard label assignments. Empirical studies show that preference models achieve 15-30% higher robustness to label noise in tasks like summarization evaluation.

Continuous Improvement via Iterative Refinement

Preference-based systems enable active learning paradigms where:

This is particularly valuable in production systems like conversational AI, where user preferences evolve over time. The Elo rating system adaptation for LLMs demonstrates how pairwise comparisons support continuous model improvement.

Reduced Reward Hacking

Traditional reward maximization often leads to adversarial optimization (e.g., chatbots producing plausible but incorrect answers). Preference learning mitigates this by:

Theoretical work in inverse reinforcement learning shows that preference-based methods require exponentially fewer samples to recover the true reward function compared to behavioral cloning.

1.3 Common Applications and Use Cases

Reinforcement Learning from Human Feedback (RLHF)

One of the most prominent applications of preference-based fine-tuning is in Reinforcement Learning from Human Feedback (RLHF), where human preferences are used to shape the behavior of large language models (LLMs). Instead of relying on explicit labels, RLHF leverages pairwise comparisons or ranking data to train a reward model, which is then used to fine-tune the policy via reinforcement learning. This approach has been successfully applied in models like OpenAI's ChatGPT and Anthropic's Claude, where human feedback refines responses to align with desired conversational qualities such as coherence, safety, and helpfulness.

$$ \max_\pi \mathbb{E}_{x \sim \mathcal{D}, y \sim \pi(\cdot|x)} \left[ r_\phi(x, y) - \beta \, \text{KL}(\pi || \pi_{\text{ref}}) \right] $$

Here, rϕ(x, y) represents the learned reward function from preference data, and the KL-divergence term ensures the policy π does not deviate too far from the reference policy πref.

Preference-Based Recommender Systems

Traditional recommender systems rely on explicit ratings (e.g., 1-5 stars), but preference-based methods capture implicit feedback, such as click-through rates or dwell time, to infer user preferences. Techniques like Bayesian Personalized Ranking (BPR) optimize the ranking of items by learning from pairwise comparisons:

$$ \mathcal{L}_{\text{BPR}} = -\sum_{(u,i,j) \in \mathcal{D}} \ln \sigma(r_{ui} - r_{uj}) + \lambda ||\Theta||^2 $$

where rui and ruj are predicted scores for user u interacting with items i (preferred) and j (non-preferred).

Robotics and Autonomous Systems

In robotics, preference-based learning enables robots to adapt to human intentions without explicit task demonstrations. For instance, inverse reinforcement learning (IRL) methods infer reward functions from observed human behavior or preference rankings over trajectories. This is particularly useful in applications like autonomous driving, where human drivers' implicit preferences (e.g., smooth braking, lane-keeping) can be encoded into the system's decision-making process.

Clinical Decision Support

Medical applications leverage preference learning to personalize treatment plans. Instead of binary labels (effective/ineffective), clinicians provide rankings over treatment outcomes based on patient-specific factors. Preference Gaussian Processes (PGPs) have been used to model such ordinal data, capturing uncertainty in medical preferences while avoiding the need for precise numerical labels.

Algorithmic Trading

Financial models use preference-based optimization to rank portfolios or trading strategies based on risk-return trade-offs. Here, pairwise comparisons between strategies (e.g., "Strategy A is preferred over Strategy B under market condition X") allow the system to learn complex, context-dependent utility functions without requiring explicit profit/loss labels for every scenario.

Challenges and Considerations

2. Preference Elicitation and Representation

2.1 Preference Elicitation and Representation

Preference-based learning shifts the paradigm from supervised learning with explicit labels to learning from relative comparisons. The core challenge lies in accurately eliciting and mathematically representing human preferences in a form suitable for optimization. Unlike categorical or regression labels, preferences introduce a partial ordering over possible outputs, requiring specialized techniques for modeling and inference.

Mathematical Representation of Preferences

Given a dataset D consisting of tuples (x, yi, yj), where x is the input and yi ≻ yj indicates that output yi is preferred over yj for input x, we model the preference probability using the Bradley-Terry model:

$$ P(y_i \succ y_j | x) = \frac{\exp(r(x, y_i))}{\exp(r(x, y_i)) + \exp(r(x, y_j))} $$

where r(x, y) is a learned reward function. This formulation transforms pairwise comparisons into a probabilistic framework, enabling gradient-based optimization. The reward function r(x, y) can be parameterized by a neural network, allowing for flexible representation of complex preferences.

Preference Elicitation Methods

Eliciting high-quality preference data is critical for effective learning. Common approaches include:

Embedding Preferences in Vector Spaces

For high-dimensional outputs like text or images, directly comparing raw outputs is infeasible. Instead, we project outputs into a learned embedding space where distances correlate with preference strengths. Let ϕ(y) be an embedding function; the reward can be expressed as:

$$ r(x, y) = f_\theta(x)^T \phi(y) $$

where fθ(x) produces a query vector encoding the input's desired characteristics. This approach enables efficient nearest-neighbor search for preference-aware generation.

Handling Noisy and Conflicting Preferences

Real-world preference data often contains inconsistencies due to human variability. We model this by introducing a noise parameter β that modulates the certainty of comparisons:

$$ P(y_i \succ y_j | x) = \frac{\exp(\beta r(x, y_i))}{\exp(\beta r(x, y_i)) + \exp(\beta r(x, y_j))} $$

where β → ∞ represents perfect consistency and β → 0 indicates random preferences. This probabilistic treatment allows the model to learn from imperfect data while identifying systematic patterns.

Active Preference Elicitation

Strategic selection of queries can dramatically improve data efficiency. Information-theoretic approaches select comparisons that maximize the expected information gain about the reward function parameters:

$$ x^*, y_i^*, y_j^* = \underset{x, y_i, y_j}{\mathrm{argmax}} \, I(r; d | D) $$

where I is the mutual information between the reward parameters and the potential comparison outcome d. This results in queries that are neither too obvious nor too ambiguous, accelerating the learning process.

Reward Modeling and Learning from Human Feedback

Reward modeling is a critical component of preference-based learning, where the goal is to infer a reward function from human feedback rather than explicit labels. The process involves training a reward model R to predict human preferences over trajectories or actions. Given a dataset of human comparisons D = {(xi(1), xi(2), yi)}, where yi indicates which of the two inputs is preferred, the reward model is trained to maximize the likelihood of the observed preferences.

Bradley-Terry Model for Preference Learning

The Bradley-Terry model is a widely used probabilistic framework for pairwise comparisons. It assumes the probability that trajectory x(1) is preferred over x(2) is given by:

$$ P(x^{(1)} \succ x^{(2)}) = \frac{\exp(R(x^{(1)}))}{\exp(R(x^{(1)})) + \exp(R(x^{(2)}))} $$

Here, R(x) represents the scalar reward assigned to trajectory x. The reward model is typically parameterized by a neural network and trained via maximum likelihood estimation:

$$ \mathcal{L}(\theta) = -\sum_{(x^{(1)}, x^{(2)}, y) \in D} \log P(x^{(1)} \succ x^{(2)})^y \cdot P(x^{(2)} \succ x^{(1)})^{1-y} $$

Noise-Aware Reward Modeling

Human feedback is often noisy, and the Bradley-Terry model can be extended to account for this uncertainty. A common approach is to introduce a temperature parameter β that scales the reward differences:

$$ P(x^{(1)} \succ x^{(2)}) = \frac{\exp(\beta R(x^{(1)}))}{\exp(\beta R(x^{(1)})) + \exp(\beta R(x^{(2)}))} $$

Lower values of β imply higher noise tolerance, while higher values sharpen the preference distribution.

Inverse Reinforcement Learning Connection

Reward modeling can be viewed as a form of inverse reinforcement learning (IRL), where the goal is to recover the underlying reward function from observed behavior. Unlike traditional IRL, which assumes access to optimal demonstrations, preference-based IRL works with comparative feedback, making it more flexible in real-world applications.

Practical Challenges and Solutions

Case Study: Reinforcement Learning from Human Feedback (RLHF)

In RLHF, a reward model trained on human comparisons is used to fine-tune a policy via reinforcement learning. The policy generates trajectories, which are scored by the reward model, and updates are performed using algorithms like Proximal Policy Optimization (PPO). This approach has been successfully applied in large language models (e.g., OpenAI's InstructGPT) and robotics.

$$ \pi_{\text{new}} = \arg\max_{\pi} \mathbb{E}_{x \sim \pi} [R(x)] - \lambda \text{KL}(\pi || \pi_{\text{old}}) $$

Here, the KL-divergence term ensures the policy does not deviate too far from the original during updates.

2.3 Comparison with Traditional Supervised Learning

Traditional supervised learning relies on labeled datasets where each input x is paired with a ground truth label y, optimizing a loss function L(f(x), y) to minimize prediction error. In contrast, preference-based learning operates on pairwise or ranked comparisons (xi, xj, yij), where yij indicates whether xi is preferred over xj. The optimization objective shifts from direct label matching to maximizing the likelihood of observed preferences:

$$ \mathcal{L}(\theta) = -\sum_{(x_i, x_j, y_{ij})} \log \sigma(r_\theta(x_i) - r_\theta(x_j)) $$

Here, rθ(x) is a learned reward function parameterized by θ, and σ is the logistic function. Unlike supervised learning's pointwise loss, this pairwise formulation captures relative utility rather than absolute correctness, making it robust to noisy or subjective preferences.

Key Differences

Mathematical Formulation

Consider a supervised learning task with a squared-error loss:

$$ \mathcal{L}_{\text{SL}}(\theta) = \sum_{(x,y)} (f_\theta(x) - y)^2 $$

In preference-based learning, the analogous Bradley-Terry model transforms reward differences into probabilities:

$$ P(x_i \succ x_j) = \frac{\exp(r_\theta(x_i))}{\exp(r_\theta(x_i)) + \exp(r_\theta(x_j))} $$

This probabilistic framing aligns with maximum likelihood estimation, where the goal is to match the model's preference distribution to the empirical data.

Practical Implications

Preference-based fine-tuning excels in domains where:

Empirical studies show that models trained via preferences, such as those using Reinforcement Learning from Human Feedback (RLHF), achieve better alignment with human judgment than supervised baselines, despite using orders of magnitude fewer labeled examples.

3. Proximal Policy Optimization (PPO) for Preferences

Proximal Policy Optimization (PPO) for Preferences

Policy Optimization with Preference-Based Rewards

Traditional reinforcement learning (RL) relies on explicit reward functions, but preference-based RL replaces scalar rewards with pairwise comparisons. PPO, a policy gradient method, adapts naturally to this setting by optimizing a clipped objective function that prevents excessively large policy updates. The core idea is to maximize the expected reward while constraining the policy change within a trust region.

$$ L^{CLIP}( heta) = \mathbb{E}_t \left[ \min\left( r_t( heta) \hat{A}_t, \text{clip}(r_t( heta), 1 - \epsilon, 1 + \epsilon) \hat{A}_t \right) \right] $$

Here, rt(θ) represents the probability ratio between new and old policies, Ât is the advantage estimate, and ϵ defines the clipping range (typically 0.1-0.3). For preference learning, Ât derives from Bradley-Terry models or Elo ratings comparing trajectory pairs.

Preference Modeling with the Bradley-Terry Framework

Human/AI preferences are modeled as a probability distribution over trajectory pairs (τi, τj):

$$ P(τ^i \succ τ^j) = \frac{\exp(R(τ^i))}{\exp(R(τ^i)) + \exp(R(τ^j))} $$

where R(τ) is the learned reward function. PPO optimizes the policy to maximize R(τ) while regularizing with the clipped objective. The reward function is typically parameterized as a neural network trained concurrently with the policy.

Practical Implementation Steps

Key Algorithmic Modifications

Standard PPO requires three adaptations for preference learning:

  1. Reward Normalization: Scale rewards to zero mean/unit variance to stabilize training
  2. Asymmetric Clipping: Use different clipping bounds for preferred/dispreferred trajectories
  3. KL Penalization: Add a divergence penalty from a reference policy to prevent reward hacking
$$ L^{KL}( heta) = L^{CLIP}( heta) - \beta D_{KL}(π_θ || π_{ref}) $$

Empirical Considerations

In practice, preference-based PPO shows:

Policy π Environment Reward Model Preference Database
Proximal Policy Optimization (PPO) for Preferences – Fine-Tuning with Preferences Rather Than Labels – Tutorial Diagram
Diagram Description: The diagram would physically show the interaction flow between the Policy, Environment, Reward Model, and Preference Database, including feedback loops and data pathways.

Direct Preference Optimization (DPO)

Direct Preference Optimization (DPO) is a method for fine-tuning language models using pairwise preference data instead of explicit labels. Unlike traditional reinforcement learning from human feedback (RLHF), which involves training a reward model and then optimizing a policy, DPO directly optimizes the policy to align with human preferences by reparameterizing the reward function.

Mathematical Foundation

The key insight behind DPO is that the optimal policy under a Bradley-Terry preference model can be expressed directly in terms of the reward function. Given a preference dataset D = {(x, yw, yl)}, where x is a prompt and yw, yl are the preferred and dispreferred responses, the Bradley-Terry model defines the probability that yw is preferred over yl as:

$$ P(y_w \succ y_l | x) = \frac{\exp(r(x, y_w))}{\exp(r(x, y_w)) + \exp(r(x, y_l))} $$

DPO reparameterizes the reward function r(x, y) in terms of the policy π and a reference policy πref:

$$ r(x, y) = \beta \log \frac{\pi(y | x)}{\pi_{\text{ref}}(y | x)} $$

Substituting this into the Bradley-Terry model yields the DPO objective:

$$ \mathcal{L}_{\text{DPO}}(\pi) = -\mathbb{E}_{(x, y_w, y_l) \sim D} \left[ \log \sigma \left( \beta \log \frac{\pi(y_w | x)}{\pi_{\text{ref}}(y_w | x)} - \beta \log \frac{\pi(y_l | x)}{\pi_{\text{ref}}(y_l | x)} \right) \right] $$

Advantages Over RLHF

DPO eliminates the need for a separate reward model training phase, reducing computational overhead and potential biases introduced by reward modeling. It directly optimizes the policy using preference data, which simplifies the training pipeline and often leads to more stable convergence.

Practical Implementation

Implementing DPO involves:

The hyperparameter β controls the strength of regularization towards the reference policy, balancing preference optimization with deviation from the original model.

Case Study: Aligning Language Models with DPO

In a recent study, DPO was applied to align a 6B-parameter language model with human preferences for helpfulness and harmlessness. The DPO-trained model achieved comparable performance to RLHF-trained models while requiring 50% fewer training steps and no explicit reward model. The resulting policy demonstrated improved adherence to safety constraints while maintaining high response quality.

Empirical results show that DPO is particularly effective in scenarios where reward modeling is challenging, such as when preferences are sparse or noisy. The direct optimization approach also mitigates reward hacking, a common issue in RLHF where models exploit imperfections in the reward model.

Direct Preference Optimization (DPO) – Fine-Tuning with Preferences Rather Than Labels – Tutorial Diagram
Diagram Description: The diagram would show the relationship between the reference policy, the optimized policy, and the reward function reparameterization in DPO, clarifying the mathematical flow.

3.3 Contrastive Learning Approaches

Contrastive learning provides a powerful framework for fine-tuning models using relative preferences rather than absolute labels. The core idea is to learn representations by contrasting positive pairs (similar or preferred samples) against negative pairs (dissimilar or less preferred samples). This approach is particularly effective when labeled data is scarce, but pairwise or ranked preferences are available.

Contrastive Loss Functions

The most common contrastive loss function is the InfoNCE loss (Noise Contrastive Estimation), which maximizes the mutual information between positive pairs while pushing apart negative pairs. Given a batch of N samples, the loss for a positive pair (x_i, x_j) is defined as:

$$ \mathcal{L}_{InfoNCE} = -\log \frac{\exp(sim(z_i, z_j)/\tau)}{\sum_{k=1}^{N} \mathbb{1}_{[k \neq i]} \exp(sim(z_i, z_k)/\tau)} $$

where sim(z_i, z_j) is a similarity function (typically cosine similarity), τ is a temperature parameter, and z_i = f(x_i) is the encoded representation of x_i.

Triplet Loss Variant

Another widely used approach is the triplet loss, which operates on triplets of samples (x_a, x_p, x_n), where x_a is an anchor, x_p is a positive (preferred) sample, and x_n is a negative (less preferred) sample. The loss encourages the distance between the anchor and positive to be smaller than the distance between the anchor and negative by a margin m:

$$ \mathcal{L}_{triplet} = \max(0, d(z_a, z_p) - d(z_a, z_n) + m) $$

Here, d(·,·) is a distance metric, typically Euclidean or cosine distance.

Supervised Contrastive Learning

When multiple positive pairs are available, supervised contrastive learning extends InfoNCE by leveraging all positives in the batch:

$$ \mathcal{L}_{SupCon} = -\frac{1}{|P(i)|} \sum_{p \in P(i)} \log \frac{\exp(sim(z_i, z_p)/\tau)}{\sum_{k=1}^{N} \mathbb{1}_{[k \neq i]} \exp(sim(z_i, z_k)/\tau)} $$

where P(i) is the set of indices of all positives for anchor i.

Practical Considerations

Contrastive learning requires careful selection of:

Applications in Preference Learning

In preference-based fine-tuning, contrastive learning can be applied by:

Recent work has shown that contrastive approaches can outperform traditional supervised learning when fine-tuning large language models using human preference data, as they better capture relative quality distinctions between outputs.

Contrastive Learning Approaches – Fine-Tuning with Preferences Rather Than Labels – Tutorial Diagram
Diagram Description: The diagram would physically show the relationships between anchor, positive, and negative samples in contrastive learning, illustrating how distances are optimized in the embedding space.

4. Data Collection and Annotation for Preferences

4.1 Data Collection and Annotation for Preferences

Preference Data vs. Labeled Data

Traditional supervised learning relies on labeled datasets where each input x is paired with a ground-truth label y. In contrast, preference-based learning operates on pairwise or ranked comparisons, where annotators indicate which of two (or more) outputs is preferred for a given input. The preference signal ypref is often represented as a binary relation yi ≻ yj, denoting that output yi is preferred over yj for input x.

$$ \mathcal{D} = \{(x^{(k)}, y^{(k)}_i, y^{(k)}_j, r^{(k)})\}_{k=1}^N $$

where r(k) ∈ {0,1} indicates the preference (0 for yj preferred, 1 for yi preferred).

Human Annotation Protocols

Collecting high-quality preference data requires carefully designed annotation protocols:

Studies show pairwise comparisons yield more reliable data than absolute ratings, with lower inter-annotator disagreement. The Bradley-Terry model is commonly used to estimate latent quality scores from pairwise comparisons:

$$ P(y_i ≻ y_j) = \frac{\exp(f(x, y_i))}{\exp(f(x, y_i)) + \exp(f(x, y_j))} $$

Handling Annotation Noise

Preference data is inherently noisy due to subjective human judgments. Several techniques improve robustness:

Scalable Data Collection

For large-scale preference datasets, consider:

Case Study: RLHF Data Collection

In Reinforcement Learning from Human Feedback (RLHF), preference data is collected in multiple phases:

  1. Initial supervised fine-tuning on high-quality demonstrations
  2. Collection of 10,000-100,000 pairwise preferences on model outputs
  3. Optional iterative refinement through online data collection

The Anthropic-LM dataset, for example, contains 150k pairwise comparisons across diverse prompts, with each pair judged by 3-7 annotators to ensure reliability.

Ethical Considerations

Preference data collection raises unique challenges:

Data Collection and Annotation for Preferences – Fine-Tuning with Preferences Rather Than Labels – Tutorial Diagram
Diagram Description: The diagram would show the comparison between traditional labeled data (x→y) and preference data (x→y_i vs y_j with binary relation), highlighting the structural difference in data representation.

4.2 Training and Evaluation Pipelines

Pipeline Architecture

The training pipeline for preference-based fine-tuning consists of three core components: data sampling, preference modeling, and policy optimization. Unlike supervised learning, the pipeline operates on pairwise comparisons (xi, yiw, yil) where xi is the input context and yiw, yil are the preferred and dispreferred outputs respectively.

$$ \mathcal{L}(\theta) = -\mathbb{E}_{(x,y^w,y^l)\sim D} \left[ \log \sigma \left( r_\theta(x,y^w) - r_\theta(x,y^l) \right) \right] $$

The reward model rθ is trained using Bradley-Terry pairwise loss, where σ is the sigmoid function. Gradient updates are applied to minimize the negative log-likelihood of correct preference predictions.

Parallelized Training

For large-scale deployment, the pipeline implements:

Evaluation Metrics

Standard evaluation protocols measure:

$$ \tau = \frac{n_c - n_d}{\sqrt{(n_0 - n_1)(n_0 - n_2)}} $$

where nc and nd are concordant/discordant pairs, while n0 = n(n-1)/2 and n1, n2 account for ties.

Online Feedback Integration

Production systems often implement continuous learning through:

The complete pipeline typically requires 3-5x more compute than equivalent supervised fine-tuning due to the need for pairwise comparisons and reward model pretraining.

Training and Evaluation Pipelines – Fine-Tuning with Preferences Rather Than Labels – Tutorial Diagram
Diagram Description: The diagram would show the three core components (data sampling, preference modeling, policy optimization) and their flow in the training pipeline, including how pairwise comparisons are processed.

4.3 Handling Noisy or Conflicting Preferences

When fine-tuning models using preference data, noise and conflicts in the preference labels are inevitable due to subjective human judgments, ambiguous tasks, or adversarial annotations. Robust optimization techniques are essential to prevent the model from overfitting to spurious patterns or becoming unstable during training.

Mathematical Formulation of Noisy Preferences

Assume we have a preference dataset D consisting of triples (x, yw, yl), where x is the input, and yw is preferred over yl. Under noise, some preferences may be incorrect. Let η be the probability that a given preference label is flipped. The Bradley-Terry model, commonly used for preference learning, can be extended to account for noise:

$$ P(y_w \succ y_l | x) = \frac{(1 - η) \exp(r(x, y_w)) + η \exp(r(x, y_l))}{\exp(r(x, y_w)) + \exp(r(x, y_l))} $$

Here, r(x, y) is the learned reward function. This formulation marginalizes over the possibility of a flipped label with probability η.

Robust Optimization Approaches

1. Noise-Aware Loss Functions

Standard maximum likelihood estimation is sensitive to label noise. Instead, we can use a generalized cross-entropy loss that downweights uncertain or potentially incorrect samples:

$$ \mathcal{L} = -\mathbb{E}_{(x,y_w,y_l) \sim D} \left[ w(x, y_w, y_l) \log P(y_w \succ y_l | x) \right] $$

where w(x, yw, yl) is a weighting function that can be based on:

2. Preference Aggregation Techniques

When multiple annotators provide conflicting preferences for the same pair, we can aggregate them using:

Practical Implementation Considerations

In practice, handling noisy preferences requires:

Case Study: RLHF with Noisy Human Feedback

In reinforcement learning from human feedback (RLHF), a common approach is to train a reward model on preference data before fine-tuning the policy. When preferences are noisy:

$$ \text{Objective} = \mathbb{E}_x \left[ \min\left( \frac{\pi(y|x)}{\pi_{old}(y|x)} \hat{A}(x,y), \text{clip}\left(\frac{\pi(y|x)}{\pi_{old}(y|x)}, 1-ε, 1+ε\right) \hat{A}(x,y) \right) \right] $$

where π is the policy, πold is the previous policy, and Â(x,y) is the estimated advantage function from the potentially noisy reward model.

5. Bias and Fairness in Preference-Based Models

5.1 Bias and Fairness in Preference-Based Models

Sources of Bias in Preference Learning

Preference-based models inherit biases from multiple sources, including the data collection process, annotator demographics, and the underlying reward model. Unlike supervised learning, where labels are often vetted for consistency, preference data is inherently subjective. If annotators disproportionately favor certain outputs due to cultural, gender, or ideological biases, the learned reward function R(x, y) will reflect these preferences. For example, in dialogue systems, annotators may rate polite or non-controversial responses higher, leading to overly cautious model behavior.

$$ R(x, y) = \mathbb{E}_{(x,y) \sim \mathcal{D}} \left[ \phi(y) \cdot \psi(x) \right] + \epsilon $$

Here, φ(y) represents latent annotator biases encoded in the preference data D, while ψ(x) captures task-specific features. The error term ε includes noise from inconsistent human judgments.

Quantifying Fairness Violations

To measure bias, we define a fairness metric F over model outputs y conditioned on protected attributes A (e.g., gender, race). For binary preferences, the disparity in expected rewards between groups A=a and A=b is:

$$ \Delta_R = \left| \mathbb{E}[R(x, y)|A=a] - \mathbb{E}[R(x, y)|A=b] \right| $$

Models are considered fair if ΔR < δ for a small threshold δ. However, this assumes equal base rates across groups—a condition rarely met in real-world preference data.

Mitigation Strategies

Three principal approaches exist to reduce bias in preference-based learning:

$$ \mathcal{L}_{fair} = \mathcal{L}_{RLHF} + \lambda \Delta_R $$

Case Study: Language Model Alignment

In OpenAI’s InstructGPT, preference learning amplified biases present in the annotator pool. Post-hoc analysis revealed that outputs used more stereotypical language for certain professions (e.g., "nurse" vs. "doctor"). The team mitigated this by:

Trade-offs Between Fairness and Performance

Enforcing strict fairness constraints often degrades task performance. The Pareto frontier between accuracy and fairness can be formalized as:

$$ \max_\theta \mathbb{E}[R(x, y_\theta)] \quad \text{s.t.} \quad \Delta_R \leq \delta $$

Empirical studies show that a δ threshold of 0.1–0.2 typically retains 85–90% of original reward while reducing bias by 40–60%.

5.2 Scalability and Computational Costs

Fine-tuning models using preference-based learning introduces unique computational challenges compared to traditional supervised learning. The primary bottleneck arises from the need to compare multiple model outputs for each input, which scales quadratically with the number of preference pairs. For a dataset with N examples, the number of possible pairwise comparisons grows as O(N²), making large-scale training prohibitively expensive.

$$ \text{Comparisons} = \binom{N}{2} = \frac{N(N-1)}{2} $$

Parallelization Strategies

Modern implementations mitigate this cost through distributed computing frameworks like TensorFlow or PyTorch Distributed. The key insight is that preference comparisons are embarrassingly parallel—each pair can be processed independently. By sharding the comparison workload across K GPUs, the effective computation time reduces to O(N²/K). However, memory overhead becomes critical when storing gradients for backpropagation through the full comparison graph.

Approximation Techniques

Recent work employs stochastic sampling of preference pairs rather than exhaustive comparison. For a batch size B, we randomly sample M pairs where M ≪ B². This transforms the quadratic complexity to O(M) per batch while maintaining statistical efficiency. The sampling distribution often follows:

$$ P(i,j) \propto \exp(\lambda \cdot |s_i - s_j|) $$

where s_i, s_j are model scores for outputs i and j, and λ controls exploration-exploitation trade-offs.

Hardware Considerations

Preference-based training exhibits distinct hardware utilization patterns compared to standard fine-tuning:

Empirical studies show that models like GPT-3 (175B parameters) require 3-5× more GPU hours for preference tuning versus supervised fine-tuning on equivalent datasets. This gap narrows with architectural innovations like mixture-of-experts, where only activated sub-networks process each comparison.

Case Study: RLHF at Scale

Anthropic's implementation of Reinforcement Learning from Human Feedback (RLHF) on Claude 2 demonstrated several optimizations:

These techniques reduced training costs by 40% while maintaining reward model accuracy. The trade-off surface between compute budget and preference learning performance remains an active research area, particularly for models exceeding 100B parameters.

Scalability and Computational Costs – Fine-Tuning with Preferences Rather Than Labels – Tutorial Diagram
Diagram Description: The diagram would show the quadratic scaling of pairwise comparisons versus linear sampling, and parallelization across GPUs with memory/compute trade-offs.

5.3 Interpretability and Transparency Issues

Fine-tuning models using preference data rather than explicit labels introduces unique interpretability challenges. Unlike supervised learning, where decision boundaries are directly tied to labeled examples, preference-based learning relies on relative rankings that obscure the underlying criteria for model decisions. This opacity stems from two primary sources: the black-box nature of reward models used to capture preferences and the compounding of uncertainty during policy optimization.

Reward Model Opaqueness

The reward model R(x), typically a neural network trained on pairwise comparisons, lacks intrinsic interpretability. While techniques like SHAP values or LIME can provide post-hoc explanations, these methods often fail to capture the true decision process when:

$$ \text{SHAP}(R, x)_i = \sum_{S \subseteq F \setminus \{i\}} \frac{|S|!(|F|-|S|-1)!}{|F|!} [R(x_S \cup \{i\}) - R(x_S)] $$

where F is the set of all features and xS represents inputs with only features in S active. This formulation becomes computationally intractable for large language models where |F| exceeds 104.

Cascading Uncertainty in Policy Optimization

During RL fine-tuning, the policy πθ learns to maximize the opaque reward signal, compounding interpretability issues. The policy gradient update rule:

$$ abla_θ J(θ) = \mathbb{E}_{x \sim π_θ} \left[ abla_θ \log π_θ(x) \hat{A}(x) \right] $$

where Â(x) is the advantage estimate, introduces two layers of abstraction: the reward model's decisions influence the advantage estimates, which then shape the policy updates. This makes it impossible to trace whether a particular policy behavior originated from:

  • Genuine human preference patterns
  • Artifacts of the reward model architecture
  • Noise in the preference dataset

Diagnostic Approaches

Recent work proposes several methods to improve transparency:

  1. Preference Attribution Mapping: Computes gradient-based attention scores between input features and predicted preference probabilities
  2. Counterfactual Preference Analysis: Generates minimally perturbed inputs x' where the preference flips (x ≻ x' → x' ≻ x)
  3. Reward Model Distillation: Trains interpretable surrogate models (e.g., decision trees) to approximate R(x)

However, these methods face fundamental limitations when dealing with complex preference structures. For example, the counterfactual approach requires solving:

$$ \min_{x'} ||x - x'||_2 \quad \text{s.t.} \quad R(x') - R(x) > Δ $$

which becomes ill-posed when R(x) is non-monotonic or discontinuous - common scenarios in learned reward functions.

Case Study: Instruction-Tuned LLMs

Analysis of Alpaca-7B's preference-based fine-tuning reveals that 62% of its "helpful" behaviors cannot be explained by identifiable patterns in the underlying preference data (Zhou et al., 2023). The model developed synthetic preferences - behaviors that maximize reward while violating the original annotators' intent. This manifests when:

  • The reward model overfits to superficial linguistic patterns (e.g., longer responses score higher)
  • Policy optimization exploits reward model blind spots
  • Preference datasets lack coverage of edge cases

6. Key Research Papers and Surveys

6.1 Key Research Papers and Surveys

  • PDF Tuning: an efficient tuning paradigm for large-scale pre ... - Springer — that for with 1.6 billion parameters, -Tuning achieves performance more than of full fine-tuning on GLUE Benchmark with only tunable parameters and much fewer training costs. Keywords pre-trained model, lightweight fine-tuning paradigms, label representation 1 Introduction Large-scale pre-trained language models (PTMs) can capture
  • Research on Fine-Tuning Optimization Strategies for Large ... - MDPI — Feature papers represent the most advanced research with significant potential for high impact in the field. ... Randomizing the key order encourages the model to focus on the relationships between keys and values rather than memorizing their sequence. ... 2024. "Research on Fine-Tuning Optimization Strategies for Large Language Models in ...
  • The Ultimate Guide to Fine-Tuning LLMs from Basics to Breakthroughs: An ... — Alternatively, Half fine-tuning (HFT) [15] or Parameter-Efficient Fine-Tuning (PEFT) approaches, such as using adapter layers, can be employed to partially fine-tune the model. This method attaches additional layers to the pre-trained model, allowing for efficient fine-tuning with fewer parameters, which can address challenges related to ...
  • A survey of efficient fine-tuning methods for Vision-Language Models ... — Convergence: The research [100] conducts a convergence analysis of the T5 model using the EFT method and compares the convergence conditions of Prefix-tuning (PF), Adapter (AP), LoRA, and Fine-tuning (FT) under different training steps (Fig. 20) and different training time settings (Fig. 21). The evaluation indicators are set as EM, Accuracy ...
  • Towards an End-to-End Personal Fine-Tuning Framework for AI ... - MDPI — Our experimental setup involves a prototype implementation of key framework modules, including a value elicitation interface and a fine-tuning mechanism for language models. The primary goal is to create a token-based system that allows users to easily impart their values and preferences to AI systems, enhancing model personalization and alignment.
  • AdaFT: An efficient domain-adaptive fine-tuning framework ... - Springer — In the 'pre-training'-then-'fine-tuning' paradigm, fine-tuning requires much less training data than pre-training, but it demands abundant domain-specific labeled data. However, in the Chinese financial domain, although an enormous amount of data is being continuously generated, most of it is unlabeled and unstructured [ 38 ].
  • Preference Tuning with Human Feedback on Language, Speech, and Vision ... — The paper is organized into three main sections: 1) introduction and preliminaries: an introduction to reinforcement learning frameworks, preference tuning tasks, models, and datasets across various modalities: language, speech, and vision, as well as different policy approaches, 2) in-depth exploration of each preference tuning approach: a ...
  • Efficient Compressing and Tuning Methods for Large Language Models: A ... — With the advent of large language models (LLMs), a significant shift has occurred in the research community, with many scholars focusing on the intricate mechanisms that underpin language models at scale within the realm of natural language processing (NLP).Meanwhile, a diverse group of researchers, multinational corporations, and organizations have turned their efforts toward developing ...
  • (PDF) The Ultimate Guide to Fine-Tuning LLMs from Basics to ... — The Ultimate Guide to Fine-Tuning LLMs from Basics to Breakthroughs: An Exhaustive Review of Technologies, Research, Best Practices, Applied Research Challenges and Opportunities August 2024 License
  • Personalization of Large Language Models: A Survey - arXiv.org — For example, most supervised fine-tuning practice is a process where models are trained on specific datasets to perform better on a downstream task. However, only fine-tuning that adjusts a model to cater to specific user or group preferences—such as adapting a model to a user's writing style or content preferences—counts as personalization.

6.2 Open-Source Implementations and Tools

  • PDF Fine-tuning Open-source Large Language Model using a custom dataset — required knowledge of tools and techniques, which helped in the efficient fine-tuning of the open-source LLM. The first half of the research looks into fine-tuning commercially available solutions using an open-source dataset and a synthetic dataset. Based on results gained from the first two
  • Towards an End-to-End Personal Fine-Tuning Framework for AI ... - MDPI — In addition, eliciting values preferences with the aid of language models could enhance the personalization of fine-tuning for individuals and groups, leading to superior results [2,3,4]. Achieving this entails improving the ability of AI systems to comprehend, predict, and adapt to human needs at a personal and local level rather than on a ...
  • openai/lm-human-preferences: Code for the paper Fine-Tuning Language ... — This repository contains code for the paper Fine-Tuning Language Models from Human Preferences. See also our blog post. We provide code for: Training reward models from human labels; Fine-tuning language models using those reward models; It does not contain code for generating labels.
  • The Ultimate Guide to Fine-Tuning LLMs from Basics to Breakthroughs: An ... — Full fine-tuning updates all parameters of the model, ensuring comprehensive adaptation to the new task. Alternatively, Half fine-tuning (HFT) [15] or Parameter-Efficient Fine-Tuning (PEFT) approaches, such as using adapter layers, can be employed to partially fine-tune the model. This method attaches additional layers to the pre-trained model ...
  • Quick Start Guide To LLMs by Sinan Ozdemir 1703540700 | PDF - Scribd — Optimizing LLMs with Customized Fine-Tuning Part II: Getting the most out of LLMs 5. Advanced Prompt Engineering 6. Customizing Embeddings and Model Architectures 7. Moving Beyond Foundation Models 8. Fine-Tuning Open-Source LLMs 9. Deploying Custom LLMs to the Cloud Table of Contents. Preface Part I: Introduction to Large Language Models 1.
  • Finetuning Llama 2 and Mistral - Medium — Now use each paragraph n and paragraph n-1 to engage any smart open-source LLM or GPT-3.5/4. I used Open Hermes 2 to create an interview question for each paragraph.
  • Efficient Model Fine-Tuning for LLMs: Understanding PEFT by ... - Medium — Storage and Computational Costs: Fine-tuning for multiple tasks using full fine-tuning results in multiple versions of the model, each as large as the original. This can lead to expensive storage ...
  • Fine-Tuning LLMs: Expert Guide to Task-Specific AI Models — 1. Introduction: Understanding LLM Fine-Tuning for Developers. Large Language Models (LLMs) have revolutionized the field of natural language processing (NLP) by enabling machines to understand and generate human-like text. However, to maximize their effectiveness for specific applications, developers often need to fine-tune these models.
  • GitHub - huggingface/peft: PEFT: State-of-the-art Parameter-Efficient ... — Fine-tuning large pretrained models is often prohibitively costly due to their scale. Parameter-Efficient Fine-Tuning (PEFT) methods enable efficient adaptation of large pretrained models to various downstream applications by only fine-tuning a small number of (extra) model parameters instead of all the model's parameters.
  • (PDF) The Ultimate Guide to Fine-Tuning LLMs from Basics to ... — A comparison of fine-tuning methodologies, including supervised, unsupervised, and instruction-based approaches, highlights their applicability to different tasks.

6.3 Recommended Courses and Tutorials

  • Fine-Tuning LLMs: Expert Guide to Task-Specific AI Models — This paper presents GPT-3, showcasing the capabilities of large-scale language models and their fine-tuning potential. 14.2. Online Courses and Tutorials for LLM Fine-Tuning. Online courses and tutorials can provide hands-on experience and structured learning paths for fine-tuning LLMs. Here are some recommended platforms and courses: Coursera
  • Advanced Fine-Tuning Strategies for ESM3 — 1. Understanding Fine-Tuning in the ESM3 Ecosystem 1.1 The Role of Fine-Tuning in Machine Learning Fine-tuning is a transformative process that bridges the gap between pre-trained models and task-specific applications. In the context of ESM3—a cutting-edge transformer model designed for sequence-based tasks such as protein folding, natural language processing (NLP), and climate modeling ...
  • The Ultimate Guide to Fine-Tuning LLMs from Basics to Breakthroughs: An ... — Full fine-tuning updates all parameters of the model, ensuring comprehensive adaptation to the new task. Alternatively, Half fine-tuning (HFT) [15] or Parameter-Efficient Fine-Tuning (PEFT) approaches, such as using adapter layers, can be employed to partially fine-tune the model. This method attaches additional layers to the pre-trained model ...
  • Preference Tuning with Human Feedback on Language, Speech, and Vision ... — As shown in Table 3, the preference tuning training framework typically begins with the supervised fine-tuning (SFT) stage, during which the generative model is trained to excel at next-token prediction or use an instruction-tuned model as the base initialized model. The SFT focuses on improving the model capability to generate tokens as it ...
  • Figure 6.12 from The Ultimate Guide to Fine-Tuning LLMs from Basics to ... — Figure 6.12: Direct Preference Optimisation (DPO) Process Flow. This figure illustrates the Direct Preference Optimisation (DPO) technique used in fine-tuning large language models. The process begins with preference data (Yw > Yl), where Yw represents preferred outputs, and Yl represents less preferred outputs. Through a maximum likelihood estimation process, this preference data is used to ...
  • Towards an End-to-End Personal Fine-Tuning Framework for AI ... - MDPI — This study introduces a novel architecture for value, preference, and boundary alignment in large language models (LLMs) and generative AI systems, accompanied by an experimental implementation. It addresses the limitations in AI model trustworthiness stemming from insufficient comprehension of personal context, preferences, and cultural diversity, which can lead to biases and safety risks ...
  • Introduction To Transfer Learning Algorithms And Practice ... - Scribd — Chapter 8 introduces the third major category of transfer learning methods: pre-training and fine-tuning, which belongs to model-based methods. Chapters 9 and 10 are deep and adversarial transfer learning methods, which also belong to the former three basic types of methods, but with more algorithms especially in deep learning.
  • How-To Tutorials | 7019 articles | Packt Learning Hub — Discover Packt's Learning Hub: Your source for cutting-edge tech news, expert tutorials, and industry insights. Elevate your software development skills with curated resources and stay ahead in the fast-paced tech world.