Skip to main content
QUICK REVIEW

[Paper Review] DNQ: Dynamic Network Quantization

Yuhui Xu, Shuai Zhang|arXiv (Cornell University)|Dec 6, 2018
Machine Learning and ELMComputer Science16 references3 citations
TL;DR

This paper proposes Dynamic Network Quantization (DNQ), a framework that uses reinforcement learning via policy gradient to dynamically assign optimal bit-widths per layer, while employing a distance-based quantization criterion to preserve accuracy. DNQ achieves state-of-the-art compression with minimal accuracy loss, outperforming fixed-bitwidth methods like INQ and SLQ on CIFAR-Net, AlexNet, and ResNet18 with up to 10.6x compression and less than 0.1% top-1 accuracy drop.

ABSTRACT

Network quantization is an effective method for the deployment of neural networks on memory and energy constrained mobile devices. In this paper, we propose a Dynamic Network Quantization (DNQ) framework which is composed of two modules: a bit-width controller and a quantizer. Unlike most existing quantization methods that use a universal quantization bit-width for the whole network, we utilize policy gradient to train an agent to learn the bit-width of each layer by the bit-width controller. This controller can make a trade-off between accuracy and compression ratio. Given the quantization bit-width sequence, the quantizer adopts the quantization distance as the criterion of the weights importance during quantization. We extensively validate the proposed approach on various main-stream neural networks and obtain impressive results.

Motivation & Objective

  • To address the limitation of fixed-bitwidth quantization across all layers, which fails to account for varying representational capacities of different layers.
  • To improve model compression and inference efficiency on memory- and energy-constrained mobile and edge devices.
  • To reduce accuracy degradation during quantization by learning layer-specific bit-widths and using a more reliable importance criterion than absolute weight values.
  • To develop a trainable, end-to-end framework that jointly optimizes bit-width assignment and quantization quality.

Proposed method

  • A bit-width controller based on a policy network trained via policy gradient to determine the optimal bit-width for each layer, modeled as a Markov Decision Process (MDP).
  • The quantizer uses a distance-based criterion to assess weight importance during iterative quantization, replacing simple absolute value comparisons.
  • The framework applies iterative quantization: weights are partitioned into quantized and retraining parts, with the retraining part compensating for quantization error.
  • The compression ratio is calculated as $ B / b_l $, where $ B $ is the original bit-width (e.g., 32) and $ b_l $ is the layer-specific bit-width.
  • The method is applied to convolutional layers only, with fully-connected layers fixed at 3-bit width due to their lower computational and representational impact.
  • Experiments use SGD with learning rate schedules and batch normalization, with distance clustering applied per weight cluster in low-bit regimes.

Experimental results

Research questions

  • RQ1Can dynamic bit-width assignment per layer improve compression-accuracy trade-offs compared to uniform bit-width quantization?
  • RQ2Is quantization distance a more reliable metric than absolute weight values for identifying important weights during quantization?
  • RQ3Can reinforcement learning effectively learn optimal bit-widths across layers without manual tuning?
  • RQ4How does DNQ perform on standard benchmarks like CIFAR-10 and ImageNet under extreme compression?
  • RQ5Does the combination of dynamic bit-width control and distance-based quantization yield better accuracy than existing iterative quantization methods?

Key findings

  • On CIFAR-Net, DNQ with dynamic bit-widths achieved 80.56% top-1 accuracy at 10.5x compression, outperforming INQ with uniform 3-bit quantization (79.52%) and the DNQ quantizer alone (79.89%).
  • The 5-bit DNQ model achieved 81.63% accuracy, surpassing INQ (81.08%) and SLQ (81.11%) at the same bit-width.
  • On AlexNet, DNQ achieved 56.72% top-1 accuracy (only -0.09% drop from full-precision 56.81%) at 10.6x compression, demonstrating near-lossless performance.
  • For ResNet18, DNQ achieved 68.23% top-1 accuracy (a +0.03% improvement over INQ) at 10.6x compression, with a nearly identical ratio to INQ’s 10.7x.
  • The bit-width controller assigned 5-bit to the first convolutional layer and 3-bit to deeper layers in both CIFAR-Net and AlexNet, reflecting the model’s adaptive learning of layer-specific complexity.

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.