Optimizing Data Flow in Binary Neural Networks
Open Access
Abstract
Binary neural networks (BNNs) can substantially accelerate a neural network’s inference time by substituting its costly floating-point arithmetic with bit-wise operations. Nevertheless, state-of-the-art approaches reduce the efficiency of the data flow in the BNN layers by introducing intermediate conversions from 1 to 16/32 bits. We propose a novel training scheme, denoted as BNN-Clip, that can increase the parallelism and data flow of the BNN pipeline; specifically, we introduce a clipping block that reduces the data width from 32 bits to 8. Furthermore, we decrease the internal accumulator size of a binary layer, usually kept using 32 bits to prevent data overflow, with no accuracy loss. Moreover, we propose an optimization of the batch normalization layer that reduces latency and simplifies deployment. Finally, we present an optimized implementation of the binary direct convolution for ARM NEON instruction sets. Our experiments show a consistent inference latency speed-up (up to and compared to two state-of-the-art BNN frameworks) while reaching an accuracy comparable with state-of-the-art approaches on datasets like CIFAR-10, SVHN, and ImageNet.
Keywords
Funding Information
- Datalogic IP-Tech
This publication has 14 references indexed in Scilit:
- ReActNet: Towards Precise Binary Neural Network with Generalized Activation Functions2020
- A Main/Subsidiary Network Framework for Simplifying Binary Neural Networks2019
- Regularizing Activation Distribution for Training Binarized Deep Networks2019
- Bi-Real Net: Enhancing the Performance of 1-Bit CNNs with Improved Representational Capability and Advanced Training Algorithm2018
- LQ-Nets: Learned Quantization for Highly Accurate and Compact Deep Neural Networks2018
- Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference2018
- XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networks2016
- Deep Residual Learning for Image Recognition2016
- Going deeper with convolutions2015
- ImageNet Large Scale Visual Recognition ChallengeInternational Journal of Computer Vision, 2015