Skip to main content
QUICK REVIEW

[论文解读] Mitigating the Alignment Tax of RLHF

Yong Lin, Hangyu Lin|arXiv (Cornell University)|Sep 12, 2023
Image Retrieval and Classification TechniquesComputer Science被引用 9
一句话总结

本文研究 RLHF 在 LLMs 中引入的对齐税,并展示模型平均,特别是 Adaptive Model Averaging (AMA),在跨 RLHF 方法与模型(如 OpenLLaMA-3B 与 Mistral-7B)上提供更优的奖励-税前 Pareto 前沿。

ABSTRACT

LLMs acquire a wide range of abilities during pre-training, but aligning LLMs under Reinforcement Learning with Human Feedback (RLHF) can lead to forgetting pretrained abilities, which is also known as the alignment tax. To investigate alignment tax, we conducted experiments with existing RLHF algorithms using OpenLLaMA-3B, which revealed a pronounced alignment tax in NLP tasks. Whereas, despite various techniques to mitigate forgetting, they are often at odds with the RLHF performance, leading to a trade-off between alignment performance and forgetting mitigation, leading to an alignment-forgetting trade-off. In this paper we show that model averaging, which simply interpolates between pre and post RLHF model weights, surprisingly achieves the most strongest alignment-forgetting Pareto front among a wide range of competing methods. To understand its effectiveness, we offer theoretical insights into model averaging, revealing that it enhances performance Pareto front by increasing feature diversity on the layers where tasks share overlapped feature spaces. Empirical evidence corroborates our analysis by showing the benefits of averaging low-level transformer layers. Building on the analysis and the observation that averaging different layers of the transformer leads to significantly different alignment-forgetting trade-offs, we propose Heterogeneous Model Averaging (HMA) to Heterogeneously find various combination ratios of model layers. HMA seeks to maximize the alignment performance while incurring minimal alignment tax. Moreover, we validate HMA's performance across a range of RLHF algorithms over OpenLLaMA-3B and further extend our findings to Mistral-7B which is evaluated by open-sourced preference model and GPT4. Code available here: https://github.com/avalonstrel/Mitigating-the-Alignment-Tax-of-RLHF.git.

研究动机与目标

  • 在 NLP 基准测试中表征 RLHF 过程中的对齐税现象。
  • 在无法访问预训练数据的情况下评估一系列遗忘缓解方法。
  • 找出在对齐奖励与遗忘之间取得平衡(奖励-税权衡)的最有效方法。
  • 开发并验证 Adaptive Model Averaging (AMA) 以优化层级模型平均比。
  • 证明 AMA 在不同 RLHF 算法与模型规模上的泛化性。

提出的方法

  • 在 OpenLLaMA-3B 上对多项 NLP 基准(常识问答、阅读理解、翻译)评估 RLHF 对齐税。
  • 比较遗忘缓解方法:早停、L1/L2 惩罚、LoRA、知识蒸馏以及模型平均(MA)。
  • 将 Experience Replay (ER) 与 MA 作为数据驱动基线比较以保持预训练能力。
  • 将奖励惩罚(KL)引入以正则化 RLHF 并与 MA 进行比较。
  • 从简化的特征空间框架理论分析模型平均以解释 Pareto 前沿增益。
  • 在不同 Transformer 部分(输入/中间/输出)上实验性测试平均化效果,以定位低层次的受益。
  • 通过将 Transformer 分成 K 部分并优化每部分的平均比来提出 Adaptive Model Averaging (AMA),在固定平均比的前提下最大化奖励。
  • 提供蒸馏代理更新以在不额外 RLHF 迭代的情况下实际优化 AMA。
Figure 1 : Illustration of RLHF procedure and the alignment tax.
Figure 1 : Illustration of RLHF procedure and the alignment tax.

实验结果

研究问题

  • RQ1在将 RLHF 应用于 OpenLLaMA-3B 时,在标准 NLP 基准上对齐税有多显著?
  • RQ2哪些遗忘缓解方法能够在不牺牲 RLHF 奖励的情况下减少对齐税,它们之间的权衡如何?
  • RQ3模型平均是否在实现有利的奖励-税 Pareto 前沿方面优于其他遗忘缓解策略?
  • RQ4自适应、逐层的平均(AMA)是否能进一步改善奖励-税权衡,它如何在不同 RLHF 算法与模型规模上泛化?
  • RQ5为何低层 Transformer 层对缓解对齐税特别有益的理论直觉是什么?

主要发现

  • 模型平均在所评估的遗忘缓解方法中获得了最有效的奖励-税 Pareto 前沿。
  • Experience Replay (ER) 并未在所有基准和数据约束下都 consistently 超过 MA。
  • KL 奖励惩罚有帮助但在改进 Pareto 前沿方面不如模型平均有效。
  • 对低层 Transformer 层的平均化在提升对齐奖励与 NLP 任务性能方面表现稳定。
  • Adaptive Model Averaging (AMA) 通过优化每部分的层平均比进一步改善 Pareto 前沿,并且这种改进在 RSF、DPO 和 PPO 以及基于 OpenLLaMA-3B 与 Mistral-7B 的模型上具有泛化性。
  • AMA 的增益在多种 RLHF 算法下得到证明,对分割数 K 的变化具有鲁棒性,3 部分提供了较强的性能。
Figure 2 : Illustration of Adaptative Model Averaging (AMA) when $K=3$ .
Figure 2 : Illustration of Adaptative Model Averaging (AMA) when $K=3$ .

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。