Skip to main content
QUICK REVIEW

[论文解读] Aligning Language Models with Preferences through f-divergence Minimization

Dongyoung Go, Tomasz Korbak|arXiv (Cornell University)|Feb 16, 2023
Topic Modeling被引用 5
一句话总结

本文提出了 f-DPG,一种通过最小化任意 f-散度(包括前向 KL、反向 KL、总变差(TV)和 Jensen-Shannon(JS)散度)来统一微调语言模型以匹配基于偏好的目标分布的框架。关键贡献在于证明了即使在以前向 KL 为评估标准时,JS 散度在对齐质量和多样性方面也始终优于前向 KL,且不同散度的选择显著影响模型在不同模型规模下的行为。

ABSTRACT

Aligning language models with preferences can be posed as approximating a target distribution representing some desired behavior. Existing approaches differ both in the functional form of the target distribution and the algorithm used to approximate it. For instance, Reinforcement Learning from Human Feedback (RLHF) corresponds to minimizing a reverse KL from an implicit target distribution arising from a KL penalty in the objective. On the other hand, Generative Distributional Control (GDC) has an explicit target distribution and minimizes a forward KL from it using the Distributional Policy Gradient (DPG) algorithm. In this paper, we propose a new approach, f-DPG, which allows the use of any f-divergence to approximate any target distribution that can be evaluated. f-DPG unifies both frameworks (RLHF, GDC) and the approximation methods (DPG, RL with KL penalties). We show the practical benefits of various choices of divergence objectives and demonstrate that there is no universally optimal objective but that different divergences present different alignment and diversity trade-offs. We show that Jensen-Shannon divergence strikes a good balance between these objectives, and frequently outperforms forward KL divergence by a wide margin, leading to significant improvements over prior work. These distinguishing characteristics between divergences persist as the model size increases, highlighting the importance of selecting appropriate divergence objectives.

研究动机与目标

  • 将现有的语言模型对齐方法(如 RLHF 和 GDC)统一到一个支持任意 f-散度的单一框架下。
  • 研究不同 f-散度如何影响基于偏好的语言模型微调中的对齐质量、多样性及训练动态。
  • 证明散度目标的选择并非中立,而是引入了对齐与多样性之间的显著权衡。
  • 表明 JS 散度提供了更优的平衡,通常在实践中优于前向 KL。
  • 验证随着模型规模增大,散度选择的影响依然存在,凸显目标选择的重要性。

提出的方法

  • 提出 f-DPG,即分布策略梯度(DPG)算法的泛化形式,支持最小化目标能量模型(EBM)与语言模型策略之间任意 f-散度。
  • 将目标分布定义为未归一化的 EBM,从而显式建模期望行为,如事实一致性、偏见减少或词汇约束。
  • 实现四种变体:KL-DPG(前向 KL)、RKL-DPG(反向 KL)、TV-DPG(总变差)和 JS-DPG(Jensen-Shannon),每种分别最小化不同的 f-散度。
  • 使用随机梯度下降优化策略,通过重参数化与重要性采样计算梯度,以处理 EBM 形式。
  • 将目标分布的定义与近似算法解耦,支持灵活组合不同目标与优化方法。
  • 使用多种 f-散度作为度量标准评估所有方法,实现不同目标之间对齐质量的交叉比较。
Figure 1: On many target distributions, the Jensen-Shannon (JS) divergence (green) outperforms the Kullback-Leibler (KL) divergence (blue) as an objective, even when performance is measured in terms of KL from the target $p$ (left panel, $\downarrow$ better). See Sec. 4.2 .
Figure 1: On many target distributions, the Jensen-Shannon (JS) divergence (green) outperforms the Kullback-Leibler (KL) divergence (blue) as an objective, even when performance is measured in terms of KL from the target $p$ (left panel, $\downarrow$ better). See Sec. 4.2 .

实验结果

研究问题

  • RQ1f-散度目标的选择是否显著影响语言模型微调中的对齐性能与多样性?
  • RQ2JS 散度能否作为前向 KL 的更优替代方案,用于将语言模型对齐至人类偏好?
  • RQ3不同散度目标在收敛性、稳定性和泛化能力方面(跨不同模型规模)如何比较?
  • RQ4随着模型规模增大,对齐与多样性之间的权衡在多大程度上依然存在?
  • RQ5f-DPG 是否能将 RLHF 和 GDC 等现有框架统一到单一、灵活的优化方案下?

主要发现

  • 即使在以前向 KL 为度量标准时,Jensen-Shannon 散度在对齐质量上始终优于前向 KL,表明其具有更优的归纳偏差。
  • 相较于前向 KL,使用 JS 散度带来的改进在多个对齐任务中均显著且持久,包括事实一致性、偏见缓解和词汇控制。
  • 不同 f-散度导致不同的模型行为,不存在单一最优目标——对齐与多样性的权衡本质上由散度选择决定。
  • JS 散度的优势不仅限于小模型;随着模型规模增大,性能差距依然存在,凸显其鲁棒性。
  • f-DPG 成功泛化了 DPG 和带 KL 惩罚的强化学习,将现有方法统一到单一框架下,并支持灵活选择散度。
  • 总变差与反向 KL 散度相较于前向 KL 提升有限,而 JS 散度在实践中成为最有效的替代方案。
Figure 2: Comparison of $f$ -DPG on sentiment preference. Evaluation metrics: four $f$ -divergences $D_{f}(\pi_{\theta}||p)$ (↓ better), alignment score $\mathbb{E}_{\pi_{\theta}}[\phi(x)]$ (↑ better), entropy (↑ better), standard deviation of pseudo-reward $\mathrm{std}(r_{\theta}(x))$ .
Figure 2: Comparison of $f$ -DPG on sentiment preference. Evaluation metrics: four $f$ -divergences $D_{f}(\pi_{\theta}||p)$ (↓ better), alignment score $\mathbb{E}_{\pi_{\theta}}[\phi(x)]$ (↑ better), entropy (↑ better), standard deviation of pseudo-reward $\mathrm{std}(r_{\theta}(x))$ .

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。