[Paper Review] Fast Relative Entropy Coding with A* coding
This paper introduces AS* and AD* coding, A*-based relative entropy coding (REC) algorithms that achieve $ϵ(D_{\infty}[Q\|P])$ expected runtime for continuous distributions with unimodal density ratios, while maintaining $ϵ(D_{\mathrm{KL}}[Q\|P])$ expected codelength. The method enables efficient, differentiable compression in VAEs via the proposed IsoKL VAE (IKVAE), achieving near-optimal compression on MNIST without quantization.
Relative entropy coding (REC) algorithms encode a sample from a target distribution $Q$ using a proposal distribution $P$, such that the expected codelength is $\mathcal{O}(D_{KL}[Q \,||\, P])$. REC can be seamlessly integrated with existing learned compression models since, unlike entropy coding, it does not assume discrete $Q$ or $P$, and does not require quantisation. However, general REC algorithms require an intractable $Ω(e^{D_{KL}[Q \,||\, P]})$ runtime. We introduce AS* and AD* coding, two REC algorithms based on A* sampling. We prove that, for continuous distributions over $\mathbb{R}$, if the density ratio is unimodal, AS* has $\mathcal{O}(D_{\infty}[Q \,||\, P])$ expected runtime, where $D_{\infty}[Q \,||\, P]$ is the Rényi $\infty$-divergence. We provide experimental evidence that AD* also has $\mathcal{O}(D_{\infty}[Q \,||\, P])$ expected runtime. We prove that AS* and AD* achieve an expected codelength of $\mathcal{O}(D_{KL}[Q \,||\, P])$. Further, we introduce DAD*, an approximate algorithm based on AD* which retains its favourable runtime and has bias similar to that of alternative methods. Focusing on VAEs, we propose the IsoKL VAE (IKVAE), which can be used with DAD* to further improve compression efficiency. We evaluate A* coding with (IK)VAEs on MNIST, showing that it can losslessly compress images near the theoretically optimal limit.
Motivation & Objective
- Address the high runtime of general relative entropy coding (REC) algorithms, which scale exponentially with KL divergence.
- Overcome the quantization mismatch in learned compression models that arises from training with continuous approximations and inference with discrete quantization.
- Develop REC algorithms with provably fast runtime and low codelength for continuous distributions, particularly applicable to variational autoencoders (VAEs).
- Reduce the codelength overhead from encoding variable-length codes by introducing block-based coding with fixed codelengths.
- Propose the IsoKL VAE (IKVAE) to parameterize latent distributions via KL and Rényi ∞-divergence, enabling efficient block coding with DAD*.
Proposed method
- Introduce AS* and AD* coding, REC algorithms based on A* sampling to efficiently sample from a proposal distribution P to encode samples from target distribution Q.
- Prove that AS* has $ϵ(D_{\infty}[Q\|P])$ expected runtime under the unimodal density ratio assumption, where $D_{\infty}[Q\|P]$ is the Rényi ∞-divergence.
- Design DAD*, an approximate variant of AD* that fixes the codelength per block, reducing overhead while maintaining low bias and fast runtime.
- Propose the IsoKL VAE (IKVAE), which parameterizes latent distributions using $D_{\mathrm{KL}}[Q\|P]$ and $D_{\infty}[Q\|P]$ instead of mean and variance, enabling tied codelengths across blocks.
- Implement parameterization via unconstrained reparameterization using exponential and hyperbolic tangent transforms to ensure constraints on mean and variance are satisfied.
- Use the Lambert W function to solve for variance in Gaussian parameterization, with a Pade approximant for numerical stability and efficiency in practice.
Experimental results
Research questions
- RQ1Can A*-based sampling be used to design REC algorithms with provably fast runtime for continuous distributions?
- RQ2Does the unimodal density ratio assumption enable a runtime bound of $ϵ(D_{\infty}[Q\|P])$ for AS*?
- RQ3Can AD* achieve similar runtime scaling to AS* despite lacking a formal proof?
- RQ4Can approximate REC with fixed codelengths reduce the codelength overhead in block-based coding without increasing bias?
- RQ5Can parameterizing VAE latent distributions via $D_{\mathrm{KL}}[Q\|P]$ and $D_{\infty}[Q\|P]$ enable efficient, low-overhead compression with DAD*?
Key findings
- AS* achieves $ϵ(D_{\mathrm{KL}}[Q\|P])$ expected codelength with $ϵ(D_{\infty}[Q\|P])$ expected runtime under unimodal density ratio assumption.
- AD* also exhibits $ϵ(D_{\infty}[Q\|P])$ expected runtime based on extensive experimental evidence, though no formal proof is provided.
- DAD*, the approximate variant of AD*, retains the fast runtime of AD* while reducing codelength overhead by coding blocks with fixed codelengths.
- The IsoKL VAE (IKVAE) enables efficient block coding by parameterizing latent distributions via $D_{\mathrm{KL}}[Q\|P]$ and $D_{\infty}[Q\|P]$, reducing per-variable codelength cost.
- On MNIST, the combination of DAD* and IKVAE achieves lossless compression near the theoretical optimal limit, demonstrating practical efficiency.
- The use of Lambert W function with Pade approximant enables numerically stable and efficient variance computation in Gaussian parameterization.
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.