arXiv(opens in a new tab)stat.MLSep 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2609.00946

Embedded Conditional Independence Tests for Large Language Model Generated Text with an Application to German Parliament Speeches

Marco Simnacher, Georg Keilbar, Benjamin König, Christoph Lippert, Sonja Greven

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Marco Simnacher

Georg Keilbar

Benjamin König

Chair of Statistics

Humboldt-Universität zu Berlin

Spandauer Str. 1, 10178 Berlin, Germany

MARCO.SIMNACHER@HU-BERLIN.DE

GEORG.KEILBAR@HU-BERLIN.DE

B.KOENIG@HU-BERLIN.DE

Christoph Lippert

Chair Digital Health & Machine Learning

Hasso-Plattner-Institut for Digital Engineering

Prof.-Dr.-Helmert-Straße 2-3, 14482 Potsdam, Germany

CHRISTOPH.LIPPERT@HPI.DE

Sonja Greven

Chair of Statistics

Humboldt-Universität zu Berlin

Spandauer Str. 1, 10178 Berlin, Germany

SONJA.GREVEN@HU-BERLIN.DE

Abstract

Conditional independence tests (CITs) test for conditional dependence between two random objects X and Y given a third random object Z. Existing CITs have limited applicability to high-dimensional data, especially multimodal data like text. However, we show that such tests are of interest for large language model (LLM) outputs, where we test whether an output X generated from a source text Z carries information about an attribute Y beyond Z itself. For this purpose, we propose embedded CITs (eCITs), which embed X and Z and apply an existing CIT to the resulting representations and to Y. We show that, provided the embedding of Z is sufficient, i.e. retains the information Z carries about either Y or the representation of X, the null hypothesis transfers from X and Z to their representations, so that a CIT valid for the embedded hypothesis is valid for the original one. We further give conditions for equivalence of the two hypotheses, and show that sufficiency weakens to mean sufficiency when the embedded test targets conditional mean independence. We propose a semi-synthetic simulation design to assess type I error (T1E) control and power of the eCITs for given embedding maps on a specific dataset and task, and use it to evaluate them on our application. Applying the eCITs to German Parliament speeches, we find for all combinations of embedding maps considered that the summaries of two LLMs contain information about the speaker's faction and gender beyond the speech they were generated from.

Keywords: conditional independence testing, embedding maps, sufficient representation, large language model

1 Introduction

A conditional independence test (CIT) is a statistical test for the null hypothesis of conditional independence (CI), H0:X⊥Y∣ZH_0: X \perp Y|Z, between two random variables, X and Y,

©2026 Marco Simnacher, Georg Keilbar, Benjamin König, Christoph Lippert, Sonja Greven.

License: CC-BY 4.0, see https://creativecommons.org/licenses/by/4.0/.

given a third variable, ZZ, against the alternative hypothesis of conditional dependence, H1:X⊥̸Y∣ZH_1: X \not\perp Y|Z. XX and YY are conditionally dependent, given ZZ, if XX (or YY) provides additional information about YY (or XX), given ZZ. A CIT should control the type I error (T1E), i.e. the probability of falsely rejecting the null hypothesis, while simultaneously achieving high power, i.e. a high probability of correctly rejecting the null hypothesis of CI.

One setting in which such conditional independencies are of interest is the evaluation of large language models (LLMs). Consider a source text ZZ, e.g. a parliament speech, observed together with a protected attribute YY, e.g. the speaker's gender or faction, and an LLM-generated summary XX of the source text. Such summaries can contain biases regarding the protected attribute, framing e.g. the speeches of one faction more critically than those of another, although the content of the speeches does not differ. Due to the widespread use of LLMs across different tasks, such biases are widely studied (Gallegos et al., 2024). However, the complexity of LLMs and their task-specific behavior make general statements about the bias of a specific LLM challenging (Anthis et al., 2024), and existing bias metrics are of limited use in this setting. Intrinsic metrics based on embeddings or token probabilities often do not correlate with the bias observed in downstream tasks (Goldfarb-Tarrant et al., 2020; Delobelle et al., 2022). Extrinsic metrics are typically bound to benchmark datasets derived from sentence completion or occupation masking, so that their results need not translate to domain-specific tasks (Li et al., 2023). LLM-based evaluators are applicable to arbitrary tasks, but can themselves be biased (Sun et al., 2022; Gao et al., 2025), and their scores do not come with statistical guarantees.

We instead define bias as additional information in the LLM output XX about the protected attribute YY beyond the information already contained in the source text ZZ. This directly corresponds to the alternative hypothesis of a CIT, so bias can be tested on a given task and dataset with a T1E guarantee. Since the summary is generated solely from the source text, any such additional information cannot come from the observed input itself, but must have entered through the model, for example via memorization of the source texts through the training data the model was fitted on. The definition is reference-free in the sense that no gold-standard output or counterfactually generated output has to be constructed, since the source text itself supplies the reference. While we focus on summarization as one instance, the definition applies to any task in which the output is generated from a source text. In our empirical application with a categorical variable YY, the definition is a conditional version of the partisanship measure of Gentzkow et al. (2019), who quantify how strongly congressional speech reveals a speaker's faction. We ask the same of the summaries, treating the speech as the conditioning variable: whether the summary reveals the speaker's faction beyond the speech it was generated from.

