Skip to main content
QUICK REVIEW

[論文レビュー] Unsupervised Discovery of Semantic Latent Directions in Diffusion Models

Yong-Hyun Park, Mingi Kwon|arXiv (Cornell University)|Feb 24, 2023
Generative Adversarial Networks and Image Synthesis被引用数 5
ひとこと要約

本稿では、拡散モデルの潜在空間における解釈可能でグローバルに一貫した意味的潜在方向を、潜在変数 $\mathbf{x}_t$ と中間U-Net特徴 $\mathcal{H}$ 間のリーマン幾何学を用いて、教師なしで発見する手法を提案する。$\mathbf{x}_t$ から $\mathcal{H}$ へのエンコーダー写像のヤコビ行列を分解することで、サンプル全体にわたって一貫して属性を操作できる分離可能な編集方向を同定する。この手法により、Stable Diffusion のようなモデルですら、初期ステップが粗い特徴を制御し、後続ステップが高周波数の詳細を精緻化することを明らかにする。

ABSTRACT

Despite the success of diffusion models (DMs), we still lack a thorough understanding of their latent space. While image editing with GANs builds upon latent space, DMs rely on editing the conditions such as text prompts. We present an unsupervised method to discover interpretable editing directions for the latent variables $\mathbf{x}_t \in \mathcal{X}$ of DMs. Our method adopts Riemannian geometry between $\mathcal{X}$ and the intermediate feature maps $\mathcal{H}$ of the U-Nets to provide a deep understanding over the geometrical structure of $\mathcal{X}$. The discovered semantic latent directions mostly yield disentangled attribute changes, and they are globally consistent across different samples. Furthermore, editing in earlier timesteps edits coarse attributes, while ones in later timesteps focus on high-frequency details. We define the curvedness of a line segment between samples to show that $\mathcal{X}$ is a curved manifold. Experiments on different baselines and datasets demonstrate the effectiveness of our method even on Stable Diffusion. Our source code will be publicly available for the future researchers.

研究の動機と目的

  • 現在の拡散モデルの潜在空間における解釈可能性と制御の欠如に取り組むこと。現在のところ、潜在空間編集ではなく、条件付きプロンプト依存のアプローチが用いられている。
  • 属性アノテーションや外部の教師信号を一切用いずに、拡散モデルの潜在空間 $\mathbf{x}_t$ において、グローバルに一貫した解釈可能な編集方向を発見すること。
  • 特にその曲率と、時間ステップにわたる階層的特徴生成との関係を含め、潜在空間 $\mathcal{X}$ の幾何構造を理解すること。
  • 事前学習済みで固定された拡散モデルに対して、$\mathbf{x}_t$ 内の意味的な方向を同定することで、意味的画像編集を可能にすること。
  • Stable Diffusion のような最先端モデルに対しても、その複雑なアーキテクチャや条件付きガイダンスにもかかわらず、本手法が汎用可能であることを示すこと。

提案手法

  • 本手法は、$\mathbf{x}_t$ を中間特徴マップ $\mathcal{H}$ に結びつけるためにリーマン幾何学を用い、$\mathcal{H}$ をリーマン多様体とみなす。
  • エンコーダー写像 $\mathbf{x}_t \to \mathcal{H}$ のヤコビ行列を計算し、特異値分解(SVD)を適用することで、$\mathcal{H}$ における変化を最大にする主方向を抽出する。
  • 複数のサンプルにわたる局所的な接空間方向の平均をとることで、グローバルな意味的方向を導出する。これにより一貫性と一般化性能が保証される。
  • 方向ベクトルを幾何平均で正規化することで、極端な摂動に対しても飽和を防ぎ、安定した編集を実現する。
  • $\mathbf{x}_t$ 空間における球面線形補間(slerp)を用いることで、$\mathcal{H}$ における測地線を近似する。これにより、$\mathcal{X}$ が曲がった多様体であることが示唆される。
  • 本手法は、微調整や学習データへのアクセスを必要とせず、Stable Diffusion を含むさまざまな拡散モデルアーキテクチャにエンドツーエンドで適用可能である。
Figure 1: Conceptual illustration of our method. We find semantic directions in the latent space $\mathbf{x}_{t}$ in an unsupervised fashion relying on Riemannian geometry between $\mathbf{x}_{t}$ and $\mathbf{h}_{t}$ . $\mathcal{H}$ denotes the bottleneck layer and $f$ indicates the frozen encoder
Figure 1: Conceptual illustration of our method. We find semantic directions in the latent space $\mathbf{x}_{t}$ in an unsupervised fashion relying on Riemannian geometry between $\mathbf{x}_{t}$ and $\mathbf{h}_{t}$ . $\mathcal{H}$ denotes the bottleneck layer and $f$ indicates the frozen encoder

実験結果

リサーチクエスチョン

  • RQ1属性の教師信号やアノテーションを一切用いずに、拡散モデルの潜在空間 $\mathbf{x}_t$ において、グローバルに一貫した解釈可能な編集方向を発見できるか?
  • RQ2特にその曲率を含めた潜在空間 $\mathcal{X}$ の幾何構造は、生成プロセスや編集行動にどのように影響を与えるか?
  • RQ3拡散プロセスの初期ステップと後期ステップは、それぞれ粗い特徴と細かい特徴の操作に対応しているか?
  • RQ4GANSpace と比較して、本手法は分離性や視覚的品質の面で優れているか?
  • RQ5本手法は、Stable Diffusion のような複雑な条件付き拡散モデルに対しても、どの程度汎用可能か?

主な発見

  • 本手法は、属性の教師信号を一切用いずに、年齢、表情、髪の長さといった属性に対して一貫した、分離可能な変更をもたらす $\mathbf{x}_t$ 内の意味的潜在方向を発見した。
  • 発見された方向はグローバルに一貫している:異なるサンプルに同じ方向を適用しても、類似した意味的編集が得られる。これにより汎用的な画像編集が可能になる。
  • 初期ステップでの編集は主に低周波成分(全体の形状、ポーズ)に影響を与え、後続ステップでの編集は高周波成分(テクスチャ、顔貌特徴)の精緻化に寄与する。
  • サンプル間の線分の非ゼロの曲率から、潜在空間 $\mathbf{x}_t$ が幾何学的に曲がっていることが示された。また、$\mathbf{x}_t$ における球面補間は、$\mathcal{H}$ における測地線を近似する。
  • GANSpace ですら設計された GAN に最適化されているにもかかわらず、本手法は $\mathcal{H}$ 空間に適用した場合、歪みが少なく、分離性が優れている。
  • 本手法は Stable Diffusion に対しても効果的に機能するが、発見される意味的方向が少ない上に、ときおり急激な変化を示すことがある。これは、このモデルにおける潜在多様体がより複雑である可能性を示唆している。
Figure 2: Conceptual illustration of our editing procedure. It consists of two parts: (① $\sim$ ④) discovering semantic latent directions using pullback metric and (⑤ $\sim$ ⑧) editing samples multiple times through geodesic shooting. ① Map a sample in $\mathcal{X}$ into a tangent space $\mathcal{T}
Figure 2: Conceptual illustration of our editing procedure. It consists of two parts: (① $\sim$ ④) discovering semantic latent directions using pullback metric and (⑤ $\sim$ ⑧) editing samples multiple times through geodesic shooting. ① Map a sample in $\mathcal{X}$ into a tangent space $\mathcal{T}

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。