Skip to main content
QUICK REVIEW

[论文解读] Exploring Sparsity in Recurrent Neural Networks

Sharan Narang, Erich Elsen|arXiv (Cornell University)|Apr 17, 2017
Advanced Neural Network Applications参考文献 16被引用 145
一句话总结

本文提出一种基于剪枝的方法,在 RNN 训练过程中逐步将权值归零,获得高度稀疏的模型,同时保持或提升准确率并实现显著的加速。

ABSTRACT

Recurrent Neural Networks (RNN) are widely used to solve a variety of problems and as the quantity of data and the amount of available compute have increased, so have model sizes. The number of parameters in recent state-of-the-art networks makes them hard to deploy, especially on mobile phones and embedded devices. The challenge is due to both the size of the model and the time it takes to evaluate it. In order to deploy these RNNs efficiently, we propose a technique to reduce the parameters of a network by pruning weights during the initial training of the network. At the end of training, the parameters of the network are sparse while accuracy is still close to the original dense neural network. The network size is reduced by 8x and the time required to train the model remains constant. Additionally, we can prune a larger dense network to achieve better than baseline performance while still reducing the total number of parameters significantly. Pruning RNNs reduces the size of the model and can also help achieve significant inference time speed-up using sparse matrix multiply. Benchmarks show that using our technique model size can be reduced by 90% and speed-up is around 2x to 7x.

研究动机与目标

  • 促使降低 RNN 参数数量,以便在移动设备和嵌入式设备上部署。
  • 开发一种在训练过程中的剪枝方法,使权重矩阵变得稀疏且无需额外再训练。
  • 证明剪枝在减小模型规模的同时可维持或提升准确性。
  • 量化稀疏循环层带来的潜在推理加速,并讨论部署带来的影响。

提出的方法

  • 为每个权重维护一个掩码,并使用递增的剪枝阈值。
  • 通过将低于每层阈值的参数置零来剪枝权重,该阈值在训练期间定期更新。
  • 使用由一小组超参数(start_itr、ramp_itr、end_itr、theta、phi、freq)控制的层特异阈值函数。
  • 剪枝循环和线性层;不对偏置或批量归一化参数进行剪枝。
  • 将渐进剪枝与硬剪枝以及更大密集基线进行比较以恢复准确性。
  • 展示在 Deep Speech 2 框架中对 GRU 和 vanilla RNN 架构的适用性。

实验结果

研究问题

  • RQ1在训练中的 RNN 权重剪枝是否能够在尽量小的准确性损失下实现高稀疏?
  • RQ2渐进剪枝在最终性能和参数减少方面相比硬剪枝如何?
  • RQ3在实际硬件上,稀疏 RNN 的实际部署收益(内存、带宽、速度)有哪些?

主要发现

  • 在剪枝后,循环层和线性层实现大约 88% 到 92% 的稀疏性。
  • 剪枝后的更大模型(例如具有 2560–3072 个隐藏单元)在使用明显更少参数的同时,能够优于或接近密集基线。
  • 对于可比较的参数数量,渐进剪枝比硬剪枝高出约 7%–9%。
  • 稀疏 RNN 显示出显著的内存压缩(Deep Speech 2:从 268 MB 降至 ~32–64 MB;GRU:从 460 MB 降至 ~50 MB)。
  • GEMM/SpMV 基准在高稀疏时对循环层的加速为 3x 到 7x,取决于层大小以及使用 GRU 还是 RNN。
  • 与某些先前方法相比,剪枝可减少训练时间,且与量化结合时可以实现设备端部署。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

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