Pré-pruning por filtragem para aprimoramento do ajuste fino de redes neurais profundas quantizadas
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.
Resumo
As Redes Neurais Profundas (DNNs) possuem muitos parâmetros e dados de ativação, ambos sendo caros de implementar. Uma maneira de reduzir o tamanho da DNN é quantizar o modelo pré-treinado utilizando uma expressão de baixa precisão para pesos e ativações, com ajuste fino para recuperar a perda de precisão. No entanto, é geralmente difícil treinar redes neurais que utilizam expressões de baixa precisão. Uma razão é que os pesos na camada intermediária da DNN possuem uma faixa dinâmica ampla; portanto, ao quantizar essa faixa dinâmica em poucos bits, o tamanho do passo torna-se grande, o que resulta em um grande erro de quantização e, finalmente, em uma grande degradação da precisão. Para resolver este problema, este trabalho apresenta as seguintes três contribuições sem utilizar quaisquer parâmetros de aprendizado ou hiperparâmetros adicionais. Primeiro, analisamos como a normalização por lote, que causa o problema mencionado anteriormente, perturba o ajuste fino da DNN quantizada. Segundo, baseados nesses resultados, propomos um novo método de poda chamado Pruning for Quantization (PfQ), que remove os filtros que perturbam o ajuste fino da DNN sem afetar o resultado inferido na medida do possível. Terceiro, propomos um fluxo de trabalho de ajuste fino para DNNs quantizadas utilizando o método de poda proposto (PfQ). Experimentos utilizando modelos e conjuntos de dados bem conhecidos confirmaram que o método proposto alcança um desempenho superior com um tamanho de modelo similar aos métodos de quantização convencionais, incluindo o ajuste fino.
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.