Abstract
Tensor decomposition is widely used to reduce the amount of model parameters and release the pressure on resource-constrained devices. However, exiting studies on tensor decomposition need tensor rank selection, which introduce a large number of additional hyper-parameters and extensive combinatorial searches on tensor ranks. In this paper, we present a new tensor product (TP) based linear layer that can replace the original convolution layer, fully-connected (FC) layer, and vector FC layer in capsule networks without tensor rank selection. Specifically, tensor-matrix product and tensor-vector product are used to the original matrix multiplication. Tensor-matrix product and tensor-outer product are used to replace element product operation. Tensor-outer product is for convolution. These tensor product operations are made up of numerous factors and have fewer parameters. The experimental results show that, when compared to the tensor decomposition algorithm, our algorithm can compress the parameter amount several times while maintaining accuracy without fine-tuning and tensor rank selection.
Similar content being viewed by others
References
Goodfellow I, Bengio Y, Courville A (2016) Deep learning. MIT press
Zhang X, Zou J, He K, Sun J (2016) Accelerating very deep convolutional networks for classification and detection. IEEE Trans Pattern Anal Mach Intell 38(10):1943–1955
Kim Y D, Park E, Yoo S, Choi T, Yang L, Shin (2015) Compression of deep convolutional neural networks for fast and low power mobile applications. Comput Sci 71(2):576–584
Wang Y, Guo W G, Yue X (2021) Tensor decomposition to compress convolutional layers in deep learning. IISE Trans:1–60
Novikov A, Podoprikhin D, Osokin A, Vetrov D P (2015) Tensorizing neural networks. In: Cortes C, Lawrence N, Lee D, Sugiyama M, Garnett R (eds) advances in neural information processing systems. https://proceedings.neurips.cc/paper/2015/file/6855456e2fe46a9d49d3d3af4f57443d-Paper.pdf, vol 28. Curran Associates, Inc.
Bengua J A, Ho P N, Tuan H D, Do M N (2017) Matrix product state for higher-order tensor compression and classification. IEEE Trans Signal Process 65(15):4019–4030
Yu R, Zheng S, Liu Y (2017) Learning chaotic dynamics using tensor recurrent neural networks. In: Proceedings of the ICML, vol 17
Tjandra A, Sakti S, Nakamura S (2017) Compressing recurrent neural network with tensor train. In: 2017 International Joint Conference on Neural Networks (IJCNN). IEEE, pp 4451–4458
Wu B, Wang D, Zhao G, Deng L, Li G (2020) Hybrid tensor decomposition in neural network compression. Neural Netw 132:309–320
Hillar C J, Lim L-H (2013) Most tensor problems are np-hard. J ACM (JACM) 60(6):1–39
Liu J, Musialski P, Wonka P, Ye J (2012) Tensor completion for estimating missing values in visual data. IEEE Trans Pattern Anal Mach Intell 35(1):208–220
Lu C, Feng J, Chen Y, Liu W, Lin Z, Yan S (2019) Tensor robust principal component analysis with a new tensor nuclear norm. IEEE Trans Pattern Anal Mach Intell 42(4):925–938
Zhang Z, Weng T-W, Daniel L (2016) Big-data tensor recovery for high-dimensional uncertainty quantification of process variations. IEEE Trans Compon Packaging Manuf Technol 7(5):687–697
Guhaniyogi R, Qamar S, Dunson D B (2017) Bayesian tensor regression. J Mach Learn Res 18(1):2733–2763
Hawkins C, Zhang Z (2021) Bayesian tensorized neural networks with automatic rank selection. Neurocomputing 453:172–180
Lin S, Ji R, Li Y, Deng C, Li X (2019) Toward compact convnets via structure-sparsity regularized filter pruning. IEEE Trans Neural Netw Learn Syst 31(2):574–588
Luo J-H, Zhang H, Zhou H-Y, Xie C-W, Wu J, Lin W (2018) Thinet: pruning cnn filters for a thinner net. IEEE Trans Pattern Anal Mach Intell 41(10):2525–2538
Lin Y, Tu Y, Dou Z (2020) An improved neural network pruning technology for automatic modulation classification in edge devices. IEEE Trans Veh Technol 69(5):5703–5706
Lin M, Ji R, Wang Y, Zhang Y, Zhang B, Tian Y, Shao L (2020) Hrank: Filter pruning using high-rank feature map. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp 1529–1538
Conti F, Schiavone P D, Benini L (2018) Xnor neural engine: A hardware accelerator ip for 21.6-fj/op binary neural network inference. IEEE Trans Comput-Aided Des Integr Circ Syst 37(11):2940–2951
Deng L, Jiao P, Pei J, Wu Z, Li G (2018) Gxnor-net: Training deep neural networks with ternary weights and activations without full-precision memory under a unified discretization framework. Neural Netw 100:49–58
Liang T, Glossner J, Wang L, Shi S, Zhang X (2021) Pruning and quantization for deep neural network acceleration: a survey. Neurocomputing 461:370–403
Tung F, Mori G (2018) Deep neural network compression by in-parallel pruning-quantization. IEEE Trans Pattern Anal Mach Intell 42(3):568–579
Liu Y, Shu C, Wang J, Shen C (2020) Structured knowledge distillation for dense prediction. IEEE Transactions on Pattern Analysis and Machine Intelligence
Chen Y, Wang N, Zhang Z (2018) Darkrank: Accelerating deep metric learning via cross sample similarities transfer. In: Proceedings of the AAAI conference on artificial intelligence, vol 32
Zhou G, Fan Y, Cui R, Bian W, Zhu X, Gai K (2018) Rocket launching: A universal and efficient framework for training well-performing light net. In: Thirty-second AAAI conference on artificial intelligence
Yang Y, Qiu J, Song M, Tao D, Wang X (2020) Distilling knowledge from graph convolutional networks. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp 7074–7083
Wang L, Yoon K-J (2021) Knowledge distillation and student-teacher learning for visual intelligence: A review and new outlooks. IEEE Transactions on Pattern Analysis and Machine Intelligence
Wang D, Zhao G, Chen H, Liu Z, Deng L, Li G (2021) Nonlinear tensor train format for deep neural network compression. Neural Netw 144:320–333
Ballester-Ripoll R, Lindstrom P, Pajarola R (2019) Tthresh: Tensor compression for multidimensional visual data. IEEE Trans Vis Comput Graph 26(9):2891–2903
Kasiviswanathan S P, Narodytska N, Jin H (2018) Network approximation using tensor sketching.. In: IJCAI, pp 2319–2325
Iandola F N, Han S, Moskewicz M W, Ashraf K, Dally W J, Keutzer K (2016) Squeezenet: Alexnet-level accuracy with 50x fewer parameters and< 0.5 mb model size. arXiv:1602.07360
Howard A G, Zhu M, Chen B, Kalenichenko D, Wang W, Weyand T, Andreetto M, Adam H (2017) Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv:1704.04861
Sandler M, Howard A, Zhu M, Zhmoginov A, Chen L-C (2018) Mobilenetv2: Inverted residuals and linear bottlenecks. In: Proceedings of the IEEE conference on computer vision and pattern recognition, pp 4510–4520
Zhang X, Zhou X, Lin M, Sun J (2018) Shufflenet: An extremely efficient convolutional neural network for mobile devices. In: Proceedings of the IEEE conference on computer vision and pattern recognition, pp 6848–6856
Ma N, Zhang X, Zheng H-T, Sun J (2018) Shufflenet v2: Practical guidelines for efficient cnn architecture design. In: Proceedings of the European conference on computer vision (ECCV), pp 116–131
Carroll J D, Chang J-J (1970) Analysis of individual differences in multidimensional scaling via an n-way generalization of “eckart-young” decomposition. Psychometrika 35(3):283–319
Kossaifi J, Lipton Z C, Kolbeinsson A, Khanna A, Furlanello T, Anandkumar A (2020) Tensor regression networks. J Mach Learn Res 21:1–21
Imaizumi M, Maehara T, Hayashi K (2017) On tensor train rank minimization: Statistical efficiency and scalable algorithm. In: advances in neural information processing systems, pp 3930–3939
Zhao Q, Zhang L, Cichocki A (2015) Bayesian cp factorization of incomplete tensors with automatic rank determination. IEEE Trans Pattern Anal Mach Intell 37(9):1751–1763
Rai P, Wang Y, Guo S, Chen G, Dunson D, Carin L (2014) Scalable bayesian low-rank decomposition of incomplete multiway tensors. In: International conference on machine learning, pp 1800–1808
Holtz S, Rohwedder T, Schneider R (2012) The alternating linear scheme for tensor optimization in the tensor train format. SIAM J Sci Comput 34(2):A683–A713
Ji Y, Wang Q, Li X, Liu J (2019) A survey on tensor techniques and applications in machine learning. IEEE Access 7:162950–162990
Kolda T G, Bader B W (2009) Tensor decompositions and applications. SIAM Rev 51 (3):455–500
Kossaifi J, Panagakis Y, Anandkumar A, Pantic M (2019) Tensorly: tensor learning in python. J Mach Learn Res 20(1):925–930
Abadi M, Agarwal A, Barham P, Brevdo E, Chen Z, Citro C, Corrado G S, Davis A, Dean J, Devin M et al (2016) Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv:1603.04467
Duan H, Xiao X, Long J, Liu Y (2020) Tensor alternating least squares grey model and its application to short-term traffic flows. Appl Soft Comput 89:106145
LeCun Y, Bottou L, Bengio Y, Haffner P (1998) Gradient-based learning applied to document recognition. Proc IEEE 86(11):2278–2324
Sabour S, Frosst N, Hinton G E (2017) Dynamic routing between capsules. In: Advances in neural information processing systems, pp 3856–3866
Cheng Z, Sun H, Takeuchi M, Katto J (2019) Deep residual learning for image compression.. In: CVPR Workshops, p 0
Tan M, Le Q (2019) Efficientnet: Rethinking model scaling for convolutional neural networks. In: International Conference on Machine Learning. PMLR, pp 6105–6114
Acknowledgements
This paper is supported by Beijing Natural Science Foundation No.L182037, National Natural Science Foundation of China No.61871045 and DiDi Cooperation.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Qiang, W., Ji, Y. TP: tensor product layer to compress the neural network in deep learning. Appl Intell 52, 17133–17144 (2022). https://doi.org/10.1007/s10489-022-03260-6
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10489-022-03260-6