Abstract
Large Language Models (LLMs) exhibit impressive capabilities but require careful alignment with human preferences. Traditional training-time methods finetune LLMs using human preference datasets but incur significant training costs and require repeated training to handle diverse user preferences. Test-time alignment methods address this by using reward models (RMs) to guide frozen LLMs without retraining. However, existing test-time approaches rely on trajectory-level RMs which are designed to evaluate complete responses, making them unsuitable for autoregressive text generation that requires computing next-token rewards from partial responses. To address this, we introduce GenARM, a test-time alignment approach that leverages the Autoregressive Reward Model—a novel reward parametrization designed to predict next-token rewards for efficient and effective autoregressive generation. Theoretically, we demonstrate that this parametrization can provably guide frozen LLMs toward any distribution achievable by traditional RMs within the KL-regularized reinforcement learning framework. Experimental results show that GenARM significantly outperforms prior test-time alignment baselines and matches the performance of training-time methods. Additionally, GenARM enables efficient weak-to-strong guidance, aligning larger LLMs with smaller RMs without the high costs of training larger models. Furthermore, GenARM supports multi-objective alignment, allowing real-time trade-offs between preference dimensions and catering to diverse user preferences without retraining.
Introduction
Aligning Large Language Models (LLMs) with human values like helpfulness and safety typically occurs during training via Reinforcement Learning from Human Feedback (RLHF) or Direct Preference Optimization (DPO). While effective, these methods are computationally expensive and produce static models that cannot easily adapt to shifting user preferences without full retraining.
"Test-time" alignment offers a flexible alternative by using a separate Reward Model (RM) to steer a frozen LLM during text generation. However, existing RMs are "trajectory-level," meaning they are trained to evaluate complete responses. To select the optimal next token, current methods must either guess or simulate thousands of potential future trajectories, leading to high inference costs and potential inaccuracies.
The GenARM Approach
GenARM addresses these limitations by introducing the Autoregressive Reward Model (ARM). Instead of outputting a single scalar for an entire sequence, the ARM treats the reward as a log-probability, allowing the total reward to be factorized into a sum of individual "next-token rewards."
This token-level factorization transforms a sparse signal (one score at the end) into a dense signal (a score for every token). During generation, GenARM combines the raw logits of the frozen base LLM with the logits of the ARM. The next token is sampled from a distribution proportional to the base model's probability adjusted by the ARM's predicted reward. This approach is mathematically proven to be as expressive as traditional trajectory-level RMs while being significantly more efficient.
Experimental Evaluation
The researchers evaluated GenARM using standard alignment benchmarks, including HH-RLHF, PKU-SafeRLHF-10K, and UltraFeedback. Performance was measured using the AlpacaEval 2 framework to determine win rates against established baselines.
Key Results
- Performance Parity: GenARM significantly outperformed prior test-time baselines like ARGS and Transfer-Q. Most notably, it matched the performance of DPO, the current gold standard for training-time alignment, without requiring the base model to be updated.
- Inference Efficiency: Because GenARM requires only one forward pass of the RM per token, it is orders of magnitude faster than look-ahead methods. In testing, GenARM generated 128 tokens in 7.28 seconds, compared to 130.53 seconds for Transfer-Q—an 18x speedup.
- Weak-to-Strong Guidance: GenARM successfully used a smaller 7B reward model to steer a 70B base model. This configuration recovered over 70% of the performance gap between a base 70B model and a fully fine-tuned 70B DPO model, demonstrating that massive models can be aligned without expensive high-parameter optimization.
- Multi-objective Steering: By summing the weighted scores of multiple ARMs (e.g., safety and conciseness) at inference time, GenARM can navigate the Pareto frontier of human preferences more effectively than weight-averaging methods like "Rewarded Soups."
Conclusion and Future Work
GenARM represents a significant step forward for test-time alignment, offering the performance of fine-tuning with the flexibility of modular guidance. While it requires running two models simultaneously—increasing VRAM requirements—the efficiency gains over previous test-time methods are substantial. Future research will investigate GenARM's effectiveness in objective-heavy domains such as mathematical reasoning and code generation, where rewards are often more binary than preference-based.
Summary updated