Source-linked AI summary

Embedding-Bias in Conditional Independence Testing

Nikolaj Thams, Anton Rask Lundborg

arXiv:2610.11584v1stat.MLcs.LG

TL;DR

Embedding the conditioning variable can make a conditional-independence test invalid, and the sufficiency conditions that would prevent this cannot be checked from data. The paper bounds the bias for a residual-correlation test using the correlation and partial R^2 values of the discarded information, then proposes a robust test under a declared tolerance. The robust test approximately holds its level in the reported experiments, while every tested embedding biases the plain test on generated text under an exact null.

  • Problem

    Conditioning on ψ(Z) instead of Z can invalidate a conditional-independence test, while the required embedding sufficiency cannot be confirmed from data.

    Source: §1 · pp. 1–2
  • Method

    The paper treats information discarded by ψ(Z) as an omitted variable and bounds residual-correlation bias using the correlation and partial R^2 values of the missed parts.

    Source: §1 · p. 3, §3.3 · p. 8
  • Results

    The robust test approximately holds its level on synthetic data and text embeddings, but every tested embedding biases the plain test on generated text under an exact null.

    Source: §1 · p. 3
  • Takeaways & Limitations

    Without a tolerance justified by domain knowledge, a rejection is hard to distinguish from an artifact of the embedding.

    Source: §5 · p. 13

    The bias bound is worst-case in λ, and the insufficiency tolerance is generally not identified from data.

    Source: §5 · p. 13

Abstract

from arXiv · show

To test conditional independence of $X$ and $Y$ given a text or an image $Z$, one conditions on an embedding $\psi(Z)$ in place of $Z$. The embedded test is valid if $Z$ is independent of $X$ or of $Y$ given $\psi(Z)$, which cannot be confirmed from data, and when this fails, the rejection probability under the null hypothesis can tend to one. We study this failure, and show that focusing on a specific form of dependence relaxes what the embedding must retain. For a residual correlation test inspired by the Generalised Covariance Measure, validity only requires that the parts of $\mathbb{E}[X \mid Z]$ and $\mathbb{E}[Y \mid Z]$ missed by $\mathbb{E}[X \mid \psi(Z)]$ and $\mathbb{E}[Y \mid \psi(Z)]$ are uncorrelated. Otherwise, we treat the discarded information as an omitted variable. Under the null hypothesis, the bias equals the absolute correlation of the missed parts times the geometric mean of two partial $R^2$ values. This identity yields a robust test valid under a declared tolerance for the geometric mean, which, like a sensitivity parameter, is not identified from the data. On synthetic data and text embeddings, the robust test holds its level approximately. On text generated by a language model, under an exact null hypothesis, every embedding, even the generator's own states, biases the embedded test.

1 Introduction

Testing conditional independence after embedding the conditioning variable can invalidate a test, and the sufficiency needed to avoid this is not verifiable from data. The paper studies a residual-correlation target and treats discarded information as an omitted variable to bound and contain the resulting bias.

1 Introduction

  • Embedding Z does not generally preserve conditional independence; validity conditions such as sufficiency cannot be confirmed from data.Prior work gives sufficient conditions including X ⊥⊥Z | ψ(Z) or Y ⊥⊥Z | ψ(Z), but learned embeddings may not satisfy them (Simnacher et al., 2026a).Source: §1 · pp. 1–2
  • When an embedding omits opinion that influences both replies and reception, a consistent test can reject with probability tending to one despite X ⊥⊥Y | Z.The example’s embedding represents topic but not opinion, leaving correlated parts of the reply and reception unexplained by ψ(Z).Source: §1 · p. 2
  • The paper studies conditional association measures and shows residual-correlation validity requires only that the parts of E[X | Z] and E[Y | Z] missed by ψ(Z) be uncorrelated.This condition includes cases where ψ(Z) retains one of the two conditional means; the test has no power against dependence that leaves residuals given Z uncorrelated.Source: §1 · p. 2
  • Treating discarded information as an omitted variable yields a robust test under a declared bound on the bias, which depends on the correlation of missed parts and partial R^2 values.The tolerance’s validity cannot be verified from data, much like a sensitivity parameter.Source: §1 · p. 3

