Distribution Compression in Near-linear Time

Abhishek Shetty, Raaz Dwivedi, Lester Mackey
11/15/2021
stat.MLcs.DScs.LG

Official code: microsoft/goodpoints (65 stars, Python, MIT, last commit 2026-03-02).

Abstract

In distribution compression, one aims to accurately summarize a probability distribution $\mathbb{P}$ using a small number of representative points. Near-optimal thinning procedures achieve this goal by sampling $n$ points from a Markov chain and identifying $\sqrt{n}$ points with $\widetilde{\mathcal{O}}(1/\sqrt{n})$ discrepancy to $\mathbb{P}$.

Show full abstract

Unfortunately, these algorithms suffer from quadratic or super-quadratic runtime in the sample size $n$. To address this deficiency, we introduce Compress++, a simple meta-procedure for speeding up any thinning algorithm while suffering at most a factor of $4$ in error. When combined with the quadratic-time kernel halving and kernel thinning algorithms of Dwivedi and Mackey (2021), Compress++ delivers $\sqrt{n}$ points with $\mathcal{O}(\sqrt{\log n/n})$ integration error and better-than-Monte-Carlo maximum mean discrepancy in $\mathcal{O}(n \log^3 n)$ time and $\mathcal{O}( \sqrt{n} \log^2 n )$ space. Moreover, Compress++ enjoys the same near-linear runtime given any quadratic-time input and reduces the runtime of super-quadratic algorithms by a square-root factor. In our benchmarks with high-dimensional Monte Carlo samples and Markov chains targeting challenging differential equation posteriors, Compress++ matches or nearly matches the accuracy of its input algorithm in orders of magnitude less time.

View on arXivView PDF

Code Implementations(1)

MIT

A Python package for generating concise, high-quality summaries of a probability distribution

658Python, CythonNov 3, 20219 months agoMIT

Similar Papers

Cite this paper

@article{shetty2021distribution,
  title  = {Distribution Compression in Near-linear Time},
  author = {Abhishek Shetty and Raaz Dwivedi and Lester Mackey},
  year   = {2021},
  eprint = {2111.07941},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2111.07941}
}

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/2111.07941.svg)](https://codeofpaper.com/paper/2111.07941)

Discussion