Controlled Decoding from Language Models

Sidharth Mudgal, Jong Lee, H. Ganapathy, YaGuang Li, Tao Wang +8 more
2/12/2026

Official code: IAAR-Shanghai/CTGSurvey (204 stars, last commit 2024-08-27).

Abstract

KL-regularized reinforcement learning (RL) is a popular alignment framework to control the language model responses towards high reward outcomes. We pose a tokenwise RL objective and propose a modular solver for it, called controlled decoding (CD). CD exerts control through a separate prefix scorer module, which is trained to learn a value function for the reward. The prefix scorer is used at inference time to control the generation from a frozen base model, provably sampling from a solution to the RL objective. We empirically demonstrate that CD is effective as a control mechanism on popular benchmarks. We also show that prefix scorers for multiple rewards may be combined at inference time, effectively solving a multi-objective RL problem with no additional training. We show that the benefits of applying CD transfer to an unseen base model with no further tuning as well. Finally, we show that CD can be applied in a blockwise decoding fashion at inference-time, essentially bridging the gap between the popular best-of-K strategy and tokenwise control through reinforcement learning. This makes CD a promising approach for alignment of language models.

View on arXivView PDF

Code Implementations(1)

Controllable Text Generation for Large Language Models: A Survey

20410TeXAug 21, 20242 years ago
controllable-text-generationcontrolled-text-generationctgdecodingsurvey

Similar Papers

Cite this paper

@article{mudgal2026controlled,
  title  = {Controlled Decoding from Language Models},
  author = {Sidharth Mudgal and Jong Lee and H. Ganapathy and YaGuang Li and Tao Wang and Yanping Huang and Zhifeng Chen and Heng-Tze Cheng and Michael Collins and Trevor Strohman and Jilin Chen and Alex Beutel and Ahmad Beirami},
  year   = {2026},
  eprint = {2310.17022},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2310.17022},
  journal = {ICML 2023 2023}
}

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/2310.17022.svg)](https://codeofpaper.com/paper/2310.17022)

Discussion