Fast Flow Matching based Conditional Independence Tests for Causal Discovery

Shunyu Zhao, Yanfeng Yang, Shuai Li, Kenji FukumizuarXiv 2026

TL;DR

The authors introduce the Flow Matching-based Conditional Independence Test (FMCIT), a novel method that dramatically accelerates constraint-based causal discovery. By training a generative Flow Matching model only once on the joint distribution and treating conditional sampling as an imputation task, FMCIT eliminates the need to repeatedly retrain models for every single query. When integrated into a guided, budgeted PC-algorithm framework (GPC-FMCIT), it delivers an exceptional accuracy-efficiency trade-off in high-dimensional, non-linear settings.

What Problem Does This Paper Address?

Discovering causal relationships from observational data is a foundational challenge in machine learning. Constraint-based algorithms, like the classic PC algorithm, find the "skeleton" of a causal graph by performing a massive number of Conditional Independence (CI) tests (e.g., checking if variable $X_i$ is independent of $X_j$ given a set of conditioning variables $X_S$).

While advanced generative-model-based CI tests (like those using diffusion models) handle complex, non-linear relationships well, they suffer from a massive computational bottleneck: because the target variables and conditioning sets change with every single query, a new conditional generative model typically has to be retrained from scratch for every test. This makes them completely impractical for high-dimensional datasets where the number of required tests explodes combinatorially.

Methods

The paper introduces two core components to solve this bottleneck:

  1. FMCIT (Flow Matching-based Conditional Independence Test): Instead of training a conditional model for every specific query, FMCIT trains a single Flow Matching model once to learn the joint distribution of all variables ($P_X$). To perform a specific CI test within the Conditional Randomization Test (CRT) framework, it reformulates conditional sampling as a missing-value imputation task. It combines Picard sampling (a global fixed-point iteration scheme) with RePaint (which adds stochasticity) to condition on $X_S$ and generate resamples of $X_i$ efficiently in parallel. Flow Matching's ODE-based nature allows high-quality sample generation in just 5–50 steps, compared to the 200+ steps required by SDE-based diffusion models.
Figure 1: An illustration of Picard sampling and RePaint.
  1. GPC-FMCIT Framework: To further reduce the total number of tests, the authors propose a two-stage PC skeleton learning pipeline:
  2. Stage 1 (Screening): Uses a cheap, linear test (FisherZ) to quickly eliminate obviously independent edges and create a sparse initial graph.
  3. Stage 2 (Refinement): Uses FMCIT to test the remaining ambiguous edges. It restricts the search space using an edge-specific guided conditioning pool of fixed size $k$ and enforces a strict per-edge query budget ($M$), providing an explicit upper bound on the total number of CI queries.

Datasets

The authors evaluated their approach on three distinct setups:

  • Synthetic Post-nonlinear CIT Benchmark: Samples generated using non-linear functions (e.g., $\tanh$, $\cos$, quadratic) with varying conditioning dimensions ($d_z \in \{10, 50\}$) and noise scales.
  • High-Dimensional Post-nonlinear SEMs: Synthetic Structural Equation Models with heavy-tailed Student-$t$ noise, configured with $p = 200$ variables and 300 expected edges.
  • Real-World Flow-Cytometry Dataset (Sachs et al., 2005): A classic biological benchmark containing measurements of 11 signaling proteins, evaluated across a curated set of 90 fixed CI and non-CI tasks.

Key Insights and Ideas

  • Train Once, Impute Anywhere: The "aha moment" of the paper is realizing that conditional generation for CI testing doesn't require conditional training. By training a single joint model and using conditional imputation, the authors bypass the retraining bottleneck entirely.
  • Robustness to Weak Conditioning: Unlike other generative CI tests that only learn the conditional distribution $P_{X|Z}$, FMCIT learns the full joint distribution. This prevents performance degradation when the conditioning information becomes weak and the test starts to degenerate into an unconditional independence test.
  • Global vs. Local Error Propagation: Picard sampling performs global fixed-point iterations rather than propagating local discretization errors step-by-step (like Euler or Heun schemes), yielding more stable and coherent imputations under observed constraints.

Key Results

  • CI Testing Accuracy: In the post-nonlinear benchmark, FMCIT consistently controlled Type-I error close to the nominal 0.05 level while maintaining a power of 1.00 (or near 1.00), significantly outperforming kernel methods (KCIT, EKCI) and nearest-neighbor methods (NNLSCIT) as noise scaled up.
Table 1: Post-nonlinear CIT benchmark (n = 1000, α = 0.05, 100 trials). We report empirical type-I error and power.
  • Causal Discovery Performance: On high-dimensional non-linear SEMs ($p=200$), GPC-FMCIT achieved the highest F1-score (0.621) and a significantly lower Structural Hamming Distance (SHD of 234.2) than the standard FisherZ-PC, proving its robustness against heavy-tailed, non-linear noise.
Table 2: Skeleton discovery on post-nonlinear SEMs with heavy-tailed noise (n = 500, p = 200, df = 3, exp edges = 300, mcs = 2). We report mean ± std over 5 runs (seeds 0–4).
  • Real-World Validation: On the Sachs dataset, FMCIT achieved the highest F1-score (0.7845) among all baselines. Crucially, its runtime (29.0s) was drastically faster than the kernel-based FastKCI (166.2s), demonstrating a highly practical efficiency-accuracy trade-off.
Real-data CIT benchmark on the Sachs dataset

Limitations and Future Work

While empirically strong, the authors note that explicit theoretical guarantees for Type-I error control using this specific flow-matching imputation approach still need to be formally established. Additionally, they suggest that incorporating double-robust statistical techniques could further improve the test's precision and robustness in future iterations.

Summary updated

BibTeX
@misc{zhao2026fast,
  author = {Shunyu Zhao and Yanfeng Yang and Shuai Li and Kenji Fukumizu},
  title = {{Fast Flow Matching based Conditional Independence Tests for Causal Discovery}},
  year = {2026},
  eprint = {2602.08315},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.08315},
}
Figure