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

Adversarial Learning of Classifier-Free Guidance Schedules

Ashwini Pokle, Alexandre Galashov, Arnaud Doucet, Mauricio Delbracio, Valentin De BortoliarXiv 2026

TL;DR

This paper introduces an adversarial learning framework to dynamically optimize the Classifier-Free Guidance (CFG) schedule in text-to-image diffusion models. By framing guidance as a time-, prompt-, and sample-dependent density ratio estimation problem, the proposed method automatically adapts the guidance scale to improve text alignment and image quality. Empirically, this approach outperforms standard static CFG and hand-crafted heuristic schedules across multiple human preference and text-alignment benchmarks.

What Problem Does This Paper Address?

Classifier-Free Guidance (CFG) is a crucial ingredient in modern text-to-image generative models, responsible for ensuring that generated images actually match the text prompts. Typically, practitioners use a static, global guidance scale (often around $\omega = 7.5$) across all diffusion timesteps, image samples, and text prompts.

However, this "one-size-fits-all" approach is fundamentally suboptimal. A constant high guidance scale often introduces unwanted artifacts, such as over-saturation and unnatural contrast, because different stages of the denoising process—and different prompt complexities—benefit from varying levels of guidance. While hand-designed, time-varying schedules can mitigate these issues, they introduce tedious hyperparameters that are difficult to tune and remain completely blind to the specific text prompt or image state. This paper addresses the challenge of automatically learning a dynamic, state-dependent guidance schedule.

Methods

The authors propose learning the guidance schedule by enforcing a marginal consistency condition. The goal is to ensure that the distribution of guided, denoised samples matches the true data distribution at every single timestep along the sampling trajectory.

To achieve this, they leverage a Generative Adversarial Network (GAN) framework formulated as a density ratio estimation problem:

  1. The Discriminator: A convolutional network is trained to distinguish between "real" noised samples from the true data distribution and "fake" samples generated via the guided denoising path. At convergence, the discriminator effectively estimates the log-density ratio between the true and guided distributions.
  2. The Generator (Guidance Network): A lightweight Multi-Layer Perceptron (MLP) predicts the optimal, non-negative guidance scale $\omega$. It takes continuous timesteps, text conditioning, and the current noisy sample as inputs. To prevent computational inefficiency and overfitting, instead of feeding raw high-dimensional latents into the MLP, the authors extract coordinate-invariant summary statistics (such as the log norm of the conditional velocity and the cosine similarity between the latent state and the guidance direction).

The overall framework is illustrated below:

Marginal consistency via GAN framework.

The generator is optimized using a combination of the adversarial loss (to push samples onto the real data manifold), an $L_2$ regularization penalty (to prevent the guidance scale from exploding), and a reward-based loss term (specifically, the CLIP score) to maximize text-image alignment.

Datasets

The method was trained and evaluated on the standard MS-COCO 2014 dataset at a $512 \times 512$ resolution. The authors utilized two sizes of a custom-trained flow matching model based on the Multimodal Diffusion Transformer (MMDiT) architecture: a 740M parameter model (MMDiT-XS) and a 1.05B parameter model (MMDiT-S).

Key Insights and Ideas

  • Density Ratio Framing: Treating dynamic guidance as a density ratio estimation problem allows the model to naturally utilize the mathematical strengths of GANs to align intermediate probability paths, rather than relying on brittle distance metrics like Maximum Mean Discrepancy (MMD).
  • Summary Statistics over Raw Latents: Passing low-dimensional geometric summary statistics to the MLP generator rather than raw, high-dimensional latents makes the guidance network highly efficient and robust, allowing it to interpolate smoothly to smaller step sizes during inference.
  • Independent Pair Sampling: During training, the real path and fake path use independent image-conditioning pairs from the dataset. This prevents the discriminator from simply memorizing the noise structure of a single trajectory, forcing it instead to evaluate global distribution matching.

Key Results

The proposed method (GAN + MC) was compared against fixed guidance, heuristic schedules (Limited Interval Guidance [LIG], Clamp-Linear Guidance [CLG]), and prior learned consistency methods.

As shown in the evaluation tables, the adversarially learned schedule consistently achieved superior text alignment (CLIP), visual quality (Aesthetic score), and human preference metrics (HPSv2 and PickScore) across both model sizes:

Table 1: MS COCO 512 × 512. Performance of different methods on a small, MMDiT-XS model. We highlight the best metric in bold.
Table 2: MS COCO 512 × 512. Performance of different methods on a large, MMDiT-S model. We highlight the best metric in bold.

While the method results in a marginal increase in FID (a known trade-off when optimizing for semantic features and CLIP rewards), it significantly improves prompt adherence and visual appeal, successfully generating more realistic images that capture nuanced prompt details that baseline methods omit.

Limitations and Future Work

  • Complex Training: Balancing an adversarial game (GAN) over an entire diffusion trajectory requires careful tuning and optimization strategies like the Two-Time-Scale Update Rule (TTUR).
  • Backbone Specificity: The learned guidance network relies heavily on the local geometric statistics of the specific pre-trained model it was trained on. Consequently, it cannot be transferred zero-shot to a different model architecture without re-training.
  • Reward Signal Dependencies: The framework currently incorporates a CLIP reward loss, inheriting any underlying biases or drawbacks present in CLIP. Exploring alternative human-preference reward signals remains an open avenue for future work.

Summary updated

BibTeX
@misc{pokle2026adversarial,
  author = {Ashwini Pokle and Alexandre Galashov and Arnaud Doucet and Mauricio Delbracio and Valentin De Bortoli},
  title = {{Adversarial Learning of Classifier-Free Guidance Schedules}},
  year = {2026},
  eprint = {2608.14038},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.14038},
}
Figure