arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.10500cs.LGcs.AIcs.CL
收藏

面向样本高效 RLHF 的主动偏好优化

Active Preference Optimization for Sample Efficient RLHF

Indian Institute of Science(印度科学研究院);University of Maryland(马里兰大学);Boston University(波士顿大学);Indian Institute of Technology Kanpur(印度理工学院坎普尔分校)

Nirjhar Das, Souradip Chakraborty, Aldo Pacchiano, Sayak Ray Chowdhury

AI总结:

针对 RLHF 中人类偏好数据昂贵的问题,论文将其建模为上下文偏好老虎机,提出主动收集最不确定上下文偏好的 APO,并证明其次优差距接近理论下界。

摘要:

使用基于人类反馈的强化学习(RLHF)对齐的大语言模型(LLM)已在众多任务中展现出卓越的生成能力。然而,收集高质量人类偏好在实际部署中造成了代价高昂的瓶颈,因此训练数据通常受到预算限制。在这些场景中,谨慎收集训练数据(例如上下文、每个上下文对应的一对生成结果,以及表明哪个生成结果更好的偏好)至关重要,但现有大多数方法都是从给定集合中均匀随机采样上下文。鉴于此,在 Bradley-Terry-Luce 偏好模型下且训练数据预算较小时,我们证明,均匀采样上下文可能导致一个策略(即对齐模型)与最优策略之间存在恒定的次优差距。这凸显出在小样本预算下,需要自适应的上下文采样策略以实现有效对齐。为解决该问题,我们在上下文偏好老虎机框架内重新表述 RLHF,将生成结果视为动作,并从下界和上界两方面对次优差距给出近乎完整的刻画。首先,当动作集为 d 维超立方体且样本数量为 T 时,我们证明存在 Ω(d/√T) 的下界。接着,我们提出一种名为 Active Preference Optimization(APO)的算法,该算法迭代地为最不确定的上下文收集偏好。我们证明,通过 APO 学习到的策略,其次优差距在一个对数因子和一个非线性常数范围内与下界相匹配。最后,我们在实际数据集上进行实验,验证 APO 相比现有方法的有效性,确立其作为 LLM 对齐的样本高效且具有成本效益的解决方案。

英文摘要:

Large Language Models (LLMs) aligned using Reinforcement Learning from Human Feedback (RLHF) have shown remarkable generation abilities in numerous tasks. However, collecting high-quality human preferences creates costly bottlenecks in practical deployments, and hence, training data are often budgeted. In these scenarios, it is crucial to collect training data (e.g., contexts, a pair of generations for each context, and a preference indicating which generation is better) carefully, yet most of the existing methods sample contexts uniformly at random from a given collection. Given this, under the Bradley-Terry-Luce preference model and with a small budget of training data, we show that uniform sampling of contexts could lead to a policy (i.e., an aligned model) that suffers a constant sub-optimality gap from the optimal policy. This highlights the need for an adaptive context sampling strategy for effective alignment under a small sample budget. To address this, we reformulate RLHF within the contextual preference bandit framework, treating generations as actions, and give a nearly complete characterization of the sub-optimality gap in terms of both lower and upper bounds. First, when the action set is a $d$-dimensional hypercube and the number of samples is $T$, we show an $Ω(d/\sqrt{T})$ lower bound. Next, we propose an algorithm, $\textit{Active Preference Optimization}$ ($\texttt{APO}$), that iteratively collects preferences for the most uncertain contexts. We show that the sub-optimality gap of the policy learned via $\texttt{APO}$ matches the lower bound up to a log factor and a non-linearity constant. Finally, we perform experiments on practical datasets to validate $\texttt{APO}$'s efficacy over existing methods, establishing it as a sample-efficient and cost-effective solution for LLM alignment.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