Abstract
Lossy data compression has traditionally relied on quantization, a process that maps continuous data to a discrete set of points. While effective, quantization introduces non-differentiability and "averaging" artifacts, particularly at low bitrates. This paper presents a comprehensive framework for Relative Entropy Coding (REC), which treats compression as a sampling problem. By leveraging Poisson point processes and branch-and-bound search, we develop the first optimally fast REC algorithms. We further introduce COMBINER, an architecture based on Bayesian Implicit Neural Representations that applies REC to stochastic network weights. Our results demonstrate that REC can outperform traditional quantization-based neural compression across various modalities, including images, audio, video, and scientific data, while maintaining statistical realism.
Introduction
The standard approach to lossy compression—rounding continuous values to a fixed set of discrete points—has two major drawbacks in the context of modern machine learning. First, the rounding operation is non-differentiable, which prevents the use of standard gradient-based optimization during end-to-end training. Researchers often resort to "straight-through estimators" or other approximations, which can lead to sub-optimal models. Second, quantization-based schemes optimized for Mean Squared Error (MSE) tend to produce blurry, "average" results at low bitrates, failing to capture the sharp details and textures characteristic of "real" data.
This research investigates Relative Entropy Coding (REC) as a solution to these challenges. Instead of rounding, REC frames compression as the task of communicating a specific random sample from a distribution. By using shared randomness (a common pseudo-random number generator seed), the encoder and decoder can agree on a sample that represents the data. This approach is naturally differentiable and, because it samples from the true distribution rather than rounding to a mean, it maintains the "realism" of the data even when the bitrate is near zero.
Theoretical Foundations and Algorithms
The development of a practical REC framework requires addressing theoretical limits and computational bottlenecks.
Channel Simulation Divergence
Classical information theory often uses mutual information as a metric for compression limits. However, we introduce Channel Simulation Divergence ($D_{CS}$), a new statistical distance that provides a tighter lower bound on the number of bits required for REC. This metric accounts for the specific constraints of sampling-based communication, providing a more accurate target for algorithm design.
Poisson Process Algorithms
We utilize the theory of Poisson point processes to design general-purpose sampling algorithms. The core concept is "sampling-as-search": the encoder treats the act of picking a representative sample as a search over an infinite, random collection of points. To make this practical, we developed Branch-and-Bound variants of A sampling and Greedy Poisson Rejection Sampling (GPRS). These algorithms exploit the unimodal structure of common distributions to achieve exponential speedups over naive sampling methods. GPRS, in particular, is the first optimally fast* REC algorithm, reaching the theoretical speed limit defined by the mutual information $O(I[x;y])$.
The COMBINER Architecture
To apply REC to diverse data types, we introduce COMBINER, which utilizes Bayesian Implicit Neural Representations (INRs). In this framework, data is not stored as a grid of pixels or samples. Instead, a small neural network is trained to represent the data (e.g., mapping coordinates to color). The weights of this network are treated as stochastic variables.
By using REC to compress these stochastic weights, we shift the focus from "compressing data" to "compressing the model that describes the data." This approach is inherently agnostic to the data modality; the same underlying network architecture and REC algorithm can be used to compress an image, a song, or the 3D structure of a protein.
Experimental Evaluation
The proposed RECOMBINER framework was tested across multiple domains:
- Image Compression: On the CIFAR-10 dataset, RECOMBINER achieved a PSNR improvement of up to 3.43 dB over previous INR-based methods like COIN++. On high-resolution Kodak images, the method proved competitive with state-of-the-art codecs like VTM (Versatile Video Coding) and BPG, especially in the low-bitrate regime where visual realism is paramount.
- Scientific Data: A novel application involved compressing the 3D coordinates of $C\alpha$ atoms in protein fragments. RECOMBINER performed competitively with highly specialized, domain-specific protein codecs. Crucially, it allowed for a continuous rate-distortion tradeoff, a feature often missing in specialized tools.
- Efficiency: While the encoding process is slow—requiring thousands of gradient descent steps to optimize the INR—the decoding process is extremely fast. A CIFAR-10 image can be reconstructed in 2–4 milliseconds on a modern GPU, making it suitable for real-time applications once the model is encoded.
Discussion and Limitations
REC demonstrates that "adding noise" is a mathematically rigorous and differentiable alternative to rounding. This allows compression to be integrated more seamlessly into end-to-end deep learning pipelines. However, several practical challenges remain. The primary bottleneck is encoding time, which can take up to 80 minutes for high-resolution images. Additionally, REC relies heavily on "common randomness"; any loss of synchronization between the encoder and decoder leads to catastrophic failure. Finally, the use of patching for high-resolution images can introduce visible artifacts at patch boundaries.
Future work will focus on Dithered Quantization as a potential path toward faster multivariate REC and the exploration of Markov Chain Monte Carlo (MCMC) methods to further bridge the gap between sampling efficiency and coding performance.
Summary updated