Table of Contents
Fetching ...

Fusion of classical and quantum kernels enables accurate and robust two-sample tests

Yu Terada, Yugo Ogio, Ken Arai, Hiroyuki Tezuka, Yu Tanaka

TL;DR

The paper tackles the challenge of performing reliable two-sample tests with limited data by refining kernel-based testing via the MMD-FUSE framework. It introduces quantum kernels and a hybrid quantum-classical kernel pool to expand the expressive hypothesis space, and demonstrates improved test power, particularly in small-sample and high-dimensional settings. Empirical results on synthetic and real-world biomedical datasets show that quantum kernels can outperform classical choices when properly tuned, and that hybridization offers robust performance across diverse data types. The work suggests that data-adaptive kernel design, including principled weighting of kernel types, can yield practical gains for kernel-based hypothesis testing in constrained data regimes.

Abstract

Two-sample tests have been extensively employed in various scientific fields and machine learning such as evaluation on the effectiveness of drugs and A/B testing on different marketing strategies to discriminate whether two sets of samples come from the same distribution or not. Kernel-based procedures for hypothetical testing have been proposed to efficiently disentangle high-dimensional complex structures in data to obtain accurate results in a model-free way by embedding the data into the reproducing kernel Hilbert space (RKHS). While the choice of kernels plays a crucial role for their performance, little is understood about how to choose kernel especially for small datasets. Here we aim to construct a hypothetical test which is effective even for small datasets, based on the theoretical foundation of kernel-based tests using maximum mean discrepancy, which is called MMD-FUSE. To address this, we enhance the MMD-FUSE framework by incorporating quantum kernels and propose a novel hybrid testing strategy that fuses classical and quantum kernels. This approach creates a powerful and adaptive test by combining the domain-specific inductive biases of classical kernels with the unique expressive power of quantum kernels. We evaluate our method on various synthetic and real-world clinical datasets, and our experiments reveal two key findings: 1) With appropriate hyperparameter tuning, MMD-FUSE with quantum kernels consistently improves test power over classical counterparts, especially for small and high-dimensional data. 2) The proposed hybrid framework demonstrates remarkable robustness, adapting to different data characteristics and achieving high test power across diverse scenarios. These results highlight the potential of quantum-inspired and hybrid kernel strategies to build more effective statistical tests, offering a versatile tool for data analysis where sample sizes are limited.

Fusion of classical and quantum kernels enables accurate and robust two-sample tests

TL;DR

The paper tackles the challenge of performing reliable two-sample tests with limited data by refining kernel-based testing via the MMD-FUSE framework. It introduces quantum kernels and a hybrid quantum-classical kernel pool to expand the expressive hypothesis space, and demonstrates improved test power, particularly in small-sample and high-dimensional settings. Empirical results on synthetic and real-world biomedical datasets show that quantum kernels can outperform classical choices when properly tuned, and that hybridization offers robust performance across diverse data types. The work suggests that data-adaptive kernel design, including principled weighting of kernel types, can yield practical gains for kernel-based hypothesis testing in constrained data regimes.

Abstract

Two-sample tests have been extensively employed in various scientific fields and machine learning such as evaluation on the effectiveness of drugs and A/B testing on different marketing strategies to discriminate whether two sets of samples come from the same distribution or not. Kernel-based procedures for hypothetical testing have been proposed to efficiently disentangle high-dimensional complex structures in data to obtain accurate results in a model-free way by embedding the data into the reproducing kernel Hilbert space (RKHS). While the choice of kernels plays a crucial role for their performance, little is understood about how to choose kernel especially for small datasets. Here we aim to construct a hypothetical test which is effective even for small datasets, based on the theoretical foundation of kernel-based tests using maximum mean discrepancy, which is called MMD-FUSE. To address this, we enhance the MMD-FUSE framework by incorporating quantum kernels and propose a novel hybrid testing strategy that fuses classical and quantum kernels. This approach creates a powerful and adaptive test by combining the domain-specific inductive biases of classical kernels with the unique expressive power of quantum kernels. We evaluate our method on various synthetic and real-world clinical datasets, and our experiments reveal two key findings: 1) With appropriate hyperparameter tuning, MMD-FUSE with quantum kernels consistently improves test power over classical counterparts, especially for small and high-dimensional data. 2) The proposed hybrid framework demonstrates remarkable robustness, adapting to different data characteristics and achieving high test power across diverse scenarios. These results highlight the potential of quantum-inspired and hybrid kernel strategies to build more effective statistical tests, offering a versatile tool for data analysis where sample sizes are limited.

