Manuscript Offprint
arXiv:2610.11584Embedding-Bias in Conditional Independence Testing
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
To test conditional independence of X and Y given a text or an image Z, one conditions on an embedding in place of Z. The embedded test is valid if Z is independent of X or of Y given , 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 and missed by and 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 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: conditional independence testing, sensitivity analysis, embeddings, text data, generalised covariance measure
1 Introduction
Tests of conditional independence (CI) are a basic tool of statistics (Shah and Peters, 2020). They underpin tests of variable significance (Lundborg et al., 2024), the evaluation of predictors for fairness (Hardt et al., 2016) and robustness (Peters et al., 2016), and constraint-based causal discovery (Spirtes et al., 2000). In many current applications, the tested variables are text, images, or other unstructured objects, and the test is run on embeddings of those objects instead (Veitch et al., 2020; Kook and Lundborg, 2024; Simnacher et al., 2026b,a), testing by testing the surrogate hypothesis for embeddings and .
Even a perfect test of may not result in a valid test of . The problem lies not with embedding or ; testing via a test of is valid, though possibly less powerful than a direct test of . Embedding the conditioning variable , however, does not generally preserve conditional independence. In this paper, we formalize and quantify this potential loss of validity. Only the embedding of matters for validity, so we absorb and into and and write for , with .

