Gradient-Guided Reward Optimization for Inference-time Alignment

Hankun Lin, Ruqi Zhang
6/8/2026
cs.CL

Official code: lhk2004/GGRO (4 stars, last commit 2026-06-08).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

lhk2004/GGROOfficial100%

[UAI 2026] Official implementation for paper: Gradient-Guided Reward Optimization for Inference-time Alignment

40Jun 8, 20264 months ago

Similar Papers

Cite this paper

@article{lin2026gradientguided,
  title  = {Gradient-Guided Reward Optimization for Inference-time Alignment},
  author = {Hankun Lin and Ruqi Zhang},
  year   = {2026},
  eprint = {2606.09635},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.09635v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.09635.svg)](https://codeofpaper.com/paper/2606.09635)

Discussion