Efficient Contextformer: Spatio-Channel Window Attention for Fast Context Modeling in Learned Image Compression

A. Burakhan Koyuncu, Panqi Jia, Atanas Boev, Elena Alshina, Eckehard Steinbach
6/25/2023
eess.IVcs.CVcs.LG

Official code: JiangWeibeta/MLIC (170 stars, Apache-2.0, last commit 2026-02-21). 1 more implementation below.

Abstract

Entropy estimation is essential for the performance of learned image compression. It has been demonstrated that a transformer-based entropy model is of critical importance for achieving a high compression ratio, however, at the expense of a significant computational effort. In this work, we introduce the Efficient Contextformer (eContextformer) - a computationally efficient transformer-based autoregressive context model for learned image compression. The eContextformer efficiently fuses the patch-wise, checkered, and channel-wise grouping techniques for parallel context modeling, and introduces a shifted window spatio-channel attention mechanism. We explore better training strategies and architectural designs and introduce additional complexity optimizations. During decoding, the proposed optimization techniques dynamically scale the attention span and cache the previous attention computations, drastically reducing the model and runtime complexity. Compared to the non-parallel approach, our proposal has ~145x lower model complexity and ~210x faster decoding speed, and achieves higher average bit savings on Kodak, CLIC2020, and Tecnick datasets. Additionally, the low complexity of our context model enables online rate-distortion algorithms, which further improve the compression performance. We achieve up to 17% bitrate savings over the intra coding of Versatile Video Coding (VVC) Test Model (VTM) 16.2 and surpass various learning-based compression models.

View on arXivView PDF

Code Implementations(2)

JiangWeibeta/MLICOfficial100%
Apache-2.0

[ACMMM 2023 / NCW ICML 2023] Multi-Reference Entropy Models for Learned Image Compression

17018Shell, PythonJun 27, 20238 months agoApache-2.0
imagecompressionlossyimagecompression

[CVPR'25] Official Implementation of MambaIC: State Space Models for High-Performance Learned Image Compression

912Shell, PythonFeb 27, 202511 months ago
context-modellearned-image-compressionstate-space-model

Similar Papers

Cite this paper

@article{koyuncu2023efficient,
  title  = {Efficient Contextformer: Spatio-Channel Window Attention for Fast Context Modeling in Learned Image Compression},
  author = {A. Burakhan Koyuncu and Panqi Jia and Atanas Boev and Elena Alshina and Eckehard Steinbach},
  year   = {2023},
  eprint = {2306.14287},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.14287v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.14287.svg)](https://codeofpaper.com/paper/2306.14287)

Discussion