Paper Structure

This paper contains 17 sections, 1 theorem, 12 equations, 5 figures.

Key Result

theorem 1

Let $G$ be a vector of elements from $S_n$, $G = (\sigma_1, ..., \sigma_{B}, \sigma_{B+1})$, with $\sigma_{B+1} = id$ (the identity permutation) for any $B \ge 1$. The elements $\sigma_1, ..., \sigma_{B}$ are drawn uniformly from $S_n$ either i.i.d. or without replacement (which includes the possibi

Figures (5)

  • Figure 1: Estimates of test power for MMD-FUSE with quantum and classical kernels for synthetic Gaussian data. Each test was conducted by randomly selecting $10, 20, \ldots, 90$ samples from $M = 500$ samples of $X^{(1)}$ and $Y^{(1)}$, repeated $50$ times. Quantum kernels use fidelity-based functions, while classical kernels use Gaussian the kernels with $8$ different bandwidths. The bandwidths were determined by coverage-based scaling, and all kernels are equally weighted with weight. The level of significance was set as $\alpha=0.05$, the error bars denote the standard errors across 50 simulations, and the insets show true negative rate. The insets show true negative rate versus sample size for shuffled distributions. (a) Test power versus sample size using default scaling parameters for quantum kernels with those using the classical kernels. (b) Test power of quantum kernels with the scaling parameters optimized in the previous work terada2025quantum.
  • Figure 2: Estimates of test power for MMD-FUSE with quantum and classical kernels for the two real-world datasets on heart disease and breast cancer data. Tests were conducted by randomly selecting $10, 20, \ldots, 90$ samples from two groups divided depending on primary dichotomous variables. Each sample consist of a 2 dimensional vector. Quantum kernels are equipped with the scaling parameters optimized in the previous work terada2025quantum. The error bars denote the standard errors across 50 independent simulations and the insets show true negative rate versus sample size for shuffled distributions. (a) Test power versus sample size using quantum and classical kernels. Clinical dataset on heart disease with 203 patients with survival and 96 with death events were used. Their feature variables denote ejection fraction and serum creatinine. (b) Test power on clinical dataset on breast cancer data with 357 benign and 212 malignant tumors.
  • Figure 3: Estimates of test power for MMD-FUSE with quantum and classical kernels on high-dimensional datasets. The datasets were generated following the same procedures as in Figs. \ref{['twofigs:results_mmd_fuse_with_q_kernels_for_data1']} and \ref{['twofigs:results_mmd_fuse_with_q_kernels_for_data2']} (a), but the dimensions of the datasets are higher than them. The error bars denote the standard errors across 50 independent simulations and the insets show true negative rate versus sample size for shuffled distributions. (a) Synthetic Gaussian dataset with $D = 6$. (b) Heart disease dataset with $D = 12$, where all 12 observed clinical variables were used.
  • Figure 4: Estimates of test power for hybrid MMD-FUSE employing both classical and quantum kernels on synthetic and real-world datasets, under priors with different weights. The fraction $p$ for weights varies from 0 to 1, where the former corresponds to the purely quantum case and the latter to the purely classical one. The datasets were generated following the same procedures as in Figs. \ref{['twofigs:results_mmd_fuse_with_q_kernels_for_data1']} and \ref{['twofigs:results_mmd_fuse_with_q_kernels_for_data2']} (a), but the dimensions of the datasets are higher than them. The error bars denote the standard errors across 50 independent simulations. (a) Gaussian dataset that are the same as in Figs. \ref{['twofigs:results_mmd_fuse_with_q_kernels_for_data1']}, (b) Clinical dataset the same as in \ref{['twofigs:results_mmd_fuse_with_q_kernels_for_data2']} (a).
  • Figure 5: Estimates of test power for hybrid MMD-FUSE with classical and quantum kernels for the synthetic log-normal data under priors with different weights. The variables drawn from the log-normal distributions are 2D vectors ($D = 2$). The error bars denote the standard errors across 50 independent simulations.

Theorems & Definitions (2)

  • theorem 1: Theorem 2 in Ref. hemerik2018exact
  • definition thmcounterdefinition: Definition 1 in Ref. biggs2023mmd