Compress Then Test: Powerful Kernel Testing in Near-linear Time

Carles Domingo-Enrich, Raaz Dwivedi, Lester Mackey
1/14/2023
stat.MLcs.LGmath.ST

No official code found. Best implementation: microsoft/goodpoints (64 stars, MIT, last commit 2026-03-02).

Abstract

Kernel two-sample testing provides a powerful framework for distinguishing any pair of distributions based on $n$ sample points. However, existing kernel tests either run in $n^2$ time or sacrifice undue power to improve runtime. To address these shortcomings, we introduce Compress Then Test (CTT), a new framework for high-powered kernel testing based on sample compression. CTT cheaply approximates an expensive test by compressing each $n$ point sample into a small but provably high-fidelity coreset. For standard kernels and subexponential distributions, CTT inherits the statistical behavior of a quadratic-time test -- recovering the same optimal detection boundary -- while running in near-linear time. We couple these advances with cheaper permutation testing, justified by new power analyses; improved time-vs.-quality guarantees for low-rank approximation; and a fast aggregation procedure for identifying especially discriminating kernels. In our experiments with real and simulated data, CTT and its extensions provide 20--200x speed-ups over state-of-the-art approximate MMD tests with no loss of power.

View on arXivView PDF

Code Implementations(1)

MIT

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

647Shell, CythonNov 3, 20217 months agoMIT

Similar Papers

Cite this paper

@article{domingoenrich2023compress,
  title  = {Compress Then Test: Powerful Kernel Testing in Near-linear Time},
  author = {Carles Domingo-Enrich and Raaz Dwivedi and Lester Mackey},
  year   = {2023},
  eprint = {2301.05974},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2301.05974v3}
}

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

Discussion