Corte de Redes Consciente de Discriminação para Compressão de Modelos Profundos
Discrimination-aware Network Pruning for Deep Model Compression
Discrimination-aware Network Pruning for Deep Model Compression
@misc{liu2020discriminationaware,
title = {Discrimination-aware Network Pruning for Deep Model Compression},
author = {Jing Liu and Bohan Zhuang and Zhuangwei Zhuang and Yong Guo and Junzhou Huang and Jinhui Zhu and Mingkui Tan},
year = {2020},
eprint = {2001.01050},
archivePrefix = {arXiv},
primaryClass = {cs.CV},
url = {https://arxiv.org/abs/2001.01050}
}
Liu, J., Zhuang, B., Zhuang, Z., Guo, Y., Huang, J., Zhu, J., & Tan, M. (2020). Discrimination-aware Network Pruning for Deep Model Compression [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2001.01050
LIU J, ZHUANG B, ZHUANG Z, et al. Discrimination-aware Network Pruning for Deep Model Compression[EB/OL]. (2020-01-04)[2026-11-29]. https://arxiv.org/abs/2001.01050.
Resumo
Estudamos o recorte de redes (network pruning), que visa remover canais/canais redundantes e, assim, acelerar a inferência de redes profundas. Os métodos de recorte existentes treinam do zero com restrições de esparsidade ou minimizam o erro de reconstrução entre os mapas de características dos modelos pré-treinados e os comprimidos. Ambas as estratégias sofrem de limitações: a primeira é computacionalmente cara e difícil de convergir, enquanto a segunda otimiza o erro de reconstrução, mas ignora o poder discriminativo dos canais. Neste trabalho, propomos um método simples, porém eficaz chamado recorte de canais ciente da discriminação (DCP) para selecionar os canais que realmente contribuem para o poder discriminativo. Observe que um canal frequentemente consiste em um conjunto de núcleos. Além da redundância nos canais, alguns núcleos dentro de um canal também podem ser redundantes e falhar em contribuir para o poder discriminativo da rede, resultando em redundância no nível de núcleo. Para resolver isso, propomos um método de recorte de núcleos ciente da discriminação (DKP) para comprimir ainda mais redes profundas removendo núcleos redundantes. Para prevenir que o DCP/DKP selecione canais/núcleos redundantes, propomos uma nova condição de parada adaptativa, que ajuda a determinar automaticamente o número de canais/núcleos selecionados e frequentemente resulta em modelos mais compactos com melhor desempenho. Experimentos extensivos em classificação de imagens e reconhecimento facial demonstram a eficácia de nossos métodos. Por exemplo, no ILSVRC-12, o modelo ResNet-50 resultante com 30% de redução de canais supera o modelo de linha de base em 0,36% em termos de acurácia Top-1. O MobileNetV1 e MobileNetV2 recortados alcançam aceleração de inferência de 1,93x e 1,42x, respectivamente, em um dispositivo móvel, com degradação de desempenho negligenciável. O código-fonte e os modelos pré-treinados estão disponíveis em https://github.com/SCUT-AILab/DCP.
We study network pruning which aims to remove redundant channels/kernels and hence speed up the inference of deep networks. Existing pruning methods either train from scratch with sparsity constraints or minimize the reconstruction error between the feature maps of the pre-trained models and the compressed ones. Both strategies suffer from some limitations: the former kind is computationally expensive and difficult to converge, while the latter kind optimizes the reconstruction error but ignores the discriminative power of channels. In this paper, we propose a simple-yet-effective method called discrimination-aware channel pruning (DCP) to choose the channels that actually contribute to the discriminative power. Note that a channel often consists of a set of kernels. Besides the redundancy in channels, some kernels in a channel may also be redundant and fail to contribute to the discriminative power of the network, resulting in kernel level redundancy. To solve this, we propose a discrimination-aware kernel pruning (DKP) method to further compress deep networks by removing redundant kernels. To prevent DCP/DKP from selecting redundant channels/kernels, we propose a new adaptive stopping condition, which helps to automatically determine the number of selected channels/kernels and often results in more compact models with better performance. Extensive experiments on both image classification and face recognition demonstrate the effectiveness of our methods. For example, on ILSVRC-12, the resultant ResNet-50 model with 30% reduction of channels even outperforms the baseline model by 0.36% in terms of Top-1 accuracy. The pruned MobileNetV1 and MobileNetV2 achieve 1.93x and 1.42x inference acceleration on a mobile device, respectively, with negligible performance degradation. The source code and the pre-trained models are available at https://github.com/SCUT-AILab/DCP.