# Score-based Generative Modeling for Conditional Independence Testing

arXiv: https://arxiv.org/abs/2505.23309 · HTML: https://mlsanity.com/paper/2505.23309/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Placed in Diffusion foundations and sampling, one of 14 directions in Diffusion models.
- Builds on 25 of its 59 references that are in the map.
- First posted on arXiv 29 May 2025.

## Placed in

- Diffusion models / [Diffusion foundations and sampling](https://mlsanity.com/diffusion/diffusion-foundations-and-sampling/)

## Builds on (most cited first, 25 of 25)

- [Deep Unsupervised Learning using Nonequilibrium Thermodynamics](https://mlsanity.com/paper/1503.03585/) (2015)
- [Hierarchical Text-Conditional Image Generation with CLIP Latents](https://mlsanity.com/paper/2204.06125/) (2022)
- [DiffWave: A Versatile Diffusion Model for Audio Synthesis](https://mlsanity.com/paper/2009.09761/) (2020)
- [Maximum Likelihood Training of Score-Based Diffusion Models](https://mlsanity.com/paper/2101.09258/) (2021)
- [Improved Techniques for Training Consistency Models](https://mlsanity.com/paper/2310.14189/) (2023)
- [Sliced Score Matching: A Scalable Approach to Density and Score Estimation](https://mlsanity.com/paper/1905.07088/) (2019)
- [Convergence for score-based generative modeling with polynomial complexity](https://mlsanity.com/paper/2206.06227/) (2022)
- [A Kernel Test of Goodness of Fit](https://mlsanity.com/paper/1602.02964/) (2016)
- [Panning for Gold: Model-X Knockoffs for High-dimensional Controlled Variable Selection](https://mlsanity.com/paper/1610.02351/) (2016)
- [A Measure-Theoretic Approach to Kernel Conditional Mean Embeddings](https://mlsanity.com/paper/2002.03689/) (2020)
- [Approximate Kernel-based Conditional Independence Tests for Fast Non-Parametric Causal Discovery](https://mlsanity.com/paper/1702.03877/) (2017)
- [Conditional independence testing based on a nearest-neighbor estimator of conditional mutual information](https://mlsanity.com/paper/1709.01447/) (2017)
- [Model-Powered Conditional Independence Test](https://mlsanity.com/paper/1709.06138/) (2017)
- [A Linear-Time Kernel Goodness-of-Fit Test](https://mlsanity.com/paper/1705.07673/) (2017)
- [A simple measure of conditional dependence](https://mlsanity.com/paper/1910.12327/) (2019)
- [Double Generative Adversarial Networks for Conditional Independence Testing](https://mlsanity.com/paper/2006.02615/) (2020)
- [Kernel Partial Correlation Coefficient -- a Measure of Conditional Dependence](https://mlsanity.com/paper/2012.14804/) (2020)
- [Testing Goodness of Fit of Conditional Density Models with Kernels](https://mlsanity.com/paper/2002.10271/) (2020)
- [Fast Conditional Independence Test for Vector Variables with Large Sample Sizes](https://mlsanity.com/paper/1804.02747/) (2018)
- [An Asymptotic Test for Conditional Independence using Analytic Kernel Embeddings](https://mlsanity.com/paper/2110.14868/) (2021)
- [A Distribution Free Conditional Independence Test with Applications to Causal Discovery](https://mlsanity.com/paper/2105.07555/) (2021)
- [Wasserstein Conditional Independence Testing](https://mlsanity.com/paper/2107.14184/) (2021)
- [On Distance and Kernel Measures of Conditional Independence](https://mlsanity.com/paper/1912.01103/) (2019)
- [Nearest-Neighbor Sampling Based Conditional Independence Testing](https://mlsanity.com/paper/2304.04183/) (2023)
- [Pearson Chi-squared Conditional Randomization Test](https://mlsanity.com/paper/2111.00027/) (2021)

## Built on by (most cited first, 2 of 2)

- [Fast Flow Matching based Conditional Independence Tests for Causal Discovery](https://mlsanity.com/paper/2602.08315/) (2026)
- [Causality-Encoded Diffusion Models for Interventional Sampling and Edge Inference](https://mlsanity.com/paper/2604.21843/) (2026)

## Abstract (arXiv)

Determining conditional independence (CI) relationships between random variables is a fundamental yet challenging task in machine learning and statistics, especially in high-dimensional settings. Existing generative model-based CI testing methods, such as those utilizing generative adversarial networks (GANs), often struggle with undesirable modeling of conditional distributions and training instability, resulting in subpar performance. To address these issues, we propose a novel CI testing method via score-based generative modeling, which achieves precise Type I error control and strong testing power. Concretely, we first employ a sliced conditional score matching scheme to accurately estimate conditional score and use Langevin dynamics conditional sampling to generate null hypothesis samples, ensuring precise Type I error control. Then, we incorporate a goodness-of-fit stage into the method to verify generated samples and enhance interpretability in practice. We theoretically establish the error bound of conditional distributions modeled by score-based generative models and prove the validity of our CI tests. Extensive experiments on both synthetic and real-world datasets show that our method significantly outperforms existing state-of-the-art methods, providing a promising way to revitalize generative model-based CI testing.
