Understanding Entropy Coding With Asymmetric Numeral Systems (ANS): a Statistician's Perspective

Robert Bamler
1/5/2022
20 citations
stat.MLcs.ITcs.LG

Official code: bamler-lab/understanding-ans (9 stars, Python, BSL-1.0, last commit 2024-08-19).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

BSL-1.0

Code examples and benchmarks from the paper "Understanding Entropy Coding With Asymmetric Numeral Systems (ANS): a Statistician's Perspective"

92Python, Jupyter NotebookJan 5, 20222 years agoBSL-1.0

Similar Papers

Cite this paper

@article{bamler2022understanding,
  title  = {Understanding Entropy Coding With Asymmetric Numeral Systems (ANS): a Statistician's Perspective},
  author = {Robert Bamler},
  year   = {2022},
  eprint = {2201.01741},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.01741}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2201.01741.svg)](https://codeofpaper.com/paper/2201.01741)

Discussion