Table of Contents
Fetching ...

CompSRT: Quantization and Pruning for Image Super Resolution Transformers

Dorsa Zeinali, Hailing Wang, Yitian Zhang, Raymond Fu

TL;DR

The paper introduces CompSRT, a Hadamard-guided quantization framework with scalar decomposition and pruning to compress image SR transformers. By empirically showing that the Hadamard transform reduces value ranges and concentrates distributions near zero, the method achieves significant PSNR/SSIM gains over state-of-the-art PTQ baselines across $\times 2$, $\times 3$, and $\times 4$ scales at $2$–$4$ bits. A two-parameter quantization decomposition and unstructured pruning (40% weight removal) yield storage reductions of $6.67$–$15\%$ in bits per parameter with comparable performance to CondiQuant, and the approach generalizes to MambaIRv2-light. Ablation studies confirm the essential role of both Hadamard transforms and scalar decomposition in achieving SOTA-like results, while supplementary analyses demonstrate robustness and reproducibility. The work offers practical, high-precision compression for SR transformers with modest overhead and broad applicability, including extension to other lightweight models.

Abstract

Model compression has become an important tool for making image super resolution models more efficient. However, the gap between the best compressed models and the full precision model still remains large and a need for deeper understanding of compression theory on more performant models remains. Prior research on quantization of LLMs has shown that Hadamard transformations lead to weights and activations with reduced outliers, which leads to improved performance. We argue that while the Hadamard transform does reduce the effect of outliers, an empirical analysis on how the transform functions remains needed. By studying the distributions of weights and activations of SwinIR-light, we show with statistical analysis that lower errors is caused by the Hadamard transforms ability to reduce the ranges, and increase the proportion of values around $0$. Based on these findings, we introduce CompSRT, a more performant way to compress the image super resolution transformer network SwinIR-light. We perform Hadamard-based quantization, and we also perform scalar decomposition to introduce two additional trainable parameters. Our quantization performance statistically significantly surpasses the SOTA in metrics with gains as large as 1.53 dB, and visibly improves visual quality by reducing blurriness at all bitwidths. At $3$-$4$ bits, to show our method is compatible with pruning for increased compression, we also prune $40\%$ of weights and show that we can achieve $6.67$-$15\%$ reduction in bits per parameter with comparable performance to SOTA.

CompSRT: Quantization and Pruning for Image Super Resolution Transformers

TL;DR

The paper introduces CompSRT, a Hadamard-guided quantization framework with scalar decomposition and pruning to compress image SR transformers. By empirically showing that the Hadamard transform reduces value ranges and concentrates distributions near zero, the method achieves significant PSNR/SSIM gains over state-of-the-art PTQ baselines across , , and scales at bits. A two-parameter quantization decomposition and unstructured pruning (40% weight removal) yield storage reductions of in bits per parameter with comparable performance to CondiQuant, and the approach generalizes to MambaIRv2-light. Ablation studies confirm the essential role of both Hadamard transforms and scalar decomposition in achieving SOTA-like results, while supplementary analyses demonstrate robustness and reproducibility. The work offers practical, high-precision compression for SR transformers with modest overhead and broad applicability, including extension to other lightweight models.

Abstract

Model compression has become an important tool for making image super resolution models more efficient. However, the gap between the best compressed models and the full precision model still remains large and a need for deeper understanding of compression theory on more performant models remains. Prior research on quantization of LLMs has shown that Hadamard transformations lead to weights and activations with reduced outliers, which leads to improved performance. We argue that while the Hadamard transform does reduce the effect of outliers, an empirical analysis on how the transform functions remains needed. By studying the distributions of weights and activations of SwinIR-light, we show with statistical analysis that lower errors is caused by the Hadamard transforms ability to reduce the ranges, and increase the proportion of values around . Based on these findings, we introduce CompSRT, a more performant way to compress the image super resolution transformer network SwinIR-light. We perform Hadamard-based quantization, and we also perform scalar decomposition to introduce two additional trainable parameters. Our quantization performance statistically significantly surpasses the SOTA in metrics with gains as large as 1.53 dB, and visibly improves visual quality by reducing blurriness at all bitwidths. At - bits, to show our method is compatible with pruning for increased compression, we also prune of weights and show that we can achieve - reduction in bits per parameter with comparable performance to SOTA.
Paper Structure (28 sections, 7 figures, 12 tables)

This paper contains 28 sections, 7 figures, 12 tables.

Figures (7)

  • Figure 1: Qualitative visual comparison for 2-bit $(\times4)$ SR on a challenging example. LR denotes low resolution image. FP denotes the output of the FP model. The comparative example is taken from 2DQuant liu20242dquant. SOTA (2DQuant) suffers from excessive blurriness, while our method is significantly more clear.
  • Figure 2: The left histogram shows the weight distribution prior Hadamard with a larger range and a sharper peak. The right histogram shows that the Post-Hadamard weight distribution is more Gaussian. The dark blue region indicates the values within $[-\epsilon,\epsilon]$ which now have more concentration after the transform as shown by the increase in the probability of a value being in $[-\varepsilon,\varepsilon]$, $p_\varepsilon$.
  • Figure 3: Architecture and Quantization scheme for Swin Transformer Layer (STL). X denotes the input. The quantized weights & activations per component are in green and the FP operations are in purple. The Hadamard and inverse Hadamard transforms are shown with red boxes.
  • Figure 4: Architecture and quantization scheme for Swin Transformer Layer MLP. The Hadamard transformation is in full precision.
  • Figure 5: Qualitative visual comparison for 2-bit $(\times 4)$ SR across all five benchmark datasets. LR denotes the low resolution image. Comparative examples are taken from the FP model SwinIR-light liang2021swinir, and 2-bit $(\times 4)$ 2DQuant liu20242dquant.
  • ...and 2 more figures