Figure 1: The conceptual example: the topic and the opinion of a post Z both influence its reply X and its reception Y, and the embedded test uses , , and . Since represents the topic but not the opinion, the dashed path through the opinion stays open and X and Y are dependent given although .
Example 1.1. Consider an observational study of online discussions. Let Z be an original post, X be a reply, and Y the votes the reply receives. Whether the style of a reply is unassociated with its reception other than through the content of the post is the hypothesis . To test it, one reduces the reply to a summary such as its politeness and the votes to a score , and replaces the post by an embedding from a pretrained encoder (Figure 1). Suppose that the encoder represents the topic of a post well but its opinion poorly, and that the opinion influences both the politeness of the replies and their votes. Then the parts of and that are not explained by are correlated even if holds, and every consistent test on the embedded variables rejects with probability tending to one.
Existing embedded tests apply a standard CI test to the embedded variables and rely on the embedding being sufficient. Simnacher et al. (2026a) show that this is valid if or (their Theorem 3) or, for tests of conditional mean independence of , if (their Theorem 14). A pretrained encoder, trained for a generic objective, has no reason to retain what says about or , and Simnacher et al. (2026a, Section 3.2) themselves consider even the mean condition implausible for learned embeddings and assess it by simulation. Nor can sufficiency be checked from the data. It is itself a conditional (mean) independence hypothesis given , for which no test is uniformly valid with nontrivial power (Shah and Peters, 2020; Neykov et al., 2021; Lundborg et al., 2024); a richer model of can only show that misses part of .
We examine how embedded tests fail without strict sufficiency, and how far the failure can be contained, in two steps. First, we choose a target that requires less of the embedding. In particular, we consider a family of conditional association measures that includes the targets of commonly used CI tests. Each measure is the largest absolute correlation between residuals of transformations of X and of Y after adjusting for the conditioning variable, and the classes of transformations determine which departures from it captures. For the absolute correlation of the residuals of X and Y after adjusting for , it suffices that the parts of and that misses are uncorrelated, for instance because retains one of the two. However the test has no power against dependence that leaves the residuals given Z uncorrelated.
Second, as in sensitivity analysis for unmeasured confounding (Rosenbaum, 2002; Imbens, 2003; Cinelli and Hazlett, 2020; Chernozhukov et al., 2022), we treat the information that discards as an omitted variable and quantify its effect. Under , , where is the share of the residual variance of given that would explain and is the correlation of the two missed parts. This yields a test that is valid, whatever the correlation of the discarded parts, under a declared bound on . Because the discarded information is part of the observed , one can use data and any richer embedding to lower-bound and .
Our contributions are as follows. In Section 2, we define a family of measures of conditional dependence and bound how embedding Z changes them. In Section 3, we treat the discarded information as an omitted variable and derive a test that remains valid under a declared bound on the resulting bias. In Section 4, we evaluate the bias on synthetic and real data. On text generated by a language model under an exact null hypothesis, every embedding we tried biases the plain embedded test.
Simnacher et al. (2026a), discussed above, develop CI tests for embedded text. A number of works (Keith et al., 2020; Feder et al., 2022; Egami et al., 2022) treat sufficiency as an untestable assumption, to be argued from domain knowledge and examined by sensitivity analysis or simulation. In our work, we quantify how a lack of sufficiency invalidates the test.
Sensitivity analysis. Sensitivity analysis bounds the bias that an unobserved confounder can cause (Rosenbaum, 2002; Imbens, 2003). Cinelli and Hazlett (2020) parametrize it by partial values in linear regression, Chernozhukov et al. (2022) extend the bounds to linear functionals of a nonparametric regression, and Veitch and Zaveri (2020) apply them post hoc; Appendix B.1 compares our identity with these bounds. Conditioning on is conditioning on a coarsening of the confounder, for which Ogburn and VanderWeele (2012, 2013) give bias-attenuation results.
1.2 Notation
Let , where , and take values in measurable spaces , and , for example spaces of texts. We observe independent copies . We write , Var, and Cov for moments under , for the conditional expectation of given , and for conditional independence of and given . Equalities between random variables hold almost surely.
The hypothesis of interest is . An embedding , with a measurable space such as , is a fixed measurable map, pretrained on external data or fitted on a split of the sample that is not used for testing, and id denotes the identity on
Z. Every quantity below is indexed by the transformation of Z that is conditioned on. For a real-valued, square-integrable function f of and a measurable , including , let
be the residual variance of after adjusting for . When X is real-valued and , we write X in place of f, as in . Throughout, when a definition or result is symmetric in and , we state it for X and f only. All proofs are in Appendix A.
2 Measures of conditional dependence
2.1 Definition and examples
In general, neither nor implies the other. Rather than comparing the two hypotheses, we compare measures of conditional dependence given and given , which vanish under and under , respectively. Write and for the distributions of and of , and let and be classes of real-valued transformations of and of ; we write for . A test that conditions on can only use transformations that depend on through . We therefore let be the for which there exists an such that , and likewise. We remark that . If is a class of functions of alone, such as , then .
Definition 2.1 (Measure of conditional dependence). For and , let
with if or , and let , with if or is empty.
The measure is the absolute correlation of the residuals and . Under , for and , since is a function of and one of , so for all and , and for every choice of classes. The classes determine which forms of conditional dependence the measure captures, and larger classes capture more.
Example 2.2. (a) If and , then if and only if .
(b) If Y is real-valued with , , and , then if and only if .
(c) If X and Y are real-valued with , , and , then , the absolute correlation of the residuals and .
In particular, if the measure in (a) vanishes, so does that in (b), and if that in (b) vanishes, so does that in (c). Reducing a text-valued or vector-valued tested variable to a real-valued summary , such as a coordinate of an embedding, is the choice . This choice will be our main focus in applications, but we develop our theory for general .
2.2 Coarsening the conditioning variable
For , let be the part of the regression of on that the embedding does not represent. Since with uncorrelated summands, . Define
the partial of with respect to . If , then , so , and we set . Let , with under degeneracy. The following result relates to .
Theorem 2.3 (Bias bound). For all and ,
Under , .
The factor shrinks since the residuals given have larger variance than those given Z. The right-hand side of the inequality in Theorem 2.3 is the absolute correlation of the discarded parts times the geometric mean of the two partial values. It vanishes if the embedding discards nothing about or about , or if the discarded parts are uncorrelated. Taking suprema over the classes yields the following corollary.
Corollary 2.4 (Bias bound for classes). Let , with if is empty.
(i) .
(ii) Under ,
so if and only if for all and .
By (i), whether or not holds, an embedded measure exceeding implies dependence given of at least the excess. By (ii), under the embedding creates no dependence exactly when the discarded parts are uncorrelated for all pairs, which a vanishing partial ensures but does not require.
Example 2.2 (continued). Under , Corollary 2.4(i) gives . Since is a supremum, this bound tightens from (a) to (c), which orders the three measures by what they require of the embedding. By Lemma A.1, if and only if , and if and only if is mean-sufficient for , that is, . Under , the measure in (a) therefore vanishes if or , the condition of Simnacher et al. (2026a, Theorem 3); that in (b) if or is mean-sufficient for , the latter being the condition of Simnacher et al. (2026a, Theorem 14); and that in (c) if is mean-sufficient for or for . By Corollary 2.4(ii), these conditions are sufficient but not necessary.
The gap between these conditions can be strict, as the following example shows for the measures in Example 2.2(a) and (c).
Example 2.5 (Discarded parts and their correlation). Let have independent standard normal coordinates, , and
with , , and independent standard normal noise, so that holds. Given , and share the scale , so ; hence fails and the measure in Example 2.2(a) is positive, for all , , and . For , is mean-sufficient for and although not sufficient, and the measure in Example 2.2(c) is zero. For , is not even mean-sufficient: , , and the discarded parts and have correlation . By Theorem 2.3, the measure in Example 2.2(c) equals . It is zero at , where the embedding misses two unrelated aspects of , one relevant for and one for , and largest at , where it misses the same aspect for both.
From now on, we consider and that are real-valued and square integrable, possibly after reduction to summaries, and we focus on the measure in Example 2.2(c), . Its classes are the smallest of the three, so it requires the least of the embedding: by Corollary 2.4, vanishes under exactly when the discarded parts and are uncorrelated, which includes the case where is mean-sufficient for or for , and is otherwise bounded by , the smallest of the bounds in Corollary 2.4(i). The disadvantage of using this measure is that it captures the fewest forms of conditional dependence: can vanish although fails.
3 Testing with an insufficient embedding
3.1 Treating discarded information as an omitted variable
A sensitivity analysis expresses the bias caused by an omitted variable through a few interpretable sensitivity parameters and asks how large they would have to be to change a conclusion (Rosenbaum, 2002; Imbens, 2003; Cinelli and Hazlett, 2020). The information in Z that discards acts as an omitted confounder of X and Y given . It enters X and Y through the discarded parts and . Let be the correlation of the discarded parts. Conditioning on instead of Z adds the covariance of the discarded parts,
which is the signed identity behind Theorem 2.3. The partial values and are thus sensitivity parameters, and the bound on the bias under has the product form that is familiar from omitted variable bias in linear regression (Appendix B.1).
Whether the discarded parts are uncorrelated (Corollary 2.4(ii)) cannot be checked without estimating and , which may be infeasible when only embedded variables are available.
3.2 Testing with uncorrelated discarded parts
We test through . Our starting point is to apply the GCM test of Shah and Peters (2020) with as the conditioning variable. To perform the test, we regress and on and reject when the products of the residuals have a mean far from zero. By Theorem 2.3, under whenever , so a valid test of is then valid for . The test we use, which we call the residual correlation test, differs from the GCM test in two ways.
First, we use cross-fitting for the regressions; the sample is split into folds, and for each observation , and are predictions of and from regressions fitted without the fold containing . With the residuals and and , the GCM statistic is
where is the sample variance of the . Cross-fitting increases computational cost, but in exchange, the asymptotic behaviour of the statistic can be controlled even when fails, which happens under whenever the discarded parts are correlated.
Second, instead of we use the sample version of the signed residual correlation , whose absolute value is ,
Here and are the sample residual variances. We write for the sample version of .
By studying the correlation, we can do the sensitivity analysis in terms of the partial values, and the tolerance in Section 3.3 below can be interpreted in terms of prediction accuracy. However, this adds the requirement that and be estimated. When , their estimation errors enter at first order, which is why Assumption 3.1 asks for each mean squared error to be rather than only their product to be , as for the GCM (Shah and Peters, 2020).
Assumption 3.1. Both cross-fitted regressions have mean squared error , that is, , and likewise for . The residuals and have finite fourth moments and positive variances.
The assumption concerns estimation error, which vanishes as grows. Define and similarly, and let
with sample version (see (A.3) in Appendix A.3).
Proposition 3.2 (Asymptotic normality). Suppose that Assumption 3.1 holds and that . Then
in distribution, and in probability.
The residual correlation test has the p-value and rejects at level when . When , it is asymptotically equivalent to the GCM test. Under , it has asymptotic level if the discarded parts are uncorrelated and rejects with probability tending to one if they are correlated (Example 2.5).
3.3 Testing under an insufficiency tolerance
If an analyst is willing to assume, before testing, that for some , then under by Corollary 2.4(ii). We call an insufficiency tolerance, and call it valid if this bound holds. Like a sensitivity parameter, its validity cannot be verified from the data, but it can be phrased in terms of prediction accuracy.
Example 3.3 (An insufficiency tolerance). Suppose the analyst is willing to assume that the best prediction of X from the embedding, , has a mean squared error (MSE) at most 10% larger than that of the best prediction from the text itself, , that is, , and likewise for Y. Since , this bounds and by . More generally, MSEs inflated by the factors and give the tolerance .
By Proposition 3.2, is approximately . For every , the probability that exceeds increases with (Appendix A.4), so we can construct a robust test by computing the -value at the least favourable point ,
the probability of exceeding in absolute value at that point, with estimated by . The robust test rejects when ; at , it is the residual correlation test.
Proposition 3.4 (Asymptotic validity under the tolerance). Under the conditions of Proposition 3.2 and , if is a valid tolerance, then for every , with equality iff .
If the bias due to the embedding is treated as an unknown bias bounded by , the robust test is the bias-aware test of Armstrong and Kolesár (2018, 2021), with the least favourable calibration used for partially identified parameters (Imbens and Manski, 2004; Stoye, 2009). It detects every alternative with , whatever (Corollary A.3 in Appendix A.5).
Inverting the robust test gives a robustness value, a term we take from Cinelli and Hazlett (2020): , the smallest tolerance at which the robust test no longer rejects, is the tolerance at which (Appendix B.2).
Example 3.5 (Example 3.3, continued). Suppose the analyst observes with standard error . The residual correlation test has and rejects. With , the robust test has and does not reject at level 0.05; it stops rejecting once the tolerance exceeds .
3.4 Benchmarking with richer embeddings
Because is observed, the partial values have lower bounds that can be estimated from the data, without the assumption on the relative strength of observed and omitted variables that benchmarks for unmeasured confounding require (Cinelli and Hazlett, 2020). For a second embedding let be the share of the residual variance of given that explains, and call the insufficiency of demonstrated by .
Proposition 3.6 (Benchmark lower bound). Suppose that . For every measurable , , with equality if and are functions of .
Every valid tolerance is therefore at least . Since the robust test with tolerance rejects if and only if (Appendix B.2), a rejection with could be explained by insufficiency that is demonstrably present, and a rejection with is robust to the demonstrated insufficiency. By Proposition 3.6, accurate predictions of and of from demonstrate all of the insufficiency. We can therefore take to be such predictions, known as prognostic scores (Hansen, 2008), fitted on a split of the sample that is not used for testing (Veitch et al., 2020). Because they are one-dimensional, their demonstrated insufficiency is estimated reliably at moderate , unlike that of a richer embedding with hundreds of coordinates (Appendix C.3). In practice, is replaced by its estimate , or, for a strict version of the rule, by a lower confidence bound.
4 Experiments
We evaluate the sensitivity analysis in four settings of increasing realism: fully synthetic, semi-synthetic, LLM-generated, and real data. We fit conditional means by OLS when , and by ridge regression otherwise.
4.1 Gaussian data
Design. We draw with and set and with independent standard normal noise, so that holds. Of the embeddings , is sufficient and is not. The coefficients of the dropped coordinates set , so the true insufficiency is . The correlation of the discarded parts is the cosine of the angle between the entries of and of on the dropped coordinates. We take them orthogonal ( ) or parallel ( ). We record the rejection rate at varying under of the residual correlation test with the sufficient embedding and with the insufficient embedding for both , and of the robust test

