Recent guidance methods in diffusion models steer reverse sampling by perturbing the model to construct an implicit weak model and guide generation away from it. Among these approaches, attention perturbation has demonstrated strong empirical performance in unconditional scenarios where classifier-free guidance is not applicable. However, existing attention perturbation methods lack principled approaches for determining where perturbations should be applied, particularly in Diffusion Transformer (DiT) architectures where quality-relevant computations are distributed across layers. In this paper, we investigate the granularity of attention perturbations, ranging from the layer level down to individual attention heads, and discover that specific heads govern distinct visual concepts such as structure, style, and texture quality. Building on this insight, we propose "HeadHunter", a systematic framework for iteratively selecting attention heads that align with user-centric objectives, enabling fine-grained control over generation quality and visual attributes. In addition, we introduce SoftPAG, which linearly interpolates each selected head's attention map toward an identity matrix, providing a continuous knob to tune perturbation strength and suppress artifacts. Our approach not only mitigates the oversmoothing issues of existing layer-level perturbation but also enables targeted manipulation of specific visual styles through compositional head selection. We validate our method on modern large-scale DiT-based text-to-image models including Stable Diffusion 3 and FLUX.1, demonstrating superior performance in both general quality enhancement and style-specific guidance. Our work provides the first head-level analysis of attention perturbation in diffusion models, uncovering interpretable specialization within attention layers and enabling practical design of effective perturbation strategies.


翻译:扩散模型中的近期引导方法通过扰动模型构建隐式弱模型,并引导生成过程偏离该模型,从而调控反向采样。在这些方法中,注意力扰动在无条件生成场景(如无分类器引导不适用时)展现出卓越的实证性能。然而,现有注意力扰动方法缺乏确定扰动应用位置的原则性框架,尤其在扩散Transformer(DiT)架构中,与生成质量相关的计算分散于各网络层。本文系统研究了注意力扰动的粒度——从网络层级别细化至单个注意力头,发现特定注意力头分别主导不同的视觉概念(如结构、风格与纹理质量)。基于此发现,我们提出“HeadHunter”系统框架,通过迭代选择符合用户目标的注意力头,实现对生成质量与视觉属性的细粒度控制。此外,我们引入SoftPAG方法,将每个选定注意力头的注意力图向单位矩阵线性插值,提供连续调节扰动强度的机制以抑制伪影。该方法不仅缓解了现有层级扰动导致的过度平滑问题,还能通过组合式注意力头选择实现特定视觉风格的定向调控。我们在包括Stable Diffusion 3和FLUX.1在内的大规模基于DiT的文生图模型上验证了所提方法,在通用质量提升与风格特异性引导方面均表现出优越性能。本研究首次实现了扩散模型中注意力扰动的头层级分析,揭示了注意力层内可解释的功能分化,并为设计高效扰动策略提供了实践指导。

0
下载
关闭预览

相关内容

【ICCV2023】保留模态结构改进多模态学习
专知会员服务
31+阅读 · 2023年8月28日
【NeurIPS 2022】扩散模型的深度平衡方法
专知会员服务
40+阅读 · 2022年11月5日
【ICML2021】因果匹配领域泛化
专知
12+阅读 · 2021年8月12日
Spark机器学习:矩阵及推荐算法
LibRec智能推荐
16+阅读 · 2017年8月3日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关资讯
【ICML2021】因果匹配领域泛化
专知
12+阅读 · 2021年8月12日
Spark机器学习:矩阵及推荐算法
LibRec智能推荐
16+阅读 · 2017年8月3日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员