The Hidden Link Between RLHF and Contrastive Learning
Xufei Lv, Kehai Chen, Haoyuan Sun, Xuefeng Bai, Min Zhang, Houde Liu, Kehai Chen
TL;DR
This work unifies RLHF and Direct Preference Optimization under a mutual-information lens, showing they function as contrastive learning between chosen and rejected samples. Replacing the DV/MINE MI estimator with a Jensen–Shannon surrogate yields Mutual Information Optimisation (MIO), which provides stable gradients and mitigates the gradient starvation that hampers DV-based methods. The authors provide theoretical analyses and empirical evidence across eight reasoning and mathematical benchmarks, showing MIO often outperforms prior alignment methods and avoids the late-stage chosen-reward collapse. This approach offers a principled, scalable path to enhance reasoning and mathematical capabilities in aligned LLMs while improving training stability.
Abstract
Alignment of large language models (LLMs) with human values has recently garnered significant attention, with prominent examples including the canonical yet costly Reinforcement Learning from Human Feedback (RLHF) and the simple Direct Preference Optimization (DPO). In this work, we demonstrate that both RLHF and DPO can be interpreted from the perspective of mutual information (MI) maximization, uncovering a profound connection to contrastive learning. Within this framework, both RLHF and DPO can be interpreted as methods that performing contrastive learning based on the positive and negative samples derived from base model, leveraging the Donsker-Varadhan (DV) lower bound on MI (equivalently, the MINE estimator). Such paradigm further illuminates why RLHF may not intrinsically incentivize reasoning capacities in LLMs beyond what is already present in the base model. Building on the perspective, we replace the DV/MINE bound with the Jensen-Shannon (JS) MI estimator and propose the Mutual Information Optimization (MIO). Comprehensive theoretical analysis and extensive empirical evaluations demonstrate that MIO mitigates the late-stage decline in chosen-likelihood observed in DPO, achieving competitive or superior performance across various challenging reasoning and mathematical benchmarks.
