TL;DR
This paper introduces "generative compression," a novel approach that uses deep generative models to compress images and videos. By learning the underlying data distribution, generative compression achieves significantly higher compression ratios and more graceful degradation under error conditions compared to traditional methods.
What Problem Does This Paper Address?
Traditional image and video compression algorithms, like JPEG and MPEG, rely on fixed, hand-crafted encoder-decoder pairs (codecs). These codecs are "agnostic" to the data they compress, meaning they don't adapt to the specific characteristics of the images or videos. This leads to limitations:
- Lack of Adaptability: They can't learn and exploit the unique statistical properties of different types of visual data.
- Suboptimal Performance at High Compression: As compression ratios increase, traditional methods often result in visually unappealing artifacts and a rapid decline in quality.
- Poor Robustness to Errors: Transmission errors (e.g., in wireless channels) can severely corrupt the compressed data, leading to unacceptable distortions.
The authors propose generative compression as a solution, aiming to overcome these limitations by leveraging the power of deep generative models to learn and represent the data's underlying structure.
Methods
The core of the proposed method, termed "NCode," is a VAE-like architecture with a twist. Instead of directly optimizing for pixel-level accuracy, NCode focuses on generating perceptually plausible reconstructions. The key components are:
- Learned Encoder/Decoder: Artificial neural networks replace traditional hand-crafted transforms. An encoder maps input data ($x$) to a latent code ($z$), and a decoder ($g$) reconstructs the data from the latent code ($\hat{x} = g(z)$).
- Adversarial Pre-training of Decoder: The decoder ($g$) is first pre-trained using a Generative Adversarial Network (GAN) approach. This involves training a discriminator network ($d$) to distinguish between real images and those generated by $g$. This encourages $g$ to produce realistic-looking samples.
- Perceptual Distortion Loss: The encoder is then trained to minimize a distortion loss that combines:
- Pixel-level loss: Standard L2 loss between the original and reconstructed image.
- Perceptual loss: A loss based on the difference in feature maps from a pre-trained deep convolutional neural network (specifically, the 4th layer of an ImageNet-pretrained AlexNet). This captures textural and semantic information, leading to more visually pleasing reconstructions.
- Latent Space Interpolation (for Video): For video compression, the method leverages the learned latent space. Instead of transmitting every frame, only a subset of frames are encoded, and the intermediate frames are generated by interpolating their latent representations. This exploits temporal correlations.
- Entropy Coding: For video, further compression is achieved by applying Huffman coding to the differences between consecutive latent vectors.
Datasets
The paper uses several datasets for training and evaluation:
- Training: CelebA, UT Zappos50K, MIT Places (all 64x64 images).
- Evaluation: CIFAR-10 (for perceptual validation and robustness testing), KTH actions dataset (for video compression).
- Comparison: The authors also refer to standard benchmarks like the Kodak PhotoCD dataset for context, though their chosen datasets are better suited for current GAN training.
Key Insights and Ideas
- Generative Models for Compression: The fundamental idea is that by learning the distribution of natural images/videos, a generative model can represent complex visual data with far fewer bits than traditional methods that treat pixels independently.
- Perceptual Quality over Pixel Accuracy: Optimizing for pixel-level metrics (like MSE) leads to blurry reconstructions. Using perceptual losses, derived from features of pre-trained networks, is crucial for generating visually appealing results.
- Graceful Degradation: Generative compression exhibits "graceful degradation." Instead of sudden, catastrophic failure under high compression or bit errors, the reconstructions degrade more smoothly, remaining recognizable.
- Robustness to Noise: The latent space representation is more robust to bit errors than traditional variable-length codes. A small number of errors in the latent code leads to a much smaller degradation in the reconstructed image compared to traditional codecs.
- Latent Space Interpolation for Video: Exploiting temporal correlations by interpolating in the learned latent space offers significant compression gains for video, going beyond simple frame-by-frame compression.
Key Results
- High Compression Ratios: NCode achieved compression ratios orders of magnitude higher than JPEG2000 and JPEG, particularly for smaller images (e.g., 708x compression for NCode(25, 2) on CelebA).
- Improved Perceptual Quality: Even at high compression levels, NCode reconstructions were visually sharper and had fewer artifacts than traditional methods. This was validated using a ConvNet classifier on CIFAR-10, showing better classification accuracy for NCode-compressed images.
- Robustness to Bit Errors: PSNR degraded by only ~1dB even at bit error rates of $\epsilon = 10^{-2}$, whereas traditional codecs can degrade by over 7dB at $\epsilon = 10^{-4}$.
- Video Compression Gains: MCode (video compression) achieved higher quality at comparable compression levels to MPEG4 (H.264) and offered order-of-magnitude bitrate reductions when using latent space interpolation and entropy coding.
Limitations and Future Work
- Scalability to Large Images: While promising for smaller images (64x64), extending generative compression to larger images (like ImageNet) faces challenges inherent to current generative modeling techniques (e.g., GAN training instabilities). The authors believe the latent vector size should grow sub-linearly with image size, suggesting potential for future improvements.
- Computational Cost: Training deep generative models is computationally intensive.
- Future Directions:
- Developing more stable and scalable generative models for larger images.
- Exploring different generative architectures beyond DCGAN.
- Creating synchronized collections of cached manifolds for common objects/scenes to avoid transmitting network weights, similar to how JPEG is used today.
- Personalizing compression by learning user-specific manifolds (e.g., for faces or rooms in video calls).
Summary updated