面向大语言模型的BoNBoN对齐与best-of-n采样的优势
BoNBoN Alignment for Large Language Models and the Sweetness of Best-of-n Sampling
AI总结:
该研究证明best-of-n采样在胜率与KL散度的权衡上是对齐分布的最优选择,同时提出BoNBoN对齐方法微调大模型以模拟该采样分布,在保留偏好提升的同时降低推理成本。
摘要:
本文研究利用best-of-n采样将大语言模型的生成样本与人类偏好对齐的问题,该方法会抽取n个样本、对其排序并返回最优结果。本文探讨两个核心问题:第一,best-of-n与那些训练大语言模型输出高期望奖励样本的对齐方法(如RLHF或DPO)之间存在怎样的关联?为解答该问题,我们将best-of-n分布与对齐流程学到的采样分布,共同嵌入基础大语言模型分布的一类倾斜分布族中。随后我们证明,在该分布族内,就“相对基础模型的胜率”与“相对基础模型的KL散度”之间的权衡而言,best-of-n本质上是最优的。也就是说,若目标是最大化胜率,best-of-n是对齐分布的最优选择。但best-of-n每次推理都需要抽取n个样本,成本极高。为规避这一问题,我们研究的第二个问题是如何微调大语言模型以模拟best-of-n的采样分布。我们利用best-of-n分布的特殊结构,提出BoNBoN对齐方法来实现该目标。实验表明,BoNBoN对齐能显著提升模型效果,使生成的模型比基础策略更受偏好,同时对非目标维度的影响极小。
英文摘要:
This paper concerns the problem of aligning samples from large language models to human preferences using best-of-$n$ sampling, where we draw $n$ samples, rank them, and return the best one. We consider two fundamental problems. First: what is the relationship between best-of-$n$ and approaches to alignment that train LLMs to output samples with a high expected reward (e.g., RLHF or DPO)? To answer this, we embed both the best-of-$n$ distribution and the sampling distributions learned by alignment procedures in a common class of tiltings of the base LLM distribution. We then show that, within this class, best-of-$n$ is essentially optimal in terms of the trade-off between win-rate against the base model vs KL distance from the base model. That is, best-of-$n$ is the best choice of alignment distribution if the goal is to maximize win rate. However, best-of-$n$ requires drawing $n$ samples for each inference, a substantial cost. To avoid this, the second problem we consider is how to fine-tune a LLM to mimic the best-of-$n$ sampling distribution. We derive BoNBoN Alignment to achieve this by exploiting the special structure of the best-of-$n$ distribution. Experiments show that BoNBoN alignment yields substantial improvements in producing a model that is preferred to the base policy while minimally affecting off-target aspects.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。