TL;DR
This paper introduces SLS (Searching for Layer-wise $N:M$ structured Sparsity), a novel framework that optimizes image restoration models by learning unique pruning ratios for every layer. By combining fine-grained $N:M$ sparsity with an adaptive inference mechanism that chooses model complexity based on image patch difficulty, the authors achieve state-of-the-art restoration quality at a fraction of the original computational cost.
What Problem Does This Paper Address?
Deep learning has revolutionized image restoration (tasks like super-resolution and deblurring), but the best models are computationally massive. This makes them difficult to deploy on mobile devices or use for real-time processing of 4K video.
To fix this, researchers use pruning—removing unnecessary weights. However, there is a catch-22:
- Unstructured Pruning: Removes individual weights. It preserves accuracy well but creates "random" holes in memory that standard GPUs can't easily skip, leading to zero real-world speedup.
- Structured Pruning: Removes entire filters or channels. This is hardware-friendly but often destroys the fine details necessary for high-quality image restoration.
Recently, $N:M$ sparsity (where $N$ out of every $M$ consecutive weights are non-zero) emerged as a "best of both worlds" solution supported by modern hardware like NVIDIA Ampere GPUs. However, existing methods apply the same $N:M$ ratio to every layer. The authors argue this is suboptimal because some layers (like the final upsampling layer) are far more sensitive to pruning than others.
Methods
The authors propose SLS, a differentiable framework to search for the best layer-wise sparsity.
- Weight Decomposition: They treat a weight tensor as a sum of $M$ sparse tensors, each having 1:$M$ sparsity. These units are ranked by weight magnitude.
- Differentiable Search: Using a Straight-Through Estimator (STE), the model learns a "priority score" for each unit. This allows the pruning process to be optimized via gradient descent alongside the restoration task itself.
- Priority-Ordered Pruning (POP): To prevent the model from accidentally pruning high-magnitude (important) weights before low-magnitude ones, they enforce a mathematical constraint that aligns the learned scores with weight magnitudes.
- Loss Annealing: They use a "budgeted pruning" loss. To avoid crashing the model's performance by pruning too fast, they gradually increase the pruning pressure ($\lambda_{reg}$) based on how quickly the model is reaching its target budget.
- Adaptive Inference: Recognizing that a clear blue sky is easier to restore than a complex brick texture, they developed an adaptive system. A tiny "MSE estimator" network looks at an image patch and decides which of several pruned models (e.g., 75% pruned vs. 93% pruned) to use for that specific area.
Datasets
The researchers evaluated their method on standard restoration benchmarks:
- Deblurring: Trained and evaluated on the GOPRO dataset.
- Super-Resolution: Trained on DIV2K and evaluated on Set14, B100, and Urban100.
- Architectures: They tested their method on diverse models including EDSR, CARN, RFDN (for SR) and UNet, SRN, DMPHN (for deblurring).
Key Insights and Ideas
- Layer Sensitivity is Non-Uniform: The search revealed that the final upsampling layers in super-resolution models are incredibly sensitive. While middle layers can be pruned aggressively, the final layer needs to stay dense to avoid "checkerboard artifacts."
- Magnitude Matters: Simply learning scores isn't enough. If the learned scores conflict with the actual magnitude of the weights, performance drops significantly. The POP mechanism is crucial for stability.
- Content-Aware Efficiency: Adaptive inference (Figure 3) shows that we don't need a "one size fits all" model. By using simpler models for simple patches, they significantly improve the overall efficiency-accuracy trade-off.
Key Results
SLS consistently outperformed existing pruning methods like filter pruning and uniform $N:M$ sparsity (SR-STE).
- Superior Trade-offs: As shown in Figure 1, the SLS curves (stars) sit significantly higher than other methods, meaning they achieve higher PSNR (better quality) at the same GMACs (computational cost).
- Extreme Pruning: At 1/16th of the original MACs, SLS maintained much sharper textures and clearer details (like license plate numbers) compared to other methods which produced blurry or artifact-ridden results.
- Quantitatively: For the RFDN model on Urban100, SLS achieved a PSNR of 25.31 dB at 2.66 GMACs, while standard filter pruning at a similar cost collapsed to 14.03 dB.
Limitations and Future Work
The primary limitation is hardware-related. While the paper explores general $N:M$ configurations (like 2:8 or 4:32), current NVIDIA Ampere GPUs specifically only provide hardware acceleration for the 2:4 sparsity pattern. The authors note that developing specialized kernels to accelerate the more diverse, layer-wise sparse patterns discovered by SLS is a key direction for future work. Additionally, the adaptive inference adds a small overhead for the MSE estimator, though this is factored into their reported results.
Summary updated