Figure 2: Rejection rate under against in Experiment 1 (left, ) and Experiment 2 (right, ) for the residual correlation test (standard) and the robust test, run at , with the embeddings and tolerances named in the rows. Dashed cells are fitted by ridge regression, since is below the dimension of .
at with the tolerance equal to the true insufficiency and to half of it, the tolerance of an analyst who wrongly assumes .
Results. Figure 2 (left) shows the rejection rates. With the sufficient embedding, and with the insufficient embedding at , the residual correlation test is approximately valid for every ; at its rejection rate rises to one. The robust test holds its level when the tolerance is set to the true insufficiency, but its rejection rate is inflated when the tolerance is set to only half of the true insufficiency. Figures D.1 and D.2 in Appendix D add the tightness of the bound, power, and the distribution of and .
4.2 Real text with synthetic outcomes
Design. We repeat the Gaussian experiment with a real Z: 15,521 posts from the 20 News-groups corpus (Lang, 1995), encoded by two sentence encoders from the Sentence-BERT family (Reimers and Gurevych, 2019), with and with . We generate Gaussian X and Y from the embeddings of Z so that is insufficient with and a correlation of the discarded parts set by design, while the four generating features and the 1152-dimensional are sufficient (Appendix C.6).
Results. Figure 2 (right) shows the rejection rates under for from 500 to 10,000. They match Experiment 1: with , the residual correlation test stays close to its level at and rejects with certainty at , where sits at the true insufficiency, and the robust test holds its level with the true insufficiency as its tolerance and not with half of it. The sufficient sets stay close to their level. Figures D.3 and D.4 in Appendix D report and , and the power at .
4.3 Text generated by a local model with accessible states
Design. Using a language model, we generate text from real Z. We take 3000 posts from the corpus of Section 4.2 and, in independent calls to Qwen3-1.7B (Qwen Team, 2025), a 1.7-billion-parameter open model, generate a reader's comment on the post, written from a randomly assigned persona that acts as independent noise, and a newsletter summary

