完整搜尋頁面 →

Consistency Models:沿同一路徑預測相同端點(ICML 2023)

選讀・DLCV 12B・單步生成 的論文導讀(第 2/7 篇)。引用編號對應本頁底部的參考文獻。

導覽:本頁與本系列: 導覽:本頁與本系列

本頁內容

補充資料 · 2

  1. 瞬時速度與區間速度
  2. 無教師的三種意思

論文導讀 · 7

  1. Progressive Distillation:教師兩步壓成學生一步(ICLR 2022)
  2. Consistency Models:沿同一路徑預測相同端點(ICML 2023)
  3. InstaFlow:先 reflow,再蒸餾端點(ICLR 2024)
  4. Latent Consistency Models:受引導潛在流的端點(2023)
  5. Adversarial Diffusion Distillation:教師與判別器(ECCV 2024)
  6. DMD:匹配教師定義的分布(CVPR 2024)
  7. DMD2:追蹤學生,加入真實資料(NeurIPS 2024)

電腦視覺深度學習

  1. 02 · 深度影像分類
  2. 03 · 物件偵測:從 R-CNN 到 DETR
  3. 09 · 深度影像復原:低階視覺
查看完整課程樹 →

挑戰

Consistency Models [8] 讓網路從機率流路徑任意位置預測近乾淨端點,將單步生成改為直接預測;預算較多時也能多次細化。

只要求相等仍可能輸出無用常數,因此須乾淨邊界錨定與同一路徑配對。教師蒸餾與直接資料訓練,是不同的監督設定。

方法

同一機率流軌跡的不同位置映向共同終點;不代表讓不同軌跡的終點全部相同。
原論文圖 2 — 同一機率流軌跡的不同位置映向共同終點;不代表讓不同軌跡的終點全部相同。

圖片來源: [8], arXiv:2303.01469v2, PDF 第 3 頁. 原始 PDF.

一致性函數。 路徑 {xt}\{x_t\} 上定義 f(xt,t)=xεf(x_t,t)=x_\varepsilon,ε>0\varepsilon>0 是近資料邊界,輸出與影像同形狀。使用跳接參數化:

fθ(x,t)=cskip(t)x+cout(t)Fθ(x,t)f_\theta(x,t)=c_{\mathrm{skip}}(t)x+c_{\mathrm{out}}(t)F_\theta(x,t)

純量係數滿足 cskip(ε)=1c_{\mathrm{skip}}(\varepsilon)=1、cout(ε)=0c_{\mathrm{out}}(\varepsilon)=0,FθF_\theta 為訓練網路。因此邊界精確回傳輸入,賦予一致性明確的端點意義。

一致性蒸餾。 從資料加雜訊取樣狀態,預訓練分數模型與 ODE 更新估計相鄰較乾淨狀態。線上模型的吵端預測符合目標網路的乾淨端預測,目標停止梯度,原演算法的目標權重追蹤線上權重的指數移動平均。

離散目標為 E[λ(tn)d(fθ(xtn+1,tn+1),sg⁡fθ−(x^tn,tn))]\mathbb E[\lambda(t_n)d(f_\theta(x_{t_{n+1}},t_{n+1}),\operatorname{sg}f_{\theta^-}(\widehat x_{t_n},t_n))]。xtn+1x_{t_{n+1}} 較吵,x^tn\widehat x_{t_n} 為教師鄰點,dd 是距離,λ\lambda 是權重,θ−\theta^- 為目標參數,sg⁡\operatorname{sg} 停止梯度。求解器、網格及距離影響訓練品質,但單步部署不執行求解器。

直接訓練。 用資料和共用高斯雜訊建構鄰近雜訊程度配對,取代教師更新。理論關係屬漸近論證,有限配對並非精確 ODE 步。時間區間數及目標更新隨訓練排程改變;沒有獨立教師仍有自我目標與損失設計。

取樣。 從高雜訊評估一次端點函數;增加步數時,在較低程度重新加雜訊再預測。固定同一時間重複相同輸入,並不等價。

距離。 LPIPS [30] 是學得的感知距離,與像素損失強調不同誤差,但不是似然。外觀改善也可能伴隨其他分布或條件誤差。

結果

表 1:CIFAR-10 一步蒸餾 FID 3.55、兩步 2.93;同篇設定下漸進蒸餾為 8.34/5.58。表 2:ImageNet 64 × 64 一步/兩步蒸餾為 6.20/4.70,直接訓練則 13.0/11.1。直接訓練與蒸餾不能當成同一模型的同義描述。

結果支持端點學習及預算取捨,但不保證完全重現教師統計,也不能從小影像直接外推高解析度文字條件能力。

消融實驗

原文的距離/求解器研究顯示 LPIPS 優於比較的像素損失;固定網格下 Heun 目標優於 Euler,選用 18 個網格點。這是訓練建構,不是部署 18 步。直接訓練也受區間數和移動平均排程影響;曲線未列精確數值時,不捏造通用增益。

結論

乾淨邊界恆等式搭配端點函數,提供單步與少步路徑。蒸餾由教師供給軌跡,直接訓練由資料及近鄰雜訊程度建構監督。

限制與問題

自我目標誤差、跨時間一致性及有限離散化仍有限制。原始直接訓練在若干基準落後蒸餾,後續方法 [9] 改良權重與目標更新。模型定義也包含適用取樣器與排程。

