# Controlled LLM Decoding via Discrete Auto-regressive Biasing

Source: [Controlled LLM Decoding via Discrete Auto-regressive Biasing](<https://www.sota2.com/research/paper/68fa76d31e209131cea6f535>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-26T04:03:16.343Z

Authors: Patrick Pynadath, Ruqi Zhang

Published: 2025-02-06T00:14:43.000Z

## Abstract

Controlled text generation allows for enforcing user-defined constraints on large language model outputs, an increasingly important field as LLMs become more prevalent in everyday life. One common approach uses energy-based decoding, which defines a target distribution through an energy function that combines multiple constraints into a weighted average. However, these methods often struggle to balance fluency with constraint satisfaction, even with extensive tuning of the energy function's coefficients. In this paper, we identify that this suboptimal balance arises from sampling in continuous space rather than the natural discrete space of text tokens. To address this, we propose Discrete Auto-regressive Biasing, a controlled decoding algorithm that leverages gradients while operating entirely in the discrete text domain. Specifically, we introduce a new formulation for controlled text generation by defining a joint distribution over the generated sequence and an auxiliary bias sequence. To efficiently sample from this joint distribution, we propose a Langevin-within-Gibbs sampling algorithm using gradient-based discrete MCMC. Our method significantly improves constraint satisfaction while maintaining comparable or better fluency, all with even lower computational costs. We demonstrate the advantages of our controlled decoding method on sentiment control, language detoxification, and keyword-guided generation.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Counterfactual explanation generation on highD subsets](<https://www.sota2.com/research/sota/counterfactual-explanation-generation-on-highd-subsets.md>): Counterfactual Explanation Generation; highD subsets; y\*\_T has top rank (%): 100.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2502.03685>)

[PDF](<https://arxiv.org/pdf/2502.03685.pdf>)
