使用基于人类反馈的强化学习(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.
Advancing Translation Preference Modeling with RLHF: A Step Towards Cost-Effective Solution
School of Computer Science, Fudan University(复旦大学计算机科学学院);College of Foreign Languages and Literature, Fudan University(复旦大学外国语言文学学院);Institute of Modern Languages and Linguistics, Fudan University(复旦大学现代语言与语言学研究所)
Avoiding $\mathbf{exp(R_{max})}$ scaling in RLHF through Preference-based Exploration
Department of Electrical & Computer Engineering(电气与计算机工程系);Boston University(波士顿大学);Department of Computer Science(计算机科学系);Cornell University(康奈尔大学);Faculty of Computing & Data Sciences(计算与数据科学学院)
Iterative Preference Learning from Human Feedback: Bridging Theory and Practice for RLHF under KL-Constraint
University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Salesforce AI Research(Salesforce AI研究院);The Hong Kong University of Science and Technology(香港科技大学)
Efficient Preference Poisoning Attack on Offline RLHF
Department of Electrical and Computer Engineering, University of California, Davis, Davis, CA, USA(加州大学戴维斯分校电气与计算机工程系);Department of Electrical and Computer Engineering, University of Iowa, Iowa City, IA, USA(爱荷华大学电气与计算机工程系)
On the Algorithmic Bias of Aligning Large Language Models with RLHF: Preference Collapse and Matching Regularization
University of Pennsylvania(宾夕法尼亚大学);The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));National University of Singapore(新加坡国立大学);Peking University(北京大学);Joint corresponding authors(联合通讯作者)
UCL Centre for Artificial Intelligence(伦敦大学学院人工智能中心);Department of Computer Science(计算机科学系);University College London(伦敦大学学院);UK AI Security Institute(英国人工智能安全研究所);Department of Computer Science and Engineering(计算机科学与工程系);University of Bologna(博洛尼亚大学)