Learning Deep Kernels for Non-Parametric Independence Testing

Nathaniel Xu, Feng Liu, Danica J. SutherlandarXiv 2024 · arXiv · OpenReview

Introduction

Non-parametric independence testing is a cornerstone of statistical analysis, yet its effectiveness often hinges on the selection of appropriate kernels. Traditional choices, such as the Gaussian kernel with a median heuristic, frequently struggle to detect dependencies in high-dimensional or highly structured data. This paper introduces a framework for learning deep kernels that maximize the statistical power of the Hilbert-Schmidt Independence Criterion (HSIC).

Methodology: Deep HSIC and SNR Optimization

The authors propose Deep HSIC (HSIC-D), which leverages deep neural networks to learn feature representations that make dependencies more apparent. The core innovation is the optimization objective: instead of maximizing the raw HSIC statistic, the model maximizes an estimate of the Signal-to-Noise Ratio (SNR). By optimizing the ratio of the HSIC value to its standard deviation, the learned kernels focus on statistically significant signals rather than high-variance noise.

Furthermore, the paper explores Neural Dependency Statistics (NDS), demonstrating that many variational Mutual Information (MI) estimators can be viewed as simple statistics at test time. The authors establish a formal connection between HSIC and MI, justifying the use of deep representations across both paradigms.

Experimental Evaluation

The proposed methods were tested against several baselines, including standard HSIC (HSIC-M) and various MI-based tests.

Performance in High Dimensions

In synthetic tasks with complex, non-linear dependencies (such as the Sinusoid task), standard tests often fail as the number of noise dimensions increases. As illustrated in the figure below, HSIC-D (represented by the red circles) maintains superior power across varying dimensions ($d=4, 10, 15$) and sample sizes, effectively filtering out independent noise to identify the underlying relationship.

Empirical power comparison on a high-dimensional synthetic task. HSIC-D consistently achieves the highest power as dimensions and sample sizes increase.

Structured Biological Data: RatInABox

The framework was also applied to the RatInABox dataset, which simulates the firing rates of hippocampal cells. This dataset features complex, structured dependencies that are notoriously difficult for fixed-kernel tests. The authors demonstrate that their approach can effectively capture these relationships. Notably, they found that permutation-based tests often outperform theoretical asymptotics in these complex settings.

Test power vs. sample size on the RatInABox dataset, comparing different power estimation methods (asymptotic, empirical, and permutation-based).

Key Insights and Results

  • SNR Optimization: Maximizing the SNR estimate is shown to be a more reliable objective than maximizing the raw statistic, as it directly relates to the probability of correctly rejecting the null hypothesis.
  • Exact Level Control: Despite the complexity of deep networks, the tests maintain exact Type-I error control through the use of data splitting and permutation testing.
  • Robustness: HSIC-D demonstrates remarkable resilience to noise, maintaining near-perfect detection power in scenarios where standard methods fail.

Conclusion

By bridging the gap between deep learning's representational power and the rigors of hypothesis testing, this work provides a powerful tool for discovering subtle relationships in complex data. Future directions include extending this paradigm to conditional independence testing and developing more data-efficient training schemes.

Summary updated

Abstract

The Hilbert-Schmidt Independence Criterion (HSIC) is a powerful tool for nonparametric detection of dependence between random variables. It crucially depends, however, on the selection of reasonable kernels; commonly-used choices like the Gaussian kernel, or the kernel that yields the distance covariance, are sufficient only for amply sized samples from data distributions with relatively simple forms of dependence. We propose a scheme for selecting the kernels used in an HSIC-based independence test, based on maximizing an estimate of the asymptotic test power. We prove that maximizing this estimate indeed approximately maximizes the true power of the test, and demonstrate that our learned kernels can identify forms of structured dependence between random variables in various experiments.
BibTeX
@misc{xu2024learning,
  author = {Nathaniel Xu and Feng Liu and Danica J. Sutherland},
  title = {{Learning Deep Kernels for Non-Parametric Independence Testing}},
  year = {2024},
  eprint = {2409.06890},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.06890},
}
Figure