Corner-to-Center long-range context model for efficient learned image compression

Yang Sui, Ding Ding, Xiang Pan, Xiaozhong Xu, Shan Liu, Bo Yuan, Zhenzhong Chen

TL;DR

The Corner-to-Center Context Model ($C^3M$) fixes the performance-speed trade-off in learned image compression by progressively decoding latent features from the corners to the center in a logarithmic order. This approach slashes decoding time complexity from $O(n^2)$ to $O(\log n)$ while significantly outperforming existing parallel context models in rate-distortion performance.

What Problem Does This Paper Address?

Learned image compression relies heavily on deep neural networks to map images into compact latent representations. To minimize the file size (bitrate), a context model predicts the probability distribution of these latents during encoding and decoding.

Traditional autoregressive context models decode latents sequentially—pixel by pixel. While this captures spatial correlations beautifully, it suffers from an unacceptable $O(n^2)$ computational complexity, taking up to several minutes to decode a single 4K image. To fix this, researchers previously proposed parallel context models (like checkerboard methods) that decode half the latents simultaneously in a first pass and the remaining half in a second pass.

However, this speedup comes at a cost: the first 50% of latents are decoded with zero causal context, and the second pass only looks at tiny local neighborhoods. This lack of both the quantity and quality of context information leads to severe rate-distortion (R-D) performance degradation. The authors set out to achieve parallel-level speeds without sacrificing compression quality.

Methods

The authors introduce two key architectural innovations:

  1. Corner-to-Center Context Model ($C^3M$): Instead of a simple two-pass checkerboard split, $C^3M$ uses a multi-stage, progressive prediction strategy based on a logarithmic algorithm. It starts by decoding just the four corners of the latent feature map. It then iteratively predicts the middle points between already decoded latents, narrowing the effective decoding area from the corners to the center. This ensures that almost all latents benefit from rich causal context, reducing the fraction of latents decoded blindly to less than 5%.
  2. Long-range Crossing Attention Module (LCAM): To improve the "quality" of the context and capture global semantic information, the authors replace standard local CNNs with a Masked Transformer backbone. Within the encoder and decoder pipelines, they introduce LCAM, which splits channels into groups and applies different attention window shapes (horizontal, vertical, $K \times K$, and $2K \times 2K$). This allows the model to capture both local textures and long-range dependencies simultaneously.
The proposed learned image compression pipeline featuring C3M and LCAM.
The progressive multi-stage prediction strategy of C3M.

Datasets

  • Training: The model was trained on the Flicker2W dataset, a standard dataset containing 20,000 high-quality images.
  • Evaluation: The architecture was evaluated on three widely accepted image compression benchmarks: the Kodak dataset (24 images), the Tecnick dataset, and the CLIC dataset. No new benchmarks were introduced.

Key Insights and Ideas

  • Logarithmic over Checkerboard: Moving from a corner-to-center progressive decoding order ($O(\log n)$ steps) provides an elegant middle ground between fully serial ($O(n^2)$ steps) and fully parallel (2 steps). It restores the vital spatial correlations missed by checkerboard methods.
  • Center-Heavy Semantics: The "quality" condition leverages the insight that most critical semantic information resides in the center of an image rather than the edges. By decoding from the corners inward, the model accumulates maximum context by the time it reaches the information-dense center.
  • Shape-Fused Attention: Splitting attention heads into diverse geometric windows (slits and squares) prevents the transformer from over-focusing on global context at the expense of local textures, striking a better balance between structure and detail.

Key Results

  • Decoding Latency: On a $512 \times 768$ Kodak image, $C^3M$ drops decoding time to ~250ms, compared to >1000ms for serial autoregressive models. While slightly slower than the ultra-fast checkerboard method (~47-68ms), it bridges the gap between speed and quality.
  • Rate-Distortion Performance: $C^3M$ combined with LCAM achieves an average BD-rate reduction of 20.84% on the Kodak dataset, 22.61% on Tecnick, and 27.20% on CLIC compared to the anchor BPG method. This significantly outperforms state-of-the-art parallel context models.

Limitations and Future Work

The authors note that despite high quantitative performance, transformer-based backbones inherently favor global context and semantic relationships over high-frequency details. Consequently, the model can occasionally smooth out sharp, drastic local texture changes (such as fine brick lines or complex patterns). The authors suggest that improving detailed local representations within transformer-based architectures is a vital and promising direction for future learned image compression research.

Summary updated

BibTeX
@article{sui2024corner,
  author = {Yang Sui and Ding Ding and Xiang Pan and Xiaozhong Xu and Shan Liu and Bo Yuan and Zhenzhong Chen},
  title = {{Corner-to-Center long-range context model for efficient learned image compression}},
  journal = {J. Vis. Commun. Image Represent.},
  year = {2024},
  doi = {10.1016/j.jvcir.2023.103990},
}
Figure