NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Semi-Supervised Kernel Two-Sample Test

Gyumin Lee, Shubhanshu Shekhar, Ilmun Kim

TL;DR

This paper introduces a novel semi-supervised kernel two-sample test that effectively leverages abundant unlabeled covariate data to boost the power of statistical tests. By integrating covariate information, the proposed method achieves higher power than existing kernel tests, even in challenging scenarios with noisy or weakly informative covariates, while maintaining robust theoretical guarantees.

What Problem Does This Paper Address?

The core problem this paper tackles is improving the power of two-sample tests when dealing with scarce labeled data but abundant unlabeled covariate data. Traditional two-sample tests often ignore covariate information, which can significantly enhance performance. However, incorporating covariates can violate the exchangeability assumption under the null hypothesis, complicating standard calibration procedures. This paper aims to bridge this gap by developing a semi-supervised framework that effectively utilizes unlabeled covariates to boost statistical power without compromising theoretical validity.

Methods

The authors propose a general semi-supervised framework for two-sample testing. A key technique is cross-fitting, a data-splitting procedure used to estimate conditional expectations of a chosen witness function. This witness function, often derived from kernel methods like MMD, is crucial for distinguishing between distributions. The proposed method, the xssMMD test, extends the existing xMMD test by incorporating unlabeled data through these estimated conditional expectations. The test statistic is designed to have asymptotic normality under the null hypothesis, making it straightforward to calibrate. The theoretical analysis provides guarantees for asymptotic level control and demonstrates consistency in power against various alternatives.

Datasets

The paper evaluates its method on several real-world datasets:

  • HTRU2 dataset: Used for classifying pulsars versus non-pulsars based on radio signal features.
  • Caltech-UCSD Bird dataset: Used for detecting differences among bird species based on image and text descriptions.
  • MNIST dataset: Used for distinguishing between handwritten digits using image data.

The authors also conduct extensive simulations with synthetic data to validate their theoretical findings across various scenarios, dimensions, and noise levels.

Key Insights and Ideas

  • Leveraging unlabeled covariates is powerful: The core insight is that abundant unlabeled covariate data, even if not directly labeled, can significantly improve the power of two-sample tests by reducing variance and providing complementary information.
  • Cross-fitting for robust estimation: The use of cross-fitting is crucial for reliably estimating conditional expectations, which are essential for integrating covariate information without introducing bias.
  • Asymptotic normality simplifies calibration: The proposed test statistic's asymptotic normality under the null simplifies the calibration process, making it practical for real-world applications.
  • Robustness to noise and dependencies: The method demonstrates robustness to noise in auxiliary covariates and can effectively handle scenarios where covariates are not perfectly independent of the primary data.

Key Results

  • The proposed xssMMD test consistently outperforms existing methods (MMD-perm and xMMD) in terms of test power across various simulated and real-world scenarios.
  • In scenarios with strong dependence between covariates and the primary data, xssMMD shows a significant power advantage.
  • The test maintains robust asymptotic normality and controls the Type-I error rate across diverse settings, including varying dimensions, sample sizes, and noise levels.
  • The method is computationally efficient, significantly outperforming permutation-based methods, especially with larger sample sizes.
  • The theoretical analysis confirms that xssMMD is asymptotically level $\alpha$ and achieves at least the same power as xMMD, often exceeding it, particularly when unlabeled data is informative.

Limitations and Future Work

  • Dependence on witness function choice: The performance of the xssMMD test can depend on the choice of the witness function, which is often derived from kernel methods.
  • Finite-sample performance: While theoretically sound, finite-sample performance can be affected by the accuracy of conditional expectation estimation, especially when covariates are independent of the primary data or when models overfit.
  • Future Directions: The authors suggest extending the framework to k-sample testing and independence testing, exploring witness functions beyond MMD, and investigating alternative variance reduction techniques.

Summary updated

BibTeX
@inproceedings{lee2026semi,
  author = {Gyumin Lee and Shubhanshu Shekhar and Ilmun Kim},
  title = {{A Semi-Supervised Kernel Two-Sample Test}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2026},
  url = {https://openreview.net/forum?id=FIp15n9OnW},
}
Figure