Skip to main content
QUICK REVIEW

[Paper Review] A White Paper on Neural Network Quantization

Markus Nagel, Marios Fournarakis|arXiv (Cornell University)|Jun 15, 2021
Advanced Neural Network ApplicationsComputer Science29 references13 citations
TL;DR

This white paper presents state-of-the-art Post-Training Quantization (PTQ) and Quantization-Aware Training (QAT) pipelines for reducing neural network inference latency and energy consumption on edge devices. By leveraging advanced quantization techniques—including per-channel quantization, range learning, and batch normalization folding—it achieves near-precision accuracy for 8-bit quantization and competitive results for 4-bit weights and activations across diverse computer vision and NLP models.

ABSTRACT

While neural networks have advanced the frontiers in many applications, they often come at a high computational cost. Reducing the power and latency of neural network inference is key if we want to integrate modern networks into edge devices with strict power and compute requirements. Neural network quantization is one of the most effective ways of achieving these savings but the additional noise it induces can lead to accuracy degradation. In this white paper, we introduce state-of-the-art algorithms for mitigating the impact of quantization noise on the network's performance while maintaining low-bit weights and activations. We start with a hardware motivated introduction to quantization and then consider two main classes of algorithms: Post-Training Quantization (PTQ) and Quantization-Aware-Training (QAT). PTQ requires no re-training or labelled data and is thus a lightweight push-button approach to quantization. In most cases, PTQ is sufficient for achieving 8-bit quantization with close to floating-point accuracy. QAT requires fine-tuning and access to labeled training data but enables lower bit quantization with competitive results. For both solutions, we provide tested pipelines based on existing literature and extensive experimentation that lead to state-of-the-art performance for common deep learning models and tasks.

Motivation & Objective

  • Address the growing need for energy-efficient and low-latency neural network inference in edge devices with strict power and compute constraints.
  • Mitigate accuracy degradation caused by quantization noise when reducing weights and activations to low bit-widths (e.g., 4-bit or 8-bit).
  • Provide practical, reproducible pipelines for both PTQ and QAT that require minimal engineering effort and deliver state-of-the-art performance.
  • Introduce a debugging workflow to diagnose and resolve common issues when quantizing new models.
  • Demonstrate that modern quantization techniques enable high-accuracy inference even at 4-bit precision for both convolutional and transformer-based models.

Proposed method

  • Propose a hardware-motivated framework for quantization, focusing on fixed-point accelerators and the Multiply-Accumulate (MAC) operation as the core computation unit.
  • Implement a PTQ pipeline using symmetric and asymmetric quantization schemes, with per-tensor and per-channel weight quantization, and dynamic range estimation via calibration on a small data subset.
  • Introduce QAT with differentiable quantization operators that simulate quantization noise during training, enabling the network to learn robustness to low-precision representations.
  • Apply batch normalization folding in QAT using a simple, static method that outperforms more complex dynamic folding techniques.
  • Utilize range learning in QAT to adaptively adjust activation quantization ranges, improving performance for high-dynamic-range activations.
  • Design a standardized, tested pipeline combining these techniques, validated across multiple models and tasks including ImageNet, COCO, Pascal VOC, and GLUE benchmarks.

Experimental results

Research questions

  • RQ1Can PTQ achieve near-precision accuracy for 8-bit quantization of weights and activations across diverse deep learning models without retraining?
  • RQ2How effective is QAT with range learning and batch normalization folding in enabling aggressive 4-bit quantization while preserving model accuracy?
  • RQ3What are the key failure modes in quantizing new models, and how can they be systematically diagnosed and resolved?
  • RQ4How do per-channel vs. per-tensor quantization and different quantization schemes impact accuracy for low-bit networks?
  • RQ5To what extent can transformer-based models like BERT maintain performance under extreme quantization (e.g., W4A4) with QAT?

Key findings

  • The proposed PTQ pipeline achieves 8-bit quantization with less than 1% accuracy drop compared to FP32 across all evaluated models, including ResNet18, ResNet50, and MobileNetV2.
  • For 4-bit weight quantization, PTQ maintains performance within 1.5% of FP32 accuracy on most models, with only a 2.5% drop on EfficientDet-D1, which remains challenging.
  • QAT with range learning enables 4-bit activation quantization while keeping accuracy within 1% of FP32 for BERT-base, and W4A8 achieves only a 0.4% drop on GLUE benchmark.
  • The QAT pipeline with static batch normalization folding outperforms more complex dynamic methods, particularly in maintaining accuracy for deeper and more complex architectures.
  • The combination of per-channel quantization and range learning in QAT reduces accuracy degradation for high-dynamic-range activations, especially in models like BERT and EfficientDet-D1.
  • For EfficientDet-D1, W4A4 quantization leads to a 15.38% accuracy drop (from 40.08 to 24.70 mAP), highlighting the difficulty of low-bit quantization for object detection models, even with QAT.

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.