CALLIC: Content Adaptive Learning for Lossless Image Compression

Daxin Li, Yuanchao Bai, Kai Wang, Junjun Jiang, Xianming Liu, Wen Gao

Introduction

Lossless image compression aims to represent an image with the minimum number of bits while allowing for perfect reconstruction. Modern learned codecs typically utilize deep generative models trained on large-scale datasets. However, these models often suffer from an amortization gap: while they perform well on average across a broad distribution, they fail to capture the specific, unique statistical nuances of individual images, such as the distinct textures in medical scans or satellite imagery.

Previous attempts to bridge this gap through per-image fine-tuning have been hindered by excessive computational overhead or the high cost of transmitting model updates to the decoder. CALLIC (Content Adaptive Learning for Lossless Image Compression) addresses these challenges by combining a lightweight architecture with a parameter-efficient, principled adaptation strategy.

Methods

Masked Gated ConvFormer (MGCF)

To achieve high efficiency, CALLIC introduces the Masked Gated ConvFormer (MGCF). Unlike standard transformers that rely on computationally expensive self-attention, MGCF utilizes "masked gating." This mechanism employs depth-wise convolutions to aggregate local context and a gating structure to simulate content-adaptivity. This design prioritizes local pixel correlations—which are critical for lossless compression—while maintaining a significantly smaller parameter footprint (approximately 575K parameters) compared to massive state-of-the-art models.

Architecture of the Masked Gated ConvFormer (MGCF), highlighting the masked gating and MLP blocks.

MDL-Principled PETL and RPFT

The core innovation of CALLIC lies in its adaptation process, framed as a Minimum Description Length (MDL) problem. The system uses Parameter-Efficient Transfer Learning (PETL), specifically low-rank matrix decomposition similar to LoRA, to introduce a minimal set of trainable weights (roughly 25K). The optimization objective jointly minimizes the bits required to transmit these updated weights and the bits required for the compressed image data itself.

To accelerate this process, the authors implement Rate-guided Progressive Fine-Tuning (RPFT). Instead of training on the entire image simultaneously, the model identifies "hard" patches with high estimated entropy and prioritizes them. This ensures the model learns the most complex and informative structures first, reducing adaptation time without sacrificing compression performance.

The two-stage encoding pipeline: MDL-principled adaptation (ST.1) and bitstream encoding (ST.2).

Cache then Crop Inference (CCI)

Autoregressive decoding is inherently serial and often slow. CALLIC mitigates this with a Cache then Crop Inference (CCI) strategy. By caching intermediate feature maps, the system avoids redundant calculations for previously decoded pixels, streamlining the inference process.

Experimental Results

CALLIC was evaluated across five diverse datasets, including Kodak (natural images), WHU-RS19 (satellite), and Histo24 (medical). Key findings include:

  • State-of-the-Art Performance: CALLIC consistently outperformed both traditional codecs (PNG, JPEG-XL) and existing learned methods (DLPR, ArIB-BPS).
  • Bitrate Efficiency: On the Kodak benchmark, CALLIC achieved a bitrate of 2.54 bpsp, surpassing the previous best of 2.78 bpsp.
  • Computational Speedup: The RPFT mechanism successfully reduced per-image adaptation time from 12.9 seconds to 9.7 seconds, a significant improvement for content-adaptive methods.

Conclusion

CALLIC demonstrates that image-specific adaptation is a viable path toward superior lossless compression when guided by MDL principles and efficient architectures. By focusing on local context and prioritizing high-entropy regions during training, CALLIC sets a new standard for compression efficiency. Future work will focus on further reducing encoding latency and extending these adaptive techniques to video compression.

Summary updated

BibTeX
@inproceedings{li2025callic,
  author = {Daxin Li and Yuanchao Bai and Kai Wang and Junjun Jiang and Xianming Liu and Wen Gao},
  title = {{CALLIC: Content Adaptive Learning for Lossless Image Compression}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i5.32494},
}
Figure