Skip to main content
QUICK REVIEW

[论文解读] Compressing Deep Neural Networks via Layer Fusion

James O’Neill, Greg Ver Steeg|arXiv (Cornell University)|Jul 29, 2020
Advanced Neural Network Applications参考文献 13被引用 6
一句话总结

本文提出层融合(LF),一种结构化模型压缩技术,通过使用Wasserstein距离和协方差相似性度量对齐权重矩阵,将深度神经网络中的相似全连接层、卷积层和注意力层进行融合。经过迭代微调后,LF在CIFAR-10上实现最高3.33倍的压缩率,且精度下降小于2%;在WikiText-2上将Transformer模型压缩至原始大小的20%,困惑度仅增加5个点,优于非结构化剪枝和匹配蒸馏知识迁移方法,且无需引入额外参数。

ABSTRACT

This paper proposes extit{layer fusion} - a model compression technique that discovers which weights to combine and then fuses weights of similar fully-connected, convolutional and attention layers. Layer fusion can significantly reduce the number of layers of the original network with little additional computation overhead, while maintaining competitive performance. From experiments on CIFAR-10, we find that various deep convolution neural networks can remain within 2\% accuracy points of the original networks up to a compression ratio of 3.33 when iteratively retrained with layer fusion. For experiments on the WikiText-2 language modelling dataset where pretrained transformer models are used, we achieve compression that leads to a network that is 20\% of its original size while being within 5 perplexity points of the original network. We also find that other well-established compression techniques can achieve competitive performance when compared to their original networks given a sufficient number of retraining steps. Generally, we observe a clear inflection point in performance as the amount of compression increases, suggesting a bound on the amount of compression that can be achieved before an exponential degradation in performance.

研究动机与目标

  • 为解决如剪枝等非结构化压缩技术带来的稀疏模型效率低下和计算开销过高的问题。
  • 开发一种结构化、密集的压缩方法,在不引入额外参数的前提下,保持网络效率的同时减小模型规模。
  • 识别并融合过参数化网络中的冗余层——尤其在深层CNN和Transformer中——同时保持竞争力的性能。
  • 研究微调策略和压缩步骤分配对压缩过程中性能下降的影响。
  • 确定是否存在一个性能拐点,超过该点后继续压缩将导致精度出现指数级下降。

提出的方法

  • 提出层融合(LF)作为结构化压缩方法,融合整个层(全连接层、卷积层、注意力层),而非单个权重。
  • 使用Wasserstein距离度量计算候选层对之间权重矩阵的对齐代价。
  • 采用多种相似性准则——欧氏距离、KL散度、Wasserstein距离和协方差对齐(CA)——对层对进行排序。
  • 应用三种融合策略:层平均(Mean)、层冻结(Freeze)和随机混合(-Mix)来组合融合过程中的权重。
  • 采用指数型课程学习调度,非均匀分配压缩步骤,即早期分配更多压缩量,后期分配更多微调步数。
  • 在每次融合步骤后对压缩模型进行迭代微调,以恢复性能,采用基于课程学习的压缩策略。

实验结果

研究问题

  • RQ1层融合能否在保持模型精度和密集计算的同时,有效压缩深度神经网络?
  • RQ2相似性度量的选择(如CA、WS、ED、KL)如何影响层融合在压缩过程中的性能表现?
  • RQ3与均匀分配压缩步骤相比,采用非均匀压缩调度的迭代微调是否能提升性能?
  • RQ4性能退化出现指数级增长的压缩比是多少?该拐点在不同模型和任务间是否具有差异?
  • RQ5在精度和模型大小方面,层融合与剪枝、张量分解和知识蒸馏等成熟方法相比表现如何?

主要发现

  • 在CIFAR-10上,经过迭代微调后,层融合在压缩比达到3.33时,精度下降不超过2个百分点。
  • 在WikiText-2语言建模任务中,层融合将GPT-2和Transformer-XL模型压缩至原始大小的20%,同时困惑度仅增加5个点。
  • 协方差对齐(CA)在所有相似性度量中表现最优,在WikiText-2上实现最低困惑度(TransXL-CA为11.13)。
  • 所有模型和压缩方法中均观察到性能的指数型拐点,超过某一阈值后,进一步压缩将导致精度迅速下降。
  • 采用基于课程学习的压缩调度——即早期分配更多压缩量、后期分配更多训练轮次——相比均匀分配压缩步骤,能显著提升性能。
  • 采用平均或混合策略的层融合性能与单纯平均法相当,表明其对融合方法选择具有鲁棒性。

更好的研究,从现在开始

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

无需绑定信用卡

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