양자화 심층 신경망의 개선된 미세 조정을 위한 필터 사전 자르기
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 의 크기를 줄이는 한 가지 방법은 가중치와 활성화에 대한 저비트 표현을 사용하여 사전 학습 모델을 양자화하고, 정밀도 하락을 회복하기 위해 미세 조정 (fine-tuning) 을 수행하는 것입니다. 그러나 저비트 표현을 사용하는 신경망을 훈련시키는 것은 일반적으로 어렵습니다. 그 이유는 DNN 의 중간 계층 가중치가 넓은 동적 범위를 가지며, 이 넓은 동적 범위를 몇 비트로 양자화할 때 스텝 크기가 커져 양자화 오류가 커지고 결과적으로 정밀도 저하가 심화되기 때문입니다. 본 논문은 추가적인 학습 파라미터나 하이퍼파라미터를 사용하지 않고 이 문제를 해결하기 위해 다음과 같은 세 가지 기여를 합니다. 첫째, aforementioned 문제를 유발하는 배치 정규화 (batch normalization) 가 양자화된 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.