让大模型生成更适配推理策略,提升实际表现
InfAlign: Inference-aware language model alignment
- 针对推理时解码方法设计新型对齐框架,优化实际生成效果
- 在 Best-of-N 等策略下,推理阶段胜率最高提升 8%
- 适用于希望提升生成质量的模型开发者与研究者
语言模型对齐是训练现代生成式语言模型的关键步骤。传统对齐旨在提升对齐模型样本相对于基线模型的胜率。然而,当前越来越多使用推理时算法(如 Best-of-N、可控解码、树搜索)进行解码,而非标准采样,这导致训练与推理不匹配,使标准 RLHF 框架次优。为此,我们提出推理感知对齐框架 InfAlign,旨在优化对齐策略在推理时相对于基线模型的胜率。我们证明:对于任意推理时解码过程,最优对齐策略是标准 RLHF 问题在奖励变换后的解。据此,我们提出校准-变换强化学习(InfAlign-CTRL)算法,包含奖励校准与带 KL 正则化的奖励最大化步骤,并对奖励进行变换。针对 Best-of-N 采样和 Best-of-N 突破攻击,我们设计了特定变换,使推理时胜率最高提升 3%~8%。此外,我们的奖励校准方法也可作为优化标准胜率的强基线。
原文摘要 · Abstract (English)
Language model alignment is a critical step in training modern generative language models. Alignment targets to improve win rate of a sample from the aligned model against the base model. Today, we are increasingly using inference-time algorithms (e.g., Best-of-N, controlled decoding, tree search) to decode from language models rather than standard sampling. We show that this train/test mismatch makes standard RLHF framework sub-optimal in view of such inference-time methods. To this end, we propose a framework for inference-aware alignment (InfAlign), which aims to optimize inference-time win rate of the aligned policy against the base model. We prove that for any inference-time decoding procedure, the optimal aligned policy is the solution to the standard RLHF problem with a transformation of the reward. This motivates us to provide the calibrate-and-transform RL (InfAlign-CTRL) algorithm to solve this problem, which involves a reward calibration step and a KL-regularized reward maximization step with a transformation of the calibrated reward. For best-of-N sampling and best-of-N jailbreaking, we propose specific transformations offering up to 3-8% improvement on inference-time win rates. Finally, we also show that our proposed reward calibration method is a strong baseline for optimizing standard win rate.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。