量子化された深層ニューラルネットワークの微調整性能向上のためのフィルタ前剪定
Filter Pre-Pruning for Improved Fine-tuning of Quantized Deep Neural Networks
Filter Pre-Pruning for Improved Fine-tuning of Quantized Deep Neural Networks
@misc{nishikawa2020filter,
title = {Filter Pre-Pruning for Improved Fine-tuning of Quantized Deep Neural Networks},
author = {Jun Nishikawa and Ryoji Ikegaya},
year = {2020},
eprint = {2011.06751},
archivePrefix = {arXiv},
primaryClass = {cs.CV},
url = {https://arxiv.org/abs/2011.06751}
}
Nishikawa, J., & Ikegaya, R. (2020). Filter Pre-Pruning for Improved Fine-tuning of Quantized Deep Neural Networks [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2011.06751
NISHIKAWA J, IKEGAYA R. Filter Pre-Pruning for Improved Fine-tuning of Quantized Deep Neural Networks[EB/OL]. (2020-11-13)[2026-11-29]. https://arxiv.org/abs/2011.06751.
要旨
深層学習ネットワーク(DNN)は多数のパラメータと活性化データを持ち、これらは実装コストが高い。DNN のサイズを削減する手法の一つとして、重みと活性化データに低ビット表現を用いて事前学習済みモデルを量子化し、精度の低下を回復させるために微調整を行う方法がある。しかし、低ビット表現を用いたニューラルネットワークの訓練は一般的に困難である。その理由の一つは、DNN の中間層の重みが広いダイナミックレンジを持つため、この広いダイナミックレンジを少数のビットに量子化するとステップサイズが大きくなり、結果として大きな量子化誤差が生じ、最終的に精度の大幅な低下を引き起こすことにある。本論文では、追加の学習パラメータやハイパーパラメータを使用せずに、この問題を解決するために以下の 3 つの貢献を提示する。第一に、前述の問題を引き起こすバッチ正規化が、量子化された DNN の微調整にどのように干渉するかを分析する。第二に、これらの結果に基づき、DNN の微調整を妨害するフィルタを除去しつつ推論結果に最大限の影響を与えない新しい剪定手法「量子化のための剪定(Pruning for Quantization, PfQ)」を提案する。第三に、提案された剪定手法(PfQ)を用いた量子化された DNN の微調整ワークフローを提案する。著名なモデルとデータセットを用いた実験により、提案された手法は従来の量子化手法(微調整を含む)と比較して、同様のモデルサイズでより高い性能を達成することが確認された。
Deep Neural Networks(DNNs) have many parameters and activation data, and these both are expensive to implement. One method to reduce the size of the DNN is to quantize the pre-trained model by using a low-bit expression for weights and activations, using fine-tuning to recover the drop in accuracy. However, it is generally difficult to train neural networks which use low-bit expressions. One reason is that the weights in the middle layer of the DNN have a wide dynamic range and so when quantizing the wide dynamic range into a few bits, the step size becomes large, which leads to a large quantization error and finally a large degradation in accuracy. To solve this problem, this paper makes the following three contributions without using any additional learning parameters and hyper-parameters. First, we analyze how batch normalization, which causes the aforementioned problem, disturbs the fine-tuning of the quantized DNN. Second, based on these results, we propose a new pruning method called Pruning for Quantization (PfQ) which removes the filters that disturb the fine-tuning of the DNN while not affecting the inferred result as far as possible. Third, we propose a workflow of fine-tuning for quantized DNNs using the proposed pruning method(PfQ). Experiments using well-known models and datasets confirmed that the proposed method achieves higher performance with a similar model size than conventional quantization methods including fine-tuning.