Learning Context-Based Non-local Entropy Modeling for Image Compression

Mu Li, Kai Zhang, Wangmeng Zuo, Radu Timofte, David ZhangarXiv 2020

In the field of lossy image compression, deep learning models have begun to rival and even surpass traditional standards. A critical component of these models is entropy modeling, which predicts the probability distribution of quantized latent codes to enable efficient bitstream generation. This paper, published in IEEE Transactions on Neural Networks and Learning Systems, introduces a novel approach that leverages non-local attention and efficient U-Net architectures to capture global image redundancies more effectively than previous methods.

The Challenge: Beyond Local Receptive Fields

Standard deep image compression frameworks typically utilize Convolutional Neural Networks (CNNs) for entropy modeling. While effective, CNNs are inherently limited by their local receptive fields. They primarily focus on immediate spatial neighbors to predict a pixel's value. However, real-world images frequently contain repeating patterns, textures, and structures that are spatially distant. Traditional masked CNNs (like PixelCNN) often miss these global similarities, leading to suboptimal compression and wasted bits.

Furthermore, improving compression quality often requires increasing the "width" (the number of feature maps) of the network. In standard architectures, this leads to a significant increase in computational complexity and GPU memory consumption, making high-quality models difficult to deploy.

Methodology: Non-local Attention and U-Net Transforms

The authors propose two primary innovations to address these limitations: the Context-Based Non-local Attention Block and U-Net Transform Blocks.

Context-Based Non-local Attention

To capture global redundancies, the researchers developed a non-local attention mechanism that allows the entropy model to search the entire image for similar patches. This helps the model more accurately predict the current pixel's value by referencing matching structures elsewhere in the latent space.

The end-to-end compression pipeline where similar image patches are mapped to similar code vectors via the analysis transform.

A significant hurdle in auto-regressive decoding is causality: you cannot compare a target pixel to "future" pixels that haven't been decoded yet. The authors solve this using a proxy similarity function. By calculating similarity based on channels that have already been decoded at a specific spatial location, the model can identify matching patches across the image without violating causality.

Comparison of context modeling approaches: (b) full context, (c) local context, and (d) the proposed non-local context which identifies similar code vectors across the latent space.

Efficient U-Net Transforms

To increase network capacity without a proportional spike in memory usage, the researchers replaced standard convolutional layers in the analysis and synthesis transforms with U-Net blocks. These blocks utilize downsampling and upsampling with skip connections to process multi-scale information efficiently. This architectural choice allows the model to be "wider" and more expressive while remaining computationally manageable.

Experimental Results

The proposed system was trained end-to-end using a rate-distortion loss function on a dataset of 10,000 high-quality images and evaluated on the industry-standard Kodak and Tecnick datasets.

  • Performance: The model consistently outperformed BPG (the state-of-the-art traditional non-deep standard) and previous leading deep models (such as Li19) across both PSNR and MS-SSIM metrics.
  • Efficiency: The U-Net architecture proved to be approximately 3x faster and significantly more memory-efficient than standard residual block architectures of comparable capacity.
  • Visual Quality: Qualitatively, the non-local modeling preserves fine textures and sharp edges better than JPEG2000 or BPG, which often introduce ringing or blurring artifacts at low bitrates.

Conclusion and Future Directions

By integrating non-local context into entropy modeling and utilizing efficient U-Net transforms, this research demonstrates a significant leap in compression efficiency. While the serial nature of auto-regressive decoding remains a challenge for real-time applications, the use of group context and non-local attention provides a powerful framework for capturing the complex global redundancies inherent in natural images. Future work may involve extending these non-local operations to video compression or further optimizing the decoding speed for practical deployment.

Summary updated

BibTeX
@misc{li2020learning,
  author = {Mu Li and Kai Zhang and Wangmeng Zuo and Radu Timofte and David Zhang},
  title = {{Learning Context-Based Non-local Entropy Modeling for Image Compression}},
  year = {2020},
  eprint = {2005.04661},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.04661},
}
Figure