Introduction
Conditional Independence (CI) testing is a fundamental task in causal inference and feature selection, aimed at determining whether two variables $X$ and $Y$ are independent given a third variable $Z$ ($X \perp Y | Z$). As the dimensionality of the conditioning variable $Z$ increases, traditional statistical tests often succumb to the "curse of dimensionality," failing to capture complex, non-linear dependencies.
Recent advancements have introduced "Model-X" frameworks, which utilize generative models like Generative Adversarial Networks (GANs) to sample from the conditional distribution $P(X|Z)$. However, GANs are frequently plagued by training instability and mode collapse, leading to unreliable statistical inference. This paper introduces SGMCIT (Score-based Generative Modeling for CI Testing), a robust framework that leverages diffusion-based score models to overcome these limitations.
Methodology: The SGMCIT Framework
SGMCIT replaces adversarial training with a stable score-matching objective. The framework operates in three primary stages to ensure rigorous statistical testing:
- Conditional Sliced Score Matching: The model learns the score function—the gradient of the log-density $\nabla_x \log p(x|z)$—rather than the density itself. By employing a "sliced" matching technique, the method remains computationally efficient even in high-dimensional spaces.
- Langevin Dynamics Sampling: To construct the null hypothesis, the model generates synthetic samples using Langevin dynamics. This iterative process refines random noise into samples that accurately reflect the learned conditional distribution $P(X|Z)$.
- Goodness-of-Fit (GOF) Validation: A critical innovation in SGMCIT is the inclusion of a validation step. Before proceeding to the CI test, the system evaluates whether the generated samples match the observed marginal distributions using metrics like Maximum Mean Discrepancy (MMD).
Experimental Results
The authors evaluated SGMCIT against traditional kernel-based methods (KCIT, LPCIT) and GAN-based approaches (DGCIT) across synthetic and real-world datasets.
Error Control and Power
In high-dimensional settings where $Z$ reached 100 dimensions, SGMCIT demonstrated superior Type I error control, maintaining a rate near the target 0.05. In contrast, competing methods like DGCIT saw error rates explode as dimensionality increased. Furthermore, SGMCIT achieved significantly higher testing power in scenarios involving complex non-linear relationships (e.g., cosine or exponential functions) where regression-based methods typically struggle.
Goodness-of-Fit and Reliability
The GOF stage provides a transparent "sanity check" for the generative model. As shown in comparative analyses, SGMCIT's ability to capture the true underlying distribution far exceeds that of GAN-based models, which often fail to align with the observed data density.
Real-World Application
Testing on the Capital Bikeshare dataset, SGMCIT successfully identified dependencies between ride duration and user types while conditioning on spatial and temporal variables. The framework's stability allowed it to model these real-world complexities where previous generative approaches failed to produce valid null distributions.
Conclusion
SGMCIT represents a significant step forward in high-dimensional CI testing by prioritizing training stability and distributional accuracy. While the iterative nature of Langevin dynamics results in slower sampling speeds compared to GANs, the gains in reliability and Type I error control are substantial. Future research may focus on integrating accelerated diffusion sampling techniques, such as consistency models, to enhance the practical scalability of the framework for massive datasets.
Summary updated