Understanding Entropy Coding With Asymmetric Numeral Systems (ANS): a Statistician's Perspective
Not on the map. Why?
Abstract (arXiv)
Entropy coding is the backbone data compression. Novel machine-learning based compression methods often use a new entropy coder called Asymmetric Numeral Systems (ANS) [Duda et al., 2015], which provides very close to optimal bitrates and simplifies [Townsend et al., 2019] advanced compression techniques such as bits-back coding. However, researchers with a background in machine learning often struggle to understand how ANS works, which prevents them from exploiting its full versatility. This paper is meant as an educational resource to make ANS more approachable by presenting it from a new perspective of latent variable models and the so-called bits-back trick. We guide the reader step by step to a complete implementation of ANS in the Python programming language, which we then generalize for more advanced use cases. We also present and empirically evaluate an open-source library of various entropy coders designed for both research and production use. Related teaching videos and problem sets are available online.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 10 of its 27 references that are in the map. First posted on arXiv 5 Jan 2022.
Builds on
10 of 27 references.
References · 10
- 2018Variational image compression with a scale hyperpriorcited by 910
- 2016End-to-end Optimized Image Compressioncited by 673
- 2018Joint Autoregressive and Hierarchical Priors for Learned Image Compressioncited by 642
- 2016Full Resolution Image Compression with Recurrent Neural Networkscited by 170
- 2019Practical Lossless Compression with Latent Variables using Bits Back Codingcited by 85
- 2020Improving Inference for Neural Image Compressioncited by 81
- 2017Dynamic Word Embeddingscited by 51
- 2019Bit-Swap: Recursive Bits-Back Coding for Lossless Compression with Hierarchical Latent Variablescited by 51
- 2020Hierarchical Autoregressive Modeling for Neural Video Compressioncited by 28
- 2021Insights from Generative Modeling for Neural Video Compressioncited by 9
Built on by
Citing papers per year: 2022: 1; 2023: 2; 2024: 3; 2025: 2; 2026: 2.
10 papers.
- 2022An Introduction to Neural Data Compressioncited by 78
- 2024Boosting Neural Representations for Videos with a Conditional Decodercited by 29
- 2025GSCodec Studio: A Modular Framework for Gaussian Splat Compressioncited by 9
- 2024PSC: Posterior Sampling-Based Compressioncited by 5
- 2023Lossy and Lossless (L2) Post-training Model Size Compressioncited by 4
- 2024An Efficient Implicit Neural Representation Image Codec Based on Mixed Autoregressive Model for Low-Complexity Decodingcited by 2
- 2026Transforming harmonic coefficients for 3D splat compressioncited by 1
- 2023Implicit Neural Multiple Description for DNA-based data storagecited by 0
- 2025Reducing Storage of Pretrained Neural Networks by Rate-Constrained Quantization and Entropy Codingcited by 0
- 2026PaaF: Raising the perceived quality of INR-Based Image Compressioncited by 0
- 2026Transforming harmonic coefficients for 3D splat compression14 Sep 2026
- 2026PaaF: Raising the perceived quality of INR-Based Image Compression19 Jun 2026
- 2025GSCodec Studio: A Modular Framework for Gaussian Splat Compression2 Jun 2025
- 2025Reducing Storage of Pretrained Neural Networks by Rate-Constrained Quantization and Entropy Coding24 May 2025
- 2024PSC: Posterior Sampling-Based Compression13 Jul 2024
- 2024Boosting Neural Representations for Videos with a Conditional Decoder28 Feb 2024
- 2024An Efficient Implicit Neural Representation Image Codec Based on Mixed Autoregressive Model for Low-Complexity Decoding23 Jan 2024
- 2023Implicit Neural Multiple Description for DNA-based data storage13 Sep 2023
- 2023Lossy and Lossless (L2) Post-training Model Size Compression8 Aug 2023
- 2022An Introduction to Neural Data Compression14 Feb 2022