Streamlined Deployment for Quantized Neural Networks

Yaman Umuroglu, Magnus JahrearXiv 2017

Deep Neural Networks (DNNs) are computationally intensive, making them difficult to deploy on power-constrained mobile or IoT devices. Quantized Neural Networks (QNNs)—which utilize low-bit integers (1–4 bits) instead of standard 32-bit floating-point numbers—offer a promising path toward efficiency. However, two major bottlenecks often prevent QNNs from reaching their full potential on commodity mobile CPUs: "floating-point islands" (residual float operations like batch normalization) and a lack of native hardware support for sub-8-bit arithmetic.

This paper introduces a "streamlining" framework and bit-serial techniques designed to overcome these hurdles, achieving a 3.5x speedup on AlexNet compared to optimized 8-bit baselines without sacrificing accuracy.

Methods for Native QNN Execution

The researchers propose a three-pronged approach to make QNNs run natively and efficiently on standard mobile hardware.

1. Streamlining and Successive Thresholding

Streamlining is a pre-deployment transformation that mathematically "collapses" sequences of linear operations—such as batch normalization and scaling factors—directly into the quantization thresholds. Instead of performing floating-point math and then quantizing the result, the system simply checks if an integer value exceeds a set of pre-calculated thresholds. This removes floating-point math from the inference path entirely.

The streamlining process transforms a sequence of linear operations and batch normalization into a series of integer-based successive thresholding steps.

2. Bit-Serial Matrix Multiplication (BitSerialGEMM)

Since mobile CPUs lack native "2-bit" multipliers, the authors employ a bit-serial approach. Multi-bit integers are broken into their constituent bit-planes, and products are calculated using fast bitwise AND and popcount (a hardware instruction that counts set bits) operations. This allows the CPU to process multiple values simultaneously across the full width of its registers, significantly increasing arithmetic intensity.

3. Interleaved Lowering

To perform convolutions efficiently, data must be rearranged via a process called im2col. For low-bit data, standard methods involve slow bit-masking. The authors propose a "bit-serial, channel-interleaved" layout. This layout allows the CPU to move entire words of data at once, reducing the overhead of data preparation by an order of magnitude.

Interleaved lowering optimizes the data layout for convolutions, allowing the CPU to process entire words of low-bit data efficiently.

Key Results and Insights

The framework was evaluated on an ARM Cortex-A57 (Nvidia Jetson TX1) using ImageNet and CIFAR-10 datasets. Key findings include:

  • Significant Speedups: The streamlined AlexNet ran 3.5x faster than an optimized 8-bit baseline. Fully-connected layers saw even more dramatic gains—up to 50x—due to the efficiency of bit-serial math.
  • High Throughput: For 1-bit binary matrices, the implementation reached 150 GOPS (Giga-Operations Per Second), a 6.8x improvement over standard 8-bit math.
  • The "Waste" Threshold: The researchers identified a clear heuristic: BitSerialGEMM outperforms 8-bit libraries (like Google’s gemmlowp) as long as the product of weight bits and activation bits is less than or equal to approximately 6.8.

Conclusion and Future Directions

By treating quantization as a computational shortcut rather than just a data format, the streamlining framework eliminates intermediate floating-point results. While highly effective for low bit-widths (up to 4 bits), the approach faces a "precision ceiling" as the number of required thresholds grows exponentially with bit-depth. Future work may explore applying these bit-serial techniques to enable on-device training or "approximate computing," where only the most significant bits are computed to save power.

Summary updated

BibTeX
@misc{umuroglu2017streamlined,
  author = {Yaman Umuroglu and Magnus Jahre},
  title = {{Streamlined Deployment for Quantized Neural Networks}},
  year = {2017},
  eprint = {1709.04060},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1709.04060},
}
Figure