Figure 3: (Left): Experiment 3, rejection rate under over 200 null datasets drawn from the replicates, for the residual correlation test and for the robust test with the tolerance equal to half the true insufficiency, to the true bias and to the true insufficiency ( in the legend); is 64 to 384 principal components of the generator's mean hidden state over the prompt tokens at its last layer, or . (Middle): The same tests with against a range of alternatives. We plot a reference test (dashed) that conditions on the post through the unused draws. (Right): Reddit data application. For each pair of (politeness rating, log length, politeness lexicon) and (signed log score, delta indicator) we plot the unconditional correlation (diamonds), from the baseline, which conditions on the comment being replied to (squares), and from the embedded test with (circles), all with 95% intervals.
of the post (prompts in Appendix E), so that holds exactly. The comment ends with a line labelling its own sentiment as positive, neutral or negative, which is removed before the comment is used. The tested variable X is a sentiment score of the comment, namely the cross-fitted prediction of its label from the embedding of the comment, and Y applies the same fitted direction to the embedding of the summary. We compare equal to and to , the two encoders of Section 4.2, with the generator's internal states. From its forward pass over the post we keep the mean of the hidden states over the prompt tokens at the last of its 28 layers. For a d-dimensional embedding, we take the first d principal components of this mean, and we compare it with and at the same dimension.
Since we have access to the generating model, we can get ground-truth values of the sensitivity parameters. For every post we draw the comment and the summary 20 more times from the same model, prompts and sampling settings, with the persona redrawn each time. By Proposition B.2, these draws identify , and for every embedding, hence the ground-truth insufficiency and the bias of Theorem 2.3. Taking one draw of each text per post gives an exact null dataset; on 200 such datasets we record the rejection rates of the residual correlation test and of the robust test with the tolerance equal to the ground-truth insufficiency, to half of it, and to the ground-truth bias. We can also use the replicates to evaluate power under the alternative: within each post we pair the comment draw, with probability , with the summary draw of the same sentiment rank, and otherwise with an independent draw. The probability controls the conditional correlation of X and Y given the post. Details are in Appendix C.7.
Results. Under , the residual correlation test (red in Figure 3, left) rejects with every embedding. Against an unadjusted correlation of 0.516, the encoders leave with and 0.232 with . The generating model's own states do not remove the bias either: at every dimension, from 64 to 768 principal components, they leave a residual correlation of the same size (Figure D.5 in Appendix D). Two explanations are consistent with this: the aggregated states are less informative than attention to every token, or the regressions do not recover at this .
The discarded parts are correlated, with between 0.64 and 0.72 across embeddings. Figure 3 (left) shows the rejection rates under the null. Using a tolerance equal to the true bias (blue) gives a robust test that approximately holds the level . If we use the true insufficiency and assume , the robust test (green) is conservative and never rejects. With half the true insufficiency (orange) it rejects almost as often as the residual correlation test. The encoders and behave similarly to the generator's own states. Figure 3 (middle) shows the corresponding power. Using the replicates, we plot a reference test that does not use an embedding but conditions on the post itself (dashed). The residual correlation test and the robust test with tolerance reject throughout, but since they do not hold their level, their power means nothing. The robust test with the true bias as tolerance detects almost the same alternatives as the reference test, while the conservative test using the true insufficiency as tolerance only starts rejecting at the strongest alternatives. In conclusion, this experiment shows that a plain residual correlation test can be biased by an insufficient embedding, while the robust test with correct tolerance approximately holds its level and has power, but underestimating the tolerance leads to a biased test and overestimating it to a loss of power.
4.4 Application: style and success of replies in online discussions
Design. We return to the conceptual example of Section 1 with the ChangeMyView corpus (Tan et al., 2016; Chang et al., 2020): 3,051 posts with their discussion threads, the Reddit score of every comment, and the ‘deltas’ that the original poster awards to comments that changed their view. Every observation is a reply to a comment, and Z is the comment being replied to, with 49,050 replies to 18,743 comments (Appendix C.8). X is either the politeness of the reply, rated by a model on a five-point scale, or its log length. Y is the signed log score of the reply or its delta indicator. Because several replies share a Z, we can construct a baseline test that conditions on Z without a representation of it: under , the values of X among the replies to a comment carry no information about their values of Y, so the covariance of X and Y after demeaning within comments estimates , and permuting X among the replies to a comment gives an exact test under exchangeability. We compare the baseline to a test that conditions on an embedding of the comment, and also plot the unconditional correlation .
Results. The embedded stays close to the unconditional value, because the embeddings do not fully recover the effect of the comment (Figure 3, right, and Figure D.8 in Appendix D). The replies to a comment are replicates in the sense of Proposition B.2, so we can recover the sensitivity parameters from variance components: the comment-level components of X and Y are correlated in the politeness and length pairs, with between -0.32 and 0.23.
5 Discussion
We have highlighted the bias arising in CI tests from using embeddings of the conditioning variable. The bias of such a test is described by both the insufficiency of the embedding and the correlation of the discarded parts. We propose a robust test that controls the level if the insufficiency tolerance is correctly specified.
Our results are largely negative about testing conditional independence given an embedding. The bias bound is worst-case in , and the tolerance is in general not identified from the data. In our experiments, richer embeddings demonstrated almost none of the insufficiency, in part because the estimated benchmark loses the excess estimation error of the richer regression (Appendix C.3). Even the generator's own states were insufficient, and only replicates identified the sensitivity parameters. Without a tolerance justified by domain knowledge, a rejection is therefore hard to distinguish from an artifact of the embedding. Future work could investigate how to adapt the embeddings to retain more information about the tested variables, to ensure the validity of the tests, or how to construct better benchmarks for the insufficiency.
AI use statement
Generative AI tools were used for drafting and editing text and proofs and for writing and testing the experiment code. In Experiment 3 (Section 4.3), we used a language model to generate the synthetic texts that constitute the data; we used a decision model in the application (Section 4.4) to rate the politeness of the replies, and a language model to rate a subset of the replies as a check (Appendix C.8); the prompts are reported in Appendix E and Appendix C.8. We have reviewed all AI-assisted work, and all mathematical statements and proofs were checked by the authors, who take responsibility for the content of this work.
Acknowledgments and Disclosure of Funding
Nikolaj Thams is supported by the Novo Nordisk Foundation (grant NNF26OC0114284). The regenerated texts of Experiment 3 were computed on the Gefion AI supercomputer, operated by the Danish Centre for AI Innovation (DCAI).
References
Anthropic. Claude Haiku 4.5 system card. https://www.anthropic.com/system-cards, 2025. Model claude-haiku-4-5 through the Anthropic API.
Timothy B. Armstrong and Michal Kolesár. Optimal inference in a class of regression models. Econometrica, 86(2):655–683, 2018.
Timothy B. Armstrong and Michal Kolesár. Sensitivity analysis using approximate moment condition models. Quantitative Economics, 12(1):77–108, 2021.
Luca Bergen, Dino Sejdinovic, and Vanessa Didelez. The generalised kernel covariance measure. arXiv preprint arXiv:2604.03721, 2026.
Thomas B. Berrett, Yi Wang, Rina Foygel Barber, and Richard J. Samworth. The conditional permutation test for independence while controlling for confounders. Journal of the Royal Statistical Society: Series B, 82(1):175–197, 2020.
Emmanuel Candès, Yingying Fan, Lucas Janson, and Jinchi Lv. Panning for gold: ‘model-X’ knockoffs for high dimensional controlled variable selection. Journal of the Royal Statistical Society: Series B, 80(3):551–577, 2018.
Jonathan P. Chang, Caleb Chiam, Liye Fu, Andrew Z. Wang, Justine Zhang, and Cristian Danescu-Niculescu-Mizil. ConvoKit: A toolkit for the analysis of conversations. In Proceedings of the 21st Annual Meeting of the Special Interest Group on Discourse and Dialogue, pages 57–60, 2020.
Victor Chernozhukov, Carlos Cinelli, Whitney Newey, Amit Sharma, and Vasilis Syrgkanis. Long story short: omitted variable bias in causal machine learning. arXiv preprint arXiv:2112.13398, 2022.
Carlos Cinelli and Chad Hazlett. Making sense of sensitivity: extending omitted variable bias. Journal of the Royal Statistical Society: Series B, 82(1):39–67, 2020.
Naoki Egami, Christian J. Fong, Justin Grimmer, Margaret E. Roberts, and Brandon M. Stewart. How to make causal inferences using texts. Science Advances, 8(42):eabg2652, 2022.
Amir Feder, Katherine A. Keith, Emaad Manzoor, Reid Pryzant, Dhanya Sridhar, Zach Wood-Doughty, Jacob Eisenstein, Justin Grimmer, Roi Reichart, Margaret E. Roberts, Brandon M. Stewart, Victor Veitch, and Diyi Yang. Causal inference in natural language processing: estimation, prediction, interpretation and beyond. Transactions of the Association for Computational Linguistics, 10:1138–1158, 2022.
Ben B. Hansen. The prognostic analogue of the propensity score. Biometrika, 95(2):481–488, 2008.
Moritz Hardt, Eric Price, and Nati Srebro. Equality of opportunity in supervised learning. In Advances in Neural Information Processing Systems, volume 29, pages 3315–3323. Curran Associates, Inc., 2016. URL https://proceedings.neurips.cc/paper_files/paper/2016/file/6a9659feb1216f14f7384ba499518b38-Paper.pdf.
Guido W. Imbens. Sensitivity to exogeneity assumptions in program evaluation. American Economic Review, 93(2):126–132, 2003.
Guido W. Imbens and Charles F. Manski. Confidence intervals for partially identified parameters. Econometrica, 72(6):1845–1857, 2004.
Katherine A. Keith, David Jensen, and Brendan O'Connor. Text and causal inference: a review of using text to remove confounding from causal estimates. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5332–5344, 2020.
Ilmun Kim, Matey Neykov, Sivaraman Balakrishnan, and Larry Wasserman. Local permutation tests for conditional independence. The Annals of Statistics, 50(6):3388–3414, 2022.
Lucas Kook and Anton Rask Lundborg. Algorithm-agnostic significance testing in supervised learning with multimodal data. Briefings in Bioinformatics, 25(6):bbae475, 2024.
Ken Lang. NewsWeeder: learning to filter netnews. In Proceedings of the 12th International Conference on Machine Learning, pages 331–339, 1995.
Anton Rask Lundborg, Ilmun Kim, Rajen D. Shah, and Richard J. Samworth. The projected covariance measure for assumption-lean variable significance testing. The Annals of Statistics, 52(6):2851–2878, 2024.
Matey Neykov, Sivaraman Balakrishnan, and Larry Wasserman. Minimax optimal conditional independence testing. The Annals of Statistics, 49(4):2151–2177, 2021.
Elizabeth L. Ogburn and Tyler J. VanderWeele. On the nondifferential misclassification of a binary confounder. Epidemiology, 23(3):433–439, 2012.
Elizabeth L. Ogburn and Tyler J. VanderWeele. Bias attenuation results for nondifferentially mismeasured ordinal and coarsened confounders. Biometrika, 100(1):241–248, 2013.
Jonas Peters, Peter Bühlmann, and Nicolai Meinshausen. Causal inference by using invariant prediction: identification and confidence intervals. Journal of the Royal Statistical Society Series B: Statistical Methodology, 78(5):947–1012, 2016. doi: 10.1111/rssb.12167.
Qwen Team. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025.
Nils Reimers and Iryna Gurevych. Sentence-BERT: sentence embeddings using Siamese BERT-networks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing, pages 3982–3992, 2019.
Yixin Ren, Chenghou Jin, Yewei Xia, Li Ke, Longtao Huang, Hui Xue, Hao Zhang, Jihong Guan, and Shuigeng Zhou. Score-based generative modeling for conditional independence testing. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining, 2025.
Paul R. Rosenbaum. Observational Studies. Springer, New York, 2nd edition, 2002.
Cyrill Scheidegger, Julia Hörrmann, and Peter Bühlmann. The weighted generalised covariance measure. Journal of Machine Learning Research, 23:1–68, 2022.
Rajen D. Shah and Jonas Peters. The hardness of conditional independence testing and the generalised covariance measure. The Annals of Statistics, 48(3):1514–1538, 2020.
Marco Simnacher, Georg Keilbar, Benjamin König, Christoph Lippert, and Sonja Greven. Embedded conditional independence tests for large language model generated text with an application to German parliament speeches. arXiv preprint arXiv:2609.00946, 2026a.
Marco Simnacher, Xiangnan Xu, Hani Park, Christoph Lippert, and Sonja Greven. Deep nonparametric conditional independence tests for images. Journal of Machine Learning Research, 27(96):1–62, 2026b.
Peter Spirtes, Clark Glymour, and Richard Scheines. Causation, Prediction, and Search. Adaptive Computation and Machine Learning. MIT Press, Cambridge, MA, 2nd edition, 2000. ISBN 0-262-19440-6. doi: 10.7551/mitpress/1754.001.0001.
Jörg Stoye. More on confidence intervals for partially identified parameters. Econometrica, 77(4):1299–1315, 2009.
Chenhao Tan, Vlad Niculae, Cristian Danescu-Niculescu-Mizil, and Lillian Lee. Winning arguments: Interaction dynamics and persuasion strategies in good-faith online discussions. In Proceedings of the 25th International Conference on World Wide Web, pages 613–624, 2016.
Wesley Tansey, Victor Veitch, Haoran Zhang, Raul Rabadan, and David M. Blei. The hold-out randomization test for feature selection in black box models. Journal of Computational and Graphical Statistics, 31(1):151–162, 2022.
TypeSafe AI. Jev: a System One decision model. https://typesafe.ai, 2026. Model jev-latest through the TypeSafe API, accessed 30 September 2026.
Victor Veitch and Anisha Zaveri. Sense and sensitivity analysis: simple post-hoc analysis of bias due to unobserved confounding. In Advances in Neural Information Processing Systems, volume 33, 2020.
Victor Veitch, Dhanya Sridhar, and David M. Blei. Adapting text embeddings for causal inference. In Proceedings of the 36th Conference on Uncertainty in Artificial Intelligence, pages 919–928, 2020.
Kun Zhang, Jonas Peters, Dominik Janzing, and Bernhard Schölkopf. Kernel-based conditional independence test and application in causal discovery. In Proceedings of the 27th Conference on Uncertainty in Artificial Intelligence, pages 804–813, 2011.
Yi Zhang, Linjun Huang, Yun Yang, and Xiaofeng Shao. Doubly robust conditional independence testing with generative neural networks. arXiv preprint arXiv:2407.17694, 2024.
Appendix A. Proofs
In this section, write , which takes values in .
A.1 Proofs for Section 2
Since is measurable, , and consists of the for which is a function of . If , then almost surely, so for every and . The conventions and thus replace 0/0 by 0, and every pair satisfies whenever .
Proof of the claims in Example 2.2. (a) Here and consist of all for which is a function of and all for which is a function of . If , then , so for all and , every is zero, and so is the supremum. Conversely, if , then every is zero, so for all and . For measurable sets , , and , take and . Then for all , so almost surely, that is, almost surely for all and . This is .
(b) Let . Since is a function of , we have by the tower property and the Cauchy–Schwarz inequality that
Therefore, for any , we have
The function is a square-integrable function of , so it lies in , and it attains the upper bound, which is therefore the value of . From this, we see that if and only if . The argument assumes . If , then , so , and the measure is zero by convention.
(c) The classes are singletons, and their elements do not depend on , so and .
Proof of Theorem 2.3. If or , both sides of the bound are zero by convention, so let . We have , and likewise for . Since has conditional mean zero given and is a function of , the cross terms have expectation zero, so
Since the discarded parts have mean zero,
Dividing by and using , and likewise for g, we have
where the second fraction is read as zero if , in which case . The two fractions have absolute values and , so the reverse triangle inequality gives the bound. Under , , so .
Proof of Corollary 2.4. If or is empty, all quantities are zero, so let both be nonempty.
(i) Let and . Since the factor multiplying in Theorem 2.3 is at most one, we have
where the second inequality uses , , , and that , because and . Taking the supremum over and gives (i).
(ii) Under , Theorem 2.3 gives for all and , and taking the supremum gives the equality in (ii). The supremum is zero if and only if every term is zero. If or , the corresponding discarded part vanishes, and by convention. Hence every term is zero if and only if for all and .
Lemma A.1 (Zero partial ). (i) if and only if .
(ii) For real-valued, square-integrable , if and only if .
Proof. For , if and only if , that is, ; this holds by definition if and by convention otherwise. (i) For , consists of the for which is a function of . If , then because is a function of , so for every bounded , and by truncation for every square-integrable one. Conversely, if , taking gives for every measurable , which is . (ii) For , the condition is .
Computations for Example 2.5. Given Z, X and Y are independent with means and and common variance , so holds, while given both have mean . Hence , , , and , and likewise for Y. For , the discarded parts have correlation , and Theorem 2.3 gives the measure in Example 2.2(c) under . For the second moments, write and , which are independent of . Expanding , every term with a single factor or has mean zero, so
while . Hence . Thus and , which are functions of and of , have , and fails by Example 2.2(a).
A.2 Coarsening under alternatives
For and , the law of total covariance gives
since has conditional mean zero given . The second term is created by the discarded information, and the first is the dependence given , averaged over the values of that maps to the same point. For classes of functions of and of alone, such as those of Example 2.2(c), only the overall average of this dependence enters the measure, and coarsening preserves it. Classes whose transformations depend on weight the dependence given . After coarsening, they can only weight its averages over the merged values, and they lose dependence that changes sign within them.
Example A.2 (An embedding that misses an effect modifier). Let have independent coordinates, standard normal and uniform on , let , and let
with independent standard normal noise. Given Z, the residual of X enters Y with slope , so changes sign with . The measure of Example 2.2(c) averages it out and is zero, whereas the measure of Example 2.2(b) is , attained by . Given , the slope averages to zero, so and both measures vanish, although fails. For the classes of (b), : the measure of (b) loses the alternative only because merges the values of that reverse the dependence, whereas the measure of (c) had nothing to lose.
Computations for Example A.2. Given Z, the residuals are and , with covariance and variances 1 and 2, so the measure of Example 2.2(c) is . For , because is independent of , so by the Cauchy-Schwarz inequality the measure of Example 2.2(b) is , attained by . Since is independent of , , so for every that is a function of , and both measures given vanish. On the other hand, depends on , so fails. Finally, is independent of , so for every such , and , so .
Even the measure of Example 2.2(a) can lose all dependence. Let and be independent fair bits, (exclusive or), and constant. Again , since and , and because . Yet , attained by and , which have the same residual given .
A.3 Proof of Proposition 3.2
The sample version of the asymptotic variance of Section 3.2 replaces and by and , by , and the variance by an average,
the summands have average zero, since and .
Proof. The number of folds is fixed, and denotes the set of indices in fold ; for , is the prediction at of a regression fitted on the observations outside fold , and likewise for . Write
so that and, by Assumption 3.1, ; define , , and likewise. Then and are the standardized residuals of observation , , and , so that . By (2), with .
We first show two bounds on the estimation errors. Since for ,
and likewise for Y. Next, we show that
and that the same holds with , , or in place of ; the four proofs are identical. Fix , let , and let be the -algebra generated by the observations outside fold and by , . Each with is -measurable, and since the observations are independent, the with are conditionally independent given , with . Hence and, by the Cauchy–Schwarz inequality,
The first factor is bounded in probability by Markov's inequality, since by Jensen's inequality, and the second is by (A.4). For , Chebyshev's inequality conditionally on gives by bounded convergence, and summing over the folds gives (A.5). This is the argument of Shah and Peters (2020) for the GCM, with conditioning on the other folds in place of .
Next, we linearize . Expanding gives
because and are by (A.5) and, as for the GCM (Shah and Peters, 2020), by the Cauchy–Schwarz inequality. Similarly, expanding gives
since the middle term is by (A.5) and , and likewise for . The vectors are independent and identically distributed with mean and, by the fourth moments in Assumption 3.1, a finite covariance matrix. By the central limit theorem, therefore converges in distribution to a normal distribution with mean zero and the covariance matrix of these vectors; in particular, the three estimates are consistent, and and are positive with probability tending to one. The map is continuously differentiable at , since the variances are positive, with gradient , and . The delta method gives
in distribution, since
It remains to show that in probability. Let
so that by (A.3). Since and , has mean zero, and its variance is by definition, so in probability by the law of large numbers. By the reverse triangle inequality, , so it suffices to show that . Let . Since in probability and is bounded in probability, (A.4) gives
and likewise for . Now
Since , it suffices that the average of the square of each term is . For the terms with a , this follows from the Cauchy–Schwarz inequality, for instance , since and are bounded in probability and is consistent. For the last term, it follows from . Hence in probability.
Finally, since , Slutsky's lemma gives in distribution.
A.4 Proof of Proposition 3.4
The construction of in Section 3.3 rests on the following fact. If , then for every ,
which is even in and nondecreasing in : for , its derivative with respect to is , where is the standard normal density, because , with strict inequality if . With and , it equals in (3).
Proof. By Proposition 3.2, converges in distribution to a standard normal random variable, and in probability; hence and in probability. Under and a valid tolerance, by Corollary 2.4(ii). We consider three cases.
If , then in probability, so in probability. Since , in probability, and .
If , then , so is the two-sided normal p-value of . By the continuous mapping theorem, converges in distribution to the uniform distribution on , and .
If , we may take , since replacing X by -X changes the signs of and but leaves , , and unchanged. On the event , whose probability tends to one, , and (3) reads
The second term tends to zero in probability, because in probability. The first term is the one-sided normal p-value of , so, by the continuous mapping theorem and Slutsky's lemma, converges in distribution to the uniform distribution on , and .
In each case, converges to a limit that is at most , with equality if and only if .
A.5 Consistency of the robust test
Corollary A.3 (Consistency of the robust test). Suppose that Assumption 3.1 holds and that . If
then for every .
Proof. By Theorem 2.3 and ,
By Proposition 3.2, and in probability, so in probability and in probability. Since , it follows that .
A.6 Proof of Proposition 3.6
Proof. Write for the residual variance of given the embedding , so that . Since minimizes the mean squared error among square-integrable functions of , which include , we have , and likewise . Dividing by gives , and likewise for ; multiplying the two bounds gives . If is a function of , then , so and . If the same holds for , the bound is an equality.
Appendix B. Sensitivity parameters and extensions
B.1 Relation to omitted variable bias
Cinelli and Hazlett (2020) write the omitted variable bias of a regression coefficient in a linear model as the geometric mean of two partial values times a scale factor, and build robustness values and benchmarks on it. The bound of Theorem 2.3 has the same product form, but it concerns the residual correlation , so it is scale-free, and it assumes no linear model: and compare residual variances around conditional expectations, and (1) holds for every distribution.
Chernozhukov et al. (2022) bound the omitted variable bias of linear functionals of a regression function. Their Theorem 1 writes the bias as , the covariance of the errors in the regression and in its Riesz representer when the omitted variables are dropped, and their Corollary 1 bounds it through nonparametric partial values. The expected conditional covariance is a linear functional of the regression with representer . The long versions condition on , so the representer error is , and under the long functional is zero and the regression error is . Their identity and (1) thus describe the same bias, but (1) splits it symmetrically into and , and the Y-side term does not involve . This is what makes and the natural sensitivity parameters; each is a correlation ratio, the kind of nonparametric partial used in their Corollary 1.
B.2 Robustness values
Definition B.1 (Robustness value). For a level , is the smallest tolerance at which the robust test does not reject. That is, if , and otherwise is the unique with .
By the fact at the start of Appendix A.4, with , is nondecreasing in , and strictly increasing if . It is also continuous in and tends to as . If , then , so exactly one has . In both cases, the robust test with tolerance rejects if and only if .
B.3 Identification with replicates
The sensitivity parameters involve and , which cannot be estimated directly from a text-valued Z, but they are identified when conditionally independent replicates are available, as in the application, where several replies share a Z, and in Experiment 3, where the generating model can be sampled. 20 regenerated comments and summaries per post identify the three parameters for every embedding (Section 4.3).
Proposition B.2 (Identification with replicates). Let be square integrable and conditionally independent of given Z, with the same conditional law given Z as X. Then , so that , , and are identified from the joint law of . If is such a replicate of Y, conditionally independent of X given Z, then , so that and are identified.
Proof. by conditional independence and equality of the conditional laws; subtracting gives the first claim. Since with , , and . For , , and the same decomposition gives .
Second embeddings that depend on Z and on independent noise U, such as a replicate or the mean of several, are covered by Proposition 3.6 after replacing Z by . Since U is independent of , the hypothesis , the conditional means given Z, and hence , , , and are unchanged.
Appendix C. Implementation details
Algorithm 1 summarizes the procedure of Section 3. The rest of this appendix describes the regressions and the details of each experiment.
Algorithm 1 Sensitivity analysis for an embedded conditional independence test
Require: Observations , embeddings and , number of folds , level , optional tolerance .
1: Cross-fit regressions of and on ; form residuals , .
2: Compute by (2) and , by (A.3), the -value of Section 3.2, and of Definition B.1.
3: Cross-fit regressions of and on ; compute , and (Section 3.4).
4: If a tolerance is given, reject if , with from (3).
Ensure: , , , and the robust decision.
C.1 Regressions and cross-fitting
All conditional means are estimated with folds. The regressions on and on use the same folds, and inputs are standardized on the training folds. In Experiments 1 and 2, we use least squares when every training fold has at least as many rows as the conditioning set has coordinates, which on the grids of both experiments is the condition , and ridge regression with the penalty chosen by leave-one-out cross-validation otherwise; the two regressions of a benchmark use the procedure of the richer set. In Experiment 1 every regression is therefore least squares, and in Experiment 2 only the 1152-dimensional set at is fitted by ridge regression. In Experiment 3 and in the application, every regression is least squares, and we report an embedding only if every training fold has at least 2.5 times as many rows as the embedding has coordinates.
Each procedure has a drawback. The estimation variance of least squares near , of order , is not captured by the standard error of Proposition 3.2, and the residual correlation test then loses its level even when the discarded parts are uncorrelated. With and in Experiment 2, the rejection rate under is 0.51 at , where the training folds hold 400 rows for 384 coordinates, and 0.22 at , against 0.07 to 0.10 from on. Ridge regression has no such variance, but a penalty chosen for prediction shrinks the fitted means and can leave correlated parts of the discarded information in both residuals. On the sufficient 1152-dimensional set of Experiment 2 it rejects at rate 0.73 at , where , which is why we use least squares wherever . The sentiment direction of Experiment 3 and the prognostic score of the application are ridge predictions; they define variables and are not regressions of the test.
C.2 Standard errors and -values
The standard error of is , with from (A.3). Where rows are clustered, as in the application, the estimated influence function is summed within clusters. The -values and of Sections 3.2 and 3.3 use this standard error, and is computed by bisection.
C.3 Demonstrated insufficiency
We estimate by one minus the ratio of the cross-fitted mean squared error of the regression on to that of the regression on , truncated at zero, with the same folds for both regressions. Each cross-fitted mean squared error is the residual variance plus the mean squared estimation error of its regression. To leading order, the estimate is therefore minus the excess estimation error of the richer regression over the base regression, relative to , and the truncated estimate is zero unless exceeds this excess, which is of order for least squares with added coordinates. A one-dimensional prognostic score adds almost no estimation error, which is why it demonstrates insufficiency more reliably than a richer embedding (Section 3.4). In Experiment 2, the 768 coordinates of demonstrate none of an insufficiency that they explain in full (Appendix D).
C.4 Corpus and encoders
The 20 Newsgroups posts have headers, footers and quoted text removed. We drop posts with fewer than 30 words and cut longer posts at 300 words, leaving 15,521 posts. is all-MiniLM-L6-v2 ( ) and is all-mpnet-base-v2 ( ), both used through the sentence-transformers library (Reimers and Gurevych, 2019) with default pooling and a window of 256 word pieces.
C.5 Experiment 1
Let and be the coefficients of the dropped coordinates . Then , , and is the cosine of the angle between and . We set , so that , and repeat every configuration 500 times. The power experiment uses , the sufficient embedding and the alternative .
C.6 Experiment 2
The outcomes are
with independent standard normal . Here and are the standardized first two principal components of , which captures fully. The features and are standardized projections on two random directions of the residual of the standardized after a least squares regression on over the corpus, with orthogonalized against . Both are linear functions of and uncorrelated with , so captures none of them and demonstrates all of the insufficiency of . The constant with sets and at . Under the alternative, receives an additional term . The population values of , , and the benchmark are computed by cross-fitted least squares on 8000 posts; the partial is 0.109 rather than 0.1 because the cross-fitted regression on the 384 coordinates of leaves an estimation error of order in the residual. The oracle tolerance of the robust test in Figure 2 is this cross-fitted value, so it includes the estimation error of a least squares regression at ; the design value under the exact linear projection is 0.1. The population benchmark of is 0.109, the full insufficiency, because and are linear in ; its estimate uses the 1152-dimensional set and follows that set's regression rule. The rejection rates under use 500 (200 for the high-dimensional encoder) draws of the outcomes per configuration, the sensitivity analysis 100 draws, and the power curves, at , 100 draws. Kernel ridge regression with a Gaussian kernel in place of least squares gives the same picture for (population , benchmark 0.092) and inflates the level of the 1152-dimensional set, as ridge regression does.
Remark C.1 (The null hypothesis for generated text). Suppose the comment is generated by a language model with weights from the post and fresh sampling noise , and that is a function of . Then for every , however the weights were obtained, so conditional on the model, holds by construction. A dependence can only arise if is treated as random and dependent on the sample, for instance through memorization (Simnacher et al., 2026a); this is a single shared realization for which the i.i.d. calibration of a test is not obviously appropriate. Text generated from real by a fixed model is therefore a benchmark in which the null hypothesis is exact, and a rejection on such data is a type I error, caused by insufficiency of or by miscalibration.
C.7 Experiment 3
The generator is Qwen3-1.7B (Qwen Team, 2025) (bfloat16, Hugging Face transformers on a laptop GPU) with the system prompt and the two instructions of Appendix E, the persona drawn per post with a fixed seed, sampling at temperature 1 with nucleus probability 0.95 and at most 160 new tokens, and the model's thinking mode disabled. The comment ends with a line in which it labels its own sentiment as positive, neutral or negative (coded +1, 0, -1), which we parse and remove before the comment is used; all but one of the 3000 comments carried a label, and that one is dropped. The label is the target of a cross-fitted ridge regression on the embedding of the comment, and its out-of-fold predictions on the embeddings of the comment and of the summary are X and Y. The direction is cross-fitted with the same five folds as the residual regressions, so the comments of a fold enter, through the direction, the values of X and Y in the other folds; for a ridge direction at n = 3000 this leakage is small. Both encoders read the first 256 word pieces of a post, and only 2.9% of the posts are longer.
The hidden states come from a forward pass over the summary prompt, which contains the post and a fixed instruction and nothing else, in batches of ten posts in a fixed order, since left padding changes the states slightly. The four embeddings are the mean over the prompt tokens and the state at the last prompt token, each at the output of the last layer and of layer 14 of 28; principal components are fitted on the 3000 posts. By the rule above, every embedding of at most 960 coordinates is reported, and the 1152- and 2048-dimensional ones are not.
We drew the replicates with vLLM, with the same bfloat16 weights, prompts, sampling settings and label parsing, and the persona redrawn per draw: 20 comments and 20 summaries for each of the 3000 posts, 120,000 texts in all. 2,997 posts have all draws complete and a labelled observed comment. The regenerated comments match the observed ones in length, label frequencies and the share written in the first person, so the two runs sample the same law. The analysis follows Proposition B.2. and are the between-post components of a balanced one-way analysis of variance over the draws. is estimated by the sample covariance of the cross-fitted prediction with , which, unlike the cross-fitted mean squared error, is not inflated by the estimation error of the regression, and by the average of the two cross covariances of a prediction with the other variable. Then gives , , and the true insufficiency, with 95% percentile intervals from 200 bootstrap samples of posts. Each null dataset takes one comment draw and one summary draw per post, independently, is scored with the sentiment direction of the observed data, and is tested exactly like the observed data. Figure D.6 in Appendix D compares on these datasets with the prediction and the bound of Theorem 2.3 for every embedding.
The alternatives re-pair the draws within each post. With probability , a comment draw is paired with the summary draw whose rank among the 20 summary draws of the post equals its own rank among the comment draws, and otherwise with an independent draw. Only the pairing changes, so every quantity identified above is unchanged, and the conditional covariance given the post is times that of the sorted draws. Hence sets exactly, up to 0.84 at , and the induced dependence is positive, the direction of the bias here. By Theorem 2.3, the residual correlation with is , and the mean of over the 200 datasets per value follows this line to within 0.01. The reference test residualizes X and Y on the means of the draws of the post that the dataset does not use. Under these means are independent of the dataset given the post, and their error enters the residual variances, so the reference approximates the test with the post observed. Figure D.7 in Appendix D shows the rejection rates for , and the generator's state.
C.8 Application
From the 3,051 conversations of the ChangeMyView corpus we keep every reply whose parent is a comment rather than the post, written by neither the original poster, a bot, nor the author of the parent, not deleted, of at least twenty words and with a score; the parent must not be deleted and must have at least five words. We keep the earliest reply per user and parent, at most 8 replies per parent (sampled at random with a fixed seed), and parents with at least two such replies. This gives 49,050 rows under 18,743 parent comments in 2,653 posts, 2.6 rows per parent on average. Z is the parent comment, of median length 78 words; 16% of the parents are top-level replies to the post and the rest lie deeper in the thread. Scores are Reddit scores at collection time, and for a score s. The delta indicator marks the comment that a delta was awarded to, the ancestor of the DeltaBot confirmation written by the awarded user (1.4% of the rows). Besides the politeness rating and the log length, we use as X a lexicon score, politeness markers minus hostile markers per hundred words.
Politeness is rated by Jev (TypeSafe AI, 2026), a decision model that answers a rubric question with a probability-weighted score instead of generating text. The reply is passed as the state, the instruction is “Rate the politeness of this online comment. Judge tone and courtesy only, not the opinion expressed.", and the five levels of the rubric are rude or hostile, somewhat impolite or curt, neutral, polite, and very polite and courteous, coded 1 to 5, so that the score is continuous (median 2.57, standard deviation 0.76). All 49,050 replies were rated in twelve minutes at a cost of 1.0 USD. As a check, 4,728 of the replies were also rated by Claude Haiku 4.5 (Anthropic, 2025) at temperature 0, with the system prompt "You rate the politeness of online comments for a research dataset. Judge tone and courtesy only, not the opinion expressed. Answer with a single digit." and the user prompt "Comment: <<[reply]>>> Rate the politeness of this comment from 1 (rude or hostile) to 5 (very polite and courteous). Answer with a single digit." The two ratings have correlation 0.80 (rank correlation 0.79). The rounded score agrees exactly in 45% of the cases and within one point in 97%, and its mean rises from 1.21 to 4.21 across the five levels of the other rating, so the two scales differ by a shift of about half a point and not in order.
The embeddings of Z are and of the parent comment, which fits into the 256 word-piece window for 84% of the parents; its surface statistics (length, sentence count, character classes, mean word length and presence of a URL) and 300 TF-IDF singular directions ; its metadata (log length, signed log score, whether the original poster wrote it, depth, log number of replies, whether it quotes its parent, presence of a URL); the embedding of the post it belongs to; combinations of these with ; and the prognostic score, the cross-fitted ridge predictions of and of from . Folds are grouped by post, and standard errors sum the influence function within posts. The baseline demeans and permutes within parents. The variance components are unbiased analysis-of-variance estimates for unbalanced groups with parents as groups, and is the between-parent covariance of the two variables divided by the product of their between-parent standard deviations.
C.9 Computation
Experiments 1 and 2 run on a laptop, in minutes and in about one hour, respectively. The generation of Experiment 3 took about 3.4 hours on the laptop’s GPU and the hidden states ten minutes; the replicates took five minutes on one H100 GPU.
C.10 Licenses
Qwen3-1.7B and the two sentence encoders are released under the Apache 2.0 license. The 20 Newsgroups corpus and the ChangeMyView corpus of ConvoKit are distributed by their creators for research use without a stated license. The ratings by Jev and Claude Haiku 4.5 were obtained through the providers' commercial APIs under their terms of use.
Appendix D. Additional figures and results
Experiment 1. Figure D.1 plots under against for five values of . The points lie on the lines of (1), and the bound is attained at . Figure D.2 (left) shows the power at with the sufficient embedding. The power curve of the robust test is that of the residual correlation test shifted to the right by roughly , as Corollary A.3 predicts: at , the residual correlation test has power 0.90 and the robust test with has power 0.04. Figure D.2 (right) shows and under
with the insufficient embedding at . The statistic is centred at , and lies below this population value in 95% of the runs.

