# Inception分数

[Inception](https://www.edgepedia.org/zh/inception-network)分数（IS）是用于评估生成图像模型的单一数值指标，它结合了预训练Inception分类器对生成图像预测的置信度和多样性。它被提出作为人工标注者判断样本质量的自动替代方案，其作者发现它与人类评估具有良好的相关性。<sup>[1](https://proceedings.neurips.cc/paper_files/paper/2016/file/8a3363abe792db2d8761d6403605aeb7-Paper.pdf)</sup> 它与Fréchet Inception距离一起，成为生成图像模型最广泛接受的指标之一。<sup>[2](https://link.springer.com/article/10.1007/s11263-020-01424-w)</sup>

| 关键事实 | 值 |
|---|---|
| 衡量内容 | 通过预训练分类器衡量生成图像的质量（置信的、有意义的物体）和多样性（多样的类别预测）<sup>[1](https://proceedings.neurips.cc/paper_files/paper/2016/file/8a3363abe792db2d8761d6403605aeb7-Paper.pdf)</sup> |
| 公式 | \( \mathrm{IS} = \exp\big( \mathbb{E}_{x} \, D_{\mathrm{KL}}( p(y \mid x) \,\|\, p(y) ) \big) \)<sup>[3](https://arxiv.org/abs/1801.01973)</sup> |
| 使用的分类器 | Inception-v3，在ImageNet上训练，利用其1000个类别的概率<sup>[4](https://openaccess.thecvf.com/content/CVPR2024/papers/Jayasumana_Rethinking_FID_Towards_a_Better_Evaluation_Metric_for_Image_Generation_CVPR_2024_paper.pdf)</sup> |
| 采样协议 | 50,000张生成图像，分为10组，每组5,000张；报告均值和标准差<sup>[1](https://proceedings.neurips.cc/paper_files/paper/2016/file/8a3363abe792db2d8761d6403605aeb7-Paper.pdf)</sup><sup> • </sup><sup>[3](https://arxiv.org/abs/1801.01973)</sup> |
| 预处理 | 图像调整为299 × 299，即Inception-v3的训练尺寸；uint8 RGB输入<sup>[5](https://github.com/PyTorchLightning/metrics/blob/v0.9.1/torchmetrics/image/inception.py)</sup> |
| 参考值 | BigGAN在ImageNet上：128 × 128时IS为166.5，256 × 256时为232.5，512 × 512时为241.5<sup>[6](https://arxiv.org/pdf/1809.11096)</sup> |
| 主要警告 | 无法检测类内模式崩溃或记忆化；在非ImageNet上具有误导性<sup>[7](https://ar5iv.labs.arxiv.org/html/2103.09396)</sup> |

## 工作原理

该分数定义为

\[ \mathrm{IS}(G) = \exp\Big( \mathbb{E}_{x \sim p_{g}} \, D_{\mathrm{KL}}\big( p(y \mid x) \,\|\, p(y) \big) \Big), \]

其中 \( p(y \mid x) \) 是在ImageNet上预训练的Inception-v3网络为图像 \( x \) 分配的条件类别分布，而 \( p(y) = \int p(y \mid g(z)) \, dz \) 是所有生成样本上的边缘类别分布。<sup>[3](https://arxiv.org/abs/1801.01973)</sup><sup> • </sup><sup>[8](https://openaccess.thecvf.com/content_CVPR_2020/papers/Chong_Effectively_Unbiased_FID_and_Inception_Score_and_Where_to_Find_CVPR_2020_paper.pdf)</sup>

这两个分布之间的KL散度捕捉了该指标所针对的两个特性。包含有意义物体的图像应具有低熵的条件标签分布 \( p(y \mid x) \)，意味着分类器对其所见内容有信心。同时，好的生成模型应产生多样的图像，因此标签上的边缘分布应具有高熵。<sup>[1](https://proceedings.neurips.cc/paper_files/paper/2016/file/8a3363abe792db2d8761d6403605aeb7-Paper.pdf)</sup> 当两者都成立时，KL项很大：每张图像都被自信地分类，且自信的预测均匀分布在1000个可能的标签上。<sup>[9](https://ar5iv.labs.arxiv.org/html/2306.04675)</sup> 应用指数是为了使结果值更易于比较。<sup>[1](https://proceedings.neurips.cc/paper_files/paper/2016/file/8a3363abe792db2d8761d6403605aeb7-Paper.pdf)</sup> 如果不加指数，该分数可以直接解释为生成图像与其预测类别标签之间的互信息。<sup>[3](https://arxiv.org/abs/1801.01973)</sup><sup> • </sup><sup>[2](https://link.springer.com/article/10.1007/s11263-020-01424-w)</sup>

## 如何计算

实践者从模型生成一组样本，将每个样本通过Inception-v3分类器获得类别概率，[计算](https://www.edgepedia.org/zh/computing)每张图像的条件分布与整个集合上的边缘分布之间的KL散度，取平均，然后取指数。原始提案建议在大量样本（50k）上评估，因为该指标的一部分衡量多样性。<sup>[1](https://proceedings.neurips.cc/paper_files/paper/2016/file/8a3363abe792db2d8761d6403605aeb7-Paper.pdf)</sup> 推荐的估计器使用 \( N = 5{,}000 \) 个样本执行计算10次，并报告所得分数的均值和标准差；在实践中，这实现为大约50,000张生成图像分成若干组，通常 \( n_{\mathrm{splits}} = 10 \)。<sup>[3](https://arxiv.org/abs/1801.01973)</sup> 实现将所有输入图像调整为299 × 299，即原始Inception-v3训练数据的尺寸，并期望uint8 RGB图像。<sup>[5](https://github.com/PyTorchLightning/metrics/blob/v0.9.1/torchmetrics/image/inception.py)</sup> 在图像的随机分割上计算分数可得到均值和标准差。<sup>[10](https://torchmetrics.readthedocs.io/en/v1.0.1/image/inception_score.html)</sup>

该估计器在有限样本量下是有偏的，且偏差取决于所评估的特定生成器，因此在固定样本数下比较生成器是不可靠的。报告的均值分数也随分割数变化，在一个记录案例中，从分为1组时的9.9147降至分为200组时的9.0884。<sup>[3](https://arxiv.org/abs/1801.01973)</sup>

## 起源

Inception分数由Tim Salimans及其同事在2016年发表于arXiv的《训练GAN的改进技术》中提出。<sup>[11](https://doi.org/10.48550/arxiv.1606.03498)</sup> 该论文将其提出作为人工标注者的自动替代方案，用于评估GAN样本，使用来自2015-12-05 [TensorFlow](https://www.edgepedia.org/zh/tensorflow)检查点的预训练Inception模型。<sup>[1](https://proceedings.neurips.cc/paper_files/paper/2016/file/8a3363abe792db2d8761d6403605aeb7-Paper.pdf)</sup> 它所基于的分类器Inception-v3来自Christian Szegedy、Vincent Vanhoucke、Sergey Ioffe、Jonathon Shlens和Zbigniew Wojna于2015年的《重新思考用于计算机视觉的Inception架构》。<sup>[12](https://doi.org/10.48550/arxiv.1512.00567)</sup> 作者指出，该分数与CatGAN的训练目标密切相关，他们发现这一目标用于训练不太成功，但作为评估指标很有用。<sup>[1](https://proceedings.neurips.cc/paper_files/paper/2016/file/8a3363abe792db2d8761d6403605aeb7-Paper.pdf)</sup> 后来，Shane Barratt和Rishi Sharma于2018年发表了《关于Inception分数的札记》，分析了该估计器对分割的依赖性和局限性。<sup>[3](https://arxiv.org/abs/1801.01973)</sup>

## 变体

由于 \( \mathrm{IS}_{N} \) 估计值与 \( 1/N \) 呈线性关系，有人提出使用拟蒙特卡罗估计和Sobol序列进行方差缩减，外推到近乎无偏的 \( \mathrm{IS}_{\infty} \)；\( \mathrm{IS}_{N} \) 的方差在不同生成器之间差异很大。<sup>[8](https://openaccess.thecvf.com/content_CVPR_2020/papers/Chong_Effectively_Unbiased_FID_and_Inception_Score_and_Where_to_Find_CVPR_2020_paper.pdf)</sup>

## 应用

该分数最初提出用于评估在CIFAR-10上训练的模型，在该数据集上与人类对真实感的评分具有良好的相关性，也用于ImageNet。<sup>[3](https://arxiv.org/abs/1801.01973)</sup> 一个有记录的评估程序使用50,000个ImageNet验证样本，每类50个。<sup>[2](https://link.springer.com/article/10.1007/s11263-020-01424-w)</sup>

最清晰的参考值来自BigGAN在ImageNet上：在128 × 128分辨率下，BigGAN达到IS 166.5和FID 7.4，优于之前最佳的IS 52.52；在256 × 256下达到IS 232.5（FID 8.1），在512 × 512下IS 241.5（FID 11.5）。<sup>[6](https://arxiv.org/pdf/1809.11096)</sup> 这些数字也说明了分类器依赖性：在128 × 128下，ImageNet训练数据本身的IS为233，而验证数据的IS为166，BigGAN作者将此差异归因于Inception分类器是在训练数据上训练的。<sup>[6](https://arxiv.org/pdf/1809.11096)</sup>

## 局限性与替代方案

记录了几种失败模式。该分数不捕捉类内多样性，偏向ImageNet数据集和Inception模型，对模型参数和实现敏感，且需要大样本量；一个类条件模型如果为每个ImageNet类别记忆一个示例，就能获得高IS。<sup>[7](https://ar5iv.labs.arxiv.org/html/2103.09396)</sup> Barratt和Sharma用一个一维例子表明，真实潜在数据分布可能获得比其它分布更低的IS。<sup>[7](https://ar5iv.labs.arxiv.org/html/2103.09396)</sup> 将该分数应用于在非ImageNet数据集（如CIFAR-10、卧室、花卉或名人面孔）上训练的模型，会得到误导性结果。<sup>[3](https://arxiv.org/abs/1801.01973)</sup> 使用该分数进行模型选择、早停或超参数调优，往往会产生分数更高但倾向于对抗样本的模型，直接优化该分数会导致对抗样本生成；训练数据的记忆化不会被检测到。<sup>[3](https://arxiv.org/abs/1801.01973)</sup> 就分数奖励的内容而言，IS主要捕捉精确率：它不会因模型未产生数据分布的所有模式而惩罚模型，只会因未产生所有类别而惩罚。<sup>[13](https://proceedings.neurips.cc/paper_files/paper/2018/file/e46de7e1bcaaced9a54f1e9d0d2f800d-Paper.pdf)</sup>

最接近的替代方案是Fréchet Inception距离（FID），它将真实和生成的特征分布建模为Inception-v3嵌入空间中的多元高斯分布；FID被证明对模式崩溃敏感，且比IS对噪声更鲁棒，与IS不同，它可以检测类内模式崩溃，尽管其高斯假设可能不成立且偏差较高，通常需要超过50k个样本。<sup>[2](https://link.springer.com/article/10.1007/s11263-020-01424-w)</sup><sup> • </sup><sup>[7](https://ar5iv.labs.arxiv.org/html/2103.09396)</sup> 其他命名的指标包括Kernel Inception距离（KID）和感知路径长度（PPL）；精确率和召回率指标明确将质量（精确率）与覆盖度（召回率）分开，而IS和FID等单值指标将两者混在一起。<sup>[2](https://link.springer.com/article/10.1007/s11263-020-01424-w)</sup><sup> • </sup><sup>[7](https://ar5iv.labs.arxiv.org/html/2103.09396)</sup> FID存在一种空间特征变体sFID。<sup>[7](https://ar5iv.labs.arxiv.org/html/2103.09396)</sup>

最近的两项批评影响了该指标的地位。一项NeurIPS 2023研究发现，尽管扩散模型产生更多人类偏好的图像，但在使用Inception-v3计算的指标上，扩散模型的排名始终低于GAN，并主张在所有图像生成评估指标中用DINOv2-ViT-L/14替换Inception-v3。<sup>[9](https://ar5iv.labs.arxiv.org/html/2306.04675)</sup> IS是仍在使用的指标之一，而CMMD是基于CLIP特征而非Inception-v3的替代方案。<sup>[4](https://openaccess.thecvf.com/content/CVPR2024/papers/Jayasumana_Rethinking_FID_Towards_a_Better_Evaluation_Metric_for_Image_Generation_CVPR_2024_paper.pdf)</sup>

## References

1. [Improved Techniques for Training GANs, NIPS 2016 proceedings version](https://proceedings.neurips.cc/paper_files/paper/2016/file/8a3363abe792db2d8761d6403605aeb7-Paper.pdf)
2. [Evaluation Metrics for Conditional Image Generation (International Journal of Computer Vision)](https://link.springer.com/article/10.1007/s11263-020-01424-w)
3. [A Note on the Inception Score (arXiv:1801.01973)](https://arxiv.org/abs/1801.01973)
4. [Rethinking FID: Towards a Better Evaluation Metric for Image Generation (CVPR 2024)](https://openaccess.thecvf.com/content/CVPR2024/papers/Jayasumana_Rethinking_FID_Towards_a_Better_Evaluation_Metric_for_Image_Generation_CVPR_2024_paper.pdf)
5. [torchmetrics/image/inception.py](https://github.com/PyTorchLightning/metrics/blob/v0.9.1/torchmetrics/image/inception.py)
6. [Large Scale GAN Training for High Fidelity Natural Image Synthesis (BigGAN)](https://arxiv.org/pdf/1809.11096)
7. [Pros and Cons of GAN Evaluation Measures: New Developments](https://ar5iv.labs.arxiv.org/html/2103.09396)
8. [Effectively Unbiased FID and Inception Score and Where to Find Them (CVPR 2020)](https://openaccess.thecvf.com/content_CVPR_2020/papers/Chong_Effectively_Unbiased_FID_and_Inception_Score_and_Where_to_Find_CVPR_2020_paper.pdf)
9. [Exposing flaws of generative model evaluation metrics and their unfair treatment of diffusion models (arXiv 2306.04675)](https://ar5iv.labs.arxiv.org/html/2306.04675)
10. [TorchMetrics Inception Score documentation](https://torchmetrics.readthedocs.io/en/v1.0.1/image/inception_score.html)
11. [Salimans, Tim and colleagues (2016). Improved Techniques for Training GANs. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1606.03498)
12. [Szegedy, Christian and colleagues (2015). Rethinking the Inception Architecture for Computer Vision. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1512.00567)
13. [Are GANs Created Equal? A Large-Scale Study (NeurIPS 2018)](https://proceedings.neurips.cc/paper_files/paper/2018/file/e46de7e1bcaaced9a54f1e9d0d2f800d-Paper.pdf)

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

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Language and vision AI › Computer vision

Copyright 2026 Edgepedia

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

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

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