參考文獻

  1. Y. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, B. Poole, “Score-Based Generative Modeling through Stochastic Differential Equations,” ICLR, 2021. paper
  2. Y. Lipman, M. Havasi, P. Holderrieth, et al., “Flow Matching Guide and Code,” arXiv tutorial, 2024. paper
  3. T. Karras, M. Aittala, T. Aila, S. Laine, “Elucidating the Design Space of Diffusion-Based Generative Models,” NeurIPS, 2022. source
  4. X. Fan, Z. Wu, H. Wu, L. Cao, “A Survey on Pre-Trained Diffusion Model Distillations,” arXiv preprint, version 2, 2025. paper
  5. J. Song, C. Meng, S. Ermon, “Denoising Diffusion Implicit Models,” ICLR, 2021. paper
  6. C. Lu, Y. Zhou, F. Bao, J. Chen, C. Li, J. Zhu, “DPM-Solver: A Fast ODE Solver for Diffusion Probabilistic Model Sampling in Around 10 Steps,” NeurIPS, 2022. paper
  7. T. Salimans, J. Ho, “Progressive Distillation for Fast Sampling of Diffusion Models,” ICLR, 2022. paper
  8. Y. Song, P. Dhariwal, M. Chen, I. Sutskever, “Consistency Models,” ICML, 2023. paper
  9. Y. Song, P. Dhariwal, “Improved Techniques for Training Consistency Models,” ICLR, 2024. paper
  10. S. Luo, Y. Tan, L. Huang, J. Li, H. Zhao, “Latent Consistency Models: Synthesizing High-Resolution Images with Few-Step Inference,” arXiv preprint, 2023. paper
  11. R. Rombach, A. Blattmann, D. Lorenz, P. Esser, B. Ommer, “High-Resolution Image Synthesis with Latent Diffusion Models,” CVPR, 2022. source
  12. X. Liu, C. Gong, Q. Liu, “Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow,” ICLR, 2023. paper
  13. X. Liu, X. Zhang, J. Ma, J. Peng, Q. Liu, “InstaFlow: One Step is Enough for High-Quality Diffusion-Based Text-to-Image Generation,” ICLR, 2024. paper
  14. A. Sauer, D. Lorenz, A. Blattmann, R. Rombach, “Adversarial Diffusion Distillation,” ECCV, 2024. paper
  15. A. Sauer, F. Boesel, T. Dockhorn, A. Blattmann, P. Esser, R. Rombach, “Fast High-Resolution Image Synthesis with Latent Adversarial Diffusion Distillation,” SIGGRAPH Asia Conference Papers, 2024. paper · published version
  16. T. Yin, M. Gharbi, R. Zhang, E. Shechtman, F. Durand, W. T. Freeman, T. Park, “One-step Diffusion with Distribution Matching Distillation,” CVPR, 2024. paper
  17. T. H. Nguyen, A. Tran, “SwiftBrush: One-Step Text-to-Image Diffusion Model with Variational Score Distillation,” CVPR, 2024. paper
  18. M. Zhou, H. Zheng, Z. Wang, M. Yin, H. Huang, “Score identity Distillation: Exponentially Fast Distillation of Pretrained Diffusion Models for One-Step Generation,” ICML, 2024. paper
  19. T. Yin, M. Gharbi, T. Park, R. Zhang, E. Shechtman, F. Durand, W. T. Freeman, “Improved Distribution Matching Distillation for Fast Image Synthesis,” NeurIPS, 2024. paper
  20. K. Frans, D. Hafner, S. Levine, P. Abbeel, “One Step Diffusion via Shortcut Models,” ICLR, 2025. paper
  21. Z. Geng, M. Deng, X. Bai, J. Z. Kolter, K. He, “Mean Flows for One-step Generative Modeling,” NeurIPS, 2025. paper
  22. M. Heusel, H. Ramsauer, T. Unterthiner, B. Nessler, S. Hochreiter, “GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium,” NeurIPS, 2017. source
  23. A. Radford, J. W. Kim, C. Hallacy, et al., “Learning Transferable Visual Models From Natural Language Supervision,” ICML, 2021. paper
  24. D. Ghosh, H. Hajishirzi, L. Schmidt, “GenEval: An Object-Focused Framework for Evaluating Text-to-Image Alignment,” NeurIPS Datasets and Benchmarks, 2023. paper
  25. A. Krizhevsky, V. Nair and G. Hinton, “CIFAR-10 and CIFAR-100 datasets,” official dataset page; companion technical report: A. Krizhevsky, “Learning Multiple Layers of Features from Tiny Images,” 2009. dataset and report
  26. J. Deng, W. Dong, R. Socher, L. Li, Kai Li, Li Fei-Fei, “ImageNet: A large-scale hierarchical image database,” CVPR, 2009. doi
  27. T. Lin, M. Maire, S. Belongie, et al., “Microsoft COCO: Common Objects in Context,” ECCV, 2014. paper
  28. L. Yang, Z. Zhang, Y. Song, et al., “Diffusion Models: A Comprehensive Survey of Methods and Applications,” ACM Computing Surveys, 2023. paper
  29. Z. Yu, J. Yuan, H. Yang, et al., “DMAD: Distribution Matching as Adversarial Distillation for Fast Visual Generation,” arXiv preprint, 2026. paper
  30. R. Zhang, P. Isola, A. A. Efros, E. Shechtman and O. Wang, “The Unreasonable Effectiveness of Deep Features as a Perceptual Metric,” in Proc. IEEE/CVF CVPR, 2018, pp. 586–595. doi · arXiv
  31. C. Schuhmann, R. Beaumont, R. Vencu, et al., “LAION-5B: An open large-scale dataset for training next generation image-text models,” NeurIPS Datasets and Benchmarks, 2022. paper