Diffusion models achieve remarkable fidelity in image synthesis, yet precise control over their outputs for targeted editing remains challenging. A key step toward controllability is to identify interpretable directions in the model's latent representations that correspond to semantic attributes. Existing approaches for finding interpretable directions typically rely on sampling large sets of images or training auxiliary networks, which limits efficiency. We propose an analytical method that derives semantic editing directions directly from the pretrained parameters of diffusion models, requiring neither additional data nor fine-tuning. Our insight is that self-attention weight matrices encode rich structural information about the data distribution learned during training. By computing the eigenvectors of these weight matrices, we obtain robust and interpretable editing directions. Experiments demonstrate that our method produces high-quality edits across multiple datasets while reducing editing time significantly by 60% over current benchmarks.
翻译:扩散模型在图像合成方面展现出卓越的保真度,但针对目标编辑实现对其输出的精确控制仍具挑战性。实现可控性的关键步骤在于识别模型潜在表示中对应语义属性的可解释方向。现有寻找可解释方向的方法通常依赖于对大量图像进行采样或训练辅助网络,这限制了效率。我们提出一种解析方法,可直接从扩散模型的预训练参数中推导出语义编辑方向,无需额外数据或微调。我们的核心见解是:自注意力权重矩阵编码了训练过程中学习到的数据分布的丰富结构信息。通过计算这些权重矩阵的特征向量,我们可获得鲁棒且可解释的编辑方向。实验表明,该方法在多个数据集上均能生成高质量的编辑结果,同时将编辑时间较当前基准显著减少60%。