Abstract: Language models trained on large amounts of data are known to produce inappropriate content in some cases and require careful tuning to be used in the real world. We revisit an effective and modular approach for controllability of the language models, when an external expert model guides the decoding. Particularly, we zoom in into the parametrization choice of an external expert, highlighting the difference between low-rank and higher-rank parametrizations. Higher-rank experts are designed to support high flexibility when representing the rewards, leading to higher computational costs during decoding. However, we demonstrate that they might not use their full flexibility. By analyzing the recently proposed reward-augmented decoding approach (RAD), which uses a higher-rank expert model, we introduce a simpler but more efficient low-rank parametrization of the expert model enabling fast and effective guided decoding. We empirically show that the low-rank RAD performs on par with the more flexible RAD on a detoxification and a sentiment control task, while requiring only a single reward model call per generated token.
Introduction
Generative Large Language Models (LLMs) are prone to producing toxic, biased, or otherwise undesirable content. While full-model finetuning (like RLHF) is a common solution, it is computationally expensive and often inflexible. An alternative is guided decoding, where a smaller "expert" reward model scores potential next tokens during the generation process. These scores are added to the base LLM's logits to steer the output toward a desired attribute, such as positive sentiment or non-toxicity.
However, a significant trade-off exists between efficiency and expressiveness. High-rank models (V-style) offer maximum flexibility but are slow, while low-rank models (Q-style) are fast but risk a "rank bottleneck" that might limit their ability to capture complex reward landscapes.
Methodology: RAD-V vs. RAD-Q
The authors compare two primary styles of reward model parametrization within the Reward-Augmented Decoding (RAD) framework:
- RAD-V (V-style): This model concatenates the current context with each potential next token candidate and performs a full forward pass for every one. This allows for complex interactions between the prefix and the next token (high-rank), but the computational cost scales linearly with the number of candidates ($k$).
- RAD-Q (Q-style): This model uses the LLM's internal hidden states to score all tokens in the vocabulary simultaneously. This is mathematically equivalent to a low-rank matrix factorization ($R = HA$). It is highly efficient, requiring only one forward pass per token, but is theoretically constrained by its lower rank.
To bridge the performance gap, the authors propose RAD-Q with Distillation. They take a pre-trained, high-performing RAD-V model and train the efficient RAD-Q model to mimic its outputs. They also introduce a regularization term to ensure the model "abstains" (predicts zero marginal reward) for rare or unrelated tokens, preserving the base LLM's natural distribution.
The Low-Rank Hypothesis
A central contribution of this work is the discovery that the high-rank flexibility of V-style models is often unnecessary for common control tasks. By reframing reward modeling as a matrix completion problem (where rows are contexts and columns are tokens), the authors analyzed the actual rank of reward matrices learned by RAD-V.
As shown in the analysis, while the theoretical maximum rank is the vocabulary size ($|V| \approx 50k$) or the hidden dimension ($d = 768$), the empirical rank for toxicity and sentiment tasks naturally collapses to a very low value (typically between 10 and 20). This suggests that the "rank bottleneck" of Q-style models is not a practical limitation for these domains, explaining why a simpler parametrization can be so effective.
Experimental Results
The researchers evaluated RAD-Q on detoxification (using Jigsaw and RealToxicityPrompts) and sentiment control (using Amazon Polarity and SST-2).
- Performance Parity: The distilled RAD-Q model performed on par with the RAD-V teacher across various model sizes, including GPT-2 and LLaMa-2. It successfully reduced toxicity and shifted sentiment without significant losses in fluency.
- Efficiency Gains: RAD-Q achieved a massive speedup, requiring exactly one forward pass per generated token. In contrast, RAD-V's compute time scales with the number of candidates; for typical settings ($k=20$ to $40$), RAD-Q is an order of magnitude faster.
- Cross-Classifier Robustness: The results were consistent across different evaluation tools (Perspective API and open-weight RoBERTa), indicating the findings are robust and not overfitted to a specific metric.
Conclusion and Future Work
This paper demonstrates that for many practical controlled generation tasks, a low-rank reward model is sufficient. By utilizing distillation and a Q-style architecture, RAD-Q provides a path toward efficient, real-time steering of LLMs.
Future research may explore tasks that do require high-rank rewards, such as complex arithmetic or highly specific identity-based constraints, where the low-rank assumption might finally break down. Additionally, while RAD-Q reduces the probability of toxic outputs, it is not a complete safety guarantee, and further qualitative work is needed to address subtle harms in generated text.
Summary updated