让扩散模型的神经元‘说话’:看清它到底认了啥
Deep Dreams Are Made of This: Visualizing Monosemantic Features in Diffusion Models
- 用稀疏自编码器拆解隐藏层,找到只对应一个概念的特征
- 在风格50数据集上,可视化出清晰的人像、玫瑰、瀑布等具体图像
- 适合研究模型内部机制或想理解生成原理的研究者
本文提出隐空间优化可视化(LVO),一种将卷积网络的特征可视化方法拓展至隐空间扩散模型的可解释性技术。LVO利用稀疏自编码器(SAE)将多义层表示解耦为单义特征,包含隐空间优化、时间步活跃度分析、时序匹配噪声注入、通过特征引导初始化先验及合适的正则化策略。我们在微调过的Stable Diffusion 1.5(Style50数据集)上验证该方法,发现SAE特征能清晰可视化出对角构图、人物、玫瑰、电缆、瀑布泡沫等可识别概念,且与数据集样本高度相关;而未解耦基线则结果模糊。我们还发现像素空间的正则化技巧可迁移至隐空间,但需针对原始层与SAE变体分别调整参数。相比数据集样本和特征控制,LVO直接揭示特征激活内容,提供互补视角。
原文摘要 · Abstract (English)
This paper proposes latent visualization by optimization (LVO), a mechanistic interpretability technique that extends feature visualization by optimization - originally developed for convolutional neural networks - to latent diffusion models. LVO employs sparse autoencoders (SAEs) to disentangle polysemantic layer representations into monosemantic features. Key contributions include latent-space optimization, time-step activity analysis, schedule-matched noise injection, prior initialization through feature steering, and suitable regularization strategies. We demonstrate the method on Stable Diffusion 1.5 fine-tuned on the Style50 dataset, showing that SAE features produce clear visualizations of recognizable concepts - including diagonal compositions, human figures, roses, cables, and waterfall foam - that correlate with dataset examples, while the baseline without disentanglement produces less coherent results. We further show that regularization techniques from pixel-space feature visualization transfer to the latent domain, though they require different configurations for the raw-layer and SAE variants. Compared to dataset examples and steering, LVO provides complementary insights by directly revealing what activates a feature rather than its downstream effects.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。