Testing this hypothesis, however, is not straightforward when XX and ZZ are texts. Existing CITs focus on low-dimensional, vector-valued variables (Li and Fan, 2020), and both ZZ and XX cause problems through their structure and high-dimensionality. The structure of ZZ affects the T1E of the CITs. Their null hypothesis comparisons require an object constructed from ZZ: the conditional distribution of XX or of YY given ZZ for resampling-based comparisons (Candes et al., 2018; Berrett et al., 2020), a kernel or a partition on the support of ZZ for kernel- and neighborhood-based comparisons (Zhang et al., 2011; Strobl et al., 2019), or a regression on ZZ for residual-based comparisons (Shah and Peters, 2020; Lundborg et al., 2024). None of these objects can be constructed on raw texts with the guarantees the tests require, whether because the construction itself is unavailable or because the rate conditions on which validity rests are not. The tests thus become applicable only on a feature representation of ZZ and condition on that representation rather than on ZZ, as in the application of algorithm-agnostic significance tests to multimodal data (Kook and Lundborg, 2024). The text structure of XX affects both whether a CIT can be applied at all and, once it can, its power. Simnacher et al. (2026) address this for structured, high-dimensional XX by embedding it onto a feature representation and applying a CIT to the representation instead. Provided the embedding map is learned as they prescribe, e.g. on external data or through sample splitting, this leaves the T1E unaffected in their setting, where ZZ is not embedded, and the choice of representation affects only the power, which depends on whether the representation retains the conditional association between XX and YY given ZZ. The representation, however, remains high-dimensional, so that only a few CITs are applicable to it. Neither line of work addresses the representation of ZZ, on which the T1E of the resulting test depends.

We therefore require CITs that are applicable to texts XX and ZZ, control the T1E for the hypothesis stated on the level of the texts, and have power against relevant alternatives. To meet these requirements, we propose embedded CITs (eCITs), which map both ZZ and XX onto feature representations and apply an existing CIT for conditional dependence of the representation of XX and YY, given the representation of ZZ, making the test applicable to structured, high-dimensional inputs. Since the CIT conditions on the representation of ZZ rather than on the source text, it is enough that that representation retain the information in ZZ about either YY or the representation of XX. Any information it drops plays the role of an omitted conditioning variable and can inflate the T1E. We call embedding maps ωZ\omega_Z yielding such a representation sufficient and characterize them in Subsection 3.1. The representation of XX needs no sufficiency condition of its own and mainly affects the power, since the test has power only if it retains the conditional association between XX and YY given ZZ in a form the CIT can detect. The two choices nevertheless interact, since the sufficiency of the embedding of ZZ is stated relative to the representation of XX, unlike in Simnacher et al. (2026), where the conditioning variable is not embedded and the choice of representation affects the power alone. We discuss this further in Subsection 3.1 and Section 4. The CIT contributes its guarantees at the level of the representations, so whether they transfer to the texts depends on the embedding maps and the dataset at hand.

Our contributions to the existing literature are as follows. First, we justify CI testing as a bias criterion for LLM outputs and discuss when the null and the alternative can hold for a fixed LLM (Section 2). Second, we propose eCITs, which combine embedding maps for XX and ZZ with existing CITs, making CI testing applicable when both XX and ZZ are texts (Section 3). Third, we characterize sufficient embedding maps for ZZ, under which the null hypothesis stated on the texts transfers to the null hypothesis stated on the representations, so that a valid CIT for the embedded hypothesis controls the T1E for the textual one. We also give conditions under which the two hypotheses are equivalent, and show that the requirement weakens to mean sufficiency when the embedded test targets conditional mean independence (Subsection 3.1). Fourth, we adapt the projected covariance measure (PCM; Lundborg et al., 2024), the conditional mean independence test (CMIT) we apply, to the categorical YY of our application, with a precision-weighted projection direction that we show to be optimal, and record the conditions under which the validity argument of Lundborg et al. (2024) carries over (Appendix D). Fifth, we show empirically how insufficient embeddings of ZZ inflate the T1E, and provide a simulation design that can be used to assess the eCITs on a given dataset before applying them (Subsection 4.2). On speech-summary pairs, eCITs with a sufficient embedding of ZZ are calibrated at all sample sizes considered for the categorical outcomes, also for high-dimensional representations, while for insufficient ones the inflation ranges from negligible to growing steeply with the sample size, depending on how much of the dropped information the remaining embedding maps recover. Finally, we apply the eCITs to German Parliament speeches and find, for both summarizers and all combinations of embedding maps considered, that the summaries of two LLMs contain information about the speaker's faction and gender beyond the speech (Subsection 4.3).

References (29)