NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Critic-Guided Decoding for Controlled Text Generation

Minbeom Kim, Hwanhee Lee, Kang Min Yoo, Joonsuk Park, Hwaran Lee, Kyomin Jung

Abstract

Controlled text generation remains a challenge for Large Language Models (LLMs), which often struggle to maintain specific attributes like topic, sentiment, or safety without sacrificing fluency. This paper presents CriticControl, a novel decoding framework that combines the sequential foresight of Reinforcement Learning (RL) with the efficiency of "plug-and-play" weighted decoding. By training a lightweight critic network to guide a frozen LLM, CriticControl achieves state-of-the-art performance across multiple control tasks while avoiding the instability of full-model fine-tuning.

Introduction

While LLMs are highly fluent, they are prone to generating toxic content or drifting away from intended topics. Current steering methods generally fall into two categories: Reinforcement Learning (RL) fine-tuning and weighted decoding. RL is powerful but computationally expensive and prone to "mode collapse," where the model repeats safe but uninteresting phrases. Weighted decoding, which uses external discriminators to nudge token probabilities at each step, is more stable but often degrades fluency because it lacks "sequential foresight"—it evaluates immediate token relevance rather than the long-term trajectory of the sentence.

Comparison of Reinforcement Learning, Weighted Decoding, and CriticControl Decoding paradigms.

The CriticControl Framework

CriticControl addresses these limitations by introducing an actor-critic framework where the Actor (the LLM) remains frozen, and only a lightweight Critic network is trained. This approach bridges the gap between the two traditional methods by providing the foresight of RL without the risks of fine-tuning the entire model.

Training the Critic

The critic is trained to estimate the "state-value" ($V(x_{<t})$), representing the expected future reward of a partial sequence. For instance, in topic control, the critic learns to assign higher values to sequences that are likely to lead to the target topic. Training utilizes Temporal Difference (TD) error and Generalized Advantage Estimation (GAE), allowing the critic to learn from a reward model (e.g., a toxicity classifier) without modifying the underlying LLM.

Inference and Decoding

During generation, the critic acts as a guide. It evaluates the top-$k$ tokens proposed by the LLM and re-weights their probabilities based on the value of the resulting next state. Unlike traditional discriminators that ask "Is this word toxic?", the critic asks "Does this word lead to a non-toxic future?" This foresight is critical for maintaining both control and linguistic coherence.

Overview of the CriticControl training and inference pipelines.

Experimental Results

The authors evaluated CriticControl on three primary tasks: topic control, sentiment steering, and detoxification.

  • Topic Control: Using seven distinct topics, CriticControl achieved a 0.89 success rate, significantly outperforming baselines like FUDGE (0.78) and PPLM (0.45). Crucially, it maintained a low perplexity of 17.19, compared to FUDGE's 69.08, indicating much higher fluency.
  • Sentiment Control: On the IMDb dataset, the model reached a 0.90 positiveness score, surpassing GeDi (0.84) and PPLM (0.60).
  • Detoxification: Using the RealToxicityPrompts dataset, CriticControl reduced toxic generation probability to 0.081, a marked improvement over the previous state-of-the-art DExperts (0.128) and the vanilla GPT-2 Large (0.520).

Human evaluations confirmed these findings, with judges preferring CriticControl for its superior balance of relevance and fluency.

Key Insights

A significant finding is the model's zero-shot generalization. Because the critic is trained against general reward models (like NLI models), it can steer the LLM toward topics not seen during the critic's training phase. Furthermore, by keeping the base LLM frozen, the system preserves the model's original knowledge and linguistic "priors," ensuring that the generated text remains natural and avoids the degradation often seen in other controlled generation methods.

Conclusion and Future Work

CriticControl provides a robust and efficient alternative to RL fine-tuning for controlled generation. While it introduces some inference overhead due to the additional critic forward pass, its stability and performance make it a compelling choice for real-world applications. Future research may explore offline RL to further streamline the training process and scaling the approach to larger model architectures beyond the GPT-2 scale.

Summary updated

BibTeX
@inproceedings{kim2023critic,
  author = {Minbeom Kim and Hwanhee Lee and Kang Min Yoo and Joonsuk Park and Hwaran Lee and Kyomin Jung},
  title = {{Critic-Guided Decoding for Controlled Text Generation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.281},
}
Figure