Fast CNN Inference by Adaptive Sparse Matrix Decomposition.

Nannan Tian,Yong Liu,Weiping Wang,Dan Meng
DOI: https://doi.org/10.1109/ijcnn52387.2021.9533546
2021-01-01
Abstract:Truncated singular value decomposition (TSVD) method can accelerate convolution neural network (CNN) inference and reduce the number of model parameters because the convolution layer and full connection layer are represented by tensor and matrix. However, the hard threshold selection of TSVD algorithm is not suitable for the ever-changing neural network structure, and it brings about irreversible accuracy loss. To solve this problem, we propose a novel objective function, which can adaptively make CNNs sparse without hard threshold and further reduce the computation of CNNs. Specifically, different from SVD, we think the orthogonality of left and right singular matrices is unreasonable in the sparse decomposition problem. Orthogonal matrices mean that the singular vectors are unit vectors which are contrary to our goal of sparsification. Therefore, we add a L21 norm on singular vectors in order to obtain group sparsity. Besides, we use an alternative iterative method to solve the decomposed matrices automatically and the optimization is easy to implement. More importantly, the more iterations, the more sparse the model becomes. As a result, we can adaptively obtain a sparse and small CNN without specifying the sparsity rate of the big model. Finally, we test the classic CNN structures such as VGG, ResNet, WRN, DenseNet on CIFAR-10 and CIFAR-100. Experimental results verify the effectiveness of our algorithm. Our code is avaliable at: https://github.com//tnn2018/ASMD.
What problem does this paper attempt to address?