Despite the success of diffusion models (DMs), we still lack a thorough understanding of their latent space. To understand the latent space $\mathbf{x}_t \in \mathcal{X}$, we analyze them from a geometrical perspective. Specifically, we utilize the pullback metric to find the local latent basis in $\mathcal{X}$ and their corresponding local tangent basis in $\mathcal{H}$, the intermediate feature maps of DMs. The discovered latent basis enables unsupervised image editing capability through latent space traversal. We investigate the discovered structure from two perspectives. First, we examine how geometric structure evolves over diffusion timesteps. Through analysis, we show that 1) the model focuses on low-frequency components early in the generative process and attunes to high-frequency details later; 2) At early timesteps, different samples share similar tangent spaces; and 3) The simpler datasets that DMs trained on, the more consistent the tangent space for each timestep. Second, we investigate how the geometric structure changes based on text conditioning in Stable Diffusion. The results show that 1) similar prompts yield comparable tangent spaces; and 2) the model depends less on text conditions in later timesteps. To the best of our knowledge, this paper is the first to present image editing through $\mathbf{x}$-space traversal and provide thorough analyses of the latent structure of DMs.
翻译:尽管扩散模型(DMs)取得了成功,我们仍缺乏对其潜在空间的深入理解。为理解潜在空间 $\mathbf{x}_t \in \mathcal{X}$,我们从几何视角对其进行分析。具体而言,我们利用拉回度量寻找 $\mathcal{X}$ 中的局部潜在基,以及其对应在 $\mathcal{H}$(即DMs的中间特征图)中的局部切基。所发现的潜在基能够通过潜在空间遍历实现无监督图像编辑。我们从两个角度探究这一发现的结构。首先,研究几何结构随扩散时间步演化的规律。通过分析,我们表明:1)模型在生成过程中早期关注低频分量,后期转向高频细节;2)在早期时间步,不同样本共享相似的切空间;3)DMs训练的数据集越简单,每个时间步的切空间一致性越强。其次,研究稳定扩散中文本条件如何改变几何结构。结果表明:1)相似提示词生成可比较的切空间;2)模型在后续时间步对文本条件的依赖减弱。据我们所知,本文首次提出通过 $\mathbf{x}$-空间遍历实现图像编辑,并对DMs的潜在结构进行了详尽分析。