Outlier-Aware Post-Training Quantization for Image Super-Resolution

Hailing Wang, Jianglin Lu, Yitian Zhang, Yun Fu

TL;DR

This paper introduces a novel post-training quantization (PTQ) method for image super-resolution (SR) that specifically addresses the challenge of activation outliers. By treating outliers and dense activation regions separately and employing a sensitivity-aware finetuning strategy, the method achieves state-of-the-art PTQ performance with significant speedups, comparable to more computationally expensive quantization-aware training (QAT) methods.

What Problem Does This Paper Address?

Deep learning models for image super-resolution (SR) have achieved impressive results, but their large size and computational demands hinder deployment on resource-constrained edge devices. Quantization, a technique that reduces model precision, is a promising solution for accelerating inference and reducing memory footprint. While quantization-aware training (QAT) can achieve high accuracy, it requires extensive retraining and ground truth data. Post-training quantization (PTQ) offers a more efficient alternative by quantizing a pre-trained model without retraining. However, existing PTQ methods for SR often struggle with performance degradation, particularly due to the presence of activation outliers. These outliers, which represent extreme activation values, are crucial for preserving image color information. Simply clipping them leads to noticeable color shifts and performance drops, while retaining them consumes valuable bit-width, impacting the quantization of normal activations. This paper aims to bridge this gap by developing a PTQ method that effectively handles these outliers while maintaining high SR quality.

Methods

The proposed method, Outlier-Aware Post-Training Quantization (OAPQ), introduces two key innovations:

  • Dual-Region Quantization Strategy: OAPQ partitions activation distributions into two distinct regions: a "dense region" containing most normal activations and an "outlier region" capturing extreme values. These regions are then quantized independently using a piecewise linear quantizer. This approach allows for a more balanced bit-width allocation, preserving the unique characteristics of both normal activations and outliers. The breakpoint for this division is determined through statistical analysis of a calibration dataset.
  • Sensitivity-Aware Finetuning: The authors observe that different layers within SR networks exhibit varying sensitivities to quantization. To address this, they propose a sensitivity-aware finetuning strategy. This involves calculating a layer-wise sensitivity score based on the variance of feature maps. A custom loss function is then designed to encourage the model to focus more on these highly sensitive layers during the finetuning process, thereby improving overall quantization performance. This finetuning process is staged, progressively updating different quantization parameters (weights, activation bounds, and breakpoints) over several epochs.

Datasets

The paper utilizes several standard datasets for evaluation:

  • Calibration: DIV2K dataset (100 low-resolution images from the training set, without ground truth).
  • Testing: Set5, Set14, BSD100, Urban100.
  • Larger Datasets: Test2K and Test4K (derived from DIV8K by downsampling).

Key Insights and Ideas

  • Outliers are Crucial for Color Fidelity: The paper empirically demonstrates a strong correlation between activation outliers and image color information. Removing these outliers leads to noticeable color distortions in the generated images, highlighting their importance for maintaining visual quality.
  • The Outlier-Dense Trade-off: Retaining outliers in quantization consumes significant bit-width, negatively impacting the quantization of normal activations. Conversely, clipping outliers degrades performance. OAPQ's dual-region approach elegantly addresses this trade-off.
  • Layer Sensitivity Matters: Different network layers have varying tolerances to quantization. Focusing finetuning efforts on more sensitive layers is a more effective strategy than uniform treatment.

Key Results

  • State-of-the-Art PTQ Performance: OAPQ consistently outperforms existing PTQ methods across various SR networks (EDSR, RDN, SRResNet) and datasets, achieving superior PSNR and SSIM scores.
  • Comparable to QAT: The proposed method achieves performance comparable to QAT methods, despite not requiring retraining or ground truth data.
  • Significant Speedup: OAPQ offers a substantial speedup of at least 75x compared to QAT methods, with the quantization process itself taking less than 2 minutes.
  • Qualitative Improvements: Visual comparisons show that OAPQ effectively preserves fine details and avoids artifacts like noise and color distortion, which are present in other PTQ methods.

Limitations and Future Work

  • Hardware Compatibility for Dynamic Quantization: While not directly addressed by OAPQ, the paper mentions that dynamic quantization (adjusting bit-widths based on input) faces hardware compatibility challenges, which is a broader issue in the field.
  • Further Exploration of Sensitivity: The paper's sensitivity-aware finetuning is a promising direction. Future work could explore more sophisticated methods for quantifying and leveraging layer sensitivity.
  • Generalizability to Other Tasks: While OAPQ is tailored for SR, its core ideas of outlier-aware quantization and sensitivity-aware finetuning could potentially be adapted to other computer vision tasks.

Summary updated

BibTeX
@inproceedings{wang2025outlier,
  author = {Hailing Wang and Jianglin Lu and Yitian Zhang and Yun Fu},
  title = {{Outlier-Aware Post-Training Quantization for Image Super-Resolution}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure