Adaptive Two-Sample Testing via Dependence-Aware Witness Aggregation
Abstract
Two-sample testing is a fundamental problem in statistics and machine learning. Existing tests are typically powerful only against particular classes of alternatives. Since the underlying discrepancy is unknown in practice, relying on a single test can lead to substantial power loss. We introduce an adaptive two-sample testing framework that combines complementary procedures through a unified witness-function perspective. Our key observation is that many seemingly heterogeneous tests can be represented by witness functions whose expectation differences reveal discrepancies between two distributions. This representation enables their signals to be aggregated within a common framework. To handle the dependence among witness statistics evaluated on the same data, we develop a dependence-aware aggregation procedure. We establish asymptotic Type-I error control and show that the proposed test is consistent whenever at least one constituent witness carries sufficiently strong signal. Extensive experiments across diverse distributional shifts demonstrate that our method consistently delivers competitive or superior power across regimes while maintaining valid Type-I error control.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.