Self-Rectifying Diffusion Sampling with Perturbed-Attention Guidance

Donghoon Ahn, Hyoungwon Cho, Jaewon Min, Wooseok Jang, Jungwoo Kim +4 more
2/14/2026

No official code found. Best implementation: cvlab-kaist/Perturbed-Attention-Guidance (332 stars, MIT, last commit 2024-07-02).

Abstract

Recent studies have demonstrated that diffusion models are capable of generating high-quality samples, but their quality heavily depends on sampling guidance techniques, such as classifier guidance (CG) and classifier-free guidance (CFG). These techniques are often not applicable in unconditional generation or in various downstream tasks such as image restoration. In this paper, we propose a novel sampling guidance, called Perturbed-Attention Guidance (PAG), which improves diffusion sample quality across both unconditional and conditional settings, achieving this without requiring additional training or the integration of external modules. PAG is designed to progressively enhance the structure of samples throughout the denoising process. It involves generating intermediate samples with degraded structure by substituting selected self-attention maps in diffusion U-Net with an identity matrix, by considering the self-attention mechanisms'ability to capture structural information, and guiding the denoising process away from these degraded samples. In both ADM and Stable Diffusion, PAG surprisingly improves sample quality in conditional and even unconditional scenarios. Moreover, PAG significantly improves the baseline performance in various downstream tasks where existing guidances such as CG or CFG cannot be fully utilized, including ControlNet with empty prompts and image restoration such as inpainting and deblurring.

View on arXivView PDF

Code Implementations(1)

MIT

Official implementation of "Perturbed-Attention Guidance"

33214Shell, PythonMar 26, 20242 years agoMIT

Similar Papers

Cite this paper

@article{ahn2026selfrectifying,
  title  = {Self-Rectifying Diffusion Sampling with Perturbed-Attention Guidance},
  author = {Donghoon Ahn and Hyoungwon Cho and Jaewon Min and Wooseok Jang and Jungwoo Kim and Seonhwa Kim and H. Park and Kyong Hwan Jin and Seungryong Kim},
  year   = {2026},
  eprint = {2403.17377},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2403.17377},
  journal = {ECCV 2024 2024}
}

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

Discussion