[Paper Review] HiLLoC: Lossless Image Compression with Hierarchical Latent Variable Models
HiLLoC proposes a novel lossless image compression method using hierarchical latent variable models and Bits-Back with Asymmetric Numeral Systems (BB-ANS), enabling fully convolutional VAEs trained on small 32×32 ImageNet images to generalize to large-scale color photographs without architectural changes. It achieves state-of-the-art compression rates on full-size ImageNet images, approaching the model's variational free energy (ELBO), with a 300x speedup via vectorized ANS implementation.
We make the following striking observation: fully convolutional VAE models trained on 32x32 ImageNet can generalize well, not just to 64x64 but also to far larger photographs, with no changes to the model. We use this property, applying fully convolutional models to lossless compression, demonstrating a method to scale the VAE-based 'Bits-Back with ANS' algorithm for lossless compression to large color photographs, and achieving state of the art for compression of full size ImageNet images. We release Craystack, an open source library for convenient prototyping of lossless compression using probabilistic models, along with full implementations of all of our compression results.
Motivation & Objective
- To extend BB-ANS compression to large, arbitrary-sized color images using hierarchical latent variable models.
- To enable fully convolutional VAEs trained on small images (32×32) to generalize effectively to large-scale photographs (e.g., 500×374) without retraining or architectural changes.
- To develop a scalable, efficient, and open-source framework for lossless compression using probabilistic models and ANS.
- To achieve compression rates close to the theoretical lower bound (ELBO) on real-world datasets like ImageNet.
Proposed method
- Utilizes a fully convolutional VAE architecture that generalizes across image sizes, enabling direct compression of arbitrary-resolution images without retraining.
- Employs a vectorized implementation of asymmetric numeral systems (ANS) that supports dynamic tensor shapes and enables massive speedups via SIMD parallelism.
- Introduces dynamic discretization to avoid the need for fixed, calibrated discretization schemes, improving adaptability to diverse image distributions.
- Uses a different codec (e.g., FLIF) to initialize the bits-back chain, improving stability and compression efficiency.
- Applies the BB-ANS algorithm to hierarchical VAEs, allowing for lossless compression with entropy coding that matches the model’s variational free energy.
- Releases Craystack, an open-source Python library for prototyping lossless compression with probabilistic models and ANS.
Experimental results
Research questions
- RQ1Can fully convolutional VAEs trained on small images (32×32) generalize effectively to compress large, high-resolution color photographs (e.g., 500×374) without architectural modification?
- RQ2To what extent can the BB-ANS algorithm be scaled to hierarchical latent variable models for lossless image compression on large-scale datasets like ImageNet?
- RQ3How does vectorization of ANS operations impact the runtime and efficiency of lossless compression for large images?
- RQ4Can dynamic discretization outperform static discretization in maintaining compression efficiency across diverse image distributions?
- RQ5What is the achievable compression rate of HiLLoC relative to the model’s ELBO and state-of-the-art codecs on full-size ImageNet images?
Key findings
- HiLLoC achieves compression rates on ImageNet test images that are within 1% of the model’s variational free energy (ELBO), outperforming all benchmarked codecs.
- The vectorized ANS implementation achieves a nearly three orders of magnitude speedup (300x) compared to serial implementations, reducing compression time for a 500×374 image to ~29 seconds on a desktop with 6 CPU cores and a GTX 1060 GPU.
- Fully convolutional VAEs trained on 32×32 ImageNet images generalize well to 64×64 and larger images, maintaining high compression performance without fine-tuning.
- The method successfully scales BB-ANS to hierarchical models and arbitrary image sizes, demonstrating robustness across diverse image resolutions and content.
- Dynamic discretization eliminates the need for static calibration, improving model adaptability and maintaining high compression efficiency.
- The open-source Craystack library enables rapid prototyping of lossless compression pipelines using probabilistic models and ANS, with full implementations of all results released.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.