Characteristic Guidance: Non-linear Correction for Diffusion Model at Large Guidance Scale

Candi Zheng, Yuan Lan

Introduction

Standard Classifier-Free Guidance (CFG) has become the backbone of modern text-to-image diffusion models, allowing users to steer generation by linearly combining conditional and unconditional models. However, this linear approach breaks down at high guidance scales, leading to over-saturated, distorted, and "fried" images. Characteristic Guidance (CH) introduces a training-free, non-linear correction based on the Fokker-Planck equation, allowing for much stronger prompt adherence without sacrificing image quality, anatomical correctness, or physical realism.

The Problem with High Guidance Scales

If you have ever used a diffusion model like Stable Diffusion and pushed the "Guidance Scale" (CFG) slider up to 20 or 30, you have likely seen the results: images with neon colors, bizarre artifacts, and crushed blacks.

Technically, CFG works by linearly combining a conditional score (which follows your prompt) and an unconditional score (representing general image knowledge). This linear approach assumes that the underlying probability distributions behave predictably when added together. However, the evolution of these distributions over time is actually governed by the Fokker-Planck (FP) equation, which is fundamentally non-linear.

At low guidance scales, the linear approximation of CFG is sufficient. But at large scales, this approximation ignores significant non-linear effects. These "mixing errors" manifest as the visual irregularities and structural collapses commonly seen in AI-generated art.

The Characteristic Guidance (CH) Solution

To address this non-linearity problem, the authors propose a first-principles approach called Characteristic Guidance (CH).

  1. The Method of Characteristics: Using this classic mathematical technique for solving partial differential equations (PDEs), the authors track how the "score"—the direction the model moves to denoise an image—should actually evolve to satisfy the FP equation.
  2. The Harmonic Ansatz: To make the complex mathematics tractable without requiring model retraining, the authors assume the optimal solution is "harmonic" (meaning its Laplacian is zero). This clever simplification holds perfectly for Gaussian distributions and serves as a robust approximation for complex images.
  3. Iterative Correction: Instead of a simple linear sum, CH calculates a non-linear correction term. Because this term depends on the model's own output, it is solved using a fast fixed-point iteration (similar to RMSprop or Anderson Acceleration) at each denoising step.
  4. Training-Free Integration: Crucially, this method requires zero retraining. It acts as a "plug-and-play" modification to the sampling process of any existing diffusion model.

Visual Quality and Semantic Enhancement

Comparison of Classifier-Free and Characteristic Guidance

Characteristic Guidance provides significant improvements in both visual fidelity and semantic composition:

  • Eliminating "Fried" Artifacts: On models like Stable Diffusion XL (SDXL), CH eliminates the color casting and exposure issues typically seen at CFG scales of 30+. Images remain vibrant and naturally lit while following prompts strictly.
  • Semantic and Anatomical Coherence: CH improves structural anatomy. By respecting non-linear dynamics, the model better understands how different elements of a prompt (e.g., a complex pose like a handstand, or a subject interacting with a landscape) should interact spatially without creating "melting" artifacts or broken limbs.
  • Maintaining Diversity: CH mitigates the "catastrophic loss of diversity" that usually occurs at high guidance scales, keeping generated samples varied rather than collapsing them into a single distorted output.

Quantitative and Scientific Validation

Beyond visual improvements in generative AI, the researchers evaluated CH across several rigorous domains:

  • Standard Benchmarks: On CIFAR-10, CH achieved lower Fréchet Inception Distance (FID) scores compared to CFG across almost all guidance scales, indicating higher overall image realism.
  • Physics-Aware AI: In a 2D Ising-like magnet model (Landau-Ginzburg) simulation, CFG failed to show the phase transition split into two magnetic poles. CH captured this perfectly, suggesting it is a superior tool for applying diffusion models to scientific simulations.
  • Bridging the SDE/ODE Gap: While stochastic (SDE) samplers traditionally handle high guidance better than deterministic (ODE) ones, CH significantly narrows this gap, making fast ODE samplers much more robust at high scales.

Limitations and Future Work

While highly effective, Characteristic Guidance does introduce computational overhead. Because CH requires an iterative solver (typically 2-5 iterations per denoising step), it is slower than standard CFG, requiring multiple passes through the U-Net or Transformer backbone. Additionally, while CH works excellently in pixel space, applying it in latent space requires careful tuning of the "projection operator."

Future work will likely explore advanced regularization techniques to speed up the convergence of the iterative solver, potentially making Characteristic Guidance as fast as standard sampling while retaining its superior image quality.

Summary updated

BibTeX
@inproceedings{zheng2024characteristic,
  author = {Candi Zheng and Yuan Lan},
  title = {{Characteristic Guidance: Non-linear Correction for Diffusion Model at Large Guidance Scale}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=eOtjMYdGLt},
}
Figure