Sequential Predictive Two-Sample and Independence Testing
Aleksandr Podkopaev, Aaditya Ramdas
Abstract
We study the problems of sequential nonparametric two-sample and independence testing. Sequential tests process data online and allow using observed data to decide whether to stop and reject the null hypothesis or to collect more data, while maintaining type I error control. We build upon the principle of (nonparametric) testing by betting, where a gambler places bets on future observations and their wealth measures evidence against the null hypothesis. While recently developed kernel-based betting strategies often work well on simple distributions, selecting a suitable kernel for high-dimensional or structured data, such as images, is often nontrivial. To address this drawback, we design prediction-based betting strategies that rely on the following fact: if a sequentially updated predictor starts to consistently determine (a) which distribution an instance is drawn from, or (b) whether an instance is drawn from the joint distribution or the product of the marginal distributions (the latter produced by external randomization), it provides evidence against the two-sample or independence nulls respectively. We empirically demonstrate the superiority of our tests over kernel-based approaches under structured settings. Our tests can be applied beyond the case of independent and identically distributed data, remaining valid and powerful even when the data distribution drifts over time.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers12
- Protected Test-Time Adaptation via Online Entropy Matching: A Betting ApproachYarin Bar, Shalev Shaer, Yaniv RomanoNeurIPS 2024 · 27 citations
- Active, anytime-valid risk controlling prediction setsZiyu Xu, Nikos Karampatziakis, Paul MineiroNeurIPS 2024 · 19 citations
- Efficiently Learning Significant Fourier Feature Pairs for Statistical Independence TestingYixin Ren, Yewei Xia, Hao Zhang, Jihong Guan et al.NeurIPS 2024 · 4 citations
- Anytime Detection of Strategic Deviations in Multi-Agent SystemsEtienne Gauthier, Francis Bach, Michael JordanICML 2026 · 2 citations
- Testing For Distribution Shifts with Conditional Conformal Test MartingalesShalev Shaer, Yarin Bar, Drew Prinster, Yaniv RomanoICML 2026 · 1 citation
Builds on3
- Learning Deep Kernels for Non-Parametric Two-Sample TestsFeng Liu, Wenkai Xu, Jie Lu, Guangquan Zhang et al.ICML 2020 · 213 citations
- AutoML Two-Sample TestJonas M. Kübler, Vincent Stimper, Simon Buchholz, Krikamol Muandet et al.NeurIPS 2022 · 29 citations
- Sequential Kernelized Independence TestingAleksandr Podkopaev, Patrick Blöbaum, Shiva Prasad Kasiviswanathan, Aaditya RamdasICML 2023 · 25 citations
Related papers
- Sequential Kernel Goodness-of-fit TestingZhengyu Zhou, Weiwei LiuICML 2024 · 1 citation
- Semi-Supervised Hypothesis Testing by Betting on PredictionsYaniv Tenzer, Elad Tolochinksy, Yaniv RomanoICML 2026
- Peeking with PEAK: Sequential, Nonparametric Composite Hypothesis Tests for Means of Multiple Data StreamsBrian Cho, Kyra Gan, Nathan KallusICML 2024 · 14 citations
- Sequential Kernel-based Conditional Independence Testing via Adaptive BettingZheng He, Danica J SutherlandICML 2026
- Optimal Online Change Detection via Random Fourier FeaturesFlorian Kalinke, Shakeel Gavioli-AkilagunNeurIPS 2025 · 2 citations
