arXiv:2611.07165cs.LGNov 2026

Manuscript Offprint

arXiv:2611.07165

Structural Conditional Independence Test via Neural Quantile Resolution

Khoa Nguyen, Bao Duong, Thin Nguyen

Khoa Nguyen, Bao Duong, Thin Nguyen

Deakin Applied Artificial Intelligence Initiative, Geelong, Australia

{khoa.nguyen, b.duong, thin.nguyen}@deakin.edu.au

Abstract—Conditional independence testing is difficult when dependence is weak, localized, or expressed through distributional changes rather than a global mean shift. Existing tests usually return a scalar statistic or p-value, which summarizes evidence against independence but does not describe where the conditional law changes. We propose QRCIT, a quantile-resolution conditional independence test that compares P(X∣Z)P(X \mid Z) and P(X∣Y,Z)P(X \mid Y, Z) through a quantile deformation learned by a shared model. A lightweight residual quantile-flow model first learns the baseline conditional quantile law and then learns the additional deformation induced by YY, yielding a global predictive-gain statistic with conditional-randomization calibration and an inspectable deformation field over context and quantile level. We also introduce the Structural Dependency Benchmark (SDB), which evaluates dependence structures motivated by real applications, such as context-local, tail-only, sign-reversing, moving-ridge, and mean-neutral patterns. Across synthetic post-nonlinear (PNL) and SDB benchmarks, QRCIT improves detection of structured alternatives, with empirical Type-I behavior evaluated across settings. Higher quantile resolution improves merged-SDB power at moderate sample sizes, while diagnostics restricted to known affected regions improve detection of localized dependence. On Sachs, METABRIC breast cancer, and CCLE/PLX4720, QRCIT provides competitive real-data performance and interpretable deformation patterns. These results support quantile-resolved conditional-law deformation as a practical framework for testing and diagnosing structured conditional dependence. Code is available at https://github.com/khoangdadk/qrcit.

I. INTRODUCTION

Conditional independence testing (CIT) asks whether

H0:X⊥Y∣Z(1)H_0: X \perp Y \mid Z \tag{1}

should be rejected, and is a basic primitive in causal discovery [19], feature screening and controlled variable selection [16], biological dependency analysis [1, 32], fairness auditing [17], and robust or invariant prediction [18]. Existing CIT procedures usually compress the sample into a scalar statistic and a p-value. This is necessary for hypothesis testing, but it hides structure: a weak statistic may reflect true conditional independence, low power against a localized alternative, cancellation between opposite effects, tail-only dependence, or a distributional shape change with little conditional-mean shift. Conversely, a rejection rarely explains where or how the conditional law changed.

Figure 1 illustrates this motivation. Panels A–B show the direction and quantile-specific shape of fitted real-data conditional-law contrasts. Panel C gives a controlled mean-neutral structural example: density and quantile views reveal changes in the conditional distribution, while residual-

covariance and local scalar summaries can be weak or unstable. Together, these panels illustrate the central gap addressed by QRCIT: conditional dependence is not only a question of whether X⊥Y∣ZX \perp Y \mid Z is rejected, but also where the conditional-law discrepancy appears over context and quantile level. This motivates a test that keeps a calibrated global p-value while retaining a deformation field for inspection, consistent with local and context-specific independence settings where dependence can be restricted to part of the conditioning space [20, 21].

Such structural discrepancies arise across data-mining applications. In genomics and pharmacogenomics, regulatory or drug-response signals can depend on molecular context, corresponding to context-local dependence [1, 2]. In finance, systemic risk and growth-at-risk are explicitly tail-focused, motivating tests that do not average away lower-tail dependence [12, 13]. In policy and social-science applications, treatment effects may vary across the outcome distribution, so mean-level summaries can miss distributional or sign-varying effects [14, 15]. These examples require a CIT method to expose how P(X∣Y,Z)P(X \mid Y, Z) differs from P(X∣Z)P(X \mid Z), not only whether the difference survives scalar aggregation.

The theoretical difficulty is that CIT compares conditional objects across ZZ. With continuous or high-dimensional ZZ, exact local replication is unavailable, so tests approximate locality through smoothing, kernels, regression, embeddings, or learned conditional distributions. This creates a stability-resolution tradeoff: broad neighborhoods reduce variance but blur localized dependence, whereas narrow neighborhoods preserve structure but may contain too few observations. Since conditional-object estimation and conditioning-kernel choices affect both Type-I error and power [38], practical CIT should retain a resolution layer that distinguishes true independence from localized, tail-specific, or cancelling dependence.

This paper asks whether CIT can be equipped with such a resolution layer. Our starting point is the law-level characterization

X⊥Y∣Z  ⟺  PX∣Y,Z=PX∣Za.s.(2)X \perp Y \mid Z \iff P_{X \mid Y, Z} = P_{X \mid Z} \quad \text{a.s.} \tag{2}

For scalar XX, let

