Training Compact Neural Networks with Binary Weights and Low Precision Activations

Bohan Zhuang, Chunhua Shen, Ian D. ReidarXiv 2018

Abstract

In this paper, we propose to train a network with binary weights and low-bitwidth activations, designed especially for mobile devices with limited power consumption. Most previous works on quantizing CNNs uncritically assume the same architecture, though with reduced precision. However, we take the view that for best performance it is possible (and even likely) that a different architecture may be better suited to dealing with low precision weights and activations. Specifically, we propose a "network expansion" strategy in which we aggregate a set of homogeneous low-precision branches to implicitly reconstruct the full-precision intermediate feature maps. Moreover, we also propose a group-wise feature approximation strategy which is very flexible and highly accurate. Experiments on ImageNet classification tasks demonstrate the superior performance of the proposed model, named Group-Net, over various popular architectures. In particular, with binary weights and activations, we outperform the previous best binary neural network in terms of accuracy as well as saving more than 5 times computational complexity on ImageNet with ResNet-18 and ResNet-50.

Introduction

Deep learning models are notoriously power-hungry and computationally expensive, making them difficult to deploy on mobile or embedded devices. Quantization—reducing the precision of weights and activations to 1 or 2 bits—is a popular solution, but it usually comes with a significant "accuracy tax." The primary issue is that researchers often uncritically assume that architectures designed for full-precision (like ResNet) are also optimal for binary values. This paper contends that to maintain high performance, we need architectures specifically designed to handle the noise and information loss inherent in low-precision operations.

Methods

The authors propose two main strategies to bridge the gap between binary efficiency and full-precision accuracy:

  1. Network Expansion (Layer-wise): Instead of one binary layer, multiple parallel binary branches are used. The outputs of these branches are weighted and summed to reconstruct the original full-precision feature map.
  2. Group-wise Feature Approximation: This is the core innovation. Rather than approximating every single layer, multiple layers or residual blocks are grouped together. The output of the entire group is then approximated using parallel low-precision branches.
Comparison of (a) standard residual block, (b) layer-wise expansion, and (c) the proposed group-wise expansion strategy.

Quantization and Training

Weights are binarized to $\\{-1, +1\\}$ using the sign function, scaled by the mean of absolute values. Activations are quantized to $k$-bits using a clipped linear function to limit dynamic range. The Straight-Through Estimator (STE) is employed to handle the non-differentiable nature of quantization during backpropagation.

Key Insights

  • Architecture > Precision: Architecture flexibility can compensate for low precision. Adding "width" (more branches) can regain representational power lost by reducing bit-width.
  • The "Mid-level" Sweet Spot: Approximating at the "group" level (e.g., a whole ResNet block) is superior to layer-by-layer or network-wide approximation, balancing error suppression with reconstruction accuracy.
  • Parallelism: The homogeneous binary branches are highly parallelizable, making the architecture ideal for hardware like FPGAs or custom ASICs.

Key Results

Group-Net demonstrates state-of-the-art performance on standard benchmarks like ImageNet and CIFAR-100. On ImageNet, Group-Net with binary weights and 2-bit activations achieved 57.3% Top-1 accuracy on AlexNet, slightly outperforming the full-precision baseline. For ResNet-18, it achieved 67.6% Top-1 accuracy, and for ResNet-50, 73.4%.

Training curves comparing (a) different numbers of bases and (b) various grouping strategies against full-precision and layer-wise baselines.

Compared to previous binary neural networks like ABC-Net, Group-Net is not only more accurate but also reduces computational complexity by more than 5 times on ResNet architectures.

Conclusion

Group-Net proves that rethinking architecture is essential for efficient low-precision deployment. While the network expansion strategy increases the total number of 1-bit parameters, the gains in accuracy and computational efficiency are substantial. Future work may involve using Neural Architecture Search (NAS) to automate the grouping process and extending the approach to tasks like object detection and semantic segmentation.

Summary updated

BibTeX
@misc{zhuang2018training,
  author = {Bohan Zhuang and Chunhua Shen and Ian D. Reid},
  title = {{Training Compact Neural Networks with Binary Weights and Low Precision Activations}},
  year = {2018},
  eprint = {1808.02631},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1808.02631},
}
Figure