Skip to main content
QUICK REVIEW

[Paper Review] BSQ: Exploring Bit-Level Sparsity for Mixed-Precision Neural Network Quantization

Huanrui Yang, Lin Duan|arXiv (Cornell University)|Feb 20, 2021
Advanced Neural Network ApplicationsComputer Science29 references34 citations
TL;DR

BSQ introduces bit-level sparsity regularization to jointly train bit-level representations of weights, enabling dynamic, layer-wise mixed-precision quantization via a single gradient-based optimization with a differentiable bit-sparsity regularizer.

ABSTRACT

Mixed-precision quantization can potentially achieve the optimal tradeoff between performance and compression rate of deep neural networks, and thus, have been widely investigated. However, it lacks a systematic method to determine the exact quantization scheme. Previous methods either examine only a small manually-designed search space or utilize a cumbersome neural architecture search to explore the vast search space. These approaches cannot lead to an optimal quantization scheme efficiently. This work proposes bit-level sparsity quantization (BSQ) to tackle the mixed-precision quantization from a new angle of inducing bit-level sparsity. We consider each bit of quantized weights as an independent trainable variable and introduce a differentiable bit-sparsity regularizer. BSQ can induce all-zero bits across a group of weight elements and realize the dynamic precision reduction, leading to a mixed-precision quantization scheme of the original model. Our method enables the exploration of the full mixed-precision space with a single gradient-based optimization process, with only one hyperparameter to tradeoff the performance and compression. BSQ achieves both higher accuracy and higher bit reduction on various model architectures on the CIFAR-10 and ImageNet datasets comparing to previous methods.

Motivation & Objective

  • Motivate mixed-precision quantization for optimal accuracy-compression tradeoffs.
  • Propose a differentiable framework to explore the full mixed-precision space without exhaustive NAS.
  • Introduce bit-level sparsity regularization to dynamically adjust layer precision.
  • Enable efficient, single-pass gradient-based optimization to yield mixed-precision schemes.
  • Provide a memory-aware objective to balance accuracy and model size during training.

Proposed method

  • Represent each bit of a fixed-point weight as an independent trainable variable.
  • Use a straight-through estimator to enable gradient-based training of bit-level representations.
  • Introduce a bit-level group Lasso regularizer to induce sparsity at the bit level across layers.
  • Apply a memory consumption-aware reweighting of the regularizer to favor pruning more for larger layers.
  • Perform periodic re-quantization and precision adjustment to dynamically finalize a mixed-precision scheme.
  • Finetune the final quantized model to recover accuracy after precision adjustments.

Experimental results

Research questions

  • RQ1How can bit-level sparsity be leveraged to discover optimal mixed-precision quantization schemes in a single training pass?
  • RQ2Can a differentiable, bit-level regularizer effectively reduce precision across layers while maintaining or improving accuracy?
  • RQ3What is the impact of layer-wise memory-aware regularization on the achieved compression-accuracy tradeoff?
  • RQ4How does BSQ compare to existing fixed-point and mixed-precision quantization methods in CIFAR-10 and ImageNet?
  • RQ5Is dynamic precision reduction feasible without incurring prohibitive training costs?

Key findings

  • BSQ achieves higher accuracy and greater bit reduction than prior methods on CIFAR-10 and ImageNet under mixed-precision setups.
  • Layer-wise memory-aware reweighting improves compression-accuracy tradeoffs by preventing over-penalization of smaller layers and under-penalization of larger layers.
  • BSQ produces quantization schemes with most important layers receiving higher precision, consistent with layer importance assessments.
  • Quantization schemes found by BSQ from scratch can outperform DoReFa-Net baselines when fine-tuned under the final scheme.
  • The approach enables dynamic precision reduction via re-quantization and precision adjustment without altering the forward STE weight reconstruction.
  • BsQ can achieve 0-bit pruning in some layers without breaking residual pathways in networks like ResNet.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.