arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2606.09635cs.CLcs.LG
收藏

梯度引导的推理时对齐奖励优化

Gradient-Guided Reward Optimization for Inference-time Alignment

Purdue University(普渡大学)

Hankun Lin, Ruqi Zhang

AI总结:

提出梯度引导奖励优化(GGRO)方法,通过解码时注入梯度信号生成的引导令牌,在推理时微调生成轨迹,提升安全性、有用性和推理性能,并增强对奖励攻击的鲁棒性。

摘要:

确保大型语言模型(LLMs)在分布漂移下的可靠性需要推理时自适应。虽然推理时对齐方法如Best-of-$N$和拒绝采样被广泛使用,但它们将任务视为采样密集的奖励引导搜索,导致两个关键限制:性能受限于基础模型的生成质量,以及对不完美奖励模型的依赖使其易受奖励攻击。为解决这些挑战,我们引入梯度引导奖励优化(GGRO),一种轻量级推理时方法,通过梯度引导在解码期间执行有针对性的最小干预。具体来说,GGRO监测令牌级熵以识别指示漂移或未对齐的高不确定性区域。一旦检测到,它通过注入使用现成奖励模型的梯度信号生成的引导令牌来响应,以引导生成轨迹而不仅仅是重新排序样本。实验表明,GGRO在安全性、有用性和推理基准上持续改进推理时对齐。它还提高了高质量响应的覆盖率和对奖励攻击的鲁棒性,且计算开销极小。代码可在https://github.com/lhk2004/GGRO获取。

英文摘要:

Ensuring the reliability of Large Language Models (LLMs) under distribution drift requires inference-time adaptation. While inference-time alignment methods such as Best-of-$N$ and rejection sampling are widely used, they frame the task as a sampling-intensive, reward-guided search, leading to two key limitations: their performance is bounded by the base model's generation quality, and their reliance on imperfect reward models makes them vulnerable to reward hacking. To address these challenges, we introduce Gradient-Guided Reward Optimization (GGRO), a lightweight inference-time method that performs targeted, minimal intervention during decoding via gradient guidance. Specifically, GGRO monitors token-level entropy to identify high-uncertainty regions indicative of drift or misalignment. Upon detection, it responds by injecting nudging tokens, generated using gradient signals from an off-the-shelf reward model, to steer the generation trajectory rather than merely re-ranking samples. Experiments show that GGRO consistently improves inference-time alignment across safety, helpfulness, and reasoning benchmarks. It also increases coverage of high-quality responses and robustness to reward hacking, with minimal computational overhead. Code is available at https://github.com/lhk2004/GGRO.

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

↑