ReGA:基于Hopfield视角的检索门控注意力引导,仅在前半程提示注意力质量内生效
Guidance Ends When Reading Ends: Retrieval-Gated Attention Guidance for Diffusion Models through a Hopfield Lens
研究提出 Retrieval-Gated Attention Guidance(ReGA),将注意力视为稀疏 Hopfield 检索,只在残差与稀疏检索输出平行的方向上外推,且仅在前半段采样步骤内施加更新。
arXiv:2603.02531v4 Announce Type: replace Abstract: Beyond classifier-free guidance, attention-space guidance extrapolates between a strong and a weak attention map within a single forward pass. However, two questions that govern its behavior remain unexamined: along which direction the extrapolation should proceed, and for how many sampling steps it should be applied. The first governs sample quality, and the second governs cost. Interestingly, viewing attention as sparse Hopfield retrieval answers both questions. At every sampling step, the informative direction is the component of the residual parallel to the sparse retrieval output. The guidance acts on the prompt in proportion to the attention mass that image queries assign to text tokens; and since the prompt shapes the image only in the early part of sampling, guidance matters only while the prompt is still being read. Building on this analysis, we propose Retrieval-Gated Attention Guidance (ReGA), which extrapolates only along this parallel component and applies the update only over the early steps holding half of the total prompt-attention mass. Extensive measurements inside the attention layers of UNet and MM-DiT backbones confirm both theoretical predictions. Across various backbone models, in multi-step and few-step regimes, ReGA consistently improves text alignment and human-preference scores over existing attention-space guidance methods, while adding as little as 2% inference time on MM-DiT backbones.
来源:arXiv (AI + Vision + Imaging) · arxiv.org