Skip to main content
QUICK REVIEW

[論文レビュー] To prune, or not to prune: exploring the efficacy of pruning for model compression

Michael Zhu, Suyog Gupta|arXiv (Cornell University)|Oct 5, 2017
Advanced Neural Network Applications被引用数 661
ひとこと要約

本論文は、視覚タスクと言語タスクの広範なスパースに剪定されたモデルと小型の密なモデルを比較し、同規模の密なモデルよりも大規模なスパースモデルがしばしば上回ることを示し、簡単な徐々に剪定する手法を導入している。

ABSTRACT

Model pruning seeks to induce sparsity in a deep neural network's various connection matrices, thereby reducing the number of nonzero-valued parameters in the model. Recent reports (Han et al., 2015; Narang et al., 2017) prune deep networks at the cost of only a marginal loss in accuracy and achieve a sizable reduction in model size. This hints at the possibility that the baseline models in these experiments are perhaps severely over-parameterized at the outset and a viable alternative for model compression might be to simply reduce the number of hidden units while maintaining the model's dense connection structure, exposing a similar trade-off in model size and accuracy. We investigate these two distinct paths for model compression within the context of energy-efficient inference in resource-constrained environments and propose a new gradual pruning technique that is simple and straightforward to apply across a variety of models/datasets with minimal tuning and can be seamlessly incorporated within the training process. We compare the accuracy of large, but pruned models (large-sparse) and their smaller, but dense (small-dense) counterparts with identical memory footprint. Across a broad range of neural network architectures (deep CNNs, stacked LSTM, and seq2seq LSTM models), we find large-sparse models to consistently outperform small-dense models and achieve up to 10x reduction in number of non-zero parameters with minimal loss in accuracy.

研究の動機と目的

  • エネルギー効率の高いオンデバイス推論のためのモデル圧縮を動機づける。
  • 2つの圧縮経路を評価する。大規模スパース(剪定された大規模モデル)と小型密(密な小規模モデル)。
  • トレーニング中に適用しやすい、シンプルな徐々の剪定手法を開発する。

提案手法

  • 順伝搬中に小さな大きさの重みをゼロにするために、剪定レイヤごとに二値マスクを拡張した TensorFlow を拡張する。
  • s_t が n 個の剪定ステップで s_i から s_f へと成長する、3次スケジュールで制御された徐々のスパーシティスケジュールを導入する: s_t = s_f + (s_i - s_f)(1 - (t - t_0)/(nΔt))^3。
  • Δt のトレーニングステップごとにマスクを更新して、剪定によって生じた損失からの回復を可能にする。
  • InceptionV3、MobileNets、積み重ねられた LSTM、seq2seq LSTM、NMT などの多様なアーキテクチャに剪定を適用する。
  • タスク全体で同一のメモリフットプリントのもと、大規模スパースと小型密モデルを比較する。
Figure 1: Sparsity function used for gradual pruning
Figure 1: Sparsity function used for gradual pruning

実験結果

リサーチクエスチョン

  • RQ1同じメモリ使用量で高いスパース性を実現する大規模モデルを剪定することは、同じ容量の小型密モデルをトレーニングするよりも優れているか?
  • RQ2視覚および自然言語処理のアーキテクチャにおける徐々の剪定は精度にどのように影響するか?
  • RQ3オンデバイス推論でスパースモデルと密モデルを使用する際の実用的なハードウェアおよびストレージの考慮点は何か?
  • RQ4与えられたパラメータ予算の下で、精度を最大化する最適なスパース性レベルはあるか?

主な発見

  • 大規模スパースモデルは、タスク全体で比較可能なメモリフットプリントの下で一貫して小型密モデルを上回る。
  • InceptionV3 では、50% スパースで 13.6M NNZ、78.0% トップ1、94.2% トップ5、一方で 0% のスパース性は 27.1M NNZ、78.1% トップ1、94.3% トップ5。
  • 87.5% のスパース性では InceptionV3 は 3.3M NNZ、74.6% トップ1、92.5% トップ5 へ低下し、巨大な圧縮を考えると妥当な精度の低下。
  • MobileNets を 75% のスパース性に剪定(1.09M NNZ)すると 67.7% トップ1 に達し、同じ NNZ 予算の密 0.75 幅のモバイルネットよりも優れている。90–95% のスパースモデルは同等サイズの密ネットより高い精度を維持する。
  • Penn Tree Bank では、90% スパースな大規模モデル(6.6M NNZ)はパープレキシティ 80.24 を達成し、密中型モデル(19.8M NNZ)の 83.37 を上回る;85% スパース(3.0–3.0M NNZ)はおよそ 85.17–85.87 のパープレキシティを示し、最適な圧縮範囲を示唆する。
  • Google Neural Machine Translation では、90% スパース(23M NNZ)のモデルが、はるかに大きい密ベースラインと同等かそれ以上の BLEU スコアを達成し、80% スパースで BLEU がわずかに改善することもある。90% スパース 1024 ユニットモデル(23M NNZ)は、密 512 ユニットモデル(81M パラメータ)と競合する。
  • 全体として、大規模スパースモデルは有利なトレードオフを示し、同じサイズなら、より大規模なモデルを訓練して剪定する方が、より小さな密モデルを剪定するよりも精度が高くなることを示唆している。
(a)
(a)

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。