Skip to main content
QUICK REVIEW

[论文解读] Go Wide, Then Narrow: Efficient Training of Deep Thin Networks

Denny Zhou, Mao Ye|arXiv (Cornell University)|Jul 1, 2020
Stochastic Gradient Optimization Techniques被引用 5
一句话总结

本文提出一种三阶段训练方法——扩展、蒸馏、微调,以在理论保证下高效训练深度窄网络。首先训练一个宽网络,并通过保持维度的线性投影进行逐层知识蒸馏,利用其中间激活值来初始化窄网络,从而实现优越性能:ResNet50 的表现优于通过标准反向传播训练的 ResNet101,BERT_BASE 的表现可与参数量更大的 BERT_LARGE 相媲美,且无需大规模预训练或模型压缩。

ABSTRACT

For deploying a deep learning model into production, it needs to be both accurate and compact to meet the latency and memory constraints. This usually results in a network that is deep (to ensure performance) and yet thin (to improve computational efficiency). In this paper, we propose an efficient method to train a deep thin network with a theoretic guarantee. Our method is motivated by model compression. It consists of three stages. First, we sufficiently widen the deep thin network and train it until convergence. Then, we use this well-trained deep wide network to warm up (or initialize) the original deep thin network. This is achieved by layerwise imitation, that is, forcing the thin network to mimic the intermediate outputs of the wide network from layer to layer. Finally, we further fine tune this already well-initialized deep thin network. The theoretical guarantee is established by using the neural mean field analysis. It demonstrates the advantage of our layerwise imitation approach over backpropagation. We also conduct large-scale empirical experiments to validate the proposed method. By training with our method, ResNet50 can outperform ResNet101, and BERT Base can be comparable with BERT Large, when ResNet101 and BERT Large are trained under the standard training procedures as in the literature.

研究动机与目标

  • 为解决在资源受限设备上高效训练适用于部署的紧凑、深度、窄神经网络的挑战。
  • 克服从零开始训练深度窄网络的困难,此类网络因非凸性和梯度消失而优化效果差。
  • 提供一种理论基础坚实的模型压缩替代方案,避免先训练大模型再剪枝的低效过程。
  • 基于均场分析,建立一种可证明更高效的深度窄网络训练流程。

提出的方法

  • 首先将目标深度窄网络扩展为深度宽网络,并训练至收敛。
  • 在第二阶段,通过使用保持维度的线性变换进行逐层知识蒸馏,模仿宽网络的中间层输出,来初始化窄网络。
  • 线性变换包括一个扩展层以匹配宽网络的输出维度,以及一个降维层以恢复原始窄网络的维度。
  • 蒸馏完成后,将窄网络中的线性层合并,恢复其原始架构,同时保留优化后的初始化。
  • 最后阶段对初始化良好的窄网络进行标准微调,以达到最优性能。
  • 理论分析采用均场理论,证明在所提方法下,训练误差界随深度呈线性增长,而标准从零开始训练则呈现指数增长。

实验结果

研究问题

  • RQ1是否可以通过先训练一个宽网络,再用其初始化窄网络,从而更高效地训练深度窄网络?
  • RQ2使用保持维度的投影进行逐层知识蒸馏,是否能带来比随机初始化或启发式初始化更好的优化与泛化性能?
  • RQ3所提方法是否能在无需大规模预训练或模型压缩的前提下,实现与更大模型相当的性能?
  • RQ4是否存在理论依据解释为何该方法能避免标准训练中深度窄网络出现的指数级误差增长?

主要发现

  • 使用所提方法训练的 ResNet50 在 ImageNet 上的表现优于通过标准反向传播训练的 ResNet101。
  • 使用所提方法训练的 BERT_BASE 表现可与通常使用更多参数和计算资源训练的 BERT_LARGE 相当。
  • 通过均场分析证明,该方法将训练误差界从指数增长降低为线性增长,与网络深度的关系更优。
  • 即使各层维度不同,逐层知识蒸馏结合保持维度的线性投影,也能实现从宽网络到窄网络的有效知识迁移。
  • 实证结果表明,该方法在多个基准测试中均表现出一致的性能提升,涵盖图像分类与自然语言处理任务。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。