Abstract
We propose the first practical learned lossless image compression system, L3C, and show that it outperforms the popular engineered codecs, PNG, WebP and JPEG 2000. At the core of our method is a fully parallelizable hierarchical probabilistic model for adaptive entropy coding which is optimized end-to-end for the compression task. In contrast to recent autoregressive discrete probabilistic models such as PixelCNN, our method i) models the image distribution jointly with learned auxiliary representations instead of exclusively modeling the image distribution in RGB space, and ii) only requires three forward-passes to predict all pixel probabilities instead of one for each pixel. As a result, L3C obtains over two orders of magnitude speedups when sampling compared to the fastest PixelCNN variant (Multiscale-PixelCNN). Furthermore, we find that learning the auxiliary representation is crucial and outperforms predefined auxiliary representations such as an RGB pyramid significantly.
Introduction
Lossless image compression is essential for applications where every bit of data matters, such as medical imaging or professional photography. While classical codecs like PNG, WebP, and JPEG2000 are fast, they rely on hand-engineered algorithms. Deep generative models like PixelCNN theoretically offer better compression by learning the underlying distribution of pixels. However, these models are "autoregressive," predicting pixels one by one. For high-resolution images, this requires millions of sequential forward passes, making decoding prohibitively slow. L3C (Learned Lossless Compression) addresses this by introducing a high-performing, fully parallelizable system suitable for real-world use.
Methods: Hierarchical Parallelizable Architecture
The core innovation of L3C is the move from pixel-by-pixel prediction to a hierarchical, parallelizable architecture. Instead of modeling pixels directly, the system learns a hierarchy of auxiliary feature representations ($z^{(1)}, z^{(2)}, z^{(3)}$).
To decode an image, the system only needs three parallel forward passes—one for each scale in the hierarchy. Because these are standard convolutions, they can be computed across all pixels simultaneously on a GPU. Unlike previous attempts using fixed hierarchies (like RGB pyramids), L3C learns the best auxiliary representations to minimize total bitrate, which the authors found improves performance by at least 12%. The system uses a discretized logistic mixture model to predict pixel probability distributions, which are then processed by an Adaptive Arithmetic Coder (AAC).
Key Results and Insights
L3C consistently outperforms classical codecs, beating PNG by approximately 40% across diverse datasets including Open Images, DIV2K, and RAISE-1k. It is only marginally outperformed by FLIF, a highly specialized hand-engineered codec.
The most significant advantage is speed. On a $320 \times 320$ image, L3C is over 50,000 times faster than PixelCNN++ and over 500 times faster than MS-PixelCNN. A $512 \times 512$ image can be processed in less than half a second on a GPU.
Sampling from the model's hierarchy reveals that the top levels (the most compressed bits) capture the global structure and colors of the image, while the lower levels fill in fine-grained texture and noise. This hierarchical capture of structure is a key factor in its efficiency.
Conclusion
L3C represents the first practical deep-learning-based system for lossless image compression. While it currently relies on GPUs for its speed advantage and assumes spatial independence within a single scale, it bridges the gap between the high compression ratios of neural models and the speed requirements of real-world applications. Future work may explore adding local dependencies to further improve compression without sacrificing parallelism.
Summary updated