Relative Entropy Coding (REC) is a powerful alternative to standard quantization for neural data compression. However, its computational expense has historically limited its practical application. This paper introduces a novel space-partitioning framework that acts as a heuristic guide during the encoding search process. By intelligently dividing the search space, this method allows REC to handle latent blocks three times larger than previous methods while reducing bitrates by 5–15% in practical compression tasks.
The Bottleneck of Standard REC
Neural compression frequently requires converting continuous latent variables—often generated by a neural network—into discrete bits. While quantization is the standard approach, its non-differentiable nature can lead to sub-optimal performance. Relative Entropy Coding (REC) offers an elegant, mathematically sound alternative: instead of quantizing, the sender transmits a random sample from a target distribution $Q$ (the posterior) using a shared prior $P$.
The primary drawback of REC is its computational cost. Standard REC algorithms, such as Poisson Functional Representation (PFR), have an encoding time that scales exponentially with the Kullback-Leibler (KL) divergence: $O(2^{D_{KL}[Q||P]})$. To keep runtimes manageable, researchers typically split data into tiny, independent blocks. Unfortunately, these small blocks carry a heavy "overhead" cost in terms of bitrate, leading to sub-optimal compression overall. The authors of this paper aim to break this exponential bottleneck, enabling the use of larger blocks for better coding efficiency.
Proposed Solution: Space Partitioning
The core innovation of this work is a Space Partitioning scheme that transforms REC's traditionally blind search into a guided, heuristic-driven one.
The framework operates through four main steps:
- Partitioning: The sender and receiver agree on a method to divide the support of the prior $P$ into $J$ distinct bins, typically using axis-aligned grids.
- Search Heuristic: Based on the target distribution $Q$, the sender selects a categorical distribution $\pi$ over these bins. This acts as a heuristic, indicating which regions of the space are most likely to contain a "good" sample.
- Two-Part Coding: Instead of searching the entire space simultaneously, the sender first samples a bin index from $\pi$. It then samples from the prior restricted exclusively to that specific bin.
- Dimension-wise Allocation: For high-dimensional vectors, the authors propose a clever allocation strategy. They utilize dimension-wise mutual information to determine which axes require more "splits," ensuring the search is focused precisely where the data is most concentrated.
The authors successfully adapt two primary REC algorithms into this framework: PFR (for exact sampling) and Ordered Random Coding (ORC) (for faster, approximate sampling).
Key Insights and Theoretical Guarantees
- The "Search Heuristic" Perspective: The authors demonstrate that space partitioning is mathematically equivalent to running standard REC with an "adjusted prior" that is better aligned with the target distribution. This equivalence proves that the method remains theoretically sound.
- Overhead is a Bargain: Transmitting a "two-part code" (the bin index followed by the local index) introduces a small theoretical overhead ($\epsilon$). However, the authors prove that for common distributions like Gaussians and Uniforms, this cost is negligible compared to the massive gains in search efficiency.
- Breaking the Block Limit: By drastically reducing the search space, the proposed method can handle blocks with a KL divergence of approximately 48 bits. For context, previous practical implementations were often strictly limited to ~16 bits to prevent encoding times from spiraling out of control.
Experimental Results
The authors validated their approach across three distinct setups, yielding impressive results:
- Massive Speedups on Toy Tasks: On synthetic 5D Gaussian distributions, the space-partitioning method reduced runtime by up to three orders of magnitude compared to standard PFR.
- Lossless Compression (MNIST): In VAE-based lossless compression, where the model must perfectly reconstruct handwritten digits, the method achieved a 5–15% reduction in bitrate compared to previous REC techniques.
- Lossy Compression (CIFAR-10): Used for lossy compression via Implicit Neural Representations (INRs) with the RECOMBINER architecture, the method outperformed the state-of-the-art by roughly 10–15% in rate-distortion performance. Notably, using 48-bit blocks, the results landed within 2% of the theoretical rate-distortion limit.
Limitations and Future Work
While highly effective, the current implementation relies primarily on axis-aligned grids. This geometry may not be the most efficient way to partition spaces where dimensions are highly correlated. Furthermore, the method requires an estimate of mutual information per dimension, which can be difficult to obtain for certain non-standard model architectures.
Future research directions include exploring "soft" partitions without hard boundaries and investigating how this approach could be applied to non-factorized distributions or one-shot REC tasks where the sender and receiver share less prior information. Ultimately, space partitioning represents a significant leap forward in making Relative Entropy Coding a practical tool for modern neural compression.
Summary updated