BiPer: Binary Neural Networks using a Periodic Function (2404.01278v1)
Abstract: Quantized neural networks employ reduced precision representations for both weights and activations. This quantization process significantly reduces the memory requirements and computational complexity of the network. Binary Neural Networks (BNNs) are the extreme quantization case, representing values with just one bit. Since the sign function is typically used to map real values to binary values, smooth approximations are introduced to mimic the gradients during error backpropagation. Thus, the mismatch between the forward and backward models corrupts the direction of the gradient, causing training inconsistency problems and performance degradation. In contrast to current BNN approaches, we propose to employ a binary periodic (BiPer) function during binarization. Specifically, we use a square wave for the forward pass to obtain the binary values and employ the trigonometric sine function with the same period of the square wave as a differentiable surrogate during the backward pass. We demonstrate that this approach can control the quantization error by using the frequency of the periodic function and improves network performance. Extensive experiments validate the effectiveness of BiPer in benchmark datasets and network architectures, with improvements of up to 1% and 0.69% with respect to state-of-the-art methods in the classification task over CIFAR-10 and ImageNet, respectively. Our code is publicly available at https://github.com/edmav4/BiPer.
- Post training 4-bit quantization of convolutional networks for rapid-deployment. Advances in Neural Information Processing Systems, 32, 2019.
- Uniq: Uniform noise injection for non-uniform quantization of neural networks. ACM Transactions on Computer Systems (TOCS), 37(1-4):1–15, 2021.
- Training accurate binary neural networks from scratch. In 2019 IEEE International Conference on Image Processing (ICIP), pages 899–903. IEEE, 2019.
- Xnor-net++: Improved binary neural networks. arXiv preprint arXiv:1909.13863, 2019.
- Improved training of binary networks for human pose estimation and image recognition. arXiv preprint arXiv:1904.05868, 2019.
- Deep learning with low precision by half-wave gaussian quantization. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5918–5926, 2017.
- Pi-gan: Periodic implicit generative adversarial networks for 3d-aware image synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 5799–5809, 2021.
- Binaryconnect: Training deep neural networks with binary weights during propagations. In Proceedings of the 28th International Conference on Neural Information Processing Systems - Volume 2, page 3123–3131, Cambridge, MA, USA, 2015. MIT Press.
- Scientific machine learning through physics–informed neural networks: Where we are and what’s next. Journal of Scientific Computing, 92(88), 2022.
- Bnn+: Improved binary network training. In ICLR, 2019.
- Regularizing activation distribution for training binarized deep networks. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 11400–11409, 2019.
- Structured multi-hashing for model compression. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 11900–11909, 2020.
- Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pages 249–256. JMLR Workshop and Conference Proceedings, 2010.
- Differentiable soft quantization: Bridging full-precision and low-bit neural networks. In 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pages 4851–4860, Los Alamitos, CA, USA, 2019. IEEE Computer Society.
- Knowledge distillation: A survey. International Journal of Computer Vision, 129:1789–1819, 2021.
- Projection convolutional neural networks for 1-bit cnns via discrete back propagation. In Proceedings of the AAAI conference on artificial intelligence, pages 8344–8351, 2019a.
- Bayesian optimized 1-bit cnns. In Proceedings of the IEEE/CVF international conference on computer vision, pages 4909–4917, 2019b.
- Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016.
- Amc: Automl for model compression and acceleration on mobile devices. In Proceedings of the European Conference on Computer Vision (ECCV), 2018.
- Mobilenets: Efficient convolutional neural networks for mobile vision applications. CoRR, abs/1704.04861, 2017.
- Binarized neural networks. In NeurIPS, 2016.
- Squeezenet: Alexnet-level accuracy with 50x fewer parameters and <1mb model size. ArXiv, abs/1602.07360, 2016.
- Alex Krizhevsky. Learning multiple layers of features from tiny images, 2009.
- Imagenet classification with deep convolutional neural networks. In Proceedings of the 25th International Conference on Neural Information Processing Systems - Volume 1, page 1097–1105, Red Hook, NY, USA, 2012. Curran Associates Inc.
- Adaste: An adaptive straight-through estimator to train binary neural networks. In 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 460–469, Los Alamitos, CA, USA, 2022. IEEE Computer Society.
- Rotated binary neural network. In Advances in Neural Information Processing Systems, pages 7474–7485. Curran Associates, Inc., 2020a.
- Rotated binary neural network. Advances in neural information processing systems, 33:7474–7485, 2020b.
- Bi-real net: Binarizing deep network towards real-network performance. International Journal of Computer Vision, 128:202–219, 2020.
- Training binary neural networks with real-to-binary convolutions. In International Conference on Learning Representations, 2019.
- Stylesdf: High-resolution 3d-consistent image and geometry generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 13503–13513, 2022.
- Stable low-rank tensor decomposition for compression of convolutional neural network. In Computer Vision – ECCV 2020, pages 522–539, Cham, 2020. Springer International Publishing.
- Hossein Pishro-Nik. Introduction to probability, statistics, and random processes. Kappa Research, LLC Blue Bell, PA, USA, 2014.
- Binary neural networks: A survey. Pattern Recognition, 105:107281, 2020a.
- Forward and backward information retention for accurate binary neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020b.
- Distribution-sensitive information retention for accurate binary neural network. International Journal of Computer Vision, 131(1):26–47, 2023.
- Xnor-net: Imagenet classification using binary convolutional neural networks. In Computer Vision – ECCV 2016, pages 525–542. Springer International Publishing, 2016.
- A systematic literature review on binary neural networks. IEEE Access, 11:27546–27578, 2023.
- Lipschitz continuity retained binary neural network. In European conference on computer vision, pages 603–619. Springer, 2022.
- Implicit neural representations with periodic activation functions. In Proc. NeurIPS, 2020.
- EfficientNet: Rethinking model scaling for convolutional neural networks. In Proceedings of the 36th International Conference on Machine Learning, pages 6105–6114. PMLR, 2019.
- Mst-compression: Compressing and accelerating binary neural networks with minimum spanning tree. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2023.
- Yolov7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7464–7475, Los Alamitos, CA, USA, 2023. IEEE Computer Society.
- Estimator meets equilibrium perspective: A rectified straight through estimator for binary neural networks training. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 17055–17064, 2023.
- Learning frequency domain approximation for binary neural networks. Advances in Neural Information Processing Systems, 34:25553–25565, 2021a.
- Recu: Reviving the dead weights in binary neural networks. In 2021 IEEE/CVF International Conference on Computer Vision (ICCV), pages 5178–5188, 2021b.
- Searching for low-bit weights in quantized neural networks. Advances in neural information processing systems, 33:4091–4102, 2020.
- A comprehensive review of binary neural network. Artificial Intelligence Review, 56:12949–13013, 2023.
- Differentiable dynamic quantization with mixed precision and adaptive resolution. In International Conference on Machine Learning, pages 12546–12556. PMLR, 2021.
- Dorefa-net: Training low bitwidth convolutional neural networks with low bitwidth gradients. arXiv preprint arXiv:1606.06160, 2016.
- Edwin Vargas (12 papers)
- Claudia Correa (19 papers)
- Carlos Hinojosa (16 papers)
- Henry Arguello (47 papers)