1.1 Related work

  • Prior work treats sufficiency as an untestable assumption, while this paper quantifies how its failure can invalidate an embedded test.The cited sensitivity-analysis literature bounds bias from unobserved confounding.Source: §1.1 · p. 3

1.2 Notation

  • The target hypothesis is X ⊥⊥Y | Z, with ψ a fixed embedding of Z that may be pretrained or fitted on a separate sample split.The paper situates embedded CI testing among applications including fairness, robustness, and causal discovery (Hardt et al., 2016).Source: §1 · p. 1, §1.2 · p. 3

2 Measures of conditional dependence

The paper defines conditional association measures through correlations of residuals after conditioning on an embedding, with transformation classes determining which dependence they capture. For residual correlation, embedding-induced bias is controlled by the correlation and partial R^2 values of the discarded parts, and vanishes when those parts are uncorrelated.

2.1 Definition and examples

  • The transformation classes yield distinct targets: with unrestricted transformations for X and a scalar Y, vanishing association is equivalent to E[Y | X, ψ(Z)] = E[Y | ψ(Z)].For the unrestricted classes, vanishing association corresponds to conditional independence given ψ(Z).Source: §2.1 · p. 4
  • For real-valued X and Y, ρψ is the absolute correlation of their residuals after adjusting for ψ(Z).The broader measure takes a supremum over allowed transformations; the chosen classes determine which conditional dependence forms it captures.Source: §2.1 · p. 4

2.2 Coarsening the conditioning variable

  • Under H0, residual-correlation bias is the absolute correlation of the discarded parts times the geometric mean of their two partial R^2 values.The bound vanishes when either part is not discarded or when the discarded parts are uncorrelated.Source: §2.2 · p. 5
  • Even when ψ(Z) is mean-sufficient for both variables, the broader association measure can be positive because shared discarded scale information induces dependence given ψ(Z).In the example, the residual squares have conditional covariance 2(1+a^2b^2λ^2) > 0.Source: §2.2 · p. 6
  • For residual correlation, H0 implies ρψ vanishes exactly when the two missed conditional-mean parts are uncorrelated.This includes mean sufficiency for either X or Y, but the measure captures fewer forms of dependence than broader choices.Source: §2.2 · p. 6
  • The residual-correlation measure can miss dependence: ρid may vanish even when H0 fails.This is the trade-off for requiring less of the embedding.Source: §2.2 · p. 6

3 Testing with an insufficient embedding

The paper treats information discarded by an embedding as an omitted variable: under the null, its effect on residual correlation depends on the correlation and partial R^2 values of the missed parts. This yields a residual-correlation test for uncorrelated missed parts, a tolerance-based robust test otherwise, and a benchmark for demonstrated insufficiency.

3.1 Treating discarded information as an omitted variable

  • The embedding-induced covariance is the signed contribution of the discarded parts, and under the null its magnitude depends on their correlation and partial R^2 values.The correlation and partial R^2 values act as sensitivity parameters; whether the discarded parts are uncorrelated may be infeasible to check when only embedded variables are available.Source: §3.1 · pp. 6–7

3.2 Testing with uncorrelated discarded parts

  • The residual correlation test is asymptotically level-valid when the discarded parts are uncorrelated, but under the null it rejects with probability tending to one when they are correlated.It uses cross-fitted regressions and a signed residual correlation statistic; when the target correlation is zero, it is asymptotically equivalent to the GCM test.Source: §3.2 · pp. 7–8

3.3 Testing under an insufficiency tolerance

  • A robust test controls asymptotic size at level α whenever the declared insufficiency tolerance B is valid, regardless of the correlation of discarded parts.The tolerance bounds residual correlation under the null and cannot be verified from data; it can be phrased through prediction accuracy.Source: §3.3 · p. 8

3.4 Benchmarking with richer embeddings

  • A richer embedding can demonstrate insufficiency in the original embedding, and a rejection is robust to that demonstrated insufficiency when its robustness value exceeds the benchmark.Prognostic scores fitted on a separate sample can serve as a one-dimensional richer representation for this benchmark.Source: §3.4 · p. 9

4 Experiments

The experiments examine the tests on synthetic designs, generated text, and online discussions. Across the synthetic settings, the plain residual-correlation test is vulnerable when the embedding misses correlated information, while the robust test's behavior depends on its tolerance; the language-model experiment also finds bias with the generator's own states.

