DUAL: Learning Diverse Kernels for Aggregated Two-sample and Independence Testing

Zhijian Zhou, Xunye Tian, Liuhua Peng, Chao Lei, Antonin Schrab, Danica J. Sutherland, Feng Liu

TL;DR

The DUAL framework significantly boosts the power of kernel-based hypothesis tests by prioritizing kernel diversity and selection over simple aggregation. By explicitly accounting for redundancy between kernels and adaptively selecting the most informative ones, DUAL achieves state-of-the-art performance in detecting distribution differences and statistical dependencies.

The Redundancy Trap in Kernel Testing

In non-parametric hypothesis testing, researchers often use kernel methods like Maximum Mean Discrepancy (MMD) for two-sample testing (e.g., determining if two sets of images come from the same distribution) or the Hilbert-Schmidt Independence Criterion (HSIC) for independence testing.

To handle complex, high-dimensional data, a common strategy is to aggregate multiple kernels, such as Gaussian kernels with different bandwidths. The intuition is that "more kernels capture more features." However, the authors identify a "redundancy trap": simply adding more kernels often leads to highly similar kernels that capture overlapping information. This redundancy can dilute the statistical signal and reduce the "test power"—the probability of correctly rejecting a false null hypothesis.

Figure 1: Aggregating all 20 kernels (solid blue) can be outperformed by a well-chosen subset of just 5 kernels (dotted orange), showing that indiscriminate aggregation introduces redundancy.

The DUAL Approach

To address this, the authors propose DUAL (Diverse U-statistic Aggregation with Learned kernels), which introduces two key innovations:

  1. Covariance-Informed Diversity: Instead of a simple sum or weighted average, DUAL constructs a multivariate $U$-statistic that incorporates the covariance matrix between different kernels. This approach, inspired by ensemble learning, ensures that kernels providing unique, non-redundant information are prioritized, effectively acting like a Mahalanobis distance for kernels.
  2. Selection Inference Framework: The authors identify a fundamental trade-off: a kernel might be very "diverse" (different from others) but "weak" (low individual power). To solve this, they use a data-splitting approach:
  3. Training Phase: Learn a pool of diverse kernels that maximize the aggregated statistic.
  4. Testing Phase: Use "selection inference" to identify and use only the most effective kernels from that pool. This adaptive selection ensures the test focuses on the strongest signals while rigorously controlling the Type-I error (false positive) rate.

Key Insights and Results

The researchers evaluated DUAL across a wide range of benchmarks, including synthetic datasets with complex local structures (BLOB), image datasets (MNIST vs. DCGAN, ImageNet vs. ImageNetV2), and high-dimensional physics data (Higgs).

  • Diversity vs. Power Trade-off: High diversity alone doesn't guarantee a good test. A kernel must be both different from its peers and individually powerful.
  • Adaptive Focus: DUAL's selection mechanism is dynamic. As the sample size increases, the test automatically "locks on" to the kernels that best capture the underlying signal, while ignoring uninformative ones.
  • Superior Power: Across all benchmarks, MMD-DUAL and HSIC-DUAL consistently outperformed state-of-the-art baselines, including AutoML-based tests (AutoTST), deep kernel methods (MMD-D), and other recent multi-kernel approaches (MMD-FUSE).
  • Type-I Error Control: Despite the adaptive selection, the false positive rate remains strictly controlled at the desired significance level.
Figure 2: Main experimental results showing DUAL (red line) consistently achieving higher power across various sample sizes compared to all other baselines for both two-sample (a-c) and independence (d-f) tests.

Limitations and Future Work

Like most kernel methods based on $U$-statistics, DUAL has a quadratic time complexity $O(n^2)$ with respect to the sample size. While manageable for moderate datasets, it remains a bottleneck for massive-scale data. Additionally, the kernel learning phase adds a computational cost that simpler, heuristic-based aggregation methods avoid. Future directions include extending this diversity-driven aggregation to other types of statistical tasks, such as goodness-of-fit testing, and exploring more advanced ensemble-regularized optimization techniques.

Summary updated

BibTeX
@inproceedings{zhou2025dual,
  author = {Zhijian Zhou and Xunye Tian and Liuhua Peng and Chao Lei and Antonin Schrab and Danica J. Sutherland and Feng Liu},
  title = {{DUAL: Learning Diverse Kernels for Aggregated Two-sample and Independence Testing}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=CVekdZDzLG},
}
Figure