Conditional independence (CI) testing is a fundamental task in modern statistics and machine learning. The conditional randomization test (CRT) was recently introduced to test whether two random variables, $X$ and $Y$, are conditionally independent given a potentially high-dimensional set of random variables, $Z$. The CRT operates exceptionally well under the assumption that the conditional distribution $X|Z$ is known. However, since this distribution is typically unknown in practice, accurately approximating it becomes crucial. In this paper, we propose using conditional diffusion models (CDMs) to learn the distribution of $X|Z$. Theoretically and empirically, it is shown that CDMs closely approximate the true conditional distribution. Furthermore, CDMs offer a more accurate approximation of $X|Z$ compared to GANs, potentially leading to a CRT that performs better than those based on GANs. To accommodate complex dependency structures, we utilize a computationally efficient classifier-based conditional mutual information (CMI) estimator as our test statistic. The proposed testing procedure performs effectively without requiring assumptions about specific distribution forms or feature dependencies, and is capable of handling mixed-type conditioning sets that include both continuous and discrete variables. Theoretical analysis shows that our proposed test achieves a valid control of the type I error. A series of experiments on synthetic data demonstrates that our new test effectively controls both type-I and type-II errors, even in high dimensional scenarios.
翻译:条件独立性(CI)检验是现代统计学与机器学习中的一项基础任务。条件随机化检验(CRT)是近年来提出的一种方法,用于检验在给定一个可能为高维的随机变量集合 $Z$ 的条件下,两个随机变量 $X$ 和 $Y$ 是否条件独立。在假设条件分布 $X|Z$ 已知的情况下,CRT 表现优异。然而,由于该分布在实际中通常未知,对其进行精确逼近变得至关重要。本文提出使用条件扩散模型(CDMs)来学习 $X|Z$ 的分布。理论与实验均表明,CDMs 能够紧密逼近真实的条件分布。此外,与生成对抗网络(GANs)相比,CDMs 能更准确地逼近 $X|Z$,这可能导致基于 CDMs 的 CRT 性能优于基于 GANs 的 CRT。为适应复杂的依赖结构,我们采用一种计算高效的、基于分类器的条件互信息(CMI)估计量作为检验统计量。所提出的检验程序无需对具体分布形式或特征依赖性做出假设即可有效运行,并且能够处理包含连续变量和离散变量的混合类型条件集。理论分析表明,我们提出的检验能有效控制第一类错误。在合成数据上进行的一系列实验证明,即使在高维场景下,我们的新检验也能有效控制第一类和第二类错误。