CLLGMLFeb 6, 2025

Controlled LLM Decoding via Discrete Auto-regressive Biasing

arXiv:2502.03685v13 citationsh-index: 3ICLR
Originality Incremental advance
AI Analysis

This addresses the challenge of enforcing user-defined constraints on LLM outputs, which is important as LLMs become more prevalent, though it is an incremental improvement over existing energy-based methods.

The paper tackled the problem of balancing fluency and constraint satisfaction in controlled text generation for large language models by proposing Discrete Auto-regressive Biasing, a decoding algorithm that operates in discrete token space, resulting in significant improvements in constraint satisfaction with comparable or better fluency and lower computational costs.

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.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes