Adaptive Classifier-Free Guidance via Dynamic Low-Confidence Masking

Pengxiang Li, Shilin Yan, Joey Tsai, Renrui Zhang, Ruichuan An +2 more
5/26/2025
cs.CL

No official code found. Best implementation: pixeli99/A-CFG (7 stars, last commit 2025-11-10).

Abstract

Classifier-Free Guidance (CFG) significantly enhances controllability in generative models by interpolating conditional and unconditional predictions. However, standard CFG often employs a static unconditional input, which can be suboptimal for iterative generation processes where model uncertainty varies dynamically. We introduce Adaptive Classifier-Free Guidance (A-CFG), a novel method that tailors the unconditional input by leveraging the model's instantaneous predictive confidence. At each step of an iterative (masked) diffusion language model, A-CFG identifies tokens in the currently generated sequence for which the model exhibits low confidence. These tokens are temporarily re-masked to create a dynamic, localized unconditional input. This focuses CFG's corrective influence precisely on areas of ambiguity, leading to more effective guidance. We integrate A-CFG into a state-of-the-art masked diffusion language model and demonstrate its efficacy. Experiments on diverse language generation benchmarks show that A-CFG yields substantial improvements over standard CFG, achieving, for instance, a 3.9 point gain on GPQA. Our work highlights the benefit of dynamically adapting guidance mechanisms to model uncertainty in iterative generation.

View on arXivView PDF

Code Implementations(1)

pixeli99/A-CFGCommunity100%
70May 24, 202511 months ago

Similar Papers

Cite this paper

@article{li2025adaptive,
  title  = {Adaptive Classifier-Free Guidance via Dynamic Low-Confidence Masking},
  author = {Pengxiang Li and Shilin Yan and Joey Tsai and Renrui Zhang and Ruichuan An and Ziyu Guo and Xiaowei Gao},
  year   = {2025},
  eprint = {2505.20199},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.20199v1}
}

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

Discussion