Reward Shaping for Inference-Time Alignment: A Stackelberg Game Perspective
Haichuan Wang, Tao Lin, Lingkai Kong, Ce Li, Hezi Jiang, Milind Tambe
TL;DR
This work reframes LLM alignment as a Stackelberg game in which the reward-model designer (leader) chooses a reward function to maximize user utility under a KL-regularized follower (the LLM). It proves the optimal reward strategy is a threshold-based model that can be efficiently computed via Monte Carlo estimation, and introduces a soft relaxation (SRS) to enhance robustness. The approach is integrated into inference-time alignment methods (CD and ARGS) and validated on established benchmarks, showing consistent gains in average reward with minimal inference overhead and strong GPT-4 judging results. By bounding and shaping rewards, the method mitigates reward hacking and adapts to diverse user preferences without retraining, offering practical benefits for scalable, per-request alignment.
Abstract
Existing alignment methods directly use the reward model learned from user preference data to optimize an LLM policy, subject to KL regularization with respect to the base policy. This practice is suboptimal for maximizing user's utility because the KL regularization may cause the LLM to inherit the bias in the base policy that conflicts with user preferences. While amplifying rewards for preferred outputs can mitigate this bias, it also increases the risk of reward hacking. This tradeoff motivates the problem of optimally designing reward models under KL regularization. We formalize this reward model optimization problem as a Stackelberg game, and show that a simple reward shaping scheme can effectively approximate the optimal reward model. We empirically evaluate our method in inference-time alignment settings and demonstrate that it integrates seamlessly into existing alignment methods with minimal overhead. Our method consistently improves average reward and achieves win-tie rates exceeding 66% against all baselines, averaged across evaluation settings.
