# 分数蒸馏

分数蒸馏是一种机器学习技术，它利用冻结扩散模型的分数函数（去噪方向）作为教师信号，来优化另一个可微模型或表示——例如图像或三维场景——无需配对训练数据，也无需通过教师模型进行反向传播。其最广为人知的用途是文本到三维合成：一个预训练的文本到图像扩散模型引导三维场景的优化，使渲染结果朝着二维模型认为与文本提示良好匹配的方向推进。<sup>[1](https://doi.org/10.48550/arxiv.2209.14988)</sup>

| 关键事实 | 详情 |
|---|---|
| 优化对象 | 被优化模型加噪渲染与冻结扩散模型所学分布之间的加权KL散度<sup>[2](https://proceedings.iclr.cc/paper_files/paper/2024/file/eb11d415557899106891f538de72569d-Paper-Conference.pdf)</sup> |
| 可处理性技巧 | 省略真实梯度的雅可比项，避免通过去噪网络反向传播<sup>[3](https://www.ecva.net/papers/eccv_2024/papers_ECCV/papers/11754.pdf)</sup> |
| 原始应用 | DreamFusion（2022）用二维文本到图像扩散模型优化类NeRF三维场景<sup>[1](https://doi.org/10.48550/arxiv.2209.14988)</sup> |
| 主要变体 | 变分分数蒸馏（VSD）优化整个分布而非单点；SDS是其单点狄拉克特例<sup>[4](https://doi.org/10.48550/arxiv.2305.16213)</sup><sup> • </sup><sup>[5](https://openaccess.thecvf.com/content/ICCV2025/papers/Lu_Adversarial_Distribution_Matching_for_Diffusion_Distillation_Towards_Efficient_Image_and_ICCV_2025_paper.pdf)</sup> |
| 典型伪影 | 颜色过饱和、过度平滑、以及Janus多面问题<sup>[6](https://ar5iv.labs.arxiv.org/html/2312.02189)</sup> |
| 成本基准 | SDS：每个三维资产66分钟、6.2 GB显存；VSD：334分钟、47.9 GB（43提示词、50视角基准）<sup>[7](https://proceedings.neurips.cc/paper_files/paper/2024/file/2ded44d59f5094eed0d02132fe75b60d-Paper-Conference.pdf)</sup> |
| CFG敏感性 | 小的无分类器引导尺度导致过度平滑；大尺度导致过饱和<sup>[8](https://openaccess.thecvf.com/content/CVPR2024/papers/Wei_Adversarial_Score_Distillation_When_score_distillation_meets_GAN_CVPR_2024_paper.pdf)</sup> |

## 工作原理

设 \( x = g(\theta) \) 为可微生成器 \( g \) 以参数 \( \theta \) 渲染的图像，\( g \) 可以是NeRF、网格或像素图像。每一步抽取时间步 \( t \) 和高斯噪声 \( \epsilon \)，将渲染加噪至 \( z_t(x) \)，冻结扩散模型预测它将去除的噪声。分数蒸馏采样（SDS）梯度为

\[ \nabla_{\theta} L_{\mathrm{SDS}} = w(t) \left( \epsilon_{\phi}^{\omega}(z_t(x); y, t) - \epsilon \right) \frac{\partial x}{\partial \theta}, \]

其中 \( y \) 为条件文本，\( w(t) \) 为依赖时间步的权重，\( \epsilon_{\phi}^{\omega} \) 为引导噪声预测。<sup>[2](https://proceedings.iclr.cc/paper_files/paper/2024/file/eb11d415557899106891f538de72569d-Paper-Conference.pdf)</sup> 普尔及其同事正式证明，该损失最小化 \( x \) 周围一族高斯分布与预训练扩散模型所学分布 \( p(z_t, y, t) \) 之间的KL散度；[DreamFusion](https://www.edgepedia.org/zh/dreamfusion)从概率密度蒸馏推导出该损失，后者在前向扩散过程下最小化共享均值的高斯分布之间的KL散度。<sup>[2](https://proceedings.iclr.cc/paper_files/paper/2024/file/eb11d415557899106891f538de72569d-Paper-Conference.pdf)</sup><sup> • </sup><sup>[1](https://doi.org/10.48550/arxiv.2209.14988)</sup>

从该KL目标推导出的SDS更新省略了通过去噪网络的完整梯度中的U-Net雅可比项。<sup>[16](https://proceedings.neurips.cc/paper_files/paper/2023/file/e7fd2c0a1a6f956c94024e955b34cc43-Paper-Conference.pdf)</sup> 实践中省略此项以避免通过去噪模型反向传播，得到上述近似梯度；DreamFusion作者发现省略条件数不佳的雅可比项能为场景模型的反向传播产生更稳定的梯度。<sup>[3](https://www.ecva.net/papers/eccv_2024/papers_ECCV/papers/11754.pdf)</sup><sup> • </sup><sup>[6](https://ar5iv.labs.arxiv.org/html/2312.02189)</sup> 使用无分类器引导时，预测噪声为条件预测与无条件预测的加权和，

\[ \epsilon_{\phi}^{\omega}(z_t, y, t) = \omega \, \epsilon_{\phi}(z_t, y, t) + (1 - \omega) \, \epsilon_{\phi}(z_t, t), \]

引导权重为 \( \omega \)。<sup>[3](https://www.ecva.net/papers/eccv_2024/papers_ECCV/papers/11754.pdf)</sup> 将引导方向展开可以看出，对于小引导强度 \( s \)，\( \epsilon \) 项充当平均项，将图像回归至均值。<sup>[9](https://proceedings.neurips.cc/paper_files/paper/2024/file/3b62bca132cf5c8973b09a2fc6dc8ca6-Paper-Conference.pdf)</sup>

## 操作方法

针对NeRF或图像的实践循环如下。每次迭代，抽取随机时间步 \( t \) 和高斯噪声 \( \epsilon \)；从随机相机渲染当前场景；对渲染加噪；用冻结的、无分类器引导的扩散模型预测噪声；并通过可微生成器反向传播加权残差。<sup>[2](https://proceedings.iclr.cc/paper_files/paper/2024/file/eb11d415557899106891f538de72569d-Paper-Conference.pdf)</sup> 一个代表性配置（NFSD）使用25,000次AdamW迭代，学习率0.01，渲染分辨率在5,000次迭代后从64×64提升至512×512，以[Stable Diffusion](https://www.edgepedia.org/zh/stable-diffusion) 2.1-base为教师，最大扩散时间退火至500。<sup>[2](https://proceedings.iclr.cc/paper_files/paper/2024/file/eb11d415557899106891f538de72569d-Paper-Conference.pdf)</sup>

时间退火很重要：训练期间高噪声水平会产生伪影和多面几何，随着模型收敛每步应添加更少噪声。<sup>[6](https://ar5iv.labs.arxiv.org/html/2312.02189)</sup> 逐渐降低优化期间抽取的扩散时间步是提高生成质量的有效方法，并被多个后续方法采用。<sup>[2](https://proceedings.iclr.cc/paper_files/paper/2024/file/eb11d415557899106891f538de72569d-Paper-Conference.pdf)</sup>

## 起源

DreamFusion（普尔及其同事，2022，arXiv）用从二维扩散模型蒸馏的损失取代了早期基于CLIP的优化，并将其应用于类NeRF三维场景参数化，SDS支持任何可微映射回图像的参数空间。<sup>[1](https://doi.org/10.48550/arxiv.2209.14988)</sup> 后来的一篇基准论文将分数蒸馏描述为在DreamFusion（SDS）、分数雅可比链（SJC）和Magic3D中同时引入，共享思想是将冻结二维扩散模型蒸馏为三维资产。<sup>[7](https://proceedings.neurips.cc/paper_files/paper/2024/file/2ded44d59f5094eed0d02132fe75b60d-Paper-Conference.pdf)</sup> 三维场景本身建立在神经辐射场（米尔登霍尔及其同事，2021，《美国计算机学会通讯》）之上。<sup>[10](https://doi.org/10.1145/3503250)</sup>

## 变体

**VSD（ProlificDreamer）。** 变分分数蒸馏（王及其同事，2023，arXiv）将目标表述为变分推断，

\[ L_{\mathrm{SDS}}(\theta) := \mathbb{E}_{t,c} \, \frac{\sigma_t}{\alpha_t} \, \omega(t) \, D_{\mathrm{KL}} \left( q_{\theta}^{t}(x_t \mid c) \, \| \, p_t(x_t \mid y^c) \right), \]

但优化的是整个分布 \( \mu \) 并从中采样参数 \( \theta \)，而非SDS的单一 \( \theta \) 点。<sup>[4](https://doi.org/10.48550/arxiv.2305.16213)</sup> SDS是VSD的特例，其中变分分布为单点狄拉克分布。<sup>[5](https://openaccess.thecvf.com/content/ICCV2025/papers/Lu_Adversarial_Distribution_Matching_for_Diffusion_Distillation_Towards_Efficient_Image_and_ICCV_2025_paper.pdf)</sup> VSD用同时在渲染图像上微调的扩散模型提供其负方向；CSD将其解释为负分类器分数优化的自适应形式。<sup>[11](https://doi.org/10.48550/arxiv.2310.19415)</sup>

**基于分解的变体。** ISD（VividDreamer）将SDS解耦为重建项和无分类器引导项的加权和，用从DDIM采样推导的不变分数替换重建项。<sup>[12](https://link.springer.com/chapter/10.1007/978-3-031-73223-2_8)</sup> NFSD将分数分解为可解释分量，\( \nabla_{\theta} L_{\mathrm{NFSD}} = w(t)(\delta D + s \, \delta C) \, \partial x / \partial \theta \)。<sup>[2](https://proceedings.iclr.cc/paper_files/paper/2024/file/eb11d415557899106891f538de72569d-Paper-Conference.pdf)</sup> LMC-SDS在SDS梯度上添加学得的流形校正损失。<sup>[3](https://www.ecva.net/papers/eccv_2024/papers_ECCV/papers/11754.pdf)</sup> SDI用提示条件DDIM反演替换SDS的随机噪声采样，证明逐视角SDS引导是DDIM采样的简化重参数化，其中原始SDS每步抽取新噪声而DDIM保持轨迹与先前预测噪声一致。<sup>[7](https://proceedings.neurips.cc/paper_files/paper/2024/file/2ded44d59f5094eed0d02132fe75b60d-Paper-Conference.pdf)</sup>

## 应用

除三维外，分数蒸馏的传输路径视角已应用于文本到二维生成、基于文本的NeRF优化、绘画到真实图像转换、视错觉生成以及三维草图的逼真化，匹配或超越专门方法。<sup>[9](https://proceedings.neurips.cc/paper_files/paper/2024/file/3b62bca132cf5c8973b09a2fc6dc8ca6-Paper-Conference.pdf)</sup> ProlificDreamer以512×512分辨率渲染NeRF，具有烟雾和水滴等复杂效果。<sup>[4](https://doi.org/10.48550/arxiv.2305.16213)</sup>

## 局限性与替代方案

经典SDS生成的三维资产通常表现出颜色过饱和、外观模糊、细节缺失、几何过度简化以及Janus问题——物体包含从不同视角看到的多个规范视图。<sup>[6](https://ar5iv.labs.arxiv.org/html/2312.02189)</sup> 诊断各有侧重。ISD的分解将过饱和归因于大的无分类器引导尺度（SDS使用引导尺度100.0），将过度平滑归因于重建项。<sup>[12](https://link.springer.com/chapter/10.1007/978-3-031-73223-2_8)</sup> 传输路径分析将特征伪影归因于从损坏图像到自然图像分布的最优传输路径的线性近似，以及对源分布的糟糕估计。<sup>[9](https://proceedings.neurips.cc/paper_files/paper/2024/file/3b62bca132cf5c8973b09a2fc6dc8ca6-Paper-Conference.pdf)</sup> 原始SDS还具有模式寻求行为，不同随机种子的结果看起来非常相似；NFSD作者将低多样性归因于扩散分数在连续迭代间不相关。<sup>[3](https://www.ecva.net/papers/eccv_2024/papers_ECCV/papers/11754.pdf)</sup><sup> • </sup><sup>[2](https://proceedings.iclr.cc/paper_files/paper/2024/file/eb11d415557899106891f538de72569d-Paper-Conference.pdf)</sup> ISD未完全解决Janus问题；其作者通过向提示添加背面描述并扩大相机视场来缓解。<sup>[12](https://link.springer.com/chapter/10.1007/978-3-031-73223-2_8)</sup>

SDS对无分类器引导尺度高度敏感：小尺度导致过度平滑，大尺度导致过饱和和更差的Janus伪影。<sup>[8](https://openaccess.thecvf.com/content/CVPR2024/papers/Wei_Adversarial_Score_Distillation_When_score_distillation_meets_GAN_CVPR_2024_paper.pdf)</sup> VSD在SDS无法生成合理结果的小CFG权重（如7.5）下有效；更小的CFG权重产生更多样结果，ProlificDreamer将CFG = 7.5设为多样性与优化稳定性之间的折中。<sup>[4](https://doi.org/10.48550/arxiv.2305.16213)</sup> 测试时优化缓慢，主要归因于NeRF表示。<sup>[6](https://ar5iv.labs.arxiv.org/html/2312.02189)</sup> 在43提示词、50视角基准中，SDS 10k步在66分钟内达到CLIP 29.81 ± 2.49，使用6.2 GB显存；VSD 25k步在334分钟内达到CLIP 33.31 ± 2.39，使用47.9 GB。<sup>[7](https://proceedings.neurips.cc/paper_files/paper/2024/file/2ded44d59f5094eed0d02132fe75b60d-Paper-Conference.pdf)</sup>

替代方案用分布级目标替换逐样本SDS梯度。分布匹配蒸馏（DMD）训练快速一步生成器，其梯度表示为两个分数函数之差，由真实和虚假分布的两个扩散去噪器建模，外加固定噪声-图像对集上的回归损失。<sup>[13](https://doi.org/10.48550/arxiv.2311.18828)</sup> DMD的反向KL最小化是零强迫的，可能导致模式崩溃；DMD使用基于ODE的正则化器，DMD2使用基于GAN的正则化器配合真实数据来抵消此问题。<sup>[5](https://openaccess.thecvf.com/content/ICCV2025/papers/Lu_Adversarial_Distribution_Matching_for_Diffusion_Distillation_Towards_Efficient_Image_and_ICCV_2025_paper.pdf)</sup> 分数恒等蒸馏（SiD）是一种无数据方法，将预训练扩散模型蒸馏为单步生成器，将前向扩散重新表述为半隐式分布并使用三个分数相关恒等式；它实现弗雷歇起始距离的指数快速降低，并接近或超过教师的FID。<sup>[14](https://doi.org/10.48550/arxiv.2404.04057)</sup> 包括矩匹配蒸馏、SiD和分数隐式匹配在内的后续方法使用Fisher散度的变体，分阶段DMD通过在扩散轨迹的子区间内应用分数匹配进行少步蒸馏，每阶段的虚假模型从预训练教师重新初始化。<sup>[5](https://openaccess.thecvf.com/content/ICCV2025/papers/Lu_Adversarial_Distribution_Matching_for_Diffusion_Distillation_Towards_Efficient_Image_and_ICCV_2025_paper.pdf)</sup><sup> • </sup><sup>[15](https://openaccess.thecvf.com/content/CVPR2026/papers/Fan_Phased_DMD_Few-step_Distribution_Matching_Distillation_via_Score_Matching_within_CVPR_2026_paper.pdf)</sup> 分数蒸馏与微调或前馈生成器的比较尚未由已发表的直接对比确定。

## References

1. [Poole, Ben and colleagues (2022). DreamFusion: Text-to-3D using 2D Diffusion. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2209.14988)
2. [Noise-Free Score Distillation (NFSD)](https://proceedings.iclr.cc/paper_files/paper/2024/file/eb11d415557899106891f538de72569d-Paper-Conference.pdf)
3. [Score Distillation Sampling with Learned Manifold Corrective (LMC-SDS)](https://www.ecva.net/papers/eccv_2024/papers_ECCV/papers/11754.pdf)
4. [Wang, Zhengyi and colleagues (2023). ProlificDreamer: High-Fidelity and Diverse Text-to-3D Generation with Variational Score Distillation. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2305.16213)
5. [Adversarial Distribution Matching for Diffusion Distillation Towards Efficient Image and Video Synthesis](https://openaccess.thecvf.com/content/ICCV2025/papers/Lu_Adversarial_Distribution_Matching_for_Diffusion_Distillation_Towards_Efficient_Image_and_ICCV_2025_paper.pdf)
6. [StableDreamer: Taming Noisy Score Distillation Sampling for Text-to-3D](https://ar5iv.labs.arxiv.org/html/2312.02189)
7. [Score Distillation via Reparametrized DDIM (SDI)](https://proceedings.neurips.cc/paper_files/paper/2024/file/2ded44d59f5094eed0d02132fe75b60d-Paper-Conference.pdf)
8. [Adversarial Score Distillation: When score distillation meets GAN](https://openaccess.thecvf.com/content/CVPR2024/papers/Wei_Adversarial_Score_Distillation_When_score_distillation_meets_GAN_CVPR_2024_paper.pdf)
9. [Rethinking Score Distillation as a Bridge Between Image Distributions](https://proceedings.neurips.cc/paper_files/paper/2024/file/3b62bca132cf5c8973b09a2fc6dc8ca6-Paper-Conference.pdf)
10. [Ben Mildenhall and colleagues (2021). NeRF. Communications of the ACM.](https://doi.org/10.1145/3503250)
11. [Yu, Xin and colleagues (2023). Text-to-3D with Classifier Score Distillation. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2310.19415)
12. [VividDreamer: Invariant Score Distillation for Hyper-Realistic Text-to-3D Generation](https://link.springer.com/chapter/10.1007/978-3-031-73223-2_8)
13. [Yin, Tianwei and colleagues (2023). One-step Diffusion with Distribution Matching Distillation. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2311.18828)
14. [Zhou, Mingyuan and colleagues (2024). Score identity Distillation: Exponentially Fast Distillation of Pretrained Diffusion Models for One-Step Generation. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2404.04057)
15. [Phased DMD: Few-step Distribution Matching Distillation via Score Matching within Subintervals](https://openaccess.thecvf.com/content/CVPR2026/papers/Fan_Phased_DMD_Few-step_Distribution_Matching_Distillation_via_Score_Matching_within_CVPR_2026_paper.pdf)
16. [proceedings.neurips.cc](https://proceedings.neurips.cc/paper_files/paper/2023/file/e7fd2c0a1a6f956c94024e955b34cc43-Paper-Conference.pdf)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 现代人工智能：基础模型、生成式人工智能与人工智能产业 › Foundation-model methods and training › Generative media methods: diffusion, flow, and autoregressive generation

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/score-distillation

English original: https://www.edgepedia.org/score-distillation