4.1 Gaussian data

  • In Gaussian data, the residual-correlation test stays approximately valid with a sufficient embedding or with λ = 0, but its rejection rate rises to one at λ = 1; the robust test holds level only at the true insufficiency tolerance.Setting the tolerance to half the true insufficiency inflates rejection.Source: §4.1 · pp. 9–10

4.2 Real text with synthetic outcomes

  • With real text and synthetic outcomes, E1 yields approximately the same pattern: the residual-correlation test rejects with certainty at λ = 1, and the robust test holds level with the true insufficiency tolerance but not half of it.Sufficient feature sets stay close to their level.Source: §4.2 · p. 10

4.3 Text generated by a local model with accessible states

  • With language-model-generated text under an exact null, every tested embedding leaves bias; the robust test approximately holds its level with the true-bias tolerance, while underestimating it biases the test and overestimating it reduces power.The generator's own states leave residual correlation of similar size to E1 and E2; their discarded parts have λ between 0.64 and 0.72.Source: §4.3 · pp. 11–12

4.4 Application: style and success of replies in online discussions

  • In the Reddit application, embedded residual correlation stays close to its unconditional value because E1 does not fully recover the effect of the comment.Variance components show correlated comment-level components for the politeness and length pairs, with estimated λ between −0.32 and 0.23.Source: §4.4 · p. 12

5 Discussion

The discussion characterizes embedding-induced bias through insufficiency and correlation of the discarded parts, and proposes a robust test conditional on a correctly specified tolerance. It emphasizes that the tolerance is generally not identified from data, limiting interpretation of rejection without domain knowledge.

5 Discussion

  • The robust test controls level if the insufficiency tolerance is correctly specified, but the tolerance is generally not identified from data, so rejection may be an embedding artifact without domain justification.The authors describe their conclusions about testing conditional independence given an embedding as largely negative.Source: §5 · p. 13

AI use statement

  • The authors report using generative AI for drafting and editing, experiment code, synthetic-text generation, and rating politeness, with human review and author responsibility.Source: AI use statement · p. 13

A.1 Proofs for Section 2

The appendix proofs establish how conditioning on an embedding changes conditional covariance and connect vanishing partial R^2 to equality of conditional means. They also characterize when the broader conditional-independence measure vanishes and illustrate how discarded dependence can make it positive.

A.1 Proofs for Section 2

  • The broader conditional-dependence measure vanishes exactly under conditional independence given the embedding; a constructed example shows that dependence in discarded parts can make it positive despite the original null.The example uses functions of X and ψ(Z), and Y and ψ(Z), whose residual covariance is positive.Source: §A.1 · pp. 17, 19
  • Conditioning on ψ(Z) rather than Z adds the expected product of the missed conditional-mean parts to conditional covariance.Under the null, the original conditional covariance term vanishes, leaving the contribution of those discarded parts.Source: §A.1 · pp. 17–18
  • For real-valued square-integrable X, zero partial R^2 of the missed part is equivalent to E[X | Z] = E[X | ψ(Z)].Source: §A.1 · p. 18

A.2 Coarsening under alternatives

Coarsening can erase conditional dependence when the embedding merges values of Z across which dependence changes sign. It can even remove all dependence detectable by an embedded measure when the embedding is constant.

A.2 Coarsening under alternatives

  • 1/2: In the effect-modifier example, measure (b) detects dependence given Z, but both measures vanish after ψ(Z) averages over the sign-reversing slope.The measure in (c) averages the conditional covariance to zero even before coarsening; measure (b) reaches 1/2 by weighting with Z2.Source: §A.2 · p. 19
  • With ψ constant, independent fair bits X and Z and Y = X ⊕ Z yield embedded dependence 0 despite ρid(F, G) = 1.The full measure attains 1 using transformations that reverse the dependence according to Z.Source: §A.2 · p. 20

A.3 Proof of Proposition 3.2

The proof uses cross-fitting to control regression-estimation errors in residuals, then applies asymptotic normality to establish consistency of the test statistics and variance estimates.

