Pruning Pre-Filtro para Mejorar el Ajuste Fino de Redes Neuronales Profundas Cuantizadas
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.
Resumen
Las Redes Neuronales Profundas (DNNs) poseen muchos parámetros y datos de activación, ambos costosos de implementar. Un método para reducir el tamaño de la DNN consiste en cuantizar el modelo pre-entrenado utilizando expresiones de baja precisión para los pesos y las activaciones, con ajuste fino para recuperar la pérdida de precisión. Sin embargo, es generalmente difícil entrenar redes neuronales que utilizan expresiones de baja precisión. Una razón es que los pesos en la capa intermedia de la DNN tienen un rango dinámico amplio; por lo tanto, al cuantizar este rango dinámico en pocos bits, el tamaño del paso se vuelve grande, lo que conduce a un gran error de cuantización y finalmente a una gran degradación en la precisión. Para resolver este problema, este trabajo presenta las siguientes tres contribuciones sin utilizar ningún parámetro de aprendizaje adicional ni hiperparámetros. Primero, analizamos cómo la normalización por lotes, que causa el problema mencionado anteriormente, perturba el ajuste fino de la DNN cuantizada. Segundo, basándonos en estos resultados, proponemos un nuevo método de poda llamado Poda para Cuantización (PfQ), que elimina los filtros que perturban el ajuste fino de la DNN sin afectar el resultado inferido en la medida de lo posible. Tercero, proponemos un flujo de trabajo de ajuste fino para DNNs cuantizadas utilizando el método de poda propuesto (PfQ). Los experimentos utilizando modelos y conjuntos de datos conocidos confirmaron que el método propuesto logra un mejor rendimiento con un tamaño de modelo similar al de los métodos de cuantización convencionales, incluyendo el 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.