Skip to main content
QUICK REVIEW

[Paper Review] Make RepVGG Greater Again: A Quantization-aware Approach

Xiangxiang Chu, Liang Li|arXiv (Cornell University)|Dec 3, 2022
Advanced Neural Network ApplicationsComputer Science16 citations
TL;DR

This paper proposes QARepVGG, a quantization-aware reparameterized convolutional block that maintains RepVGG's high FP32 accuracy and inference speed while drastically reducing INT8 quantization accuracy drop—achieving less than 2% top-1 accuracy loss on ImageNet via standard post-training quantization. The method restructures the block's weight and activation distributions to be more quantization-friendly, enabling robust deployment without additional training or hardware cost.

ABSTRACT

The tradeoff between performance and inference speed is critical for practical applications. Architecture reparameterization obtains better tradeoffs and it is becoming an increasingly popular ingredient in modern convolutional neural networks. Nonetheless, its quantization performance is usually too poor to deploy (more than 20% top-1 accuracy drop on ImageNet) when INT8 inference is desired. In this paper, we dive into the underlying mechanism of this failure, where the original design inevitably enlarges quantization error. We propose a simple, robust, and effective remedy to have a quantization-friendly structure that also enjoys reparameterization benefits. Our method greatly bridges the gap between INT8 and FP32 accuracy for RepVGG. Without bells and whistles, the top-1 accuracy drop on ImageNet is reduced within 2% by standard post-training quantization. Moreover, our method also achieves similar FP32 performance as RepVGG. Extensive experiments on detection and semantic segmentation tasks verify its generalization.

Motivation & Objective

  • To identify the root cause of severe quantization accuracy degradation in RepVGG, which suffers over 20% top-1 accuracy drop under INT8 post-training quantization.
  • To design a reparameterized block that preserves RepVGG’s high FP32 performance and inference speed while being inherently robust to quantization.
  • To develop a method that achieves state-of-the-art post-training quantization performance for reparameterized networks without requiring quantization-aware training or architectural overhaul.
  • To verify generalization across diverse vision tasks, including object detection and semantic segmentation, under both PTQ and QAT settings.

Proposed method

  • The authors identify that RepVGG’s multi-branch structure inherently enlarges quantization error due to unfavorable weight and activation distributions.
  • They propose QARepVGG, a redesigned block that modifies the residual connection and batch normalization placement to create more quantization-friendly weight and activation distributions.
  • The new block maintains identical inference speed to RepVGG by fusing all branches into a single 3×3 convolution, preserving the reparameterization benefit.
  • The design incorporates four key components: (1) removing batch normalization from the main branch, (2) replacing residual connection with a skip connection after depthwise convolution, (3) reordering normalization and activation, and (4) using a single normalization layer.
  • The method is compatible with standard post-training quantization (PTQ) and quantization-aware training (QAT), requiring no additional calibration or fine-tuning.
  • The final architecture is derived through ablation studies that validate the contribution of each component to quantization robustness.

Experimental results

Research questions

  • RQ1Why does RepVGG suffer from severe quantization accuracy degradation, especially under post-training quantization?
  • RQ2What structural properties of RepVGG’s architecture lead to increased quantization error?
  • RQ3Can a reparameterized block be designed to maintain high FP32 accuracy and inference speed while being inherently robust to INT8 quantization?
  • RQ4How do changes in weight and activation distributions affect quantization performance in reparameterized networks?
  • RQ5Does the proposed QARepVGG design generalize across different model scales and vision tasks such as detection and segmentation?

Key findings

  • QARepVGG achieves 70.4% top-1 accuracy on ImageNet under post-training quantization, compared to only 50.3% for RepVGG-A0, reducing the accuracy drop to less than 2%.
  • On the RepVGG-B1g2 variant, QARepVGG maintains 77.0% INT8 accuracy, compared to just 14.5% for RepVGG, demonstrating a 62.5 percentage point improvement.
  • Under quantization-aware training, QARepVGG achieves 71.9% top-1 accuracy on ImageNet, outperforming RepVGG+QAT by 5.6 percentage points.
  • In object detection on COCO, QARepVGG-based YOLOv6 models show only 1.3% mAP drop under PTQ, compared to 7.4% for RepVGG-based YOLOv6s.
  • On semantic segmentation with FCN and DeepLabV3+, QARepVGG reduces mIoU drop from 5.3% (RepVGG) to 1.2% (QARepVGG), demonstrating strong generalization.
  • The method achieves comparable FP32 accuracy to RepVGG while maintaining identical inference speed, making it a drop-in replacement for quantized deployment.

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.