Q0(z,u)=QX∣Z=z(u),(3)Q_0(z, u) = Q_{X \mid Z=z}(u), \tag{3} Q1(y,z,u)=QX∣Y=y,Z=z(u),Q_1(y, z, u) = Q_{X \mid Y=y, Z=z}(u),

where u∈(0,1)u \in (0, 1) is the quantile level. We define the quantile-flow deformation

Δ(y,z,u)=Q1(y,z,u)−Q0(z,u).(4)\Delta(y, z, u) = Q_1(y, z, u) - Q_0(z, u). \tag{4}

A. Breast cancer

B. CCLE / PLX4720

Figure

C. Synthetic explanatory mechanism (v0=+1.5)(v_{0}=+1.5)

Figure

(a.1) z0=−1.8z_{0} = -1.8

(b)

(c)

(e)

(g)

Fig. 1. Real-data evidence and synthetic explanation for quantile-resolved conditional dependence. In A–B, black curves show mean conditional quantile contrasts, averaged over held-out contexts and across folds; grey bands show ±1\pm1 standard deviation across folds. A contrasts gene expression at the 75th versus 25th percentile; B contrasts mutation presence versus absence. Each contrast compares the learned quantiles at two values of Y, so the shared baseline cancels. Positive and negative values indicate upward and downward quantile shifts, respectively. (A) Breast-cancer deformation profiles in the cBioPortal-reconstructed METABRIC benchmark. PTPRN2 shows negative upper-tail tumor-size deformation, interpreted as a progression-associated conditional signature [6]; SF3B1 shows positive upper-tail deformation, consistent with breast-cancer relevance of splicing-factor dysregulation [5]. (B) CCLE/PLX4720 mutation-response profiles. PIP5K1A_MUT shows a broadly positive fitted Amax-scale contrast, while HIP1_MUT shows a negative contrast whose magnitude varies across quantile levels. These profiles describe how mutation status shifts the fitted response quantiles conditional on the other selected mutations. (C) A synthetic mean-neutral example in which observing v0v_0, playing the role of Y, changes the conditional distribution's shape with little change in its mean. Panels (a.1)–(a.2) show baseline and refined density slices; (b) shows the corresponding quantile functions; and (c) shows the signed deformation Δ(v0,z,u)=Q1(v0,z,u)−Q0(z,u)\Delta(v_0, z, u) = Q_1(v_0, z, u) - Q_0(z, u). Panels (d)–(g) illustrate the difficulty of detecting these changes: mean-like summaries can be weak, broad neighborhoods blur local structure, and narrow neighborhoods increase estimation variance [38].

Under conditional independence, this field is zero almost everywhere; under conditional dependence, its geometry describes how observing Y deforms the conditional law of X beyond Z.

Inspired by residual networks and residual flows [39, 40], we propose Quantile-Resolution Conditional Independence Test (QRCIT), a residual neural quantile-flow framework. QRCIT learns a baseline conditional quantile model Q^0(Z,u)\widehat{Q}_0(Z, u) and only the additional deformation Dη(Y,Z,u)D_\eta(Y, Z, u), giving

Q^1(Y,Z,u)=Q^0(Z,u)+Dη(Y,Z,u).(5)\widehat{Q}_{1}(Y,Z,u)=\widehat{Q}_{0}(Z,u)+D_{\eta}(Y,Z,u). \tag{5}

The global statistic measures predictive gain under the pinball loss: whether adding Y improves quantile prediction of X beyond Z. Its p-value is calibrated by conditional randomization, while the learned deformation field remains available for structural inspection. Thus QRCIT keeps the standard hypothesis-testing interface but exposes the conditional-law discrepancy before it is aggregated into a scalar statistic.

The central design principle is resolution. Prior Wasserstein CIT uses multiresolution distributional comparisons within conditioning-space bins [23]. QRCIT adopts the broad resolution principle along a different axis: a quantile grid

UK={u1,…,uK}U_K = \{u_1, \ldots, u_K\} evaluates conditional-law change. A coarse grid summarizes broad discrepancy, while a finer grid can resolve localized changes. Since uu is an input to the neural model, increasing KK refines evaluation resolution without increasing model parameters.

Our contributions are as follows.

• We represent conditional-law discrepancy through an inspectable quantile-deformation field, building on the quantile characterization of conditional independence.

  • We propose QRCIT, a residual neural quantile-flow test that learns Q^0(Z,u)\widehat{Q}_0(Z, u) and Dη(Y,Z,u)D_\eta(Y, Z, u), tests via predictive gain, and calibrates global p-values by conditional randomization.

  • We identify quantile resolution as a practical degree of freedom for CIT: the grid size controls how finely QRCIT inspects localized distributional alternatives without changing the model size.

  • We introduce SDB, a controlled benchmark suite for structured conditional-law changes motivated by practical domain evidence and the stability–resolution difficulty of conditional testing.

  • We evaluate QRCIT on synthetic, SDB, sliced multivariate, and biological benchmarks, showing improved detection of structured alternatives and interpretable real-data deformation patterns.

References (39)