Share
Embed
論文解説 Latent Diffusion Model
Presentation for explaining the paper "Latent Diffusion Model "presented at CVPR2022
koharite
September 29, 2022
Transcript
26 slides
-
2 Explosion of Diffusion Model https://www.youtube.com/watch?v=Bo3VZCjDhGI This video was created
using 36 consecutive phrases that define the visual narrative. Stable Diffusionを「いらすとや」で追加学習する https://tadaoyamaoka.hatenablog.com/entry/2022/09/18/134024 https://memeplex.app/ ⽇本でリリースされたWebサービス (複数のAIモデルを選択可) more and more … -
3 論⽂情報 • タイトル:High-Resolution Image Synthesis with Latent Diffusion Models
• 論⽂: https://arxiv.org/abs/2112.10752 • コード: https://github.com/CompVis/latent-diffusion • 投稿学会: CVPR2022 • 著者: Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, Bj¨orn Ommer • 所属:Ludwig Maximilian University of Munich & IWR, Heidelberg University, Runway ML 選んだ理由: • 最近話題のStable Diffusionの前⾝となる論⽂ • Diffusion Modelの基本原理・構成を知りたい -
6 Basic of Diffusion Model Forward trajectory(diffusion) Reverse trajectory(denoising) 複雑な分布x0
を”徐々に”簡単な分布xT に変換するようなマルコフ過程を定義する 𝑞 𝑥! |𝑥!"# これに対して逆変換になるような過程𝑝$ 𝑥!"# |𝑥! を”学習で得る”ことで簡単な分布XT を 与えることで学習データセットに近い意味あるデータを⽣成できる。 データ⽣成 拡散過程 -
7 Toy Diffusion Model 下記記事をもとに点群表現したピカチュウとイーブイをDiffusion Modelで再現する A Toy Diffusion model
you can run on your laptop https://medium.com/mlearning-ai/a-toy-diffusion-model-you-can-run-on-your-laptop- 20e9e5a83462 -
8 Diffusion Model Process 𝛽! が⼗分に⼩さければ、逆過程も同様の関数系で表わせる。 (Kolmogorov equation) ガウス分布で少量のノイズを付与していく。 𝑝
𝑥!"# |𝑥! の平均𝜇$ 𝑥! , 𝑡 、分散Σ$ 𝑥! , 𝑡 を推定する問題 ⽬的関数 -
9 Implementation of DPM 論⽂にはネットワーク構造の記載はないが、GitHubの実装は下のような特徴 • ResNetBlockで構成するU-Net形状 • self-attentionあり •
timeはsinusoidal position embedding https://github.com/hojonathanho/diffusion/blob/ master/diffusion_tf/models/unet.py -
12 Diffusion Model vs. GAN • GANと⽐べて多様なデータの⽣成に強い • 学習が安定している 短所
• 学習・⽣成に時間がかかる (学習で150-1000個の V100を1⽇使う, 50kのサンプルの⽣成に1つのA100で5⽇かかる [15]) • 潜在変数の次元数が⾼い ⻑所 Diffusion ModelをGANと⽐較して [15]Diffusion models beat gans on image synthesis -
14 Latent Diffusion Models basic idea 直接Pixel空間で処理をすることで学習、推論(⽣成)の時間がかかっている。 Autoencoderから得られたlatent spaceでDiffusion modelを適⽤することで、
多様なデータの⽣成を⾼速に⾏うことができるようになった。 また、タスクごとのconditioningとなるネットワークと連結cross-attentionを導 ⼊することで、テキスト(プロンプト)などをもとにした⽣成を可能にした。 -
15 Latent Diffusion Models concept autoencoderで知覚的に等価な低次元の 表現空間latent spaceを得る Diffusion Modelはlatent
spaceで学習する。 ⼊⼒データxがEncoderを通してLatent spaceでの 特徴になってからDiffusion Processが⾏われる。 -
16 LDM Architecture 𝐴𝑡𝑡𝑒𝑛𝑡𝑖𝑜𝑛 𝑄, 𝐾, 𝑉 = 𝑆𝑜𝑓𝑡𝑚𝑎𝑥 𝑄𝐾!
𝑑 ・𝑉 Latent space Denoising data Conditioning Encoderを通した値 各Wは学習パラメータ 𝐿𝑎𝑡𝑒𝑛𝑡 𝑆𝑝𝑎𝑐𝑒の𝐷𝑖𝑓𝑓𝑢𝑠𝑖𝑜𝑛 𝑀𝑜𝑑𝑒𝑙の𝜀" とタスクごとの𝜏" を同時に学習される。 ネットワークの役割(phase)を分割 (1つのネットワークとして連結) • Encoder-Decoder • Diffusion model • Conditioning -
20 Text-to-image we train a 1.45B parameter KL-regularized LDM conditioned
on language prompts on LAION-400M [78]. We employ the BERT-tokenizer [14] and implement 𝜏" as a transformer [97] to infer a latent code which is mapped into the UNet via (multi-head) cross attention. -
26 参考資料 Denoising Diffusion Probabilistic Models https://arxiv.org/abs/2006.11239 Improved Precision and
Recall Metric for Assessing Generative Models https://arxiv.org/abs/1904.06991 【AI論⽂解説】物理学の知識を背景とした画像⽣成⼿法Part1 Diffusion Probabilistic Models https://www.youtube.com/watch?v=DDGgKt_CyRQ 【AI論⽂解説】物理学の知識を背景とした画像⽣成⼿法Part2 Diffusion Probabilistic Models https://www.youtube.com/watch?v=G4tGMueM6lg 【Deep Learning研修(発展)】データ⽣成・変換のための機械学習 第7回前編「Diffusion models」 https://www.youtube.com/watch?v=10ki2IS55Q4 A Toy Diffusion model you can run on your laptop https://medium.com/mlearning-ai/a-toy-diffusion-model-you-can-run-on-your-laptop-20e9e5a83462 Ultimate Guide to Diffusion Models | ML Coding Series | Denoising Diffusion Probabilistic Models https://www.youtube.com/watch?v=y7J6sSO1k50 Stable Diffusion: High-Resolution Image Synthesis with Latent Diffusion Models | ML Coding Series https://www.youtube.com/watch?v=f6PtJKdey8E