[论文解读] Compressing GANs using Knowledge Distillation
本论文展示了通过知识蒸馏对过度参数化的GAN进行压缩,产生的小型学生GAN在MNIST、CIFAR-10和Celeb-A上能够紧密匹配甚至优于同等规模的从零开始训练的GAN,且压缩比显著。
Generative Adversarial Networks (GANs) have been used in several machine learning tasks such as domain transfer, super resolution, and synthetic data generation. State-of-the-art GANs often use tens of millions of parameters, making them expensive to deploy for applications in low SWAP (size, weight, and power) hardware, such as mobile devices, and for applications with real time capabilities. There has been no work found to reduce the number of parameters used in GANs. Therefore, we propose a method to compress GANs using knowledge distillation techniques, in which a smaller "student" GAN learns to mimic a larger "teacher" GAN. We show that the distillation methods used on MNIST, CIFAR-10, and Celeb-A datasets can compress teacher GANs at ratios of 1669:1, 58:1, and 87:1, respectively, while retaining the quality of the generated image. From our experiments, we observe a qualitative limit for GAN's compression. Moreover, we observe that, with a fixed parameter budget, compressed GANs outperform GANs trained using standard training methods. We conjecture that this is partially owing to the optimization landscape of over-parameterized GANs which allows efficient training using alternating gradient descent. Thus, training an over-parameterized GAN followed by our proposed compression scheme provides a high quality generative model with a small number of parameters.
研究动机与目标
- 为低功耗/体积受限硬件和实时应用动机并解决大型GAN的计算负担。
- 引入适用于GAN的知识蒸馏,压缩生成器网络同时保持图像质量。
- 在MNIST、CIFAR-10和Celeb-A上使用IS和FID作为质量度量标准对压缩进行实证评估。
- 分析GAN压缩的极限以及过度参数化在成功蒸馏中的作用。
提出的方法
- 使用教师-学生框架,其中一个大且过度参数化的GAN(教师)引导一个较小的GAN(学生)。
- 为学生采用两种训练方案:(i) MSE 损失最小化与教师输出的像素级距离;(ii) 将GAN目标与MSE项结合的联合损失,以使学生输出与教师对齐。
- 通过训练不同大小的网络,选择在Inception Score和FID上表现最佳的教师网络。
- 通过深度尺度因子d来控制模型大小,探索教师的大小以及相应的参数数量。
- 使用Inception Score、Frechet Inception Distance进行压缩评估,并对模糊性进行Laplace方差(Variance of Laplacian)评估。
实验结果
研究问题
- RQ1一个学生GAN在参数显著少量的情况下,是否能够在潜在空间上复制教师GAN的生成函数?
- RQ2在不显著降低图像质量的前提下,MNIST、CIFAR-10和Celeb-A 的可实现压缩比是多少?
- RQ3与从零开始训练同等规模的GAN相比,知识蒸馏在IS、FID与清晰度方面是否具有优势?
- RQ4在不同复杂度的数据集上,GAN压缩的视觉及定量极限是什么?
- RQ5联合GAN+MSE损失相较于仅MSE对压缩质量有何影响,尤其在图像清晰度方面?
主要发现
| GAN 大小 (d) | 参数数量 | MNIST - 比例 | MNIST IS (学生版) | MNIST IS (基线) | CIFAR-10 - 比例 | CIFAR-10 FID (学生版) | CIFAR-10 FID (基线) | Celeb-A - 比例 | Celeb-A FID (学生版) | Celeb-A FID (基线) |
|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 28,351 | 1669:1 | 5.80 | 1.86 | 126:1 | 11.76 | 38.72 | 446:1 | 12.15 | 45.49 |
| 4 | 62,077 | 762:1 | 6.41 | 3.63 | 58:1 | 11.00 | 14.28 | 204:1 | 10.97 | 18.72 |
| 8 | 145,657 | 325:1 | 6.60 | 4.73 | 25:1 | 9.57 | 11.85 | 87:1 | 8.78 | 11.06 |
| 16 | 377,329 | 125:1 | 6.83 | 5.07 | 9:1 | 8.39 | 9.90 | 34:1 | 6.29 | 9.14 |
| 32 | 1,098,721 | 43:1 | 6.87 | 6.08 | 3:1 | 7.80 | 7.86 | 12:1 | 4.84 | 5.05 |
| 48 | 2,164,177 | — | — | — | 2:1 | 7.58 | — | 6:1 | 4.54 | — |
| 64 | 3,573,697 | — | 6.93 | 6.51 | — | — | — | — | — | — |
| 128 | 12,652,417 | 4:1 | 6.97 | 6.63 | — | — | — | — | — | — |
- 学生GAN在所有数据集上均显著优于同等小规模的常规GAN。
- 在MNIST上,压缩达到1,669:1,且保留了83%的教师的Inception Score。
- 在CIFAR-10和Celeb-A上,压缩分别达到58:1和87:1的显著比例,FID分数具有竞争力。
- 压缩后的学生在潜在空间上近似教师的生成函数,表明是知识转移而非记忆化。
- 联合损失略微提升FID,并产生比仅MSE训练更清晰的图像(更高的VoL),但在更复杂数据的高压缩下仍存在一些模糊。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。