A.3 Proof of Proposition 3.2

  • For observation i, a regression fitted outside fold k predicts at ψ(Zi); its estimated residual is rhatX,i = rX,i − eX,i, and Assumption 3.1 gives MX = oP(n^-1/2).Source: §A.3 · p. 20
  • Conditioning on observations outside a fold and its embedded covariates makes the residual products have conditional mean zero, controlling their aggregate error.The proof applies conditional independence across observations and sums the resulting bounds over the fixed number of folds.Source: §A.3 · pp. 20–21
  • The central limit theorem and continuous mapping yield consistent estimates and asymptotic normality for the residual-correlation statistic.The proof also establishes that the estimated residual standard deviations are positive with probability tending to one.Source: §A.3 · p. 21

A.4 Proof of Proposition 3.4

The robust p-value is calibrated at the declared bias tolerance, and the proof establishes level control and consistency. The appendix also connects the bias identity to omitted-variable bounds.

A.4 Proof of Proposition 3.4

  • At the tolerance boundary, the robust test’s limiting rejection probability equals α; when the true bias is strictly below the bound, its p-value tends to one.The proof treats the zero-bound case as a two-sided normal test and the positive-bound boundary case using the one-sided normal tail.Source: §A.4 · pp. 22–23

A.5 Consistency of the robust test

  • When ρψ > B, the standardized excess over the tolerance diverges, so the robust test is consistent.This conclusion follows under Assumption 3.1 and the stated positive asymptotic variance condition.Source: §A.5 · p. 23

A.6 Proof of Proposition 3.6

  • The bound using a richer embedding is an equality when both full conditional means can be expressed through the richer embedding.The richer embedding’s conditional mean minimizes mean squared error among functions of that embedding and the original embedding.Source: §A.6 · p. 23

B.1 Relation to omitted variable bias

  • The paper’s bias identity has the partial-R2 product form of omitted-variable bounds, but applies to residual correlation without assuming a linear model.Its symmetric decomposition separates the missed parts for X and Y, and the Y-side term does not involve X.Source: §B.1 · pp. 23–24

B.2 Robustness values

The appendix defines robustness values, describes replicate-based identification and implementation, and notes estimation limitations. It also gives details on demonstrated insufficiency and the text corpus.

B.2 Robustness values

  • RVα is the smallest tolerance B at which the robust test does not reject; rejection occurs exactly when B < RVα.If p0 is below α, RVα is the unique B for which pB = α.Source: §B.2 · p. 24

B.3 Identification with replicates

  • Conditionally independent replicates with the same conditional law identify the variance of the conditional mean and the missed-part quantities from joint distributions.A replicate of Y also identifies the covariance of the two missed parts and their correlation parameter.Source: §B.3 · p. 24

Appendix C. Implementation details

  • Algorithm 1 cross-fits regressions on ψ(Z), estimates the robust-test quantities, and optionally rejects using the p-value at tolerance B.It also fits regressions on (ψ(Z), ψ′(Z)) to estimate demonstrated insufficiency.Source: Appendix C · p. 25

C.1 Regressions and cross-fitting

  • Five-fold regressions use least squares when n ≥ d, but near n = d its unaccounted estimation variance can break test level; ridge can leave correlated discarded parts.For the sufficient 1152-dimensional set, ridge rejects at rate 0.73 at n = 10,000; least squares is used wherever n ≥ d.Source: §C.1 · p. 25

C.2 Standard errors and p-values

  • For clustered rows, the estimated influence function is summed within clusters when computing the standard error used for p-values.The robustness value is computed by bisection.Source: §C.2 · p. 25

C.3 Demonstrated insufficiency

  • Demonstrated insufficiency is reliable when the added embedding’s improvement exceeds its extra estimation error, which is of order d′/n for least squares.A one-dimensional prognostic score adds almost no estimation error; the 768 coordinates of E2 demonstrate none of an insufficiency they explain in full.Source: §C.3 · p. 26

C.4 Corpus and encoders

  • The processed 20 Newsgroups corpus contains 15,521 posts, embedded with all-MiniLM-L6-v2 (384 dimensions) and all-mpnet-base-v2 (768 dimensions).Posts with fewer than 30 words were dropped, and longer posts were cut at 300 words.Source: §C.4 · p. 26

