Abstract
Although quantization has emerged as a promising approach to reducing computational complexity across various high-level vision tasks, it inevitably leads to accuracy loss in image super-resolution (SR) networks. This is due to the significantly divergent feature distributions across different channels and input images of the SR networks, which complicates the selection of a fixed quantization range. Existing works address this distribution mismatch problem by dynamically adapting quantization ranges to the varying distributions during test time. However, such a dynamic adaptation incurs additional computational costs during inference. In contrast, we propose a new quantization-aware training scheme that effectively Overcomes the Distribution Mismatch problem in SR networks without the need for dynamic adaptation. Intuitively, this mismatch can be mitigated by regularizing the distance between the feature and a fixed quantization range. However, we observe that such regularization can conflict with the reconstruction loss during training, negatively impacting SR accuracy. Therefore, we opt to regularize the mismatch only when the gradients of the regularization are aligned with those of the reconstruction loss. Additionally, we introduce a layer-wise weight clipping correction scheme to determine a more suitable quantization range for layer-wise weights. Experimental results demonstrate that our framework effectively reduces the distribution mismatch and achieves state-of-the-art performance with minimal computational overhead.
Introduction: The Challenge of SR Quantization
Deep learning models for Image Super-Resolution (SR) are computationally intensive, making them difficult to run on resource-constrained mobile devices. Quantization—reducing the precision of weights and activations from 32-bit floating point to low-bit integers (e.g., 2-bit)—is a key strategy for efficiency. However, SR networks are uniquely difficult to quantize compared to standard classification models.
The primary issue is "distribution mismatch." Unlike classification models that often use Batch Normalization to stabilize features, SR networks typically lack it. This leads to internal data distributions that vary wildly across different channels and input images. As illustrated in Figure 1, while classification features are relatively consistent, SR features exhibit highly irregular distributions. A fixed quantization range in this context either clips important outliers or wastes precision on empty space. While dynamic quantization can adapt at runtime, it adds significant computational lag, defeating the purpose of quantization.
Methodology: The ODM Framework
The authors propose ODM, a Quantization-Aware Training (QAT) scheme that solves the mismatch problem during training, ensuring the model is "quantization-ready" without requiring runtime adaptation.
Cooperative Mismatch Regularization (CMR)
To align features with a fixed quantization grid, one might use a regularization loss. However, the authors observed a "gradient conflict": sometimes, making a feature quantization-friendly ruins the image reconstruction quality.
To address this, ODM uses Cooperative Mismatch Regularization (CMR). It monitors the cosine similarity between the gradients of the reconstruction loss and the regularization loss. Regularization is only applied when the two losses are "cooperating" (pointing in similar directions), ensuring that quantization-friendliness never comes at the cost of image clarity. Figure 4 visualizes this conflict and the resulting alignment.
Weight Clipping Correction (WCC)
Weights in SR networks often have extreme outliers that "stretch" the quantization range, leaving the dense, important parts of the distribution with very few bits of precision. ODM introduces a learnable, layer-wise correction parameter ($\gamma_w$). This allows the model to automatically find the "sweet spot" for clipping weights in each layer, balancing the need to capture outliers versus maintaining high resolution for the majority of the weights.
Experimental Results
The authors evaluated ODM using the DIV2K dataset for training and standard benchmarks like Set5, Set14, BSD100, and Urban100 for testing across architectures like EDSR, RDN, and SwinIR.
- Accuracy Gains: ODM achieves state-of-the-art results, particularly in the 2-bit regime. For the EDSR model (2-bit), ODM achieved a 0.49 dB PSNR gain over previous best methods on Set5.
- Efficiency: Unlike dynamic methods, ODM requires zero additional BitOPs during inference. The storage overhead for learnable parameters is negligible (~0.01%).
- Visual Quality: Qualitative results show that ODM produces much sharper edges and fewer artifacts compared to previous quantization methods.
Limitations and Future Work
While ODM significantly closes the gap, a performance difference remains between 2-bit quantized models and full 32-bit floating-point models. Additionally, the method relies on balancing parameters ($\lambda_R, \lambda_M$) which may require tuning for new architectures. Future work could extend this "cooperative" training approach to other tasks like image denoising or deblurring.
Conclusion
ODM effectively overcomes the distribution mismatch in SR networks by shaping the data to fit a simple quantizer during training. By introducing cooperative regularization and layer-wise weight clipping, it achieves state-of-the-art performance without the computational overhead of dynamic adaptation.
Summary updated