Minimax Optimal Kernel Two-Sample Tests with Random Features
Mukherjee, Sriperumbudur
Reproducing Kernel Hilbert Space (RKHS) embedding of probability distributions has proved to be an effective approach, via MMD (maximum mean discrepancy), for nonparametric hypothesis testing problems involving distributions defined over general (non-Euclidean) domains. While a substantial amount of work has been done on this topic, only recently have minimax optimal two-sample tests been constructed that incorporate, unlike MMD, both the mean element and a regularized version of the covariance operator. However, as with most kernel algorithms, the optimal test scales cubically in the sample size, limiting its applicability. In this paper, we propose a spectral-regularized two-sample test based on random Fourier feature (RFF) approximation and investigate the trade-offs between statistical optimality and computational efficiency. We show the proposed test to be minimax optimal if the approximation order of RFF (which depends on the smoothness of the likelihood ratio and the decay rate of the eigenvalues of the integral operator) is sufficiently large. We develop a practically implementable permutation-based version of the proposed test with a data-adaptive strategy for selecting the regularization parameter. Finally, through numerical experiments on simulated and benchmark datasets, we demonstrate that the proposed RFF-based test is computationally efficient and performs almost similarly (with a small drop in power) to the exact test.
academic
Minimax Optimal Kernel Two-Sample Tests with Random Features
This paper proposes a spectrally regularized two-sample test based on random Fourier features (RFF) approximation for the two-sample testing problem based on reproducing kernel Hilbert space (RKHS) embeddings. The method maintains statistical optimality while significantly reducing computational complexity from cubic to near-linear, and provides a fully data-driven practical implementation.
Two-sample testing is a fundamental problem in statistics, aiming to determine whether two random samples originate from equal probability distributions. Traditional parametric and nonparametric testing methods face significant limitations when dealing with high-dimensional data or distributions on non-Euclidean domains.
Suboptimality of MMD tests: Although the maximum mean discrepancy (MMD) test is widely applied, it lacks minimax optimality and only considers mean embeddings while ignoring covariance operator information
Computational bottleneck of spectral regularization methods: Recently proposed spectrally regularized MMD tests achieve minimax optimality but have O(n³) computational complexity, limiting their application to large-scale data
Difficulty in parameter selection: The choice of regularization parameters depends on unknown distributional properties, lacking data-driven adaptive strategies
This paper aims to significantly improve the computational efficiency of spectrally regularized two-sample tests through random Fourier features approximation while maintaining statistical optimality, and develop practical adaptive versions.
Computationally efficient and statistically optimal test: Proposes an RFF-based spectrally regularized two-sample test that reduces computational complexity from O(n³) to O(nl² + nld) while maintaining minimax optimality under sufficient conditions
Theoretical guarantees: Establishes theoretical connections between RFF approximation order and statistical optimality, proving minimax optimality of the test when the number of features l satisfies specific conditions
Practical adaptive version: Develops a fully data-driven version based on permutation testing, including adaptive selection strategies for regularization parameters and kernel functions
Comprehensive experimental validation: Validates the method's effectiveness through synthetic and benchmark datasets, demonstrating good trade-offs between computational efficiency and statistical performance
Gretton, A., et al. (2012). A kernel two-sample test. JMLR.
Hagrass, O., et al. (2024). Spectral regularized kernel two-sample tests. Annals of Statistics.
Rahimi, A., & Recht, B. (2007). Random features for large-scale kernel machines. NIPS.
Choi, I., & Kim, I. (2024). Computational-statistical trade-off in kernel two-sample testing with random Fourier features.
Sriperumbudur, B. K., & Sterge, N. (2022). Approximate kernel PCA: Computational versus statistical trade-off. Annals of Statistics.
Overall Assessment: This is a high-quality theoretical statistics paper that successfully applies random features approximation techniques to spectrally regularized two-sample testing, significantly improving computational efficiency while maintaining statistical optimality. The paper's theoretical analysis is thorough and detailed, experimental validation is comprehensive, and it has important value for both statistical learning theory and practical applications.