C.5 Experiment 1

  • Experiment 1 fixes the Y-side insufficiency at 0.1 and repeats each configuration 500 times.Source: §C.5 · p. 26

C.6 Experiment 2

The experiment constructs an embedding E1 that captures two shared features while omitting directions represented by E2. It compares population benchmarks with cross-fitted estimates and examines regression choices.

C.6 Experiment 2

  • E1 captures the first two principal components, while E2 adds two directions uncorrelated with E1 that contain the designed insufficiency.The added directions are constructed from E2 after regressing on E1, with one orthogonalized against the other.Source: §C.6 · p. 26
  • The population benchmark for E2 is 0.109, representing the full insufficiency, while cross-fitted estimates also include regression estimation error.The oracle tolerance uses a cross-fitted value of 0.109 rather than the design value of 0.1.Source: §C.6 · pp. 26–27
  • Kernel ridge regression gives a similar picture for E1 but inflates the level for the 1152-dimensional set, as ridge regression does.The reported E1 values are population R2 = 0.095 and benchmark 0.092.Source: §C.6 · p. 27

C.7 Experiment 3

The appendix describes generated-text experiments and a ChangeMyView application, including their sampling, measurements, and computation. It also specifies the data and model licensing information.

C.7 Experiment 3

  • Twenty comments and twenty summaries were generated for each of 3,000 posts, producing 120,000 texts for replicate-based estimation and null datasets.The null datasets independently sample one comment and one summary per post; alternatives re-pair draws within posts while leaving the identified quantities unchanged.Source: §C.7 · pp. 27–28

C.8 Application

  • The ChangeMyView application uses 49,050 replies grouped under 18,743 parent comments, with politeness or log length as X and score or delta status as Y.Politeness ratings from Jev and Claude Haiku 4.5 have correlation 0.80.Source: §C.8 · pp. 28–29

C.9 Computation

  • The experiments ran on a laptop, while replicate generation required five minutes on one H100 GPU.Experiment 3 generation took about 3.4 hours on the laptop GPU, and hidden-state extraction took ten minutes.Source: §C.9 · p. 29

C.10 Licenses

  • Qwen3-1.7B and the sentence encoders are released under Apache 2.0, while the corpora have no stated license and ratings used commercial APIs.Source: §C.10 · p. 29

Appendix D. Additional figures and results

Appendix D reports additional power, sensitivity, and application results, while Appendix E provides prompts for the generated-text experiment. The results include comparisons of robust and residual-correlation tests and checks of the bias identity.

Appendix D. Additional figures and results

  • At γ = 0.1, the residual correlation test has power 0.90 and the robust test with B = 0.1 has power 0.04.Figure D.2 reports power at n = 1000 with the sufficient embedding.Source: Appendix D · p. 29, Figure D.2 · p. 30
  • At λ = 1, the robust test with the oracle tolerance approximately holds its level at 0.08, versus 0.96 for the residual correlation test, and loses power at small effects.Source: Appendix D · p. 31, Figure D.4 · p. 32
  • With ψ = E1 and λ = 1, the median estimated benchmark is 0.000 at every n despite a population value of 0.109.The excess estimation variance of the 768 added coordinates dominates the estimated increment.Source: Appendix D · p. 31, Figure D.3 · p. 31
  • Across generator-state embeddings, the conditional-correlation alternatives give the same rejection-rate pattern for E1, E2, and 384 principal components of the mean state.Source: Appendix D · p. 31, Figure D.7 · p. 34
  • In the application, E1 predicts ρ = 0.072 for politeness and 0.093 for log length, versus measured values of 0.072 and 0.091.Across the six pairs, the insufficiency demonstrated by another embedding is at most 0.024.Source: Appendix D · p. 31
  • For the generator-state identity check, filled markers lie on the diagonal within 0.006, while hollow markers lie to its right.Figure D.6 compares observed values with predictions and bounds for every embedding.Source: Appendix D · pp. 31, 34, Figure D.6 · p. 34

Appendix E. Language model prompts

  • The comment prompt requests a persona-based reaction and sentiment label, while the summary prompt requests a short newsletter summary of the post.The two calls share the model weights but otherwise nothing, so conditional independence holds given the post and model.Source: Appendix E · p. 36
Loading 2610.11584v1…