Guiding a Diffusion Model by Swapping Its Tokens
On the map: Diffusion models → Diffusion foundations and sampling
Abstract (arXiv)
Classifier-Free Guidance (CFG) is a widely used inference-time technique to boost the image quality of diffusion models. Yet, its reliance on text conditions prevents its use in unconditional generation. We propose a simple method to enable CFG-like guidance for both conditional and unconditional generation. The key idea is to generate a perturbed prediction via simple token swap operations, and use the direction between it and the clean prediction to steer sampling towards higher-fidelity distributions. In practice, we swap pairs of most semantically dissimilar token latents in either spatial or channel dimensions. Unlike existing methods that apply perturbation in a global or less constrained manner, our approach selectively exchanges and recomposes token latents, allowing finer control over perturbation and its influence on generated samples. Experiments on MS-COCO 2014, MS-COCO 2017, and ImageNet datasets demonstrate that the proposed Self-Swap Guidance (SSG), when applied to popular diffusion models, outperforms previous condition-free methods in image fidelity and prompt alignment under different set-ups. Its fine-grained perturbation granularity also improves robustness, reducing side-effects across a wider range of perturbation strengths. Overall, SSG extends CFG to a broader scope of applications including both conditional and unconditional generation, and can be readily inserted into any diffusion model as a plug-in to gain immediate improvements.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Diffusion foundations and sampling, one of 14 directions in Diffusion models. Builds on 51 of its 57 references that are in the map. First posted on arXiv 9 Apr 2026.
Builds on
51 of 57 references.
Closest ancestors · 22
Same direction, newest first
- 2025Token Perturbation Guidance for Diffusion Models10 Jun
- 2024textitRevelio: Interpreting and leveraging semantic information in diffusion models23 Nov
- 2024Eliminating Oversaturation and Artifacts of High Guidance Scales in Diffusion Models3 Oct
- 2024Smoothed Energy Guidance: Guiding Diffusion Models with Reduced Energy Curvature of Attention1 Aug
- 2024No Training, No Problem: Rethinking Classifier-Free Guidance for Diffusion Models2 Jul
- 2024CFG++: Manifold-constrained Classifier Free Guidance for Diffusion Models12 Jun
- 2024Guiding a Diffusion Model with a Bad Version of Itself4 Jun
- 2024Applying Guidance in a Limited Interval Improves Sample and Distribution Quality in Diffusion Models11 Apr
- 2024Self-Rectifying Diffusion Sampling with Perturbed-Attention Guidance26 Mar
- 2024PixArt-Sigma: Weak-to-Strong Training of Diffusion Transformer for 4K Text-to-Image Generation7 Mar
- 2024Scaling Rectified Flow Transformers for High-Resolution Image Synthesis5 Mar
- 2023CADS: Unleashing the Diversity of Diffusion Models through Condition-Annealed Sampling26 Oct
10 more
- 2023SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesis4 Jul
- 2022Scalable Diffusion Models with Transformers19 Dec
- 2022Improving Sample Quality of Diffusion Models Using Self-Attention Guidance3 Oct
- 2022Classifier-Free Diffusion Guidance26 Jul
- 2022Elucidating the Design Space of Diffusion-Based Generative Models1 Jun
- 2021High-Resolution Image Synthesis with Latent Diffusion Models20 Dec
- 2021Diffusion Models Beat GANs on Image Synthesis11 May
- 2020Score-Based Generative Modeling through Stochastic Differential Equations26 Nov
- 2020Denoising Diffusion Implicit Models6 Oct
- 2020Denoising Diffusion Probabilistic Models19 Jun
Other references · 29
- 2017Attention Is All You Needcited by 59,932
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2014Microsoft COCO: Common Objects in Contextcited by 17,498
- 2014Very Deep Convolutional Networks for Large-Scale Image Recognitioncited by 15,267
- 2015Deep Unsupervised Learning using Nonequilibrium Thermodynamicscited by 7,005
- 2022Photorealistic Text-to-Image Diffusion Models with Deep Language Understandingcited by 6,322
- 2015Rethinking the Inception Architecture for Computer Visioncited by 5,451
- 2022LAION-5B: An open large-scale dataset for training next generation image-text modelscited by 4,131
- 2019Generative Modeling by Estimating Gradients of the Data Distributioncited by 4,067
- 2021GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Modelscited by 3,595
- 2022DreamFusion: Text-to-3D using 2D Diffusioncited by 3,006
17 more
- 2016Improved Techniques for Training GANscited by 2,938
- 2023Stable Video Diffusion: Scaling Latent Video Diffusion Models to Large Datasetscited by 2,526
- 2022Video Diffusion Modelscited by 2,280
- 2024CogVideoX: Text-to-Video Diffusion Models with An Expert Transformercited by 2,198
- 2022Diffusion Posterior Sampling for General Noisy Inverse Problemscited by 1,375
- 2022Magic3D: High-Resolution Text-to-3D Content Creationcited by 1,285
- 2023ProlificDreamer: High-Fidelity and Diverse Text-to-3D Generation with Variational Score Distillationcited by 1,207
- 2023Pick-a-Pic: An Open Dataset of User Preferences for Text-to-Image Generationcited by 950
- 2019Improved Precision and Recall Metric for Assessing Generative Modelscited by 925
- 2023Diffusion Self-Guidance for Controllable Image Generationcited by 305
- 2023Photorealistic Video Generation with Diffusion Modelscited by 304
- 2023Text-To-4D Dynamic Scene Generationcited by 204
- 2024Improving Diffusion Inverse Problem Solving with Decoupled Noise Annealingcited by 157
- 2023Beyond First-Order Tweedie: Solving Inverse Problems using Latent Diffusioncited by 78
- 20244Real: Towards Photorealistic 4D Scene Generation via Video Diffusion Modelscited by 64
- 2024Not All Diffusion Model Activations Have Been Evaluated as Discriminative Featurescited by 23
- 2024Pre-trained Text-to-Image Diffusion Models Are Versatile Representation Learners for Controlcited by 11
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Revisiting Classifier-Free Guidance Methods in Latent Diffusion Models
- 2025Feedback Guidance of Diffusion Models
- 2025In-situ Autoguidance: Eliciting Self-Correction in Diffusion Models
- 2024Classifier-Free Guidance is a Predictor-Corrector
- 2023Adaptive Guidance: Training-free Acceleration of Conditional Diffusion Models
- 2025Dynamic Classifier-Free Diffusion Guidance via Online Feedback
- 2025Stochastic Self-Guidance for Training-Free Enhancement of Diffusion Models
- 2025Entropy Rectifying Guidance for Diffusion and Flow Models