Unicorn: Unified Neural Image Compression with One Number Reconstruction

Qi Zheng, Haozhi Wang, Zihao Liu, Jiaming Liu, Peiye Liu, Zhijian Hao, Yanheng Lu, Dimin Niu, Jinjia Zhou, Minge Jing, Yibo Fan

TL;DR

Unicorn introduces a novel image compression paradigm that conceptualizes a collection of images as unique index-image pairs, learning their distribution within a single neural network decoder. Once this unified decoder is shared, any image in the set can be reconstructed using just a single index number and random noise, yielding massive bitrate savings that actually improve as the dataset scales.

What Problem Does This Paper Address?

Existing lossy image compression frameworks generally fall into two camps: Explicit Image Compression (EIC) and Implicit Image Compression (IIC).

EIC includes traditional standards (like JPEG, HEVC, VVC) and end-to-end neural networks (like ELIC). These methods represent each image as an explicit bitstream. However, EIC is hitting a wall: squeezing out further bitrate reductions requires a massive, impractical increase in model complexity.

IIC, on the other hand, utilizes Implicit Neural Representations (INRs) to overfit a separate, dedicated neural network to every single image, mapping coordinates to pixel values. While this avoids long bitstreams, it completely ignores similarities between different images (inter-image redundancy), requires storing thousands of individual models, and often suffers from blurry, over-smoothed results.

Unicorn steps in to bridge this gap by creating a unified approach that eliminates inter-image redundancy while maintaining high-fidelity perceptual quality.

Figure 1: Bitrates comparison among EIC, IIC, and Unicorn when compressing 4000 images at the high perceptual qual- ity (LPIPS = 0.10 for EIC and Uncorn while 0.35 for IIC since it’s hard to approach satisfactory perceptual quality.

Methods

The core idea behind Unicorn (Unified Neural Image Compression with One Number Reconstruction) is to treat image compression as an image distribution sampling task.

  1. Bijective Mapping: Given a set of $M$ images, the authors assign each image a unique, random index from $1$ to $M$.
  2. Unified Decoder: They train a single, lightweight conditional neural network to learn the mapping from these indexes to their respective images.
  3. The Prototype (Laduree): As a proof of concept, the authors developed Laduree, a prototype based on Latent Diffusion Models (LDMs) and Diffusion Transformers (DiTs). Laduree takes a target index and random noise to progressively denoise and reconstruct the specific image via a shared VAE decoder.

To make this architecture highly efficient and compact, the authors explored several tailored design choices:

  • Index Conditioning via CAG: Instead of heavy standard conditioning mechanisms, they propose Cross-Attention with Gating (CAG), which inserts dimension-wise scaling parameters into residual connections, drastically reducing parameter overhead.
  • Index Embedding via GRF: They utilize Gaussian Random Frequency embedding (GRF), which scales linearly with hidden sizes rather than quadratically, keeping the model lightweight.
  • Latent Normalization: They scale the VAE latent space to a tighter normal distribution $N(0, 1/9)$, ensuring the data concentrates within a $[-1, 1]$ interval to stabilize diffusion training.
  • Model Quantization: Learnable parameters are quantized post-training from 32-bit to 14-bit floating-point representations without needing complex entropy coding.
Figure 2: Overall framework of the proposed paradigm Unicorn specified by the proposed prototype Laduree.
Figure 3: Design space explorations on various manners for index embedding and condition within Transformer-based denoising model, with parameters introduced by each manner compared in the right bottom.

Datasets

The authors evaluated their approach using subsets of the ImageNet training dataset, downsampled to $256 \times 256$ resolution:

  • CAT-4000: A dataset containing 4,000 images from various cat categories (highly similar semantics).
  • HYBRID-4000: A dataset containing 4,000 images sampled equally across 5 distinct cat categories (more diverse semantics).

To evaluate how the framework scales, both datasets were split into smaller subsets containing 1,000, 1,500, 2,000, and 3,000 images.

Key Insights and Ideas

  • Amortized Model Size: In traditional compression, total file size scales linearly with the number of images. In Unicorn, because the unified decoder is shared across the entire dataset, the per-image model overhead drops significantly as the dataset grows. The compression ratio actually escalates with scale.
  • Extreme Online Transmission Savings: If the unified decoder is shared offline with a receiver beforehand, the online cost to transmit an image drops to just $\log_2 M$ bits (the index number). For 4,000 images, this is less than 12 bits per image—a 99.97% bitrate reduction compared to traditional neural codecs.
  • Semantic Efficiency: The diffusion model inherently learns the underlying distribution of the image features. As a result, Unicorn becomes exceptionally efficient when compressing datasets with high semantic similarity (like a database of cat photos).

Key Results

  • Bitrate Reduction: On the CAT-4000 dataset, Laduree achieved a 21.73% bitrate saving over ELIC and a 17.87% saving over HiFiC at a high perceptual quality threshold (LPIPS = 0.10).
  • Visual Realism: Qualitative evaluations showed that Unicorn produces sharper, more visually pleasing textures and details at lower bitrates compared to both EIC standards and blurry IIC methods.

Limitations and Future Work

  • The Fidelity-Perception Trade-off: Because Unicorn relies on a generative diffusion process, it prioritizes realistic textures over exact pixel-matching. As a result, its PSNR (Peak Signal-to-Noise Ratio) is lower than traditional codecs like VVC or HEVC. It is not ideal for applications requiring mathematically lossless pixel fidelity.
  • Decoder Overhead for Small Sets: If you are only compressing a handful of images, the size of the unified decoder outweighs the bitrate savings of the index numbers. This paradigm is strictly optimized for large-scale image repositories.
  • Training Computation: Overfitting a diffusion model to act as a bijective index-to-image mapper for massive datasets requires significant training time and compute resources.
Figure 5: RD performance comparison in terms of PSNR.

Summary updated

Abstract

Prevalent lossy image compression schemes can be divided into: 1) explicit image compression (EIC), including traditional standards and neural end-to-end algorithms; 2) implicit image compression (IIC) based on implicit neural representations (INR). The former is encountering impasses of either leveling off bitrate reduction at a cost of tremendous complexity while the latter suffers from excessive smoothing quality as well as lengthy decoder models. In this paper, we propose an innovative paradigm, which we dub \textbf{Unicorn} (\textbf{U}nified \textbf{N}eural \textbf{I}mage \textbf{C}ompression with \textbf{O}ne \textbf{N}number \textbf{R}econstruction). By conceptualizing the images as index-image pairs and learning the inherent distribution of pairs in a subtle neural network model, Unicorn can reconstruct a visually pleasing image from a randomly generated noise with only one index number. The neural model serves as the unified decoder of images while the noises and indexes corresponds to explicit representations. As a proof of concept, we propose an effective and efficient prototype of Unicorn based on latent diffusion models with tailored model designs. Quantitive and qualitative experimental results demonstrate that our prototype achieves significant bitrates reduction compared with EIC and IIC algorithms. More impressively, benefitting from the unified decoder, our compression ratio escalates as the quantity of images increases. We envision that more advanced model designs will endow Unicorn with greater potential in image compression. We will release our codes in \url{https://github.com/uniqzheng/Unicorn-Laduree}.
BibTeX
@inproceedings{zheng2024unicorn,
  author = {Qi Zheng and Haozhi Wang and Zihao Liu and Jiaming Liu and Peiye Liu and Zhijian Hao and Yanheng Lu and Dimin Niu and Jinjia Zhou and Minge Jing and Yibo Fan},
  title = {{Unicorn: Unified Neural Image Compression with One Number Reconstruction}},
  booktitle = {ACM Multimedia},
  year = {2024},
}
Figure