· Masked / discrete diffusion, Post-training, Controllability · Source

Guidance Is Not a Hyperparameter: Learning Dynamic Control in Diffusion Language Models

SourceFull paper

Article overview

Verdict

The method provides evidence that PPO-trained CFG policies can improve the controllability–quality trade-off in discrete diffusion language models on the studied tasks and data. Universal superiority over fixed and heuristic schedules is not established across all conditions.

Main idea

Classifier-free guidance scale is treated as a discrete action selected from the evolving generation state at each diffusion stage. PPO learns task-specific scale trajectories from terminal rewards instead of using fixed or hand-designed schedules.

Mechanism

The controller state contains step ratio, mask ratio, task progress, previous CFG, and masked-token prediction confidence. Frozen LLaDA-8B-Instruct computes conditional and unconditional logits; the controller selects CFG, followed by semi-autoregressive block generation and remasking of low-confidence tokens. Separate two-layer actor and critic MLPs with LayerNorm/ReLU and 128 hidden units are trained while the base model remains frozen. PPO uses on-policy trajectories, GAE, clipped updates, and sparse terminal rewards combining controllability, fluency through perplexity, and semantic/content terms; weights vary by task and transfer direction. There are 30 effective decisions, with each action repeated across multiple diffusion steps. For deterministic inference, multiple stochastic rollouts are aggregated: RL-Mean averages them, while RL-Freq emphasizes recurring patterns and suppresses rare exploratory trajectories. Reproduction plan: (1) freeze LLaDA and define the state; (2) specify 13 CFG actions and action repetition; (3) construct a task-specific terminal reward; (4) train the actor–critic with PPO and GAE; (5) aggregate rollout trajectories into mean/frequency schedules; (6) compare against fixed and heuristic schedules at matched step counts.

What this is useful for

The approach is useful for discrete diffusion language models where CFG scheduling affects quality and the final objective can be measured after generation, including keyword control, length control, and sentiment transfer. It is particularly suitable when one task-generalized schedule is desired rather than per-instance schedule optimization.

Risks / not proven

The reward is terminal only: intermediate masked states are treated as too weak for reliable proxies, which can make training less informative and dependent on the final metric. Reward weights are task-dependent, while temperature and step count introduce explicit trade-offs. Evidence is limited to LLaDA-8B-Instruct, WikiText-103, Yelp, three task types, and the stated heuristic baselines; transfer to other models, languages, controlled properties, and longer horizons is not demonstrated.

Full abstract

Classifier-Free Guidance (CFG) is a widely used mechanism for controlling diffusion-based generative models, yet its guidance scale is typically treated as a fixed hyperparameter throughout generation. This static design yields a suboptimal controllability and quality tradeoff, as the optimal degree of guidance varies across tasks and across different stages of the diffusion process, especially in NLP domain. We recast CFG scale selection as a sequential decision-making problem and propose to learn dynamic guidance trajectories via reinforcement learning. Specifically, we model the guidance scale as a discrete control action selected at each generation step based on the evolving diffusion state, and optimize a policy using Proximal Policy Optimization (PPO) under task-level rewards. Experiments on three controlled NLP generation tasks using discrete diffusion language models demonstrate that adaptive guidance consistently achieves a better balance between controllability and generation quality than fixed-scale strategies. Further analysis of the learned policies reveals distinct and interpretable guidance trajectories across tasks, underscoring the importance of treating guidance as a dynamic control process rather than a static design choice.

Source

BibTeX · RIS · Markdown · JSON