Universal Efficient Variable-rate Neural Image Compression

Shanzhi Yin, Chao Li, Youneng Bao, Yongsheng Liang

TL;DR

This paper introduces two plug-and-play modules, Energy-based Channel Gating (ECG) and Bit-rate Modulator (BM), that can be seamlessly integrated into existing neural image compression (NIC) models. These modules enable NIC models to achieve arbitrary bit-rate control and significantly reduce computational complexity without substantial loss in reconstruction quality, making them more practical for real-world deployment.

What Problem Does This Paper Address?

Learning-based image compression methods have achieved performance comparable to traditional codecs like JPEG and WebP. However, two major hurdles remain for their widespread adoption: high computational complexity, making them unsuitable for resource-constrained devices, and a lack of rate flexibility. Typically, a single trained NIC model is optimized for a specific rate-distortion trade-off, meaning a large number of models are needed to cover a range of bitrates. Existing methods to achieve variable rates often require significant architectural modifications, making them difficult to integrate with pre-trained models. This paper aims to solve these issues by providing universal modules that enhance both efficiency and rate flexibility in a plug-and-play manner.

Methods

The paper proposes two novel modules:

  • Energy-based Channel Gating (ECG): This module introduces sparsity into convolution operations by dynamically pruning less significant input features. It calculates a channel-wise threshold based on the energy of the input feature map and uses this to generate a binary mask. This mask selectively zeros out channels, effectively reducing the number of computations (FLOPs) in convolutional layers by up to 3x. The gating function is made differentiable for training using a sigmoid approximation.
  • Bit-rate Modulator (BM): This module allows for channel-wise control of the latent representation to modulate the bit-rate. It takes a trade-off factor ($\lambda$) as input and, through two simple fully-connected layers, generates a channel-wise multiplier. This multiplier is then applied to the latent representation from a pre-trained fixed-rate model. An inverse BM module is used during decoding to restore the original feature map. This approach allows for arbitrary bit-rate control outside the standard entropy coding process.

These modules are designed to be easily embedded into existing NIC architectures, and the entire system is optimized end-to-end by formulating a comprehensive optimization problem that includes rate, distortion, and computational complexity.

Datasets

  • Training: The NIC_dataset is used for training. This dataset consists of 607,714 patches (256x256) extracted from 1,600 original images, along with their 2x and 4x down-sampled versions.
  • Evaluation: The Kodak dataset is used for evaluating the performance of the trained models.

Key Insights and Ideas

  • Modularity is Key: The paper demonstrates that by designing universal, plug-and-play modules (ECG and BM), significant improvements in both efficiency and rate flexibility can be achieved without redesigning entire compression architectures.
  • Sparsity for Efficiency: ECG effectively leverages channel-wise feature importance to introduce sparsity, leading to substantial FLOP reductions. This is a more dynamic and adaptive approach compared to fixed architectural pruning.
  • Latent Space Modulation for Rate Control: BM offers a simple yet effective way to control the bit-rate by directly manipulating the latent representation, bypassing the complexities of modifying entropy models.
  • Unified Optimization: The ability to jointly optimize for rate, distortion, and computational complexity allows for models that are not only efficient but also maintain high reconstruction quality across a range of bitrates.

Key Results

  • FLOP Reduction: The ECG module achieved FLOP reductions of more than 2x across three tested NIC models (ScaleHyperprior, MeanscaleHyperprior, and JointAutoregressive), with very slight PSNR degradation (around 0.5% to 1%).
  • Storage Savings: By enabling variable-rate compression with a single model, the proposed method achieved significant storage savings, up to 91.7% compared to using multiple models for different bitrates. For example, one model for ScaleHyperprior with BM and ECG took 135MB, compared to 695.5MB for 8 separate models.
  • Rate Flexibility: The combined ECG and BM modules enabled continuous bit-rate flexibility in a single trained model, approaching the performance of original fixed-rate models.
  • Overall Efficiency: The models with both ECG and BM modules achieved storage savings of 80.5% to 91.7% and FLOP savings of approximately 2-3x.

Limitations and Future Work

  • Limitations: While the paper demonstrates significant improvements, the PSNR degradation, though small, is still present. The paper mentions that the actual arithmetic coding is bypassed for rate calculation, which is a simplification. The performance of the BM module is dependent on the quality of the pre-trained fixed-rate model.
  • Future Work: The authors suggest exploring better joint training strategies for overall performance and adaptive computational cost within a single model. Further research could focus on improving the trade-off between PSNR and FLOP reduction, and potentially integrating the rate control more directly with the entropy coding process for even finer control.

Summary updated

BibTeX
@inproceedings{yin2021universal,
  author = {Shanzhi Yin and Chao Li and Youneng Bao and Yongsheng Liang},
  title = {{Universal Efficient Variable-rate Neural Image Compression}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2021},
  url = {https://openreview.net/forum?id=PkZjfIdPFf},
}
Figure