Abstract
Deep convolutional neural networks (DCNNs) have dominated as the best performers on almost all computer vision tasks over the past several years. However, it remains a major challenge to deploy these powerful DCNNs in resource-limited environments, such as embedded devices and smartphones. To this end, 1-bit CNNs have emerged as a feasible solution as they are much more resource-efficient. Unfortunately, they often suffer from a significant performance drop compared to their full-precision counterparts. In this paper, we propose a novel Bayesian Optimized compact 1-bit CNNs (BONNs) model, which has the advantage of Bayesian learning, to improve the performance of 1-bit CNNs significantly. BONNs incorporate the prior distributions of full-precision kernels, features, and filters into a Bayesian framework to construct 1-bit CNNs in a comprehensive end-to-end manner. The proposed Bayesian learning algorithms are well-founded and used to optimize the network simultaneously in different kernels, features, and filters, which largely improves the compactness and capacity of 1-bit CNNs. We further introduce a new Bayesian learning-based pruning method for 1-bit CNNs, which significantly increases the model efficiency with very competitive performance. This enables our method to be used in a variety of practical scenarios. Extensive experiments on the ImageNet, CIFAR, and LFW datasets show that BONNs achieve the best in classification performance compared to a variety of state-of-the-art 1-bit CNN models. In particular, BONN achieves a strong generalization performance on the object detection task.
Similar content being viewed by others
References
Bishop, C. M. (1997). Bayesian neural networks. Journal of the Brazilian Computer Society, 4(1), 61–68.
Blei, D. M., Lafferty, J. D., et al. (2007). A correlated topic model of science. The annals of applied statistics, 1(1), 17–35.
Blundell, C., Cornebise, J., Kavukcuoglu, K., & Wierstra, D. (2015). Weight uncertainty in neural network. In: Proceedings of the International Conference on Machine Learning, pp. 1613–1622
Cai, Y., Yao, Z., Dong, Z., Gholami, A., Mahoney, M.W., & Keutzer, K. (2020). Zeroq: A novel zero shot quantization framework. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13169–13178
Courbariaux, M., Bengio, Y., & David, J.P. (2015). Binaryconnect: Training deep neural networks with binary weights during propagations. In: Proceedings of the Advances in Neural Information Processing Systems, pp. 3123–3131
Courbariaux, M., Hubara, I., Soudry, D., El-Yaniv, R., & Bengio, Y. (2016). Binarized neural networks: Training deep neural networks with weights and activations constrained to+ 1 or-1. arXiv preprint arXiv:1602.02830
Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., & Fei-Fei, L. (2009). Imagenet: A large-scale hierarchical image database. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 248–255
Dikov, G., & Bayer, J. (2019). Bayesian learning of neural network architectures. In: Proceedings of the International Conference on Artificial Intelligence and Statistics, pp. 730–738
Ding, X., Ding, G., Guo, Y., & Han, J. (2019). Centripetal sgd for pruning very deep convolutional networks with complicated structure. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4943–4953
Dong, C., Loy, C.C., He, K., & Tang, X. (2014). Learning a deep convolutional network for image super-resolution. In: Proceedings of the European Conference on Computer Vision, pp. 184–199
Dong, Y., Zhen, L., Liao, S., & Li, S.Z. (2014). Learning face representation from scratch. arXiv preprint arXiv:1411.7923
Everingham, M., Van Gool, L., Williams, C. K., Winn, J., & Zisserman, A. (2010). The pascal visual object classes (voc) challenge. International Journal of Computer Vision, 88(2), 303–338.
Fang, J., Shafiee, A., Abdel-Aziz, H., Thorsley, D., Georgiadis, G., & Hassoun, J.H. (2020). Post-training piecewise linear quantization for deep neural networks. In: Proceedings of the European Conference on Computer Vision, pp. 69–86
Gu, J., Li, C., Zhang, B., Han, J., Cao, X., Liu, J., & Doermann, D. (2019). Projection convolutional neural networks for 1-bit cnns via discrete back propagation. In: Proceedings of the AAAI Conference on Artificial Intelligence
Gu, J., Zhao, J., Jiang, X., Zhang, B., Liu, J., Guo, G., & Ji, R. (2019). Bayesian optimized 1-bit cnns. In: Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 4909–4917
Guo, Y., Yao, A., & Chen, Y. (2016). Dynamic network surgery for efficient dnns. In: Proceedings of the Advances in Neural Information Processing Systems, pp. 1379–1387
Han, S., Mao, H., & Dally, W. J. (2015). Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. Fiber, 56(4), 3–7.
Han, S., Pool, J., Tran, J., & Dally, W. (2015). Learning both weights and connections for efficient neural network. In: Proceedings of the Advances in Neural Information Processing Systems, pp. 1135–1143
Hassibi, B., & Stork, D.G. (1993). Second order derivatives for network pruning: Optimal brain surgeon. In: Proceedings of the Advances in Neural Information Processing Systems, pp. 164–171
Hastie, T., Tibshirani, R., Friedman, J., & Franklin, J. (2005). The elements of statistical learning: Data mining, inference and prediction. The Mathematical Intelligencer, 27(2), 83–85.
He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 770–778
He, Y., Liu, P., Wang, Z., Hu, Z., & Yang, Y. (2019). Filter pruning via geometric median for deep convolutional neural networks acceleration. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4340–4349
He, Y., Zhang, X., & Sun, J. (2017). Channel pruning for accelerating very deep neural networks. In: Proceedings of the IEEE International Conference on Computer Vision, pp. 1389–1397
Hernández-Lobato, J.M., & Adams, R. (2015). Probabilistic backpropagation for scalable learning of bayesian neural networks. In: Proceedings of the International Conference on Machine Learning, pp. 1861–1869
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 preprint arXiv:1704.04861
Hu, H., Peng, R., Tai, Y.W., & Tang, C.K. (2016). Network trimming: A data-driven neuron pruning approach towards efficient deep architectures. arXiv preprint arXiv:1607.03250
Huang, G., Liu, S., Van der Maaten, L., & Weinberger, K.Q. (2018). Condensenet: An efficient densenet using learned group convolutions. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2752–2761
Huang, G., Liu, Z., Van Der Maaten, L., & Weinberger, K.Q. (2017). Densely connected convolutional networks. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4700–4708
Huang, G.B., Mattar, M., Berg, T., & Learned-Miller, E. (2008). Labeled faces in the wild: A database forstudying face recognition in unconstrained environments. In: Proceedings of the European Conference on Computer Vision Workshops, pp. 1–15
Huang, Z., & Wang, N. (2018). Data-driven sparse structure selection for deep neural networks. In: Proceedings of the European Conference on Computer Vision, pp. 304–320
Jung, S., Son, C., Lee, S., Son, J., Han, J.J., Kwak, Y., Hwang, S.J., & Choi, C. (2019). Learning to quantize deep networks by optimizing quantization intervals with task loss. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4350–4359
Kingma, D.P., Salimans, T., & Welling, M. (2015). Variational dropout and the local reparameterization trick. Proceedings of the Advances in neural information processing systems pp. 2575–2583
Krizhevsky, A., Nair, V., & Hinton, G. (2014). The cifar-10 dataset. online: http://www.cs.toronto.edu/kriz/cifar.html
Krizhevsky, A., Sutskever, I., & Hinton, G.E. (2012). Imagenet classification with deep convolutional neural networks. In: Proceedings of the Advances in Neural Information Processing Systems, pp. 1097–1105
Lampinen, J., & Vehtari, A. (2001). Bayesian approach for neural networks-review and case studies. Neural Networks, 14(3), 257–274.
LeCun, Y., Denker, J.S., & Solla, S.A. (1990). Optimal brain damage. In: Proceedings of the Advances in Neural Information Processing Systems, pp. 598–605
Lemaire, C., Achkar, A., & Jodoin, P.M. (2019). Structured pruning of neural networks with budget-aware regularization. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9108–9116
Leng, C., Dou, Z., Li, H., Zhu, S., & Jin, R. (2018). Extremely low bit neural network: Squeeze the last bit out with admm. In: Proceedings of the AAAI Conference on Artificial Intelligence, pp. 3466–3473
Li, B., Wu, B., Su, J., & Wang, G. (2020). Eagleeye: Fast sub-net evaluation for efficient neural network pruning. In: Proceedings of the European Conference on Computer Vision, pp. 639–654
Li, F., Zhang, B., & Liu, B. (2016). Ternary weight networks. arXiv preprint arXiv:1605.04711
Li, H., Kadav, A., Durdanovic, I., Samet, H., & Peter Graf, H. (2017). Pruning filters for efficient convnets. In: Proceedings of the International Conference on Learning Representations, pp. 1–13
Li, Y., Lin, S., Zhang, B., Liu, J., Doermann, D., Wu, Y., Huang, F., & Ji, R. (2019). Exploiting kernel sparsity and entropy for interpretable cnn compression. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2800–2809
Li, Z., Ni, B., Zhang, W., Yang, X., & Gao, W. (2017). Performance guaranteed network acceleration via high-order residual quantization. In: Proceedings of the IEEE International Conference on Computer Vision, pp. 2584–2592
Liang, F., Li, Q., & Zhou, L. (2018). Bayesian neural networks for selection of drug sensitive genes. Journal of the American Statistical Association, 113(523), 955–972.
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
Lin, S., Ji, R., Li, Y., Wu, Y., Huang, F., & Zhang, B. (2018a). Accelerating convolutional networks via global & dynamic filter pruning. In: Proceedings of the International Joint Conference on Artificial Intelligence, pp. 2425–2432
Lin, S., Ji, R., Yan, C., Zhang, B., Cao, L., Ye, Q., Huang, F., & Doermann, D. (2019a). Towards optimal structured cnn pruning via generative adversarial learning. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2790–2799
Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., & Zitnick, C.L. (2014). Microsoft coco: Common objects in context. In: Proceedings of the European Conference on Computer Vision, pp. 740–755
Lin, X., Zhao, C., & Pan, W. (2017a). Towards accurate binary convolutional neural network. In: Proceedings of the Advances in Neural Information Processing Systems, pp. 345–353
Liu, C., Ding, W., Xia, X., Zhang, B., Gu, J., Liu, J., Ji, R., & Doermann, D. (2019b). Circulant binary convolutional networks: Enhancing the performance of 1-bit dcnns with circulant back propagation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2691–2699
Liu, C., Zoph, B., Neumann, M., Shlens, J., Hua, W., Li, L.J., Fei-Fei, L., Yuille, A., Huang, J., & Murphy, K. (2018b). Progressive neural architecture search. In: Proceedings of the European Conference on Computer Vision, pp. 19–34
Liu, G., Reda, F.A., Shih, K.J., Wang, T.C., Tao, A., & Catanzaro, B. (2018c). Image inpainting for irregular holes using partial convolutions. In: Proceedings of the European Conference on Computer Vision, pp. 85–100
Liu, H., Simonyan, K., & Yang, Y. (2019c). Darts: Differentiable architecture search. In: Proceedings of the International Conference on Learning Representations, pp. 1–13
Liu, J., Zhuang, B., Zhuang, Z., Guo, Y., Huang, J., Zhu, J., & Tan, M. (2021). Discrimination-aware network pruning for deep model compression. IEEE Transactions on Pattern Analysis and Machine Intelligence pp. 1–15
Liu, W., Anguelov, D., Erhan, D., Szegedy, C., Reed, S., Fu, C.Y., & Berg, A.C. (2016). Ssd: Single shot multibox detector. In: Proceedings of the European Conference on Computer Vision, pp. 21–37
Liu, Z., Li, J., Shen, Z., Huang, G., Yan, S., & Zhang, C. (2017b). Learning efficient convolutional networks through network slimming. In: Proceedings of the IEEE International Conference on Computer Vision, pp. 2736–2744
Liu, Z., Luo, W., Wu, B., Yang, X., Liu, W., & Cheng, K. T. (2020). Bi-real net: Binarizing deep network towards real-network performance. International Journal of Computer Vision, 128(1), 202–219.
Liu, Z., Shen, Z., Savvides, M., & Cheng, K.T. (2020). Reactnet: Towards precise binary neural network with generalized activation functions. In: Proceedings of the European Conference on Computer Vision, pp. 143–159
Louizos, C., Welling, M., & Kingma, D.P. (2017). Learning sparse neural networks through \( l_0 \) regularization. arXiv preprint arXiv:1712.01312
Luo, J.H., Wu, J., & Lin, W. (2017). Thinet: A filter level pruning method for deep neural network compression. In: Proceedings of the IEEE international conference on computer vision, pp. 5058–5066
MacKay, D. J. (1992). Bayesian interpolation. Neural Computation, 4(3), 415–447.
MacKay, D. J. (1992). A practical bayesian framework for backpropagation networks. Neural Computation, 4(3), 448–472.
McDonnell, M.D. (2018). Training wide residual networks for deployment using a single bit for each weight. In: Proceedings of the International Conference on Learning Representations, pp. 1–16
Mockus, J., Tiesis, V., & Zilinskas, A. (1978). The application of bayesian methods for seeking the extremum. Towards Global Optimization, 2(117–129), 2.
Molchanov, D., Ashukha, A., & Vetrov, D. (2017). Variational dropout sparsifies deep neural networks. In: Proceedings of the International Conference on Machine Learning, pp. 2498–2507
Molchanov, P., Tyree, S., Karras, T., Aila, T., & Kautz, J. (2017). Pruning convolutional neural networks for resource efficient inference. In: Proceedings of the International Conference on Learning Representations, pp. 1–17
Moschoglou, S., Papaioannou, A., Sagonas, C., Deng, J., Kotsia, I., & Zafeiriou, S. (2017). Agedb: the first manually collected, in-the-wild age database. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pp. 51–59
Novikov, A., Podoprikhin, D., Osokin, A., & Vetrov, D.P. (2015). Tensorizing neural networks. In: Proceedings of the Advances in Neural Information Processing Systems, pp. 442–450
Parkhi, O.M., Vedaldi, A., Zisserman, A., et al. (2015). Deep face recognition. In: Proceedings of the British Machine Vision Conference, pp. 1–12
Phan, H., He, Y., Savvides, M., Shen, Z., et al. (2020). Mobinet: A mobile binary network for image classification. In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 3453–3462
Phan, H., Liu, Z., Huynh, D., Savvides, M., Cheng, K.T., & Shen, Z. (2020). Binarizing mobilenet via evolution-based searching. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13420–13429
Qin, H., Gong, R., Liu, X., Shen, M., Wei, Z., Yu, F., & Song, J. (2020). Forward and backward information retention for accurate binary neural networks. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2250–2259
Rastegari, M., Ordonez, V., Redmon, J., & Farhadi, A. (2016). Xnor-net: Imagenet classification using binary convolutional neural networks. In: Proceedings of the European Conference on Computer Vision, pp. 525–542
Ren, S., He, K., Girshick, R., & Sun, J. (2015). Faster r-cnn: Towards real-time object detection with region proposal networks. In: Proceedings of the Advances in Neural Information Processing Systems, pp. 91–99
Schroff, F., Kalenichenko, D., & Philbin, J. (2015). Facenet: A unified embedding for face recognition and clustering. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 815–823
Sengupta, S., Chen, J.C., Castillo, C., Patel, V.M., Chellappa, R., & Jacobs, D.W. (2016). Frontal to profile face verification in the wild. In: Proceedings of the IEEE Winter Conference on Applications of Computer Vision, pp. 1–9. IEEE
Simonyan, K., & Zisserman, A. (2015). Very deep convolutional networks for large-scale image recognition. In: Proceedings of the International Conference on Learning Representations, pp. 1–15
Sun, S., Chen, C., & Carin, L. (2017). Learning structured weight uncertainty in bayesian neural networks. In: Proceedings of the Artificial Intelligence and Statistics, pp. 1283–1292
Sun, S., Zhang, G., Shi, J., & Grosse, R. (2019). Functional variational bayesian neural networks. In: Proceedings of the International Conference on Learning Representations, pp. 1–22
Taigman, Y., Ming, Y., Ranzato, M., & Wolf, L. (2014). Deepface: Closing the gap to human-level performance in face verification. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1701–1708
Tipping, M. E. (2001). Sparse bayesian learning and the relevance vector machine. Journal of Machine Learning Research, 1, 211–244.
Ullrich, K., Meeds, E., & Welling, M. (2017). Soft weight-sharing for neural network compression. In: Proceedings of the International Conference on Learning Representations, pp. 1–16
Wan, D., Shen, F., Liu, L., Zhu, F., Qin, J., Shao, L., & Tao Shen, H. (2018). Tbn: Convolutional neural network with ternary inputs and binary weights. In: Proceedings of the European Conference on Computer Vision, pp. 315–332
Wan, F., Liu, C., Ke, W., Ji, X., Jiao, J., & Ye, Q. (2019). C-mil: Continuation multiple instance learning for weakly supervised object detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2199–2208
Wang, X., Zhang, B., Li, C., Ji, R., Han, J., Cao, X., & Liu, J. (2018). Modulated convolutional networks. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 840–848
Wang, Z., Wu, Z., Lu, J., & Zhou, J. (2020). Bidet: An efficient binarized object detector. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2049–2058
Wen, Y., Zhang, K., Li, Z., & Qiao, Y. (2016). A discriminative feature learning approach for deep face recognition. In: Proceedings of the European Conference on Computer Vision, pp. 499–515
Wu, S., Li, G., Chen, F., & Shi, L. (2018). Training and inference with integers in deep neural networks. In: Proceedings of the International Conference on Learning Representationss, pp. 1–14
Xie, Z., Wen, Z., Liu, J., Liu, Z., Wu, X., & Tan, M. (2020). Deep transferring quantization. In: Proceedings of the European Conference on Computer Vision, pp. 625–642
Xu, S., Li, H., Zhuang, B., Liu, J., Cao, J., Liang, C., & Tan, M. (2020). Generative low-bitwidth data free quantization. In: Proceedings of the European Conference on Computer Vision, pp. 1–17
Xu, S., Zhao, J., Lu, J., Zhang, B., Han, S., & Doermann, D. (2021). Layer-wise searching for 1-bit detectors. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5682–5691
Xu, Z., Lin, M., Liu, J., Chen, J., Shao, L., Gao, Y., Tian, Y., & Ji, R. (2021). Recu: Reviving the dead weights in binary neural networks. arXiv preprint arXiv:2103.12369
Yang, T.J., Chen, Y.H., & Sze, V. (2017). Designing energy-efficient convolutional neural networks using energy-aware pruning. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5687–5695
Yang, Z., Wang, Y., Han, K., Xu, C., Xu, C., Tao, D., & Xu, C. (2020). Searching for low-bit weights in quantized neural networks. In: Proceedings of the Advances in Neural Information Processing Systems, pp. 4091–4102
Yoon, J., & Hwang, S.J. (2017). Combined group and exclusive sparsity for deep neural networks. In: Proceedings of the International Conference on Machine Learning, pp. 3958–3966
Zagoruyko, S., & Komodakis, N. (2016). Wide residual networks. In: Proceedings of the British Machine Vision Conference, pp. 1–15
Zhang, X., Zou, J., He, K., & Sun, J. (2016). Accelerating very deep convolutional networks for classification and detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(10), 1943–1955.
Zhou, H., Yang, M., Wang, J., & Pan, W. (2019). Bayesnas: A bayesian approach for neural architecture search. In: Proceedings of the International Conference on Machine Learning, pp. 7603–7613
Zhou, S., Wu, Y., Ni, Z., Zhou, X., Wen, H., & Zou, Y. (2016). Dorefa-net: Training low bitwidth convolutional neural networks with low bitwidth gradients. arXiv preprint arXiv:1606.06160
Zhu, C., Han, S., Mao, H., & Dally, W.J. (2017). Trained ternary quantization. In: Proceedings of the International Conference on Learning Representations, pp. 1–10
Zhuang, B., Shen, C., Tan, M., Liu, L., & Reid, I. (2018). Towards effective low-bitwidth convolutional neural networks. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7920–7928
Zoph, B., Vasudevan, V., Shlens, J., & Le, Q.V. (2018). Learning transferable architectures for scalable image recognition. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8697–8710
Acknowledgements
The work was supported by the National Natural Science Foundation of China 62076016.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Kong Hui.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
J. Zhao, S. Xu: Co-first Author.
Rights and permissions
About this article
Cite this article
Zhao, J., Xu, S., Zhang, B. et al. Towards Compact 1-bit CNNs via Bayesian Learning. Int J Comput Vis 130, 201–225 (2022). https://doi.org/10.1007/s11263-021-01543-y
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11263-021-01543-y