[Paper Review] The Devil Is in the Details: Window-based Attention for Image Compression
This paper proposes a window-based local attention mechanism to enhance learned image compression by improving local texture reconstruction, which addresses the limitation of CNNs in capturing non-repetitive textures. The method integrates seamlessly into both CNN and Transformer architectures, achieving state-of-the-art rate-distortion performance, especially under MS-SSIM optimization, with significant gains in visual quality and detail preservation.
Learned image compression methods have exhibited superior rate-distortion performance than classical image compression standards. Most existing learned image compression models are based on Convolutional Neural Networks (CNNs). Despite great contributions, a main drawback of CNN based model is that its structure is not designed for capturing local redundancy, especially the non-repetitive textures, which severely affects the reconstruction quality. Therefore, how to make full use of both global structure and local texture becomes the core problem for learning-based image compression. Inspired by recent progresses of Vision Transformer (ViT) and Swin Transformer, we found that combining the local-aware attention mechanism with the global-related feature learning could meet the expectation in image compression. In this paper, we first extensively study the effects of multiple kinds of attention mechanisms for local features learning, then introduce a more straightforward yet effective window-based local attention block. The proposed window-based attention is very flexible which could work as a plug-and-play component to enhance CNN and Transformer models. Moreover, we propose a novel Symmetrical TransFormer (STF) framework with absolute transformer blocks in the down-sampling encoder and up-sampling decoder. Extensive experimental evaluations have shown that the proposed method is effective and outperforms the state-of-the-art methods. The code is publicly available at https://github.com/Googolxx/STF.
Motivation & Objective
- Address the inherent limitation of CNN-based learned image compression in reconstructing non-repetitive local textures.
- Investigate whether local-aware attention mechanisms outperform global attention for image compression tasks.
- Design a flexible, plug-and-play attention module that enhances both CNN and Transformer-based compression models.
- Develop a novel Symmetrical TransFormer (STF) framework with absolute transformer blocks in encoder and decoder for improved reconstruction fidelity.
- Improve perceptual quality by enabling better bit allocation to high-contrast and detailed regions without relying solely on PSNR or MS-SSIM metrics.
Proposed method
- Propose a window-based attention mechanism (WAM) that computes self-attention within local spatial windows to capture short-range spatial correlations.
- Integrate WAM as a plug-in module into existing CNN and Transformer architectures, including the STF framework.
- Design the Symmetrical TransFormer (STF) with identical absolute transformer blocks in both the encoder and decoder for symmetric feature learning.
- Use channel-wise multi-head self-attention within fixed spatial windows to preserve local texture details while maintaining computational efficiency.
- Apply SGM-based entropy models for efficient bitstream coding and use layer normalization in the Transformer blocks.
- Train the models end-to-end using a rate-distortion loss with hyperparameters tuned for both MSE and MS-SSIM optimization.
Experimental results
Research questions
- RQ1Can local-aware attention mechanisms improve the reconstruction of non-repetitive textures in learned image compression compared to global attention?
- RQ2How does the window-based attention mechanism compare to non-local attention in terms of rate-distortion and visual quality?
- RQ3To what extent can the window-based attention module be generalized and integrated into both CNN and Transformer-based compression models?
- RQ4Does the proposed Symmetrical TransFormer (STF) framework with symmetric transformer blocks improve reconstruction fidelity over asymmetric or standard Transformer designs?
- RQ5How does the performance of the proposed method vary under different optimization objectives (e.g., MSE vs. MS-SSIM) in terms of perceptual quality?
Key findings
- The window-based attention mechanism (WAM) improves PSNR by 0.16 dB and reduces bpp by 0.003 compared to the baseline CNN model (Minnen2020) at λ=0.0035.
- At λ=0.0130, the WAM-enhanced model achieves 34.10 dB PSNR with 0.448 bpp, outperforming the baseline (33.87 dB, 0.454 bpp) and the non-local attention variant (33.95 dB, 0.467 bpp).
- The STF model with window-attention achieves superior visual quality, especially in high-contrast regions like text and edges, as shown in qualitative comparisons.
- Ablation studies confirm that WAM consistently improves performance across different λ values, demonstrating its robustness and effectiveness.
- The proposed method achieves state-of-the-art rate-distortion performance, with significant gains under MS-SSIM optimization, indicating better perceptual quality.
- The window-based attention mechanism is compatible with both CNN and Transformer architectures, showing strong generalization as a plug-and-play component.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.