Abstract

To test conditional independence of $X$ and $Y$ given a text or an image $Z$, one conditions on an embedding $ψ(Z)$ in place of $Z$. The embedded test is valid if $Z$ is independent of $X$ or of $Y$ given $ψ(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 ψ(Z)]$ and $\mathbb{E}[Y \mid ψ(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.

Keywords

Publication details

Journal
Not available
Open access
Green open access

Cite this article

APA 7

Thams, N., & Lundborg, A. R. (2026). Embedding-Bias in Conditional Independence Testing. https://omanscience.com/en/articles/embedding-bias-in-conditional-independence-testing

MLA 9

Thams, Nikolaj, and Anton Rask Lundborg. "Embedding-Bias in Conditional Independence Testing." https://omanscience.com/en/articles/embedding-bias-in-conditional-independence-testing.

Chicago (author–date)

Thams, Nikolaj, and Anton Rask Lundborg. 2026. "Embedding-Bias in Conditional Independence Testing." https://omanscience.com/en/articles/embedding-bias-in-conditional-independence-testing.

Harvard

Thams, N. and Lundborg, A. R. (2026) 'Embedding-Bias in Conditional Independence Testing', Available at: https://omanscience.com/en/articles/embedding-bias-in-conditional-independence-testing.

Vancouver

Thams N, Lundborg AR. Embedding-Bias in Conditional Independence Testing. https://omanscience.com/en/articles/embedding-bias-in-conditional-independence-testing

IEEE

N. Thams, and A. R. Lundborg, "Embedding-Bias in Conditional Independence Testing," https://omanscience.com/en/articles/embedding-bias-in-conditional-independence-testing.