Figure D.1: Experiment 1, under against for five values of . Solid lines are , the value under by (1); the dashed line is the bound.


Figure D.2: Experiment 1. Left: power at against the effect size of the alternative , with the sufficient embedding, for the residual correlation test and for the robust test with tolerances . Right: (labelled in the legend, the robustness value of the point estimate) and against under with the insufficient embedding at ; the dashed line is the population value .
Experiment 2. Figure D.3 shows the sensitivity analysis with and . The median of is 0.118 at and 0.103 at , against the oracle bound 0.109, and the median rises from 0.039 to 0.087. The insufficiency of demonstrated by has population value 0.109, all of the truth, but its estimate has median 0.000 at every n: the excess estimation variance of the 768 added coordinates dominates the increment (Appendix C.3). Figure D.4 shows the power at n = 2000. At , the robust test with the oracle tolerance approximately holds its level (0.08 against 0.96 for the residual correlation test) and loses power at small effects.

Figure D.3: Experiment 2, (median and interquartile range; labelled RV = in the legend), median , and the estimated benchmark against n with and . The dashed line is the oracle bound, which equals the population benchmark.
Experiment 3. Figure D.5 shows under for the four embeddings of the generator's state against their dimension, together with the true insufficiency of each, and the rejection rates of the tests for the mean and the last-token state at the last layer. Figure D.6 checks the identity of Theorem 2.3. For every embedding, the mean of over the 200 null datasets lies within 0.006 of the prediction identified from the replicates, and below the bound , since lies between 0.64 and 0.72. Figure D.7 shows the rejection rates against the coupled alternatives for , and 384 principal components of the mean state at the last layer; the three embeddings give the same picture.
Application. Figure D.8 shows politeness and log length against score under every embedding of the comment being replied to. In both pairs, every embedded lies between the unconditional correlation and the baseline, and closer to the former; for politeness, the embedded values range from 0.062 to 0.072 against a baseline of 0.094. The insufficiency of that any other embedding demonstrates is at most 0.024 over the six pairs. The baseline estimates directly, so the gap to it is the bias of the embedded test. For , the identity (1) with from the baseline and , and from the variance components predicts for politeness and 0.093 for log length, against measured values of 0.072 and 0.091.

