Self-Discrepancy Conditional Independence Test

Sanghack Lee, Vasant G. Honavar

Abstract

Testing for conditional independence (CI) is a cornerstone of causal inference and machine learning. While kernel-based methods like the Kernel CI Permutation Test (KCIPT) offer flexibility, they often struggle to balance statistical power with calibratedness, particularly as the number of bootstrap iterations increases. We introduce the Self-Discrepancy Conditional Independence Test (SDCIT), which utilizes a novel Maximum Mean Self-Discrepancy (MMSD) statistic. By avoiding random data splits and leveraging a single optimal permutation, SDCIT achieves superior calibration, competitive power, and improved computational efficiency in high-dimensional settings.

Introduction

Determining if $X \perp Y \mid Z$ is essential for tasks ranging from causal discovery to dimensionality reduction. Kernel-based CI tests are favored for their ability to capture non-linear dependencies. However, existing methods like KCIPT face a "bootstrap trap": increasing bootstraps to gain power leads to a degenerate null distribution, causing high Type I error rates. Furthermore, the stochastic nature of data splitting in KCIPT results in non-deterministic p-values that are difficult to reproduce.

The SDCIT Framework

SDCIT addresses these issues by operating on the full dataset rather than splitting it. It identifies a single, optimal permutation that breaks the relationship between $X$ and $Y$ while preserving the relationship with $Z$ using a minimum cost perfect matching algorithm.

Maximum Mean Self-Discrepancy (MMSD)

Because the original and permuted samples are inherently dependent, standard Maximum Mean Discrepancy (MMD) cannot be applied directly. SDCIT introduces the Maximum Mean Self-Discrepancy (MMSD) statistic, which calculates discrepancy while explicitly masking specific pairs of observations that would introduce spurious correlations. The null distribution is then approximated empirically using a half-sampling strategy with a modified distance matrix, ensuring high accuracy and calibration.

Key Results and Discussion

Calibration and Power

SDCIT maintains strict calibratedness, keeping Type I error rates near the target 0.05 threshold. In contrast, KCIPT's error rate can spike significantly (up to 10%) as bootstraps are increased. Under the null hypothesis, SDCIT produces a p-value distribution that is approximately uniform, confirming its reliability.

P-value distribution of SDCIT under the null hypothesis, showing the near-uniformity required for a well-calibrated test.

High-Dimensional Performance

A significant advantage of SDCIT is its robustness as the dimensionality of the conditioning variable $Z$ increases. In experiments with post-nonlinear noise data, SDCIT maintained high power and low Kolmogorov-Smirnov (KS) test statistics even as the dimension of $Z$ reached 50, whereas competing methods like KCIT saw significant degradation in calibration.

KS test statistic across varying dimensions of the conditioning variable Z. SDCIT (red) maintains superior calibration (lower KS statistic) compared to baselines as dimensionality increases.

Computational Efficiency

SDCIT is substantially faster than its predecessors. For a dataset of size $n=400$, SDCIT runs in approximately 2.4 seconds—roughly ten times faster than KCIPT, which is slowed by the massive number of MMD computations required by its bootstrap loops.

Conclusion

SDCIT provides a stable, reproducible, and calibrated approach to conditional independence testing. By replacing random splitting with self-discrepancy and optimal matching, it overcomes the fundamental limitations of previous kernel-based permutation tests, particularly in high-dimensional scenarios. Future work will explore analytic approximations for the MMSD null distribution to further enhance speed and eliminate the need for empirical sampling.

Summary updated

BibTeX
@inproceedings{lee2017self,
  author = {Sanghack Lee and Vasant G. Honavar},
  title = {{Self-Discrepancy Conditional Independence Test}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2017},
}
Figure