RAAG: Ratio Aware Adaptive Guidance

Shangwen Zhu, Qianyu Peng, Yuting Hu, Zhantao Yang, Han Zhang, Zhao Pu, Ruili Feng, Fan Cheng

Abstract

Flow-based generative models have achieved remarkable progress, with classifier-free guidance (CFG) becoming the standard for high-fidelity generation. However, the conventional practice of applying a strong, fixed guidance scale throughout inference is poorly suited for the rapid, few-step sampling required by modern applications. In this work, we uncover the root cause of this conflict: a fundamental sampling instability where the earliest steps are acutely sensitive to guidance. We trace this to a significant spike in the ratio of conditional to unconditional predictions—a spike that we prove to be an inherent property of the training data distribution itself, making it an almost inevitable challenge. Applying a high, static guidance value during this volatile initial phase leads to an exponential amplification of error, degrading image quality. To resolve this, we propose a simple, theoretically grounded, adaptive guidance schedule that automatically dampens the guidance scale at early steps based on the evolving ratio. Our method is lightweight, incurs no inference overhead, and is compatible with standard frameworks. Experiments across state-of-the-art image (SD3.5, Qwen-Image) and video (WAN2.1) models show our approach enables up to 3x faster sampling while maintaining or improving quality, robustness, and semantic alignment.

Introduction

Most modern generative models rely on Classifier-Free Guidance (CFG) to ensure the output matches the user's prompt. While effective, CFG is computationally expensive and often unstable. The researchers identify a specific "Zero-SNR" instability: at the very beginning of the generation process (when the image is just pure noise), the guidance direction is "generic"—it pushes the image toward a prompt-related concept without considering the specific structure of the random noise.

In high-dimensional models, such as the 14B-parameter Wan2.1 or high-resolution Flux, this leads to disproportionately large updates that cause "overshooting." The result is often visual artifacts like oversaturated colors, crushed blacks, and structural incoherence. To mitigate this, users typically run many sampling steps, which is slow and costly.

Methods: MAMBO-G

The core innovation is MAMBO-G (Magnitude-Aware Mitigation for Boosted Guidance). Unlike previous methods that change guidance based solely on the timestep (time-aware), MAMBO-G is magnitude-aware.

  1. The Ratio ($r_t$): The authors define a ratio that compares the magnitude of the guidance update to the magnitude of the unconditional prediction. A high ratio indicates that the guidance is trying to force a massive change that might be unstable.
  2. Adaptive Damping: Instead of a constant guidance scale, MAMBO-G uses an exponential decay function: $$w(r_t) = 1 + (w_{max} - 1) \cdot \exp(-\alpha r_t)$$ When the update magnitude is high (high $r_t$), the guidance scale is automatically dialed back to prevent artifacts. As the image structure stabilizes and the ratio drops, the guidance "boosts" back up to refine details.

  3. Training-Free: This is a purely mathematical adjustment to the inference process. It requires no retraining and can be added to existing pipelines.

Comparison of image quality across different sampling configurations using adaptive guidance.

Key Insights

  • The "Generic Direction" Trap: At $t=1$, the cosine similarity of guidance updates across different noise seeds is nearly 1.0. This means the model is ignoring the specific noise and blindly following the prompt, which is the primary source of early-stage instability.
  • Instance-Awareness: Even at the same timestep, different images have different stability needs. MAMBO-G adapts to the specific image being generated rather than using a fixed schedule.
  • The Dimensionality Curse: As latent space dimensions increase (moving from SD1.5 to SD3.5 or 4K video), the risk of guidance instability grows exponentially, making magnitude-aware control essential.

Experimental Results

The researchers evaluated MAMBO-G across several benchmarks, including MS-COCO, ImageReward, and WebVid, testing models like Stable Diffusion v3.5 and the Wan2.1 video suite.

  • Significant Speedups: MAMBO-G achieves quality comparable to 30-step CFG in just 10 steps (a 3.0× speedup).
  • Quantitative Gains: On MS-COCO, MAMBO-G improved the FID (Fréchet Inception Distance) from 63.6 to 32.05 at 10 steps, nearly matching the quality of a 50-step reference.
  • Video Acceleration: It accelerated the 14B-parameter Wan2.1 video model by 2× while preserving visual fidelity and temporal consistency.
Temporal consistency in video generation using the Wan2.1 model with RAAG.

Conclusion

RAAG (MAMBO-G) demonstrates that adapting guidance to the sampling process, rather than fixing it, is critical for unlocking the full potential of fast, flow-based models. By dynamically damping the guidance scale based on update magnitudes, it prevents overshooting and enables high-fidelity results in significantly fewer steps. Future work will explore automated hyperparameter tuning and integration with distillation techniques like LCM to further reduce step counts.

Summary updated

Abstract

Flow-based generative models have achieved remarkable progress, with classifier-free guidance (CFG) becoming the standard for high-fidelity generation. However, the conventional practice of applying a strong, fixed guidance scale throughout inference is poorly suited for the rapid, few-step sampling required by modern applications. In this work, we uncover the root cause of this conflict: a fundamental sampling instability where the earliest steps are acutely sensitive to guidance. We trace this to a significant spike in the ratio of conditional to unconditional predictions--a spike that we prove to be an inherent property of the training data distribution itself, making it a almost inevitable challenge. Applying a high, static guidance value during this volatile initial phase leads to an exponential amplification of error, degrading image quality. To resolve this, we propose a simple, theoretically grounded, adaptive guidance schedule that automatically dampens the guidance scale at early steps based on the evolving ratio. Our method is lightweight, incurs no inference overhead, and is compatible with standard frameworks. Experiments across state-of-the-art image (SD3.5, Qwen-Image) and video (WAN2.1) models show our approach enables up to 3x faster sampling while maintaining or improving quality, robustness, and semantic alignment. Our findings highlight that adapting guidance to the sampling process, rather than fixing it, is critical for unlocking the full potential of fast, flow-based models.
BibTeX
@inproceedings{zhu2026raag,
  author = {Shangwen Zhu and Qianyu Peng and Yuting Hu and Zhantao Yang and Han Zhang and Zhao Pu and Ruili Feng and Fan Cheng},
  title = {{RAAG: Ratio Aware Adaptive Guidance}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=zSKSZm46DO},
}
Figure