: insufficient , bias at the bound

Figure D.4: Experiment 2, power at n = 2000 against the effect size with , for the residual correlation test and for the robust test with tolerance equal to the oracle bound. Left: , where is insufficient but the residual correlation test is unbiased. Right: , where the residual correlation test rejects at rate 0.96 under .

Figure D.5: Experiment 3, the four embeddings of the generator’s state. Left: under with 95% intervals against the dimension of , for the principal components of the generator’s states (mean over the prompt tokens and last prompt token, at the last and the middle layer), for and , and the unadjusted correlation (dotted); hollow markers are the true insufficiency of each embedding, identified from the replicates. Right: rejection rate under over 200 null datasets drawn from the replicates, for the residual correlation test and for the robust test with the tolerance equal to half the true insufficiency, to the true bias and to the true insufficiency ( in the legend), for the mean and the last-token state at the last layer. All regressions are least squares.

Figure D.6: Experiment 3, identification check. For every embedding , under (mean over the 200 null datasets, with twice its standard deviation) against the prediction of Theorem 2.3 (filled) and the bound (hollow), both identified from the replicates; the line is the diagonal. Every filled marker lies on the diagonal, to within 0.006, and every hollow marker to its right.

Figure D.7: Experiment 3, rejection rates against the coupled alternatives for , and 384 principal components of the generator's mean state at the last layer, by the conditional correlation of comment and summary given the post, over 200 datasets per value: the residual correlation test, the robust test with the tolerance equal to half the true insufficiency, to the true bias and to the true insufficiency ( in the legend), and the reference test that conditions on the post through the unused draws (Appendix C.7).

