Skip to main content
QUICK REVIEW

[Paper Review] Mixed-Precision Neural Network Quantization via Learned Layer-wise Importance

Chen Tang, Kai Ouyang|arXiv (Cornell University)|Mar 16, 2022
Advanced Image and Video Retrieval TechniquesComputer Science5 citations
TL;DR

This paper proposes a learned layer-wise importance mechanism using quantizer scale factors to enable fast, one-time mixed-precision quantization (MPQ) via integer linear programming (ILP). By training these scale factors end-to-end during quantization-aware training, the method captures layer-specific quantization sensitivity, reducing MPQ search time to 0.06 seconds on ResNet18—exponentially faster than iterative methods—while achieving state-of-the-art accuracy on ImageNet under diverse constraints.

ABSTRACT

The exponentially large discrete search space in mixed-precision quantization (MPQ) makes it hard to determine the optimal bit-width for each layer. Previous works usually resort to iterative search methods on the training set, which consume hundreds or even thousands of GPU-hours. In this study, we reveal that some unique learnable parameters in quantization, namely the scale factors in the quantizer, can serve as importance indicators of a layer, reflecting the contribution of that layer to the final accuracy at certain bit-widths. These importance indicators naturally perceive the numerical transformation during quantization-aware training, which can precisely provide quantization sensitivity metrics of layers. However, a deep network always contains hundreds of such indicators, and training them one by one would lead to an excessive time cost. To overcome this issue, we propose a joint training scheme that can obtain all indicators at once. It considerably speeds up the indicators training process by parallelizing the original sequential training processes. With these learned importance indicators, we formulate the MPQ search problem as a one-time integer linear programming (ILP) problem. That avoids the iterative search and significantly reduces search time without limiting the bit-width search space. For example, MPQ search on ResNet18 with our indicators takes only 0.06 s, which improves time efficiency exponentially compared to iterative search methods. Also, extensive experiments show our approach can achieve SOTA accuracy on ImageNet for far-ranging models with various constraints (e.g., BitOps, compress rate). Code is available on https://github.com/1hunters/LIMPQ.

Motivation & Objective

  • To address the exponentially large search space in mixed-precision quantization (MPQ), which makes traditional iterative search methods prohibitively slow.
  • To overcome the bias in existing criterion-based MPQ methods that rely on full-precision Hessian approximations, which fail to capture quantization-specific numerical behavior.
  • To eliminate the need for manual bit-width assignment or constrained search spaces in MPQ, enabling full flexibility in bit-width selection for weights and activations.
  • To develop a fast, one-time MPQ policy search method that avoids repeated evaluation on training data, drastically reducing time cost.
  • To establish a learnable, end-to-end importance indicator that reflects layer sensitivity during quantization-aware training.

Proposed method

  • Leverage learnable scale factors in the quantizer as end-to-end importance indicators that reflect layer sensitivity to quantization at specific bit-widths.
  • Train all layer-wise importance indicators jointly via a parallelized joint training scheme, avoiding sequential training and reducing time cost.
  • Formulate the MPQ search problem as a one-time integer linear programming (ILP) problem using the learned importance indicators to assign optimal bit-widths to each layer.
  • Use the ILP solution to assign mixed-precision bit-widths to both weights and activations, enabling fine-grained, flexible accuracy-efficiency trade-offs.
  • Integrate the learned indicators into a full quantization pipeline: importance training, ILP-based policy search, and model fine-tuning.
  • Ensure the method supports full search space exploration (e.g., 4-bit, 8-bit, etc.) for both weights and activations without manual constraints.

Experimental results

Research questions

  • RQ1Can learnable scale factors in the quantizer serve as reliable, end-to-end indicators of layer quantization sensitivity?
  • RQ2Does a joint training scheme for importance indicators significantly reduce training time compared to sequential training?
  • RQ3Can the ILP-based MPQ policy search achieve SOTA accuracy while reducing search time to near-zero seconds?
  • RQ4How does the method compare to iterative search-based and Hessian-based criterion methods in terms of accuracy and efficiency?
  • RQ5Does reversing the bit-width assignment based on scale factor magnitude degrade performance, confirming the validity of the proposed importance metric?

Key findings

  • The method achieves MPQ policy search in 0.06 seconds on ResNet18, representing an exponential speedup over iterative methods like AutoQ, which require over 1000 GPU-hours.
  • For ResNet50, the method completes importance training in 50 minutes (3.3 GPU-hours) and ILP search in 0.35 seconds, enabling a 330× speedup over AutoQ for multiple deployment devices.
  • The method improves top-1 accuracy by 1.1% on ResNet50 compared to HAWQv2, while maintaining full search space flexibility for both weights and activations.
  • Ablation studies show that reversing the bit-width assignment based on scale factors leads to a 6.59% drop in top-1 accuracy, confirming the rationality of the proposed importance-based assignment.
  • Under a 9.68 G BitOps constraint, the method achieves 71.84% top-1 accuracy with 4-bit weights and activations, while the reversed assignment drops to 65.25%, demonstrating the robustness of the learned indicators.
  • The approach achieves state-of-the-art accuracy on ImageNet across diverse models and constraints, including BitOps and compression rate, without limiting the search space.

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.