Fitted Neural Lossless Image Compression

Zhe Zhang, Zhenzhong Chen, Shan LiuCVPR 2025

Abstract

Lossless image compression is essential for high-fidelity applications such as medical imaging and remote sensing. While modern neural compression methods have achieved superior compression ratios compared to traditional codecs, they often suffer from high computational complexity and slow decoding speeds. This paper introduces Fitted Neural Lossless Image Compression (FNLIC), a novel codec that utilizes a two-phase fitting process. By combining a pre-trained generalist model with a lightweight, image-specific "overfitted" network, FNLIC achieves competitive compression ratios while delivering decoding speeds up to 45x faster than state-of-the-art neural methods.

Introduction

Traditional lossless codecs like PNG and WebP are widely used but often fall short of the compression efficiency offered by modern neural models. However, these neural models typically rely on massive, complex architectures to capture the diverse patterns found in large-scale datasets. This leads to a "complexity trap" where high performance comes at the cost of impractical latency. FNLIC addresses this challenge by shifting the modeling burden from a universal architecture to an image-specific optimization process, allowing for a much smaller and faster model during inference.

Methodology

The core innovation of FNLIC is its two-phase fitting process, which balances general knowledge with image-specific specialization:

  1. Pre-fitting (The Generalist): A lightweight Autoregressive Model (ARM) is trained on a large, diverse dataset (Open Images) to learn a general prior of image structures. Since this model is fixed and shared between the encoder and decoder, it adds no overhead to the compressed bitstream.
  2. Overfitting (The Specialist): For each individual image, a tiny "overfitter" network is trained from scratch during encoding. This network captures the unique probability distribution of that specific image. Because it only needs to model one image rather than a million, the network can remain extremely compact.
The FNLIC architecture showing the interaction between pre-fitted and overfitted components.

To integrate these two phases, FNLIC employs an Adaptive Prior Transformation. This involves a "scale map" that allows the overfitted model to dynamically decide how much to rely on the pre-fitted general prior for different regions of the image, ensuring optimal bit allocation.

Experiments and Results

FNLIC was evaluated across standard natural image benchmarks (Kodak, CLIC2024, DIV2K) and Out-of-Domain (OOD) scenarios, including medical histology (Histo24), remote sensing (LoveDA24), and historical documents (Doc24).

Performance and Speed

FNLIC demonstrates exceptional decoding efficiency, achieving 13ms decoding on a GPU for Kodak images—roughly 45x faster than comparable neural codecs like LC-FDNet. In terms of compression ratio, FNLIC achieved a bitrate of 2.88 Bits Per Dimension (BPD) on the Kodak dataset, outperforming WebP (3.18 BPD) and PNG (4.50 BPD), and matching the performance of JPEG-XL.

Robustness and Generalization

One of the primary strengths of the overfitting approach is its inherent adaptability. While traditional neural models often struggle with data types not seen during training, FNLIC naturally adapts to any domain. On the Doc24 dataset, FNLIC achieved 2.22 BPD, significantly outperforming both JPEG-XL (2.30 BPD) and other specialized neural methods.

Visual breakdown of bitrates across different components and scales in FNLIC.

Discussion and Limitations

The primary trade-off in the FNLIC framework is encoding time. Because the model must be optimized for every new image, the encoding process takes approximately 44 seconds per 1,000 iterations. This makes the current implementation unsuitable for real-time applications like live video. However, it is highly effective for "encode once, decode many" scenarios, such as image hosting, digital archives, and medical data storage.

Conclusion

FNLIC provides a practical path forward for neural lossless compression by leveraging image-specific specialization. By using a "weak" model to achieve "strong" results through overfitting, it breaks the complexity trap of traditional neural architectures. Future work will focus on accelerating the encoding optimization and refining the compression of the overfitted network parameters to further reduce file headers.

Summary updated

BibTeX
@inproceedings{zhang2025fitted,
  author = {Zhe Zhang and Zhenzhong Chen and Shan Liu},
  title = {{Fitted Neural Lossless Image Compression}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02165},
}
Figure