Figure D.8: Application, politeness against score (left) and log length against score (right) under every embedding of the comment being replied to: , , , the surface statistics , the metadata , the TF-IDF directions , the post embedding , combinations with , and the prognostic score. Circles: with 95% intervals; squares: the insufficiency of demonstrated by the added embedding, ; line and band: the baseline with its 95% interval; dotted: the unconditional correlation.
Appendix E. Language model prompts
Every call in Experiment 3 uses the system prompt below and one of the two instructions, with the post inserted in place of {Z}. The comment instruction inserts one of three personas, drawn uniformly at random per post: “who tends to be critical and skeptical”, “who tends to be appreciative and enthusiastic”, or “who is matter-of-fact and reserved”. The two calls for a post share nothing but the model weights, so holds conditional on the model (Remark C.1). The sampling settings are in Appendix C.7.
System prompt. You write short pieces of text for a research dataset on online discussions. Follow the instructions exactly. Write in natural, varied English. Output plain text only: no preamble, no headings, no quotation marks around the whole answer.
Comment. Below is a post from an online discussion forum. POST: << {Z} >> Write a reader comment of 2-3 sentences reacting to this post, as a forum member {PERSONA} would. Then, on a new final line, write exactly one of the words POSITIVE, NEGATIVE or NEUTRAL to label the overall sentiment of your comment.
Summary. Below is a post from an online discussion forum. POST: << {Z} >> Write a 2-3 sentence summary of this post for a newsletter that digests forum discussions. Output only the summary.
The label line is removed from the comment before embedding. Of the 2,999 comments with a label, 1815 report a positive, 1140 a negative and 44 a neutral sentiment.