Exploring Sparsity in Image Super-Resolution for Efficient Inference

Longguang Wang, Xiaoyu Dong, Yingqian Wang, Xinyi Ying, Zaiping Lin, Wei An, Yulan Guo

Abstract

Current CNN-based super-resolution (SR) methods process all locations equally with computational resources being uniformly assigned in space. However, since missing details in low-resolution (LR) images mainly exist in regions of edges and textures, less computational resources are required for those flat regions. Therefore, existing CNN-based methods involve redundant computation in flat regions, which increases their computational cost and limits their applications on mobile devices. In this paper, we explore the sparsity in image SR to improve inference efficiency of SR networks. Specifically, we develop a Sparse Mask SR (SMSR) network to learn sparse masks to prune redundant computation. Within our SMSR, spatial masks learn to identify "important" regions while channel masks learn to mark redundant channels in those "unimportant" regions. Consequently, redundant computation can be accurately localized and skipped while maintaining comparable performance. It is demonstrated that our SMSR achieves state-of-the-art performance with 41%/33%/27% FLOPs being reduced for x2/3/4 SR.

Introduction

Deep learning has revolutionized Single Image Super-Resolution (SR), but the uniform application of filters across all image regions remains a significant bottleneck. Standard Convolutional Neural Networks (CNNs) treat every pixel equally, assigning identical computational power to smooth, low-frequency regions (like a clear sky) as they do to complex, high-frequency textures (like brickwork).

Since the primary goal of SR is to recover missing high-frequency details, processing flat regions with heavy-duty filters is computationally wasteful. This redundancy hinders the deployment of high-performing SR models on resource-constrained edge devices such as smartphones or VR headsets. This research addresses this by exploring intrinsic sparsity in SR tasks to prune redundant computations dynamically.

Methodology: Sparse Mask SR (SMSR)

The core of the proposed approach is the Sparse Mask Module (SMM), which enables the network to learn where to focus its computational efforts.

Dual Masking Strategy

SMSR employs a two-pronged masking strategy to identify redundancy:

  1. Spatial Masks: These masks identify "important" regions containing edges and textures versus "unimportant" flat areas.
  2. Channel Masks: Within regions identified as "unimportant," the network further identifies which specific feature channels are necessary, marking the rest as redundant.

Learning and Inference

To make these binary masks trainable, the authors utilize the Gumbel Softmax trick, providing a differentiable approximation during training. During inference, the model employs specialized Sparse Mask Convolutions to physically skip computations in redundant channels and regions, rather than simply multiplying by zero.

The Sparse Mask Module (SMM) architecture, illustrating the generation of spatial and channel masks and their application in sparse convolution.

Experimental Results

The SMSR model was evaluated on standard benchmarks including DIV2K, Set5, Set14, B100, Urban100, and Manga109.

Efficiency and Performance

SMSR achieves a significant reduction in FLOPs—41%, 33%, and 27% for x2, x3, and x4 upscaling, respectively—compared to a dense baseline. As shown in Figure 1, SMSR outperforms existing lightweight models like CARN and IDN in both reconstruction quality (PSNR) and efficiency. For instance, on Set14 (x2), SMSR achieves higher PSNR than CARN while utilizing 38% fewer parameters and 41% fewer FLOPs.

Comparison of PSNR vs. GFLOPs. SMSR (Ours) occupies the top-left region, indicating superior reconstruction quality at a lower computational cost compared to state-of-the-art lightweight SR methods.

Real-World Deployment

On mobile hardware (Kirin 810), SMSR demonstrated a practical speedup, reducing inference time to 0.57x of the baseline while maintaining nearly identical visual quality. Qualitative analysis further reveals that SMSR is particularly effective at reducing artifacts in repetitive patterns compared to other lightweight alternatives.

Conclusion and Future Work

By leveraging the inherent sparsity of image SR, SMSR provides a path toward high-quality upscaling on mobile devices. While the model shows impressive gains on mobile NPUs/CPUs, optimization for desktop GPUs remains a challenge due to the irregular memory access patterns of sparse convolutions. Future research will focus on developing specialized kernels (e.g., CUDA or TensorRT) and incorporating hardware-specific constraints directly into the training process to further enhance cross-platform efficiency.

Summary updated

BibTeX
@inproceedings{wang2021exploring,
  author = {Longguang Wang and Xiaoyu Dong and Yingqian Wang and Xinyi Ying and Zaiping Lin and Wei An and Yulan Guo},
  title = {{Exploring Sparsity in Image Super-Resolution for Efficient Inference}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  url = {https://openreview.net/forum?id=H-V-yDWW_At},
}
Figure