PokeBNN: A Binary Pursuit of Lightweight Accuracy

Yichi Zhang, Zhiru Zhang, Lukasz Lew

Abstract

Optimization of Top-1 ImageNet promotes enormous networks that may be impractical in inference settings. Binary neural networks (BNNs) have the potential to significantly lower the compute intensity but existing models suffer from low quality. To overcome this deficiency, we propose PokeConv, a binary convolution block which improves quality of BNNs by techniques such as adding multiple residual paths and tuning the activation function. We apply it to ResNet-50 and optimize ResNet's initial convolutional layer which is hard to binarize. We name the resulting network family PokeBNN. These techniques are chosen to yield favorable improvements in both top-1 accuracy and the network's cost. In order to enable joint optimization of the cost together with accuracy, we define arithmetic computation effort (ACE), a hardware- and energy-inspired cost metric for quantized and binarized networks. We also identify a need to optimize an under-explored hyper-parameter controlling the binarization gradient approximation. We establish a new, strong state-of-the-art (SOTA) on top-1 accuracy together with commonly-used CPU64 cost, ACE cost, and network size metrics. ReActNet-Adam, the previous SOTA in BNNs, achieved a 70.5% top-1 accuracy with 7.9 ACE. A small variant of PokeBNN achieves 70.5% top-1 with 2.6 ACE, more than 3x reduction in cost; a larger PokeBNN achieves 75.6% top-1 with 7.8 ACE, more than 5% improvement in accuracy without increasing the cost.

Introduction

Deep learning’s success has largely been driven by massive models that are computationally expensive and energy-intensive. Binary Neural Networks (BNNs)—which use 1-bit weights and activations—offer a theoretical path to extreme efficiency, potentially reducing compute intensity by orders of magnitude. However, BNNs traditionally suffer from two major issues: a significant accuracy gap compared to floating-point counterparts and notorious optimization challenges due to "chaotic" loss landscapes. Furthermore, standard metrics like FLOPs or CPU64 don't accurately reflect the true energy savings of bit-level operations on modern hardware.

Proposed Methodology

The PokeBNN framework introduces three primary innovations to bridge the efficiency-accuracy gap:

Arithmetic Computation Effort (ACE)

ACE is a hardware-agnostic metric that counts bit-level operations ($\sum n_{i,j} \cdot i \cdot j$). Unlike FLOPs, ACE captures the reality that a 1-bit operation is significantly cheaper than an 8-bit or 32-bit one. It correlates much more closely with actual energy consumption in modern CMOS processes.

PokeConv and PokeInit

The core of the architecture is the PokeConv block. It adds multiple residual paths to prevent information bottlenecks and uses Dynamic PReLU (DPReLU) to help the network learn to shift and reshape activation distributions. It also incorporates 4-bit Squeeze-and-Excitation (SE) layers for global context at a negligible cost.

The PokeConv block architecture and its corresponding pseudocode, featuring multiple residual paths and Dynamic PReLU.

Additionally, the PokeInit block addresses the difficulty of binarizing the first layer of a CNN. Instead of forcing it to 1-bit, the authors optimized it into an 8-bit block that fuses stride-2 max-pooling with a stride-2 convolution and reduces the kernel size to 4x4. This reduces the input layer's cost by 18x compared to standard ResNet-50.

Clipping Bound Optimization

The authors identified that the hyperparameter $B$, which controls the gradient approximation in the Straight-Through Estimator, is often overlooked. They found that setting $B=3$ (rather than the standard 1.0) significantly improves accuracy by smoothing the loss landscape.

Experimental Results

Models were evaluated on the ILSVRC12 ImageNet dataset at 224x224 resolution. PokeBNN establishes a new Pareto frontier for BNNs, as illustrated in the comparison below.

Top-1 Accuracy vs. ACE cost, showing PokeBNN's superior Pareto frontier compared to previous SOTA BNNs.

PokeBNN-1.4x achieves 75.6% Top-1 accuracy on ImageNet with an ACE of 7.8. For context, the previous state-of-the-art (ReActNet-Adam) achieved only 70.5% at a similar cost. A smaller variant, PokeBNN-0.75x, matches the 70.5% accuracy of previous SOTA models but reduces the computational cost (ACE) by more than 3x. The largest variant, PokeBNN-2x, reaches 77.2% Top-1, outperforming some 4-bit quantized models while remaining significantly more efficient.

Discussion and Conclusion

The success of PokeBNN highlights that energy is the real bottleneck in modern AI. By using ACE as a proxy for energy cost, the authors were able to optimize for "dollar cost per inference." Key insights include the critical role of unquantized shortcuts in binary convolutions and the significant impact of tuning the clipping bound $B$.

While PokeBNN sets a new SOTA, limitations remain. The training process is complex, requiring a two-phase 750-epoch schedule. Additionally, ACE does not yet account for data movement costs (DRAM/SRAM), which are significant in hardware. Future work may involve using Neural Architecture Search (NAS) to further optimize structures specifically for the ACE metric.

Summary updated

BibTeX
@misc{zhang2021pokebnn,
  author = {Yichi Zhang and Zhiru Zhang and Lukasz Lew},
  title = {{PokeBNN: A Binary Pursuit of Lightweight Accuracy}},
  year = {2021},
  eprint = {2112.00133},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.00133},
}
Figure