基于弹性重置的语言模型对齐
Language Model Alignment with Elastic Reset
AI总结:
针对语言模型RL微调中奖励提升伴随性能漂移的问题,提出Elastic Reset算法,通过定期重置在线模型为其EMA并重置EMA为初始模型,在多任务上实现更高奖励与更少漂移,取得更优对齐效果。
摘要:
使用强化学习(RL)(例如基于人类反馈(HF)的强化学习)微调语言模型是主流的对齐方法,但针对奖励模型优化可能在提升奖励得分的同时降低其他方面的性能,这一现象被称为奖励黑客、对齐税或语言漂移。首先,我们认为常用的测试指标存在不足,无法准确衡量不同算法在奖励与漂移之间的权衡效果。标准方法通过在在线模型与初始模型之间加入库尔贝克-莱布勒(KL)散度惩罚项来修正奖励。我们提出Elastic Reset(弹性重置)这一新算法,无需显式修改训练目标,即可实现更高奖励与更少漂移。我们定期将在线模型重置为其自身的指数移动平均(EMA)版本,随后将EMA模型重置为初始模型。通过引入EMA,我们的模型在重置后能快速恢复,在相同步数内实现更高奖励且漂移更小。实验表明,采用Elastic Reset微调语言模型在小规模枢轴翻译基准上取得了当前最优性能,在中等规模类RLHF的IMDB模拟情感任务中优于所有基线,还能基于LLaMA-7B构建出性能更强、对齐效果更好的技术问答聊天机器人。代码可在github.com/mnoukhov/elastic-reset获取。
英文摘要:
Finetuning language models with reinforcement learning (RL), e.g. from human feedback (HF), is a prominent method for alignment. But optimizing against a reward model can improve on reward while degrading performance in other areas, a phenomenon known as reward hacking, alignment tax, or language drift. First, we argue that commonly-used test metrics are insufficient and instead measure how different algorithms tradeoff between reward and drift. The standard method modified the reward with a Kullback-Lieber (KL) penalty between the online and initial model. We propose Elastic Reset, a new algorithm that achieves higher reward with less drift without explicitly modifying the training objective. We periodically reset the online model to an exponentially moving average (EMA) of itself, then reset the EMA model to the initial model. Through the use of an EMA, our model recovers quickly after resets and achieves higher reward with less drift in the same number of steps. We demonstrate that fine-tuning language models with Elastic Reset leads to state-of-the-art performance on a small scale pivot-translation benchmark, outperforms all baselines in a medium-scale RLHF-like IMDB mock sentiment task and leads to a more performant and more aligned technical QA chatbot with LLaMA-7B. Code available at github.com/mnoukhov/elastic-reset.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。