Content Adaptive Optimization for Neural Image Compression

Joaquim Campos, Simon Meierhans, Abdelaziz Djelouah, Christopher Schroers

Introduction

Standard neural image compression models typically rely on a "train once, deploy everywhere" paradigm. An encoder-decoder pair is trained on a large, diverse dataset to learn a general transformation. While effective on average, these models often underperform when encountering images with unique textures, specific artistic styles, or high resolutions (like 4K) that deviate from the training distribution.

To address this, researchers from DisneyResearch|Studios proposed Latent Adaptation, a method to optimize the compressed representation for each individual image at encoding time. This approach achieves significant quality gains without requiring changes to the decoder or transmitting additional model parameters.

The Problem: One-Size-Fits-All Models

Most neural codecs struggle with domain shift. Adapting a model to new content usually involves fine-tuning network weights. However, for the receiver to decode the image, they would also need these updated weights, creating a massive data overhead that negates the benefits of compression. The core challenge is: how can we adapt to specific content without changing the model weights?

Methods: Latent Adaptation

The proposed solution involves an iterative procedure performed entirely on the encoder side. Instead of a single forward pass through the encoder, the "latents" (the compressed features) are treated as variables to be optimized.

Using the Adam optimizer, the encoder minimizes a Rate-Distortion (RD) loss function: $$L = \text{Rate} + \lambda \cdot \text{Distortion}$$

To handle the non-differentiable nature of quantization, the authors employ a standard relaxation technique: adding uniform noise during optimization to simulate quantization in a differentiable manner. Crucially, the decoder and the probability model remain fixed. The "intelligence" of the adaptation is embedded within the specific values of the optimized latents.

Key Insights and Ideas

The paper suggests that standard neural encoders are often sub-optimal, failing to find the mathematically best latent representation in a single pass. By "over-thinking" the encoding through optimization, the model discovers a more efficient bit-allocation.

Visualization of latent representations before and after adaptation.

As seen in the visualization above, adaptation allows the model to assign likelihoods more accurately to the specific textures of an image. This refinement leads to a more efficient bitstream, reducing the bitrate while simultaneously improving quality (from 39.81 dB at 0.67 bpp to 39.93 dB at 0.57 bpp in this example).

Key Results

Evaluations on the Tecnick dataset demonstrate that latent adaptation provides a consistent improvement of approximately 0.5 dB PSNR at the same bitrate across various model architectures, including both simple factorized and complex hierarchical models.

Rate-Distortion performance on the Tecnick dataset showing gains from latent adaptation.

Furthermore, the method proved highly effective for domain and resolution adaptation. When tested on 4K video sequences from Netflix, the adaptation strategy largely closed the performance gap between a generic model and one specifically trained on 4K data. On specific movie sequences like Lucid Dreams and Meridian, the adapted generic model performed nearly as well as models trained from scratch on those specific domains.

Limitations and Future Work

The primary trade-off for these gains is computational cost. Optimizing an HD image currently takes about 5 minutes on a high-end GPU (requiring 1500 iterations). While suitable for Video-on-Demand applications where encoding happens once for millions of viewers, it is currently impractical for real-time use. Future research may focus on "meta-learning" or other optimization strategies to achieve similar gains with significantly fewer iterations.

Summary updated

BibTeX
@inproceedings{campos2019content,
  author = {Joaquim Campos and Simon Meierhans and Abdelaziz Djelouah and Christopher Schroers},
  title = {{Content Adaptive Optimization for Neural Image Compression}},
  booktitle = {Workshops @ CVPR},
  year = {2019},
  url = {https://openreview.net/forum?id=sYJQw46PGi},
}
Figure