Skip to main content
QUICK REVIEW

[Paper Review] Channel-wise Hessian Aware trace-Weighted Quantization of Neural Networks

Xu Qian, Victor C. Li|arXiv (Cornell University)|Aug 19, 2020
Adversarial Robustness in Machine LearningComputer Science24 references9 citations
TL;DR

This paper proposes Channel-wise Hessian Aware trace-Weighted Quantization (CW-HAWQ), a deep reinforcement learning-based method that uses Hessian trace to rank channel sensitivity and a DDPG agent to optimize mixed-precision bit allocation across channels for both weights and activations. It achieves state-of-the-art accuracy with lower top-1 accuracy drop compared to AutoQ and HAWQ-V2 across ResNet-50, ResNet-18, and MobileNetV2 at comparable compression ratios.

ABSTRACT

Second-order information has proven to be very effective in determining the redundancy of neural network weights and activations. Recent paper proposes to use Hessian traces of weights and activations for mixed-precision quantization and achieves state-of-the-art results. However, prior works only focus on selecting bits for each layer while the redundancy of different channels within a layer also differ a lot. This is mainly because the complexity of determining bits for each channel is too high for original methods. Here, we introduce Channel-wise Hessian Aware trace-Weighted Quantization (CW-HAWQ). CW-HAWQ uses Hessian trace to determine the relative sensitivity order of different channels of activations and weights. What's more, CW-HAWQ proposes to use deep Reinforcement learning (DRL) Deep Deterministic Policy Gradient (DDPG)-based agent to find the optimal ratios of different quantization bits and assign bits to channels according to the Hessian trace order. The number of states in CW-HAWQ is much smaller compared with traditional AutoML based mix-precision methods since we only need to search ratios for the quantization bits. Compare CW-HAWQ with state-of-the-art shows that we can achieve better results for multiple networks.

Motivation & Objective

  • To address the limitation of existing mixed-precision quantization methods that only optimize bit-width per layer, not per channel, despite significant intra-layer redundancy differences.
  • To reduce the search space complexity of channel-wise mixed-precision quantization, which is infeasibly large for exhaustive or standard reinforcement learning approaches.
  • To improve model accuracy and compression efficiency by jointly optimizing quantization bit-widths for both weight and activation channels using second-order sensitivity information.
  • To develop a scalable reinforcement learning framework where the state space is reduced to only bit-ratio configurations, enabling efficient and effective policy learning.

Proposed method

  • The method computes the Hessian trace for each channel of weights and activations to determine their relative sensitivity to quantization error.
  • Channels are sorted by Hessian trace to establish a sensitivity order, which guides bit allocation decisions.
  • A Deep Deterministic Policy Gradient (DDPG) agent is trained to search for optimal ratios of quantization bit-widths (e.g., 2, 3, 4, 5, 6, 7, 8) across channels, rather than searching over individual channel bit assignments.
  • The agent operates on a reduced state space consisting only of bit-ratio configurations, significantly lowering computational complexity compared to traditional AutoML-based search.
  • The framework performs two-stage quantization: first optimizing activation bit-widths using the DDPG agent, then fine-tuning and optimizing weight bit-widths on the resulting model.
  • It employs PACT for activation quantization with a trainable clipping threshold and uses symmetric ternary or 2-bit SAWB-style binning for weights to reduce quantization error.

Experimental results

Research questions

  • RQ1Can Hessian trace be effectively used to rank channel-level sensitivity in both weights and activations for mixed-precision quantization?
  • RQ2Can a DDPG-based reinforcement learning agent efficiently explore the channel-wise mixed-precision search space when the state space is reduced to bit-ratio configurations?
  • RQ3Does channel-wise mixed-precision quantization outperform layer-wise or uniform quantization in terms of accuracy and compression efficiency?
  • RQ4Can the proposed method achieve better accuracy than state-of-the-art methods like AutoQ and HAWQ-V2 while maintaining low top-1 accuracy drop?

Key findings

  • On ResNet-50, CW-HAWQ achieves a top-1 accuracy of 76.65% with 2.61 average weight bits and 4 activation bits, resulting in a top-1 accuracy drop of only -0.2% compared to the full-precision baseline.
  • At a 14.48x weight compression ratio, CW-HAWQ achieves 75.57% top-1 accuracy with 2.21 average weight bits and 3.07 activation bits, outperforming AutoQ by 1.2% in accuracy and reducing top-1 drop by 0.88%.
  • On ResNet-18, CW-HAWQ achieves 69.02% top-1 accuracy with 2.19 average weight bits and 3.02 activation bits, outperforming AutoQ by 1.6% in accuracy and reducing top-1 drop by 0.85%.
  • On MobileNetV2, CW-HAWQ achieves 69.85% top-1 accuracy with 2.26 average weight bits and 3.13 activation bits, outperforming AutoQ by 1.2% and reducing top-1 drop by 0.47%.
  • The method achieves state-of-the-art results across all evaluated models, demonstrating that channel-wise sensitivity-aware bit allocation via DDPG leads to superior accuracy and efficiency.

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.