Directional Attention Guidance for Diffusion Models via Sparse Hopfield Retrieval

Read full text
Authors: Kwanyoung Kim
Cited by: 0
References: 18

Abstract

Classifier-Free Guidance (CFG) improves sample quality in diffusion models, but its dual-pass inference and null-condition training limit its use in few-step regimes. Attention-space guidance is a single-pass alternative, yet why sparse-versus-dense attention guidance works remains elusive. We analyze attention extrapolation through Modern Hopfield dynamics and establish two directional properties of the sparse-dense discrepancy under shared conditioning that identify it as an acceleration direction toward the dominant stored pattern. Building on this, we propose Directional Attention Guidance (DAG), a training-free, single-pass rule that amplifies only the component of the discrepancy aligned with the retrieval direction; stability follows from a weak contraction property, and an analysis inside real cross-attention layers shows that this alignment is observed throughout sampling. DAG generalizes across UNet and MMDiT backbones and multi-step and few-step regimes, improving text alignment and human-preference scores on every backbone tested, including FLUX.1, FLUX.2, and Qwen-Image, at a small added cost per image over the base sampler.

Fields of Study & Subjects

Generative Adversarial Networks and Image Synthesis Adversarial Robustness in Machine Learning Advanced Neural Network Applications

Publication details

Journal / source
arXiv (Cornell University)
Publication date
3 March 2026
Language
EN
Document type
Preprint