arXiv:2412.02542cs.CVcs.LG2024-12NeurIPS被引 12

揭示扩散模型中正负组件如何协同生成概念,实现精准编辑。

Unveiling Concept Attribution in Diffusion Models

  • 提出组件归因框架CAD,量化各参数对概念的贡献度。
  • 发现正负两种组件:前者促进概念生成,后者抑制生成。
  • 基于归因结果,实现无需重训练的概念擦除与增强。

扩散模型在文本生成高质量图像方面表现卓越,但其内部机制仍属黑箱,我们对各组件在呈现物体、风格等概念中的作用知之甚少。现有研究通过因果追踪定位知识存储层,却未揭示其他层的贡献。本文从更通用视角出发,提出核心问题:‘模型组件如何协同展现知识?’为此,我们采用组件归因方法,系统揭示每个组件(特别是模型参数)在生成特定概念时的重要性。所提框架CAD发现促进概念生成的正向组件,同时意外识别出抑制概念生成的负向组件——这一现象此前研究中被忽略。基于此全面理解,我们设计两种快速推理时编辑算法:CAD-Erase通过移除正向组件实现概念擦除,CAD-Amplify通过移除负向组件实现概念增强,同时保留其他概念的知识。大量实验验证了正负组件的重要性,证明该框架可为生成模型提供完整解释视角。代码已公开于GitHub。

原文摘要 · Abstract (English)

Diffusion models have shown remarkable abilities in generating realistic and high-quality images from text prompts. However, a trained model remains largely black-box; little do we know about the roles of its components in exhibiting a concept such as objects or styles. Recent works employ causal tracing to localize knowledge-storing layers in generative models without showing how other layers contribute to the target concept. In this work, we approach diffusion models' interpretability problem from a more general perspective and pose a question: \textit{``How do model components work jointly to demonstrate knowledge?''}. To answer this question, we decompose diffusion models using component attribution, systematically unveiling the importance of each component (specifically the model parameter) in generating a concept. The proposed framework, called \textbf{C}omponent \textbf{A}ttribution for \textbf{D}iffusion Model (CAD), discovers the localization of concept-inducing (positive) components, while interestingly uncovers another type of components that contribute negatively to generating a concept, which is missing in the previous knowledge localization work. Based on this holistic understanding of diffusion models, we introduce two fast, inference-time model editing algorithms, CAD-Erase and CAD-Amplify; in particular, CAD-Erase enables erasure and CAD-Amplify allows amplification of a generated concept by ablating the positive and negative components, respectively, while retaining knowledge of other concepts. Extensive experimental results validate the significance of both positive and negative components pinpointed by our framework, demonstrating the potential of providing a complete view of interpreting generative models. Our code is available \href{https://github.com/mail-research/CAD-attribution4diffusion}{here}.

扩散模型可解释性概念编辑归因分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。