Manuscript Offprint
arXiv:2610.37227Doubly Robust Deep Kernel Tests for Structured Outcomes
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We propose a test of whether two interventions induce the same outcome distribution when outcomes are structured and high-dimensional, such as images, text and graphs. We represent the interventional distributions as mean embeddings on learned deep features, such that the treatment effect is a doubly robust representation of the difference in mean embeddings. Our test, DR-KTE-Deep, optimises the learned features so as to maximise an estimated power criterion on this treatment effect representation. To motivate our learning objective, we show that the power criterion characterises the asymptotic signal-to-noise ratio of the test under fixed alternatives, and we derive a uniform finite-sample bound for its regularised estimate. We show that, with the learned kernel fixed, a held-out test is asymptotically valid under the null given suitable nuisance-estimation rates. Empirically, DR-KTE-Deep achieves substantially higher power than fixed and bandwidth-optimised kernel baselines across image, text and graph outcomes, while maintaining well-calibrated Type-I error.
(a) Pneumonia
Treated
ITE

(b) OCT-Drusen
Treated
ITE

(c) Derma-Melanoma
ITE
Treated

ITE
Figure 1: Semi-synthetic medical-image experiments adapted from MedMNIST (Yang et al., 2021; 2023). Each pair shows a treated potential outcome and its ground-truth individual treatment effect (ITE).
1 Introduction
In causal problems involving structured and high-dimensional outcomes, such as images, text, and graphs, a mean outcome may be undefined or poorly aligned with the structure of the data. For example, comparing protein or text sequences requires choosing a numerical representation or a notion of similarity (Saigo et al., 2004; Lodhi et al., 2002; Reimers & Gurevych, 2019) and comparing images with coordinate-wise averaging ignores the spatial structure of the data (LeCun et al., 1998). Distributional causal inference addresses this by defining the interventional distributions directly on the structured outcome space, without reducing outcomes.
to an arbitrary scalar summary or notion of averaging (Rothe, 2010; Chernozhukov et al., 2013; Kennedy et al., 2023; Muandet et al., 2021). Kernels define similarities on these spaces (Gärtner, 2003; Borgwardt et al., 2006; Shervashidze et al., 2011) and, through kernel mean embeddings, represent interventional distributions in a reproducing kernel Hilbert space (RKHS) (Smola et al., 2007).
Kernels define the geometry used to compare outcome distributions (Sriperumbudur et al., 2010; Simon-Gabriel & Schölkopf, 2018; Gretton, 2019). If this geometry is fixed a priori, the kernel may be poorly suited to detecting differences between the interventional distributions, leading to low test power (Gretton et al., 2012a; Sutherland et al., 2017). Deep kernels address this by using neural networks to learn a representation of the outcomes and compare distributions in the resulting space (Wilson et al., 2016). Rather than learning this representation through a reconstruction task, the learned kernel can be optimised by directly maximising a test-power criterion (Sutherland et al., 2017).
We consider two soft interventions and inducing the outcome distributions and . Determining whether an intervention changes the outcome distribution can be formulated as a hypothesis testing problem, testing against .
Treatment effects often need to be estimated from observational data, because experimentation can be costly, unethical or infeasible. In this setting, interventional distributions are not directly observed and must be recovered (Robins, 1986; Hernán & Robins, 2020; Muandet et al., 2021; Zenati et al., 2025b). This can be done by estimating either treatment assignment or the conditional outcome embedding (Song et al., 2009; Grünewälder et al., 2012). However, either approach alone is sensitive to model misspecification. We therefore use a doubly robust estimator, which combines both approaches and remains consistent when either model is correctly specified (Bang & Robins, 2005; Luedtke & Chung, 2024).
In this paper, we introduce DR-KTE-Deep, which combines doubly robust interventional embeddings with deep kernel learning and testing. Our main contributions are: (i) we develop a method for learning deep kernels for tests of interventional distributions, estimating both the distributional discrepancy and the test-power criterion from observational data; (ii) we derive a uniform finite-sample bound for the estimated learning criterion, accounting for both kernel-class complexity and errors in estimating the treatment-assignment and outcome models; (iii) we establish conditional asymptotic validity of the held-out test after nuisance estimation and kernel training and selection; and (iv) we evaluate the method on image, text, and graph outcomes, showing substantial power gains over fixed and bandwidth-optimised doubly robust kernel tests, while maintaining Type-I error close to the nominal level.
The remainder of the paper is organised as follows. Section 3 develops the doubly robust test. Section 4 develops the deep-kernel learning objective. Section 5 evaluates its power and calibration across image, text, and graph outcomes. Section 6 concludes.
Kernel mean embeddings represent interventional outcome distributions in an RKHS. Muandet et al. (2021) introduce counterfactual mean embeddings, while Park et al. (2021), Näf et al. (2026), and Jain & Luedtke (2026) use kernel methods to study conditional distributional treatment effects. For marginal effects, Fawkes et al. (2024) and Martinez-Taboada et al. (2023) develop doubly robust kernel tests, and Zenati et al. (2025b) extend them to general stochastic policies. Finally, Zenati et al. (2026) further consider adaptively collected data. These methods use prescribed outcome kernels, including aggregation over kernel bandwidths, without learning a deep outcome representation. A separate literature uses kernels to estimate causal mean functions through kernel ridge regression (Singh et al., 2024; Kim & Wang, 2026), instrumental variable regression (Singh et al., 2019; Meunier et al., 2024), and proxy bridge learning (Bozkurt et al., 2025; 2026). These approaches use kernels or learned representations for causal function estimation, rather than for comparing interventional outcome distributions.
Other work adapts the kernel or outcome representation to improve test power. Gretton et al. (2012b) optimise the power of linear-time MMD tests over kernel mixtures and analyse convergence of the selection criterion. Sutherland et al. (2017) optimise kernel parameters for two-sample tests, while Liu et al. (2020) learn characteristic deep kernels and prove uniform convergence of their learning criterion. Other approaches combine multiple kernels through aggregation or fusion (Schrab et al., 2023; Biggs et al., 2023). In causal settings, Zenati & Gretton (2026) learn informative witness locations for distributional treatment effects, while Wibisono & Wang (2026) and Durand et al. (2025) learn outcome features or projections to detect causal effects. Our method instead learns the outcome kernel for an omnibus test of marginal interventional distributions. We estimate the learning criterion from observational data using causal nuisance models and analyse how errors in these models affect the criterion.
3 Doubly Robust Kernel Test
Problem Setting. We are given an observational dataset of independent and identically distributed (i.i.d.) samples , where . , , and are standard Borel spaces. Write for the -marginal of , and for its treatment-covariate marginal. Let be a -finite reference measure on . The logging policy assigns with density relative to . We consider a unit-level potential-outcome setting with no interference between units (Rubin, 2005; Imbens & Rubin, 2015). We compare two soft interventions and with conditional densities and respectively.
Identification. The observational data are generated under the logging policy , whereas the targets we consider are the outcome distributions under and . To identify these distributions, we work under the standard assumption that the treatment assignment is unconfounded given the observed covariates, and that the interventions assign only treatments supported by the logging policy. We formalise these conditions through the common assumptions below.
Assumption 3.1 (Identification). There exist a standard Borel space , a -valued random variable , and a jointly measurable map such that:
-
Consistency and structural response: almost surely; for every , define .
-
Conditional exogeneity: .
-
Positivity on intervention support: whenever , up to a -null set.
For , draw with density independently of given , and define and . We test against .
Let denote an observational conditional distribution of Y given . Under Assumption 3.1, the intervention changes the treatment assignment mechanism while preserving the conditional outcome response. The interventional outcome distribution is then identified by the g-formula (Robins, 1986; Hernán & Robins, 2020):
for every measurable .
This formula averages the conditional outcome distributions over the treatments assigned by p and the covariate distribution of the population. Positivity ensures that this average only involves treatment-covariate pairs supported by the observational data. We establish these claims in Proposition B.1.
Kernel Formulation. To compare distributions over structured outcomes, we represent them as elements of an RKHS. Let be a non-empty parameter set. For each , let be a positive-semidefinite kernel on parameterised by with separable RKHS and strongly measurable canonical feature map .
We define the interventional mean embedding (Muandet et al., 2021; Zenati et al., 2025b), embedding contrast, and squared maximum mean discrepancy (MMD) (Gretton et al., 2012a) respectively by
Assumption 3.2 (Embedding integrability). For every and , assume and . These first moments ensure Bochner integrability under the observed and interventional laws.
If is characteristic, testing is equivalent to testing (Gretton et al., 2012a, Section 2.2).
Doubly Robust Representation. To estimate from observational data, we construct a doubly robust representation of the embedding contrast , following Zenati et al. (2025b). We further compare the choice of estimator in Section D.4.
For a fixed , define the conditional outcome mean embedding (Grünewälder et al., 2012) by
We use the null-set convention described in Section B.1. This embedding satisfies almost surely. For ease of notation, write . Let be a measurable candidate logging-policy density that is positive wherever . Let be a measurable candidate conditional outcome embedding. We set ratios and integrands weighted by or to zero where .
Define the Hilbert-valued pseudo-feature map
The second term estimates the embedding contrast through the conditional outcome model, while the first corrects it using propensity-weighted outcome residuals.
We suppress the intervention superscript when no ambiguity arises, . The oracle pseudo-feature is then . Write for expectation under .
Proposition 3.3 (Observed-data representation and double robustness). Suppose Assumptions 3.1 and 3.2 hold and the candidate nuisances satisfy the absolute-integrability conditions of Section B.2. Write . For candidate nuisance functions and ,
Thus, if either or on the support of .
A proof is given in Section B.2. We examine the effect of outcome-model misspecification empirically in Section D.5, using a misspecified but oracle propensity .
Test Statistic. Since , the embedding contrast vanishes under and the induced cross-U kernel over is one-degenerate. We therefore estimate by taking the inner product of two independent estimates of , following the cross-U and cross-MMD constructions of Kim & Ramdas (2024) and Shekhar et al. (2022).
Let and be nuisance estimators fitted on a sample independent of the evaluation sample, and set . We split the evaluation sample into two disjoint halves and of size . Define for . The cross-MMD and variance estimators are then, respectively,
Our test statistic is the studentised cross-U statistic
We set whenever .
Let denote the standard normal distribution function. For a fixed kernel, Theorem 4.3 gives, under the corresponding moment, projected non-degeneracy and nuisance-bias conditions of Assumption B.4, under . Since for a characteristic kernel under , large positive values of therefore provide evidence against . We reject at level when .
4 Learning Deep Kernels
Learning Objective. The choice of outcome kernel affects both the population discrepancy and the sampling variability of its estimator. We therefore select using the signal-to-noise ratio (Gretton et al., 2012b; Sutherland et al., 2017; Liu et al., 2020)
whenever . is unchanged by a global rescaling of the kernel and governs the growth of the studentised test statistic under fixed alternatives.
Proposition 4.1 (Fixed-alternative growth rate). Suppose Assumptions 3.1 and 3.2 hold. For a fixed , suppose , , and . Suppose the statistics use the true nuisance functions. Then the cross-MMD and variance estimators satisfy
• Experimental Treatment
• Traditional Treatment
♦ Population mean
— Kernel contour
✗ Anchor
(a) Interventions

(b) Observed groups
(c) Gaussian kernel
(d) Deep kernel
Figure 2: Synthetic example where treatment assignment is driven by an indicator of disease severity X. The potential-outcome distributions are Gaussians with the same mean, but the traditional-treatment distribution is isotropic while the experimental-treatment distribution is anisotropic. The deep kernel adapts to the geometry of the distributions, while the Gaussian kernel treats points uniformly throughout the outcome space.
A proof is given in Section B.3. Section D.6 further studies the choice of learning criterion. This result motivates maximising ; kernels with larger yield a test statistic that is asymptotically larger under fixed alternatives. Since and are unknown, we use the empirical regularised criterion (Jitkrittum et al., 2016; 2017)
where and . The regularisation prevents the learning objective from becoming artificially large when the estimated variance is close to zero. It is used only to stabilise kernel selection; the final test statistic remains unregularised.
While the learning criterion can be used to optimise the parameters of a simple kernel family, like the lengthscale of a Gaussian kernel, the kernel still compares outcomes isotropically throughout the outcome space, and may have low power against localised or anisotropic perturbations at finite sample size (Liu et al., 2020, Section 3) (Figure 2).
Deep Kernels. We therefore learn a deep kernel combining a neural component with a base characteristic kernel. Since deep kernel optimisation is sensitive to random initialisation, we train and select an ensemble of kernels, and average them. Let be the parameter space of a kernel member and let collect each for . Define
Here is a neural feature map, is a Gaussian kernel on the learned feature space, is a characteristic kernel on , and is a learned mixing parameter where .
The learned component adapts the geometry used to distinguish the interventional distributions, while the characteristic component preserves sensitivity to arbitrary distributional differences.
Lemma 4.2 (Characteristic ensemble safeguard). For every pair of probability laws P, Q for which the component mean embeddings exist,
Consequently is characteristic for every .
A proof is given in Section B.4. For every , if and only if the two interventional outcome distributions are equal.
Training and Testing Procedure. We detail the training and testing procedure in Algorithm 1 and Section C.1. D is partitioned into independent learning, validation and testing samples (Gretton et al., 2012b; Liu et al., 2020). We optimise the kernel parameters on the learning sample, select a kernel on the validation sample, and compute on the testing sample. The learning sample is split into three disjoint sets , , and . We fit the nuisance estimators on and compute on and . At each training step, we rotate the roles of the three folds and average the resulting criterion, then optimise each by gradient ascent. During training, we maintain an exponential moving average (EMA) of each member's kernel parameters (Tarvainen & Valpola, 2017) and select the EMA checkpoint with the largest unregularised validation statistic.
Let denote the data and randomness used to estimate the nuisances and train and select the deep kernel. The fitted nuisances and selected kernel are therefore fixed when conditioned on , and the test observations remain independent. We suppose Assumption B.4 holds, including conditional fourth-moment control, non-degenerate projected variance, and a conditional pseudo-feature bias . The latter follows from a corresponding product-rate condition on the nuisance errors (Proposition 3.3).
Theorem 4.3 (Held-out null validity). Suppose Assumption B.4 holds, and set when . Under , as the size m of each test half tends to infinity,
Consequently, and the test has asymptotic level for every fixed .
A proof is given in Section B.6. The result is conditional on the full learning procedure and does not require the optimised parameters to converge to a deterministic kernel.
Uniform Control of the Learning Criterion. We provide a uniform analysis of the learning criterion (see also Gretton et al. (2012b, Theorem 1), Liu et al. (2020, Theorem 11)) with the fitted nuisances and , which will introduce a nuisance estimation error. The bound does not guarantee that training attains a global maximiser. Define
Let the nuisance-fitting sample have size n and each selection half have size m. Write for the data and randomness used to fit the nuisance functions. The nuisance functions are therefore fixed when conditioned on , but retain their dependence on .
On a compact finite-dimensional parameter class, we impose the conditions of Assumption B.5. These require the fitted kernels, constructed from and the nuisance estimates, to be bounded and Lipschitz in , together with overlap and measurability conditions.
Theorem 4.4 (Uniform feasible learning criterion). Let Assumptions B.5 and 3.1 hold and fix . Let and be the nuisance errors conditional on defined in Section B. For every and , there is a finite constant , depending only on the constants in Assumption B.5 and , such that, with conditional probability at least over the two selection halves,
For three cyclic rotations of the learning folds satisfying the same regularity constants, the averaged criterion obeys the analogous bound with unconditional probability at least , with the nuisance remainder averaged over rotations.
The uniform bound separates sampling error from nuisance-estimation error. The MMD numerator retains the doubly robust product remainder . Estimating introduces additional terms and . For fixed class constants and confidence level, the sampling term is , which is asymptotically faster than the of Gretton et al. (2012b, Theorem 1), Liu et al. (2020, Theorem 11).
Theorem 4.4 controls uniformly over the full parameter class for bounded away from zero. On subclasses where the variance is bounded below,
the results in Section B allow and yield uniform approximation to the unregularised criterion . The comparison with earlier rates follows the proof of Theorem B.13.
Since each kernel member is trained separately, we apply these results setting , and , under the corresponding assumptions. With , Proposition B.3 gives for with positive denominators. Conditional on the common learning and validation data and shared training randomness, independent and identically distributed member training reduces the training-randomness variance of the population discrepancy by a factor of . Proposition B.3 establishes these population guarantees. Section D.8 studies the effect of ensemble size on test power. Section D.12 analyses the effect of jointly maximising the averaged criterion.
5 Experimental Evaluation
We evaluate our doubly robust deep kernel test, DR-KTE-Deep, on image, text and graph outcomes. Evaluations on low-dimensional outcomes are included in Section D. We compare our method with DR-KTE (Martinez-Taboada et al., 2023), which uses a fixed Gaussian kernel, and DR-KTE-Opt, which optimises the lengthscale of a Gaussian kernel. Experimental details are given in Section C. Section D.10 additionally compares our method to linear kernels. All methods are fitted and evaluated using the same total sample size. Our code is available at https://www.github.com/robinlmn/deep-kte.
We learn the deep kernel and nuisance parameters on , sampled from the dataset's training pool, and select the kernel on , sampled from the validation pool. We then refit the nuisances on and estimate the rejection rate at over 200 test datasets , sampled from the testing pool. We repeat this process over 20 independent outer repetitions and report the mean rejection rate one standard error across the outer repetitions.
Image Outcomes. We first evaluate our method on mean-preserving distributional effects on medical-image outcomes. We extend the OCTMNIST construction of Zenati & Gretton (2026). Potential outcomes are constructed as where is sampled from normal or healthy MedMNIST images (Yang et al., 2023) and is a medically motivated perturbation representing a localised lesion, scattered deposits, or morphological changes. We scale the perturbation by an effect strength . The residual construction is mean-matched, , such that the effect is mainly distributional under the alternative. We consider ten constructions, three of which are illustrated in Figure 1. Section C.2 details the full generative process.
DR-KTE-Deep achieves substantially higher estimated power than the baselines on all constructions (Table 1), while DR-KTE-Opt only slightly improves power over the fixed kernel. Under , rejection rates across the three methods remain close to the nominal level of , with only a slight inflation for
OCT-DME. In Figure 3, the power of the deep kernel grows with sample size and effect strength, while Gaussian baselines remain near the nominal rejection rate across the sample-size sweep.
| Scenario | DR-KTE | DR-KTE-Opt | DR-KTE-Deep |
|---|---|---|---|
| Breast-Tumor | |||
| Chest-Cardiomegaly | |||
| Chest-Effusion | |||
| Chest-Mass | |||
| Derma-Melanoma | |||
| OCT-CNV | |||
| OCT-DME | |||
| OCT-Drusen | |||
| Pneumonia | |||
| Retina-Severe |
Table 1: Power and Type-I error for medical-image outcomes at and . Each cell reports , with means one standard error across 20 independent repetitions.

(a) Type-I error

(b) Power ( )

(c) Power (N=1500)

Figure 3: Results for OCT-Drusen. (a) Type-I error under , (b) average power when varying while keeping fixed, (c) average power when varying while keeping fixed. Shaded bands show one standard error across 20 independent repetitions. The dotted grey line marks .
Text Outcomes. We now evaluate our method on text outcomes, using a language model to generate synthetic data under the assumed causal structure (Bynum & Cho, 2025). Covariates and treatments generate a scalar pseudo-outcome, discretised into one of three tones used to condition the language model. We consider three scenarios: Oncology Notes, Movie Reviews and Clinical Notes. The generated text is represented as a sequence of tokens and used as input to each kernel method. Construction details are given in Section C.3. Section D.7 additionally compares each method through an alternative text embedding outcome representation.
DR-KTE-Deep achieves the highest estimated power (Table 2), with substantial gains on Oncology Notes and Clinical Notes and smaller improvements on Movie Reviews. Under , average rejection rates are close to the nominal level of . In Figure 4, we vary the sample size and a treatment-effect strength . DR-KTE-Deep maintains higher power across all sample sizes, with larger gains as increases.
| Scenario | DR-KTE | DR-KTE-Opt | DR-KTE-Deep |
|---|---|---|---|
| Oncology Notes | |||
| Movie Reviews | |||
| Clinical Notes |
Table 2: Power () and Type-I error () for text outcomes, represented as a sequence of tokens, at and . Each cell reports , with means one standard error across 20 independent repetitions.

Figure 4: Results for Movie Reviews. (a) Type-I error under , (b) average test power when varying while keeping fixed, (c) average test power when varying while keeping fixed. Shaded bands show one standard error across 20 independent repetitions. The dotted grey line marks .
Graph Outcomes. We consider two experiments in which the outcome is a labelled graph. For LLM Code Repairs, we simulate the effect of using a large language model (LLM) to fix a buggy Python function represented as its abstract syntax tree (AST). For Contact Networks, we simulate the effect of social distancing on the spread of an infection using contact networks sampled from the Infectious SocioPatterns dataset (Isella et al., 2011). The graph constructions and encodings are detailed in Section C.4. In addition to Gaussian-based kernels, we evaluate Weisfeiler-Lehman (WL) subtree kernels (Shervashidze et al., 2011) in Section D.9.
DR-KTE-Deep achieves higher estimated average power on both LLM Code Repairs and Contact Networks, with smaller improvements on the latter. The Gaussian baselines already have high power on both constructions. Under , rejection rates range from 0.048 to 0.052, close to the nominal level (Table 3).
| Scenario | DR-KTE | DR-KTE-Opt | DR-KTE-Deep |
|---|---|---|---|
| LLM Code Repairs | |||
| Contact Networks |
Table 3: Power () and Type-I error () for graph outcomes at . Each cell reports , with means one standard error across 20 outer repetitions.
6 Discussion
In this paper, we introduced DR-KTE-Deep, a doubly robust test of interventional distributions. We learned a deep outcome kernel by maximising an estimated power criterion, allowing the kernel to adapt to the geometry of the outcome space. We established conditional asymptotic null validity after kernel learning and selection, and a uniform finite-sample bound for the regularised learning criterion. DR-KTE-Deep achieved substantially higher empirical power than fixed and bandwidth-optimised baselines, while maintaining Type-I error close to the nominal level. Section D further motivates our choice of estimator and learning objective, and examines how outcome-model misspecification, outcome representation, ensemble size and outcome dimension affect the test. We use separate samples to learn the kernel and compute the test statistic. Future work could investigate whether reusing observations can further improve power while maintaining Type-I error control. We also restrict the test to two interventions, fixed in advance. Future work could extend our method to multiple candidate interventions.
AI Use Statement
Language models were used to generate synthetic text outcomes for our experiments, as described in Section C.3. We also used generative AI for coding assistance, primarily for plotting and running scripts. We also used generative AI for proof strategies and checking theoretical results. Finally, we used generative AI to proofread and improve writing and clarity. The synthetic text datasets were manually checked by the authors for quality. LLM-generated code was verified and tested for correctness by the authors. We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI.
References
Alberto Abadie, Joshua Angrist, and Guido Imbens. Instrumental variables estimates of the effect of subsidized training on the quantiles of trainee earnings. Econometrica, 70(1):91–117, 2002. doi: 10.1111/1468-0262.00270.
Walid Al-Dhabyani, Mohammed Gomaa, Hussien Khaled, and Aly Fahmy. Dataset of breast ultrasound images. Data in Brief, 28:104863, 2020.
H. Bang and J. M. Robins. Doubly robust estimation in missing data and causal inference models. Biometrics, 61(4):962–973, 2005.
Satarupa Bhattacharjee, Bing Li, Xiao Wu, and Lingzhou Xue. Doubly robust estimation of causal effects for random object outcomes with continuous treatments. arXiv preprint arXiv:2506.22754, 2025.
Felix Biggs, Antonin Schrab, and Arthur Gretton. MMD-Fuse: Learning and combining kernels for two-sample testing without data splitting. In Advances in Neural Information Processing Systems, volume 36, 2023. URL https://proceedings.neurips.cc/paper_files/paper/2023/hash/edd00cead3425393baf13004de993017-Abstract.html.
Karsten M Borgwardt, Arthur Gretton, Malte J Rasch, Hans-Peter Kriegel, Bernhard Schölkopf, and Alex J Smola. Integrating structured biological data by kernel maximum mean discrepancy. Bioinformatics, 22(14):e49–e57, 2006.
Bariscan Bozkurt, Houssam Zenati, Dimitri Meunier, Liyuan Xu, and Arthur Gretton. Density ratio-free doubly robust proxy causal learning. In Advances in Neural Information Processing Systems, 2025.
Bariscan Bozkurt, Alexandre Galashov, Dimitri Meunier, Zikai Shen, Arthur Gretton, and Houssam Zenati. Doubly robust proxy causal learning with neural mean embeddings, 2026. URL https://arxiv.org/abs/2605.09514.
Lucius E.J. Bynum and Kyunghyun Cho. Language models as causal effect generators. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pp. 2096–2115, Suzhou, China, 2025. Association for Computational Linguistics. doi: 10.18653/v1/2025.emnlp-main.107. URL https://aclanthology.org/2025.emnlp-main.107/.
Victor Chernozhukov and Christian Hansen. An IV model of quantile treatment effects. Econometrica, 73(1):245–261, 2005. doi: 10.1111/j.1468-0262.2005.00570.x.
Victor Chernozhukov, Iván Fernández-Val, and Blaise Melly. Inference on counterfactual distributions. Econometrica, 81(6):2205–2268, 2013.
Kyle Colangelo and Ying-Ying Lee. Double Debiased Machine Learning Nonparametric Inference with Continuous Treatments. Technical report, 2020. URL https://arxiv.org/pdf/2004.03036.
Homer Durand, Gherardo Varando, and Gustau Camps-Valls. Learning causal response representations through direct effect analysis. In Proceedings of the Forty-first Conference on Uncertainty in Artificial Intelligence, volume 286 of Proceedings of Machine Learning Research, pp. 1135–1166, 2025. URL https://proceedings.mlr.press/v286/durand25a.html.
Ramtin Ehsani, Esteban Parra, Sonia Haiduc, and Preetha Chatterjee. Hierarchical knowledge injection for improving LLM-based program repair. In Proceedings of the 40th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 1440–1452. IEEE, 2025. doi: 10.1109/ASE63991.2025.00122.
Jake Fawkes, Robert Hu, Robin J. Evans, and Dino Sejdinovic. Doubly robust kernel statistics for testing distributional treatment effects. Transactions on Machine Learning Research, 2024.
Sergio Firpo. Efficient semiparametric estimation of quantile treatment effects. Econometrica, 75(1):259–276, 2007. doi: 10.1111/j.1468-0262.2007.00738.x.
Thomas Gärtner. A survey of kernels for structured data. ACM SIGKDD explorations newsletter, 5(1):49–58, 2003.
Arthur Gretton. Introduction to RKHS, and some simple kernel algorithms. Lecture notes, University College London, 2019. URL https://www.gatsby.ucl.ac.uk/~gretton/coursefiles/lecture4_introToRKHS.pdf.
Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Schölkopf, and Alexander Smola. A kernel two-sample test. The Journal of Machine Learning Research, 13(25):723–773, 2012a.
Arthur Gretton, Dino Sejdinovic, Heiko Strathmann, Sivaraman Balakrishnan, Massimiliano Pontil, Kenji Fukumizu, and Bharath K. Sriperumbudur. Optimal kernel choice for large-scale two-sample tests. In Advances in Neural Information Processing Systems, volume 25, pp. 1205–1213, 2012b. URL https://proceedings.neurips.cc/paper/2012/hash/dbe272bab69f8e13f14b405e038deb64-Abstract.html.
Steffen Grünewälder, Guy Lever, Luca Baldassarre, Sam Patterson, Arthur Gretton, and Massimiliano Pontil. Conditional mean embeddings as regressors. In International Conference on Machine Learning, 2012.
Miguel A. Hernán and James M. Robins. Causal Inference: What If. Chapman & Hall/CRC, Boca Raton, 2020.
Guido W. Imbens and Donald B. Rubin. Causal Inference for Statistics, Social, and Biomedical Sciences: An Introduction. Cambridge University Press, 2015.
Lorenzo Isella, Juliette Stehlé, Alain Barrat, Ciro Cattuto, Jean-François Pinton, and Wouter Van den Broeck. What's in a crowd? Analysis of face-to-face behavioral networks. Journal of Theoretical Biology, 271(1):166–180, 2011. doi: 10.1016/j.jtbi.2010.11.033.
Saksham Jain and Alex Luedtke. Conditional distributional treatment effects: Doubly robust estimation and testing. In International Conference on Machine Learning, 2026. URL https://arxiv.org/abs/2603.16829. In press.
Wittawat Jitkrittum, Zoltán Szabó, Kacper P Chwialkowski, and Arthur Gretton. Interpretable distribution features with maximum testing power. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc., 2016.
Wittawat Jitkrittum, Wenkai Xu, Zoltan Szabo, Kenji Fukumizu, and Arthur Gretton. A linear-time kernel goodness-of-fit test. In I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
Edward H. Kennedy, Sivaraman Balakrishnan, and Larry Wasserman. Semiparametric counterfactual density estimation. Biometrika, 110(4):875–896, 2023. doi: 10.1093/biomet/asad017. URL https://doi.org/10.1093/biomet/asad017.
Ilmun Kim and Aaditya Ramdas. Dimension-agnostic inference using cross U-statistics. Bernoulli, 30(1):683–711, 2024.
Seok-Jin Kim and Kaizheng Wang. Estimating Continuous Treatment Effects with Two-Stage Kernel Ridge Regression. In International Conference on Machine Learning, 2026.
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015. URL https://arxiv.org/abs/1412.6980.
Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. doi: 10.1109/5.726791.
Feng Liu, Wenkai Xu, Jie Lu, Guangquan Zhang, Arthur Gretton, and Danica J. Sutherland. Learning deep kernels for non-parametric two-sample tests. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. 6316–6326, 2020. URL https://proceedings.mlr.press/v119/liu20m.html.
Ruhan Liu, Xiangning Wang, Qiang Wu, Ling Dai, Xi Fang, Tao Yan, Jaemin Son, Shiqi Tang, Jiang Li, Zijian Gao, Adrian Galdran, J. M. Poorneshwaran, Hao Liu, Jie Wang, Yerui Chen, Prasanna Porwal, Gavin Siew Wei Tan, Xiaokang Yang, Chao Dai, Haitao Song, Mingang Chen, Huating Li, Weiping Jia, Dinggang Shen, Bin Sheng, and Ping Zhang. DeepDRiD: Diabetic retinopathy-grading and image quality estimation challenge. Patterns, 3(6):100512, 2022. doi: 10.1016/j.patter.2022.100512.
Huma Lodhi, Craig Saunders, John Shawe-Taylor, Nello Cristianini, and Chris Watkins. Text classification using string kernels. Journal of Machine Learning Research, 2:419–444, 2002.
Alex Luedtke and Incheoul Chung. One-step estimation of differentiable Hilbert-valued parameters. The Annals of Statistics, 52(4):1534 – 1563, 2024.
Alexander R. Luedtke, Marco Carone, and Mark J. van der Laan. An omnibus non-parametric test of equality in distribution for unknown functions. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 81(1):75–99, 2019. doi: 10.1111/rssb.12299.
Diego Martinez-Taboada, Aaditya Ramdas, and Edward H. Kennedy. An efficient doubly-robust test for the kernel treatment effect. In Advances in Neural Information Processing Systems, volume 36, pp. 59924–59952, 2023. URL https://proceedings.neurips.cc/paper_files/paper/2023/hash/bccdd196d798a51a4961989984a9ed4a-Abstract-Conference.html.
Dimitri Meunier, Zhu Li, Tim Christensen, and Arthur Gretton. Nonparametric instrumental regression via kernel methods is minimax optimal, 2024. URL https://arxiv.org/abs/2411.19653.
Krikamol Muandet, Motonobu Kanagawa, Sorawit Saengkyongam, and Sanparith Marukatat. Counterfactual mean embeddings. Journal of Machine Learning Research, 22(162):1–71, 2021.
Jeffrey Näf, Junhyung Park, and Herbert Susmann. Causal-drf: Conditional kernel treatment effect estimation using distributional random forest. In Proceedings of the 29th International Conference on Artificial Intelligence and Statistics, volume 300 of Proceedings of Machine Learning Research, pp. 1000–1008. PMLR, 2026.
Harish Nair. MTSamples. Hugging Face dataset, 2024. URL https://huggingface.co/datasets/harishnair04/mtsamples.
M. E. J. Newman. Spread of epidemic disease on networks. Phys. Rev. E, 66:016128, Jul 2002. doi:10.1103/PhysRevE.66.016128. URL https://link.aps.org/doi/10.1103/PhysRevE.66.016128.
Bo Pang and Lillian Lee. Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales. In Proceedings of the 43rd Annual Meeting of the Association for Computational Linguistics, pp. 115–124, 2005. doi: 10.3115/1219840.1219855. URL https://aclanthology.org/P05-1015/.
Junhyung Park, Uri Shalit, Bernhard Schölkopf, and Krikamol Muandet. Conditional distributional treatment effect with kernel conditional mean embeddings and U-statistic regression. In Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pp. 8401–8412, 2021. URL https://proceedings.mlr.press/v139/park21c.html.
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 and the 9th International Joint Conference on Natural Language Processing, pp. 3982–3992. Association for Computational Linguistics, 2019. doi: 10.18653/v1/D19-1410.
JM Robins. A new approach to causal inference in mortality studies with a sustained exposure period - application to control of the healthy worker survivor effect. Mathematical Modelling, 7:1393–1512, 1986.
Christoph Rothe. Nonparametric estimation of distributional policy effects. Journal of Econometrics, 155(1):56–70, 2010.
Donald B. Rubin. Causal inference using potential outcomes: Design, modeling, decisions. Journal of the American Statistical Association, 100(469):322–331, 2005. doi: 10.1198/016214504000001880.
Hiroto Saigo, Jean-Philippe Vert, Nobuhisa Ueda, and Tatsuya Akutsu. Protein homology detection using string alignment kernels. Bioinformatics, 20(11):1682–1689, 2004. doi: 10.1093/bioinformatics/bth141.
Antonin Schrab, Ilmun Kim, Mélisande Albert, Béatrice Laurent, Benjamin Guedj, and Arthur Gretton. MMD aggregated two-sample test. Journal of Machine Learning Research, 24(194):1–81, 2023. URL https://www.jmlr.org/papers/v24/21-1289.html.
Shubhanshu Shekhar, Ilmun Kim, and Aaditya Ramdas. A permutation-free kernel two-sample test. In Advances in Neural Information Processing Systems, volume 35, pp. 18168–18180, 2022. URL https://proceedings.neurips.cc/paper_files/paper/2022/hash/731b952bdc833485eb72f458cdd5c489-Abstruct-Conference.html.
Nino Shervashidze, Pascal Schweitzer, Erik Jan van Leeuwen, Kurt Mehlhorn, and Karsten M. Borgwardt. Weisfeiler–Lehman graph kernels. Journal of Machine Learning Research, 12:2539–2561, 2011.
Carl-Johann Simon-Gabriel and Bernhard Schölkopf. Kernel distribution embeddings: Universal kernels, characteristic kernels and kernel metrics on distributions. Journal of Machine Learning Research, 19(44):1–29, 2018.
Rahul Singh, Maneesh Sahani, and Arthur Gretton. Kernel instrumental variable regression. In Advances in Neural Information Processing Systems, volume 32, pp. 4595–4607, 2019.
Rahul Singh, Liyuan Xu, and Arthur Gretton. Kernel methods for causal functions: dose, heterogeneous and incremental response curves. Biometrika, 111(2):497–516, 2024.
Alex Smola, Arthur Gretton, Le Song, and Bernhard Schölkopf. A Hilbert space embedding for distributions. In International conference on algorithmic learning theory, pp. 13–31. Springer, 2007.
Le Song, Jonathan Huang, Alex Smola, and Kenji Fukumizu. Hilbert space embeddings of conditional distributions with applications to dynamical systems. In Proceedings of the 26th Annual International Conference on Machine Learning, pp. 961–968, 2009.
B. Sriperumbudur, A. Gretton, K. Fukumizu, B. Schölkopf, and G. Lanckriet. Hilbert space embeddings and metrics on probability measures. Journal of Machine Learning Research, 11:1517–1561, 2010.
Danica J. Sutherland, Hsiao-Yu Tung, Heiko Strathmann, Soumyajit De, Aaditya Ramdas, Alex Smola, and Arthur Gretton. Generative models and model criticism via optimized maximum mean discrepancy. In International Conference on Learning Representations (ICLR), 2017. URL https://openreview.net/forum?id=HJWHIKqgl.
Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Advances in Neural Information Processing Systems, volume 30, 2017. URL https://proceedings.neurips.cc/paper/2017/hash/68053af2923e00204c3ca7c6a3150cf7-Abstract.html.
Kevin Christian Wibisono and Yixin Wang. Causal inference with unstructured outcomes, 2026. URL https://arxiv.org/abs/2608.03085. Preprint.
Ratnadira Widyasari, Sheng Qin Sim, Camellia Lok, Haodi Qi, Jack Phan, Qijin Tay, Constance Tan, Fiona Wee, Jodie Ethelda Tan, Yuheng Yieh, Brian Goh, Ferdian Thung, Hong Jin Kang, Thong Hoang, David Lo, and Eng Lieh Ouh. BugsInPy: A database of existing bugs in Python programs to enable controlled testing and debugging studies. In Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/FSE 2020, pp. 1556–1560. Association for Computing Machinery, 2020. doi: 10.1145/3368089.3417943.
Andrew Gordon Wilson, Zhiting Hu, Ruslan Salakhutdinov, and Eric P. Xing. Deep kernel learning. In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics (AISTATS), pp. 370–378, 2016.
Jiancheng Yang, Rui Shi, and Bingbing Ni. MedMNIST classification decathlon: A lightweight AutoML benchmark for medical image analysis. In IEEE 18th International Symposium on Biomedical Imaging (ISBI), pp. 191–195, 2021.
Jiancheng Yang, Rui Shi, Donglai Wei, Zequan Liu, Lin Zhao, Bilian Ke, Hanspeter Pfister, and Bingbing Ni. MedMNIST v2—a large-scale lightweight benchmark for 2D and 3D biomedical image classification. Scientific Data, 10(1):41, 2023.
Houssam Zenati and Arthur Gretton. Semiparametric efficient test for interpretable distributional treatment effects, 2026. URL https://arxiv.org/abs/2605.08034.
Houssam Zenati, Judith Abécassis, Julie Josse, and Bertrand Thirion. Double debiased machine learning for mediation analysis with continuous treatments. In International Conference on Artificial Intelligence and Statistics, volume 258, pp. 4150–4158, 2025a.
Houssam Zenati, Bariscan Bozkurt, and Arthur Gretton. Doubly-robust estimation of counterfactual policy mean embeddings. In Advances in Neural Information Processing Systems, volume 38, 2025b. URL https://proceedings.neurips.cc/paper_files/paper/2025/hash/49a77f5557668b87a568c2d9468d4d6b-Abstract-Conference.html.
Houssam Zenati, Bariscan Bozkurt, and Arthur Gretton. Kernel treatment effects with adaptively collected data. In The 29th International Conference on Artificial Intelligence and Statistics, 2026. URL https://openreview.net/forum?id=di2b5P0qcE.
Yanzhao Zhang, Mingxin Li, Dingkun Long, Xin Zhang, Huan Lin, Baosong Yang, Pengjun Xie, An Yang, Dayiheng Liu, Junyang Lin, Fei Huang, and Jingren Zhou. Qwen3 embedding: Advancing text embedding and reranking through foundation models, 2025. URL https://arxiv.org/abs/2506.05176.
Appendix
Appendix A recalls the main notation used throughout this paper. Appendix B presents our theoretical results and proofs. Appendix C describes the training and testing procedure, data constructions, architectures and hyperparameters. Appendix D presents additional experiments and ablations.
A Notations
Data, interventions and samples
-
denotes an observed covariate-treatment-outcome triplet and the observed dataset.
-
is the observed-data law, its covariate marginal, its treatment-covariate marginal, and denotes expectation under .
-
is the logging-policy density; and are the target intervention densities, all relative to the -finite treatment reference measure .
-
is the structural variable, with ; the jointly measurable response defines and .
-
, independently of given ; has law . We test .
-
is a regular conditional law of given ; is the common response kernel.
-
is the policy contrast. Ratios and integrands weighted by or are set to zero where .
-
and are the disjoint training, validation and test samples; are the three learning folds.
-
n is the nuisance-fitting sample size; index two evaluation halves of size . In the test analysis, denotes the size of each test half, also written .
Kernels and interventional mean embeddings
-
is an outcome kernel with parameter , RKHS and feature map . Inner products and norms are in .
-
is the mean embedding under intervention .
-
is the embedding contrast and is the squared MMD. For characteristic , is equivalent to .
-
is the conditional outcome mean embedding, with the null-set convention in Section B.1; it agrees -almost surely with the observational conditional mean.
-
, with , is the family optimised by each training run. is the ensemble size and collects its member parameters, with .
-
is the neural feature map of member and is its Gaussian kernel on the learned features.
-
is the characteristic component, with weight for . The ensemble kernel is .
Nuisance estimation, kernel learning and testing
-
e and are candidate logging-policy and conditional-embedding functions; and estimate and , respectively.
-
is the doubly robust pseudo-feature in (1). Its oracle version is , with .
-
is the fitted pseudo-feature map, , and .
-
is the oracle observed-data kernel; is its fitted counterpart.
-
is the cross-MMD estimator. is the empirical variance of over , with divisor .
-
is the oracle projected variance; is the fixed-alternative growth coefficient when .
-
is the selection regulariser. The population and empirical criteria are and , where .
-
denotes the EMA parameters and the selected checkpoint of member ; specifies the selected ensemble.
-
is the test statistic. We reject at level when , where is the standard normal distribution function.
Notation for the theoretical analysis
– is the information used for nuisance fitting in the selection analysis; contains all nuisance fitting, kernel training and selection information available before the final test. contains the common learning and validation data and shared training randomness, excluding member-specific randomness.
-
and are the conditional population counterparts of and formed from , holding the nuisance fits fixed. The label or marks empirical quantities computed with oracle pseudo-features.
-
and are the conditional root-mean-square nuisance errors weighted by : relative propensity error and conditional-embedding error, the latter uniform over , as defined in (15).
-
bounds the Euclidean radius of ; is the kernel-class sampling term in (16), with failure probability .
-
bound the kernel diagonal, , relative propensity error and fitted embedding norm, respectively. and are the parameter Lipschitz constants of the fitted and oracle observed-data kernels.
-
, for , is the population comparison class used in the adaptation results; is a positive sequence of selection regularisers.
-
is the fitted-score bias under , and is the centred test score.
-
and are the weighted nuisance errors for the selected kernel; their product bounds under .
B Theoretical Results and Proofs
We prove the results of Sections 3 and 4, then give further results on nuisance errors and the learned test under . We suppress the fixed-policy superscript on when unambiguous and write for quantities bounded in probability and for quantities converging to zero in probability.
B.1 Identification of Soft-Intervention Outcome Laws
We show that the observational conditional outcome law can be used to recover the outcome distribution under a soft intervention.
Proposition B.1 (Soft-intervention identification). Under Assumption 3.1, there exists a measurable probability kernel Q from to that is a version of the observational conditional law of Y given and, for every fixed , a conditional law of given X.
For any conditional treatment density p relative to , let be drawn from independently of
U given X, and set . Then, for every measurable ,
If wherever , up to a -null set, this expression depends only on the observational distribution. In particular, and are identified.
Proof. Let denote a conditional distribution of given . For every measurable , define
Since F is jointly measurable, Q is a measurable probability kernel. We show that it describes both the observed outcome response and the fixed-treatment potential outcomes.
First, for any measurable , consistency and give
Hence is a version of the observational conditional law of given . For each fixed , the definition similarly gives, for every measurable ,
Thus is also a conditional law of given .
We next consider a soft intervention . Since is drawn from independently of given , while the distribution of is unchanged, we obtain
where the second equality follows by conditioning on X and applying Tonelli's theorem.
Finally, . If wherever , up to a -null set, then the law of is absolutely continuous with respect to . For each measurable , any two versions of the observational conditional probability agree -almost everywhere, and therefore also under the intervention. They consequently give the same g-formula, which is thus determined by the observational law. The required support condition holds for both and by Assumption 3.1, completing the proof.
Mean embeddings and integrability. For fixed , define wherever , and set it to zero elsewhere. This exceptional set is measurable and null under both and the two target treatment-covariate measures by Assumption 3.2 and parts (b)-(d). Separability and strongly measurable approximation under kernel integration give a strongly measurable . Part (b) identifies with the observational Bochner conditional mean, and part (d) with Bochner Fubini gives
The observed-law first moment in Assumption 3.2 is needed for the observational conditional mean, since target moments need not control actions outside the target support. Uniformly bounded kernels satisfy all these moment conditions.
For finite or countable A with counting measure , the action integrals reduce to sums, giving the usual randomised mixture of atomic interventions.
B.2 Observed-Data Representation and Double Robustness
For Proposition 3.3, the candidate nuisances are assumed to satisfy
These conditions make both terms of the pseudo-feature Bochner integrable and justify the conditional integration below. The target moments also ensure .
Proof of Proposition 3.3. Recall that . As in Section 3, ratios and integrands weighted by or are set to zero wherever .
Under Assumptions 3.1 and 3.2, Proposition B.1 and Bochner Fubini identify each target embedding through the common response kernel. Subtracting the two embeddings gives
The weight is fixed conditional on , and agrees almost surely with the observational conditional mean. The integrability conditions above therefore give
Averaging over , with density , gives
We now subtract the expression for :
This expression is zero if either or wherever . Thus, if at least one nuisance function is correct,
Using the true nuisance functions gives .
Remark B.2. The representation above covers continuous actions for soft interventions , but not hard interventions at a fixed treatment value. Atomic continuous-treatment interventions require localization in treatment space, with the resulting smoothing bias controlled explicitly (Colangelo & Lee, 2020; Zenati et al., 2025a; Bhattacharjee et al., 2025). This remains true when the outcome kernel is learned.
B.3 Fixed-Alternative Growth Rate
Proof of Proposition 4.1. Fix . We take all inner products and norms in . We assume the statistics use the true nuisance functions, so and
By Proposition 3.3, . The fourth-moment assumption gives finite first and second moments, so the RKHS law of large numbers gives for . Continuity of the inner product gives
For the variance estimator, define the real-valued variables
The have sample mean . Expanding their sample variance gives
We have already shown that . To find the limit of , we compare with . By and Cauchy-Schwarz,
Here the first factor converges to zero, the second is bounded in probability, and the last converges to by the law of large numbers. The same law applied to gives
We also have . Combining these gives
Since , we have . By (2) and Slutsky's theorem,
We set when . Since this event has probability tending to zero, it does not affect the limit. ☐
B.4 Characteristic Ensemble Safeguard
This result is the analogue of Liu et al. (2020, Proposition 5). Their kernel in Eq. (1), however, additionally factors the characteristic component and the deep neural component.
Proof of Lemma 4.2. Let and be mutually independent. Then
The squared MMD is therefore linear in the kernel. For each ensemble member b, write
Substituting the ensemble kernel form in (4) yields
Every squared MMD is nonnegative, and . Dropping the deep kernel terms and using gives
Each base kernel is characteristic and , so the lower bound is strictly positive when . When , every squared MMD term is zero. Thus is characteristic.
B.5 Memberwise Ensemble Aggregation
Proposition B.3 (Memberwise ensemble aggregation). Suppose Assumptions 3.1 and 3.2 hold. Let be fixed kernel members and . Use the oracle pseudo-features based on the common response kernel , and assume each projection is square-integrable. For , define and analogously for the aggregate whenever the denominators are positive. Then
If all member and aggregate denominators are positive, then
For learned parameters , let contain the common learning and validation data and training randomness. If the selected member kernels are conditionally independent given and the have finite conditional second moments, then
If the members are also conditionally identically distributed, this equals .
Proof. In the Hilbert direct sum , the averaged kernel has the isometric feature representation
Linearity of Bochner integration gives and the same identity for the conditional embeddings. Using the common and in (1) therefore gives . Taking squared norms proves the discrepancy identity, and
Let . By Proposition 3.3, , so and . The triangle inequality in yields
Since , the denominator bound proves the first efficacy inequality. The intervening ratio is a weighted average of the member efficacies with positive weights proportional to , proving the second. No independence of the projected scores on a common observation is required. Finally, the discrepancy identity holds for every realised collection of learned kernels; conditional independence eliminates its cross-covariances, and identical conditional distributions give the formula.
B.6 Held-Out Null Validity
The sample-splitting principle detailed below also appears in Gretton et al. (2012b); Liu et al. (2020). Here we additionally control bias from nuisance estimation.
Let contain the data and randomness used for nuisance fitting, kernel training and selection. Conditional on , the fitted map is fixed. Write for the size of each test half. For a new observation independent of , define
is the bias from nuisance estimation under .
Let denote the information from the learning procedure and the first test half. is therefore fixed when conditioned on . For a new observation independent of , define
Since has conditional mean zero, is its variance conditioned on .
Assumption B.4 (Held-out regularity). Let . Suppose the two test halves are mutually independent i.i.d. samples from and are independent of . Assume that is strongly measurable and conditionally Bochner integrable. Under , suppose that:
- The conditional fourth moment of the centred pseudo-feature is bounded in probability:
- The projected variance is nonzero with probability tending to one, , and
The inverse and ratio are defined to be zero when .
- The conditional mean tends to zero faster than :
Double robustness gives a sufficient nuisance-rate condition for condition 3 of Assumption B.4. Under Assumptions 3.1 and 3.2, define the weighted nuisance errors
Under , . If is positive on the support of and the terms in the double robustness identity are integrable, taking norms in the identity of Proposition 3.3 and applying Cauchy-Schwarz with weight gives
is therefore sufficient for condition 3.
Proof of Theorem 4.3. Write and . All inner products and norms are in .
Let for , and define
Set when .
are i.i.d., conditional on , with mean zero and variance . On , the fourth-moment ratio in condition 2 is the Lyapunov condition, so has a conditional standard normal limit. The sample-variance identity above and conditional Chebyshev and Markov inequalities give, for every ,
Here the two bounds control the sample second moment and the squared sample mean, using . Applying Slutsky's theorem conditionally gives
Since and , we have . On , also gives .
Conditional independence and centring give
By condition 1 and conditional Markov's inequality,
Since the fitted half-sample means are , condition 3 and Cauchy-Schwarz give
Applying the reverse triangle inequality to the residual vectors and Cauchy-Schwarz gives
On , combining these bounds with yields
Hence . Since , the fitted statistic satisfies .
Since and , we have . Therefore . For any fixed ,
by Markov's inequality, since .
Averaging over the first test half gives the bound for the normal-approximation error of . The fitted and centred statistics differ by at most , except with conditional probability . Comparing their distribution functions at and gives
where the last term follows because the standard normal density is bounded by . Letting and then proves (6). The left-hand side is bounded by one, so taking expectations gives the unconditional normal limit and asymptotic level . This argument also covers a fixed kernel by taking deterministically and retaining nuisance-fitting data and randomness in .
B.7 Uniform Control of the Learning Criterion
We prove Theorem 4.4 by separating sampling error from nuisance error. Throughout this subsection, expectations, variances and norms involving fitted functions are conditional on , the data and randomness used to fit the nuisance estimators. This fixes the fitted functions for every . Write for the fitting-sample size and for the size of each selection half. The two halves are mutually independent i.i.d. samples from and are independent of . For a separable Hilbert space , let .
Write . For the ensemble in (4), let , where is the member parameter set and . For the memberwise optimisation in Algorithm 1, we apply the learning bound with , and . For , write for the learned component and for its mixture weight, with .
Let denote the fitted pseudo-feature. Its conditional population quantities are
A subscript or denotes an empirical quantity computed with oracle pseudo-features.
Measurable versions. We use the common response kernel from Proposition B.1:
The measurable null-set convention in Section B.1 applies whenever only first moments are assumed. Under the uniform diagonal bound below, the integral exists for every and satisfies ; no parameter-dependent exceptional sets are needed.
Write the estimators from Section 3 in terms of the fitted observed-data kernel . Set . Then
and
Assumption B.5 (Selection regularity). The set is compact and lies in a Euclidean ball of radius . There are fixed such that, almost surely over the nuisance-fitting sample, for every and, outside one common -null set, whenever , and, for every ,
For every , and are strongly measurable. Moreover, is jointly measurable and, almost surely over the nuisance-fitting sample, on a common -full set,
Conditional on , define the nuisance errors
(15)
We assume that is measurable with respect to .
For , the empirical and fitted-population criteria are continuous on compact under the measurability and Lipschitz assumptions on . We can take the supremum of their absolute difference over a countable dense subset of , so it is measurable. Measurability of the error relative to follows from continuity of on . This map is Lipschitz in the supremum norm because is deterministic and bounded.
For a failure probability , define the kernel-class sampling term
B.7.1 Kernel-Class Regularity
We give sufficient conditions for regularity of , the oracle kernel and the fitted kernel .
For , define the oracle induced observed-data kernel
Assumption B.6 (Oracle induced-kernel class). The parameter set is compact and contained in the Euclidean ball of radius . There exist a measurable set with and constants such that, simultaneously for every and ,
The scalar map is jointly measurable on . Consequently, on this set; write .
Remark B.7 (Sufficient conditions for neural kernels). The uniform learning bound requires the outcome kernel to be bounded and Lipschitz in its parameters. For a Gaussian kernel on learned features, these properties hold if the feature map is uniformly Lipschitz in its parameters and the bandwidth is Lipschitz and bounded away from zero (a fixed positive bandwidth is a special case). For a feedforward network of fixed architecture, uniform parameter Lipschitzness follows, for example, from bounded inputs and parameters and Lipschitz activations; see Liu et al. (2020, Propositions 21 and 23). These conditions control the neural component. Lemma B.7 extends them to the kernel mixture and ensemble, while Propositions B.8 and B.9 give the additional conditions needed for the oracle and fitted observed-data kernels.
Lemma B.8 (Regularity of the deep-kernel ensemble). Suppose there exist finite constants
such that, for all and ,
and
Writing , for and ,
Moreover,
Proof. For one member, add and subtract . Since ,
Average this bound over members and apply Cauchy-Schwarz:
The diagonal bound follows first from convexity within each member and then from averaging the members. ☐
Proposition B.9 (Primitive conditions for the induced kernel). Suppose is compact and contained in a Euclidean ball of finite radius, Assumption 3.1 holds, the map is jointly measurable, and, for finite , ,
Let
If , then there exists a measurable set with such that
and the induced kernels in (17) satisfy Assumption B.6 with
Proof. Choose a common full-measure set on which the contrast-overlap bound defining W holds and whose x-sections have full -measure, and let be the corresponding full-measure subset of observed triples. Positive definiteness and the diagonal bound imply
Hence and, by Jensen's inequality, . Since ,
Cauchy-Schwarz gives .
To compare across , define for the finite signed measure
The common kernel Q makes independent of . Its total variation satisfies . Moreover,
SO
Measurability of and joint measurability of the kernel family imply that is jointly measurable on . Therefore
Proposition B.10 (Primitive conditions for the fitted CME family). Condition on . Retain the compact parameter set and overlap and fitted propensity-ratio bounds of Assumption B.5, with a measurable independent of . Suppose is jointly measurable, has diagonal bound and uniform parameter Lipschitz constant as in Proposition B.9, and each is strongly measurable. Let
where the fitting outcomes and measurable coefficient functions are fixed conditional on and the coefficients do not depend on . Suppose these bounds hold almost surely with fixed constants. Then Assumption B.5 holds with
and on a common -full set.
Proof. The CME bound follows by the triangle inequality. Define the finite signed measure
with the ratio set to zero where . Since and , its total variation is at most on a common full set. It is independent of , and
These representations give the envelope and Lipschitz bounds by and the assumed bound on . The finite expansions and measurable coefficient integrals give strong measurability of the fitted functions and joint measurability of the scalar kernel.
For kernel ridge regression with a fixed input kernel and ridge, the coefficients do not depend on , although the fitted embedding still changes through . With the normalisation, a bounded input kernel and bounded away from zero give the uniform coefficient bound required above.
B.7.2 Oracle Concentration and Adaptation
Let be a deterministic sequence of positive selection regularisers. Let two independent oracle selection samples each contain observations. Construct the oracle versions of (11), (12), and (3) by replacing the fitted pseudo-features with , and denote the resulting quantities by
For , define
where C > 0 is a universal constant. For s > 0, let
Membership in depends on unknown population variances.
Lemma B.11 (Uniform oracle concentration). Under Assumptions 3.1 and 3.2 and Assumption B.6, with probability at least ,
Proof. We adapt the covering and bounded-difference arguments of Liu et al. (2020, Propositions 15–16 and Lemmas 17–19) to the cross-statistic. Earlier uniform bounds for kernel mixtures appear in Gretton et al. (2012b, Supplement, Appendix A). Let . Since lies in a Euclidean ball of radius , it admits a -net with
For fixed ,
Replacing one observation in either half changes by at most . McDiarmid's inequality therefore gives
A union bound over controls the maximum over the net by a universal constant times
Since both and are -Lipschitz, extending from the net adds at most . This proves the numerator bound.
For the variance estimator, write
and
Then and . Replacing one observation in either half changes by at most for a universal constant C. Hence
for a universal .
We now control the bias term. Let , , , and let . Conditional on , is the sample variance, with denominator , of . Therefore
Since ,
Thus
and boundedness of yields
Finally, is -Lipschitz and is -Lipschitz. Applying the preceding concentration inequality on the net, adding the bias, and extending from the net proves the variance bound.
Lemma B.12 (Stable ratio bound). Let , , and . Suppose
Then, for every ,
Proof. The variance condition gives . Hence
where the second line uses the mean-value theorem on . Since , (20) follows.
Theorem B.13 (Variance-stable oracle adaptation). Let satisfy , and suppose Assumptions 3.1 and 3.2 and Assumption B.6 hold. If , then, with probability at least ,
where
If are fixed,
then
Proof of Theorem B.13. On the event in Lemma B.11, every satisfies
Moreover, . Apply Lemma B.12 pointwise with
and take the supremum over . This gives (21) with as defined in (22). The stochastic rate follows from the definitions of and .
Theorem 1 of Gretton et al. (2012b) and Theorem 11 of Liu et al. (2020) choose a ridge of order for training size . Their ratio bounds amplify root-t estimation errors, up to logarithmic and class-complexity factors, by and balance this against bias. Both assume a positive population variance lower bound. Here, for sufficiently large samples, the uniform concentration event bounds the empirical variance away from zero on , so Lemma B.12 avoids this amplification. The same refinement applies on the variance-bounded subclass of Liu et al. using their Propositions 15-16 and for fixed class constants and a fixed positive variance lower bound. Thus the cube-root bounds do not establish an intrinsic rate limitation.
B.7.3 Nuisance Perturbation
We now transfer the oracle concentration bounds to fitted pseudo-features.
Lemma B.14 (Score envelopes from selection regularity). Under Assumption B.5, on a common full-measure set,
where
Consequently .
Proof. The diagonal kernel bound and Jensen's inequality give and . Also . The oracle bound therefore follows from
On the support of ,
which gives the fitted bound in the same way. Cauchy-Schwarz gives the final claim.
Write . Let and be defined by (18)-(19), with replaced by .
Lemma B.15 (Exact nuisance decomposition). Under Assumptions B.5 and 3.1, define
where off . Writing and , the fitted-score error has the exact decomposition
The first term has conditional mean zero given , and the second has conditional mean zero given . Hence, for ,
Moreover, the squared norms of the three terms in (23) are bounded, respectively, by
Proof. Because and , subtracting the oracle score from the fitted score gives
where abbreviates integration over . Since , the first conditional-mean statement follows. Also
which proves the second. Only the last term contributes to the unconditional mean, and conditioning on X yields the identity for . Cauchy-Schwarz with respect to the finite measure proves the product bound.
For the component bounds, and , whence
The middle term is the negative of centred conditionally on X, so conditional variance contraction gives
Finally, and the same change of measure gives the third bound in (25).
Lemma B.16 (Sharp population nuisance perturbation). Under Assumptions B.5 and 3.1, for every ,
There is a finite C, depending only on , such that
If on the support of , then and
so .
Proof. The numerator identity follows from . Since , (24) gives the stated bound.
To bound the variance error, we treat the propensity and outcome components separately. Suppress and write
The centred fitted projection is
Both Z and R are centred. Therefore
Let , , and denote the three terms in (23). Also set . Then
The conditional-embedding term has the exact cancellation
Indeed, is -measurable and , so the covariance with the residual part vanishes. The remaining part is -measurable, while . Thus there is no term linear in .
The same calculation does not cancel the propensity contribution. Instead,
which is not necessarily zero. Since , bounded features and Cauchy-Schwarz give
where .
For the mixed term,
The residual part is again orthogonal to v, while Cauchy-Schwarz gives
Since , , and the scores are uniformly bounded by Lemma B.14,
We now control the quadratic term in (29). From (25),
Using and the score envelope,
Substituting into (29) proves the first inequality in (27). Under Assumption B.5, both nuisance errors are bounded by constants: , , and the -weighted measure has mass at most two. Hence the higher-order and mixed terms are absorbed into , proving the second inequality.
If , then and . Equation (30) yields
The middle component bound in (25) and give the final inequality.
B.7.4 Uniform Criterion Bound and Consequences
Proof of Theorem 4.4. Conditional on , Lemma B.14 and the covering argument in Lemma B.11 give, with probability at least ,
The definitions of these two radii and of imply for fixed class constants. Combining (32) with (26) and (27) gives the componentwise bounds
Here the bounded nuisance envelopes absorb into the product term.
For the ratio, decompose
where and the derivative of has magnitude at most . Taking the supremum and using (33) to (34) proves (8).
For a cyclic rotation , apply the conditional result given its own nuisance-fitting fold and write its errors as and . Integrating each conditional failure probability and applying an unconditional union bound yields simultaneous control with probability at least . Averaging the three inequalities gives, for example,
No independence among the three rotation events is required.
Joint product-class complexity. If , then and . Hence
For fixed class constants and nuisance rates and , Theorem 4.4 gives criterion error
If increases, the sampling term vanishes when , provided the regularity constants remain bounded. The memberwise procedure in Algorithm 1 uses the bound for each trained member.
Theorem B.17 (Approximation of unregularised efficacy on a variance-stable class). Let be nonempty for , and suppose Assumptions B.5 and 3.1 hold. There exist finite constants , where depends only on the constants in Assumption B.5 and may additionally depend on , such that the following holds. On every realisation satisfying
for every , with conditional probability at least ,
Suppose also that deterministic sequences satisfy and , and that
Then the margin holds with probability tending to one for fixed s and fixed , and the left-hand side of (35) is
Proof. The proof of (34) supplies the constant independently of the ridge. On its concentration event, the assumed inequality gives throughout . Apply Lemma B.12 with , , , , and . Equations (33) to (34) then give (35). The rate statement follows from (16).
Under the preceding ridge choice, for and fixed class constants, sufficient conditions for a uniform approximation rate of for the unregularised criterion on are and . These learner rates, including uniformity over for the regression, are assumed rather than proved here.
Corollary B.18 (Known logging policy). Under the conditions of Theorem 4.4, if on the support of , then, for every , with conditional probability at least ,
If, in addition, is nonempty and
then, for every , with conditional probability at least ,
Proof. With known logging, , the population nuisance perturbation in the numerator vanishes, and (28) bounds the population variance perturbation by . Combining these facts with (32) proves the fixed-ridge result. The stable-ratio argument in the proof of Theorem B.17 proves the second result.
Remark B.19 (Approximate optimisation and held-out inference). The comparison below follows Liu et al. (2020, Corollary 13), with an optimisation error as allowed in their Corollary 12, footnote 7. Let . On an event where , suppose a selected satisfies
Then
Theorem 4.4 bounds for , but we do not bound the optimisation error of the training procedure. Separate member training gives no guarantee of joint optimisation over .
For , Theorem B.17 gives the same comparison for on , provided and the empirical optimisation inequality holds over . Held-out validity under Theorem 4.3 does not require global optimisation.
B.8 Null Second-Order Structure
We use the conditional notation and nuisance errors from Section B.7.
Proposition B.20 (Null second-order structure). Fix and assume all terms below are integrable. Consider a regular perturbation through for which the embedding contrast satisfies in . Under ,
If the perturbation has score and , then the quadratic form in (36) is induced by
Equivalently, ; thus, under the conventional Taylor normalisation, the order-two coefficient is , whereas is the kernel averaged by the corresponding U-statistic. Moreover,
so is one-degenerate.
For the fitted cross-product, suppose Assumptions B.5 and 3.1 hold, let and let be its mean over selection half . Under , and
Consequently, and, for this fixed ,
Proof. Under . Squaring the Hilbert-space expansion gives
which proves (36). If , then
Multiplying this identity by two gives the asserted second-derivative convention. Since ,
and similarly conditioning on . This is the asserted one-degeneracy.
For the empirical identities, write the two fitted half-means as and and expand their inner product. Subtracting the second-half projected mean from each projected observation gives (38). Independence and centring of the two halves then give the conditional expectation. Finally, the Hilbert-space second-moment bound yields , while . Combining these facts with (24) proves (39).
This expansion parallels Luedtke et al. (2019, Theorem 2), whose U-statistic uses all off-diagonal pairs. Here the cross-product uses independent halves, with conditional studentisation as in Kim & Ramdas (2024); Shekhar et al. (2022). With fitted nuisances, only the centred term in (37) is degenerate; the terms account for nuisance bias.
B.9 Held-Out Fixed-Alternative Scaling
Proposition 4.1 concerns a fixed kernel and true nuisance functions. We now extend its scaling limit to the selected kernel with fitted nuisances, conditional on the learning procedure. Write for the size of each test half.
Theorem B.21 (Held-out fixed-alternative scaling). Suppose Assumptions 3.1 and 3.2 hold. Consider a joint sequence with under a fixed alternative. Assume that the final fitted score is -measurable and conditionally Bochner integrable, and that the two test halves consist of i.i.d. observations from , are mutually independent, and are independent of . For a random fitted score , write
For some fixed , suppose , define on , and assume
Then
Proof of Theorem B.21. Condition on and write
The conditional fourth-moment bound and conditional laws of large numbers on the two independent test halves give
For the second line, first condition additionally on the first test half; the second-half studentiser is a scalar sample variance. The conditional fourth-moment bound makes its law of large numbers uniform along the joint sequence, and replacing the first-half mean by costs .
Since , conditional Jensen's inequality and the assumed score convergence give
Moreover,
Here follows from the conditional fourth-moment bound, and follows from the preceding display and . Thus the fitted-score numerator and variance differ from and , respectively, by . On , division is stable because . In particular, , and the zero-denominator convention in (2) does not affect the limit. It follows that
which proves (40).
☐
C Experimental Details
We now detail our experimental setting. We first describe the training and testing procedure, then specify the construction of each experiment. Finally, we detail the neural network architectures and hyperparameters used for the optimisation.
C.1 Training and Testing Procedure
We describe the training and testing procedure in Algorithm 1. Each ensemble member is trained separately by maximising its own learning criterion, using the same learning sample but a different random initialisation. We estimate the outcome embedding using kernel ridge regression and the propensity estimate using logistic regression for binary treatments and a Gaussian logging-policy model for continuous treatments. For each member, we average the learning criteria across three rotations of the learning folds and optimise by gradient ascent. At each epoch, we update an exponential moving average (EMA) of the kernel parameters and compute its unregularised test statistic on , using nuisance estimators fitted on . We retain the EMA checkpoint with the highest validation statistic for each member, then average the selected kernels as in (4). Finally, we refit the nuisance estimators on for testing.
We keep the selected kernels and fitted nuisance estimators fixed and evaluate all methods on the same 200 fresh test datasets at . We perform 20 independent outer repetitions, drawing new learning and validation samples and repeating kernel training, checkpoint selection and nuisance estimation. We report the mean rejection rate one standard error across outer repetitions. The reported sample size is where each sample contains observations, up to integer rounding. Here, denotes the size of each test dataset.
For experiments with binary treatments, we compare two deterministic interventions and .
For DR-KTE, we use the Gaussian outcome kernel where is a numerical representation of the structured outcome. We use flattened pixel values for images, token IDs for text, node-label and parent-index encodings for graphs. We set to the median pairwise Euclidean distance over the combined learning and validation outcomes, except on Causal-Blob, where we use the fifth percentile.
Algorithm 1 Training and testing procedure of DR-KTE-Deep
Require: Logged data , target interventions , ensemble size , member kernel family , selection regularisation , epochs , EMA decay
1: Split into disjoint samples , , and
2: Split into three equal folds
3: for do
4: Initialise independently across members and set
5: for do
6: for do
7: Assign the folds cyclically to
8: Fit and on
9: Compute pseudo-features on and
10: Compute using (3)
11: Update by gradient ascent on
12: Update the EMA parameters
13: Fit nuisances on and evaluate on
14: Set to the EMA checkpoint with the largest validation statistic on
15: Set and form k_\hat{\theta} using (4)
16: Refit the nuisance estimators on the combined learning and validation samples
17: Split into two halves of size
18: Compute the test pseudo-features and form T_\hat{\theta} using (2)
19: return T_\hat{\theta} and the asymptotic -value 1 - \Phi(T_\hat{\theta})
C.2 Image Outcomes
We detail the construction of experiments on image outcomes from Section 5. We extend the OCTMNIST experiments of Zenati & Gretton (2026). We apply semi-synthetic perturbations to baseline images sampled from MedMNIST v2 (Yang et al., 2023), released under CC BY-NC 4.0 for DermaMNIST and CC BY 4.0 for the remaining datasets.
For each unit, we sample a synthetic covariate
and assign treatment as
The potential outcomes are generated as
where is a baseline image sampled from a healthy or normal-labelled class and is a treatment dependent residual. We generate a potential outcome for each treatment and retain the outcome under the assigned treatment, .
To construct the residual, let
where determines the probability of a severe case. We sample
define mean-one multiplicative jitter factors
and independent pixel noise . The residuals under both treatments are then
where is a mask describing one of three perturbations: a localised lesion, scattered deposits, and a morphological change. Localised perturbations add a single blob to the baseline image, as in Chest-Effusion, Chest-Mass, OCT-DME, OCT-CNV and Pneumonia. Scattered perturbations add several small blobs to plausible locations, as in OCT-Drusen and Retina-Severe. Morphological perturbations change an existing structure; Chest-Cardiomegaly enlarges the cardiac silhouette, while Derma-Melanoma distorts and desaturates a mole. Finally, Breast-Tumor distorts an added localised lesion, combining a localised and morphological perturbation.
We use , and with , , and . Baseline images are sampled with replacement from the corresponding training, validation or test split.
For Table 1 under , we use for Breast-Tumor, 1.4 for Chest-Cardiomegaly, 1.2 for Chest-Effusion, 1.0 for Chest-Mass, 1.4 for Derma-Melanoma, 0.8 for OCT-CNV, 0.4 for OCT-DME and OCT-Drusen, and 1.0 for Pneumonia and Retina-Severe. We set under .
C.3 Text Outcomes
We now detail the generation of text outcomes in Section 5. Given some covariate , we sample a treatment according to Equation (42) and generate pseudo-outcomes
where , with . Each pseudo-outcome is then discretised into one of three tones. The tone is used as conditioning to generate the outcome text for each treatment from a large language model. We retain the potential outcome under the assigned treatment, .
Oncology Notes. We sample a five-dimensional covariate . The covariate is rendered as a breast-cancer patient profile containing age, cancer stage, ECOG performance status, a biomarker score, and a comorbidity index. For each profile, we prompt the language model to write three post-treatment clinical notes describing respectively disease progression, stabilised disease and positive treatment response.
Movie Reviews. For each unit, we first sample a movie review from the Rotten Tomatoes dataset (Pang & Lee, 2005) and prompt the language model to rewrite the review as positive, negative and neutral. We construct the covariate by applying a fixed Gaussian random projection to the sampled review's embedding.
Clinical Notes. For each unit, we first sample a clinical note from the MTSamples dataset (Nair, 2024). We then append to the note two language model generated sentences describing a positive, negative or neutral clinical outcome. As with movie reviews, we construct from a fixed Gaussian random projection of the note's embedding.
We use , , and . Pseudo-outcomes below -1 select the negative variant, in select the neutral variant, and at or above 1 select the positive text variant. For , we use for Oncology Notes and Movie Reviews and for Clinical Notes. For , we use .
We generate the text variants with Qwen3-8B, with thinking disabled, temperature 0.7 and p = 0.9. Outcomes in Section D.7 and text covariates are embedded using Qwen3-Embedding-0.6B.
C.4 Graph Outcomes
Finally, we detail the graph outcome constructions of Section 5. For a pre-treatment graph , we extract and standardise a scalar feature from to obtain the covariate . As before, treatment is assigned according to Equation (42) with . Here, treatment modifies , from which we construct the outcome graph .
Contact Networks. Each unit’s pre-treatment graph is a contact network obtained by sampling a connected subgraph from the Infectious SocioPatterns dataset (Isella et al., 2011). Each node is an individual, and each edge is weighted by the number of 20-second intervals during which two individuals were in close proximity. We use mean excess degree as a proxy for epidemic risk, motivated by its role in random-network epidemic thresholds (Newman, 2002):
where is the number of distinct contacts of individual v. Contact networks with a larger epidemic risk are therefore more likely to receive the intervention.
We sample an infection source with probability proportional to each node's weighted degree. Under , the contact network is unchanged. Under , we remove 20% of the contact edges, prioritising edges with more neighbours, greater contact weight, and greater weighted degree. We then sample potential transmission edges, with probability increasing with contact weight, and construct a transmission tree from each network. The two potential outcomes use the same infection source and sampled potential transmission edges. Under , the transmission trees are generated from the unchanged contact network for both potential outcomes.
LLM Code Repairs. Each unit’s pre-treatment graph is a buggy Python function from the BugsInPy dataset (Widyasari et al., 2020), represented as its abstract syntax tree (AST).
Under , we retain the original AST, . Under , the outcome is the AST of the corresponding LLM-generated repair attempt from Ehsani et al. (2025). We choose as the log-size
where is the number of nodes in the original AST. Longer functions are therefore more likely to receive an LLM-generated repair.
Under , we set both potential outcomes to the original AST, , while retaining the same covariates and treatment-assignment mechanism. Under , the treated potential outcome is the corresponding repair candidate.
Each outcome tree is encoded as a padded sequence of node labels and parent indices. This representation is injective for the labelled tree, although constructing the tree may discard information from the original program or contact network. The WL subtree kernel is not generally characteristic, and therefore does not provide the same omnibus guarantees as the Gaussian kernel tests.
C.5 Architectures and Hyperparameters
We describe the neural network architectures and hyperparameters used for DR-KTE-Deep. For scalar outcomes, Causal-Blob, and text outcomes when represented as an embedding, is a four-layer fully connected network with softplus activations (Figure 5). Text outcomes, when represented as a sequence of tokens, use a two-layer transformer (Figure 7). For image outcomes, we use a four-layer convolutional network with LeakyReLU activations (Figure 6). Finally for graph outcomes, we use a three-layer message-passing graph neural network (GNN) (Figure 8).
We use an Adam optimiser (Kingma & Ba, 2015), with separate learning rates for the neural features and the remaining parameters. Hyperparameters are summarised in Tables 4 and 5.
DR-KTE-Opt shares the same optimiser, regularisation parameters and number of epochs, but only optimises the lengthscale of its kernel, using the same learning rate as the non-neural parameters of DR-KTE-Deep.
| Hyperparameter | Value |
|---|---|
| Training variance regularisation | |
| Validation and test variance regularisation | |
| CME regularisation | |
| EMA decay | |
| Minimum mixture weight | |
| Learning-rate schedule | Cosine decay to of initial rate |
| Gradient norm clipping |
Table 4: Shared hyperparameters for our experiments.
| Experiment | Epochs | Ensemble Size | Feature LR | Other LR |
|---|---|---|---|---|
| Image outcomes | ||||
| Text outcomes (token sequences) | ||||
| Graph outcomes | ||||
| Text outcomes (embedded) | ||||
| Scalar outcomes | ||||
| Causal-Blob |
Table 5: Experiment-specific hyperparameters.

Figure 5: Four-layer fully connected feature extractor for scalar outcomes, Causal-Blob, and text outcomes under an embedded representation.

Figure 6: Four-layer convolutional feature extractor for image outcomes.

Figure 7: Two-layer transformer feature extractor for text outcomes represented as a sequence of tokens.

Figure 8: Three-layer message-passing feature extractor for graph outcomes.
D Additional Experiments
D.1 Additional Results on Image Outcomes
Medical-Image Outcomes. We run additional simulations on medical-image outcomes, varying both sample size and effect strength. On OCT-DME, deep-kernel power is already near one throughout the sample-size sweep, while the Gaussian baselines have low power (Figure 9). On Derma-Melanoma, increasing N substantially raises deep-kernel power, with smaller gains for the Gaussian baselines (Figure 10).
DR-KTE
DR-KTE-Opt
DR-KTE-Deep
(a) Type-I error

(b) Power ( )
(c) Power (N=1500)

Figure 9: Results for OCT-DME. From left to right: (a) Type-I error under ( ), (b) average test power when varying N while keeping fixed, (c) average test power when varying while keeping N = 1500 fixed. Shaded bands show one standard error across 20 independent outer repetitions. The dotted grey line marks .
DR-KTE DR-KTE-Opt DR-KTE-Deep
(a) Type-I error
(b) Power ( )

(c) Power (N = 1500)

Figure 10: Results for Derma-Melanoma. From left to right: (a) Type-I error under ( ), (b) average test power when varying N with fixed, (c) average test power when varying with N = 1500 fixed. Shaded bands show one standard error across 20 independent outer repetitions. The dotted grey line marks .
MNIST, RetinaMNIST, BUSI. We next study a construction where treatment changes the sampling frequency of image labels of the MNIST (LeCun et al., 1998), RetinaMNIST (Yang et al., 2021; 2023; Liu et al., 2022), and BUSI (Al-Dhabyani et al., 2020) datasets.
Covariates and treatments are sampled as in Equation (41) and Equation (42). We define the scalar pseudo-outcomes
where , , and .
We consider the three scenarios of Muandet et al. (2021). For Scenario I, . For Scenario II, . For Scenario III, , where Bernoulli(0.5). Scenario I thus tests , while Scenarios II and III test . The pseudo-outcomes are converted to discrete image labels within each dataset's range. is then generated by sampling an image with label . We retain the outcome under the assigned treatment, . The generative process is summarised in Figure 11, and Figure 12 illustrates the construction.

Figure 11: Data-generating process for MNIST, RetinaMNIST and BUSI. The covariate X and treatment A generate a scalar pseudo-outcome , which is discretised to select the label of the sampled image outcome Y.
We report average Type-I error for Scenario I and average power for Scenarios II and III in Table 6 for the three datasets at N = 1500 and N = 3000. Type-I error ranges from 0.045 to 0.054, close to the nominal rate of . Under the alternatives, DR-KTE-Deep has higher estimated power than the baselines in every setting, with the largest improvement on RetinaMNIST in Scenario III.

Figure 12: MNIST (Scenario II, left) and RetinaMNIST (Scenario III, right). Panels (a) and (c) show label distributions under each treatment. Panels (b) and (d) show sampled image outcomes.
| Dataset | N | Scenario | DR-KTE | DR-KTE-Opt | DR-KTE-Deep |
|---|---|---|---|---|---|
| MNIST | 1500 | I | |||
| II | |||||
| III | |||||
| 3000 | I | ||||
| II | |||||
| III | |||||
| RetinaMNIST | 1500 | I | |||
| II | |||||
| III | |||||
| 3000 | I | ||||
| II | |||||
| III | |||||
| BUSI | 1500 | I | |||
| III | |||||
| 3000 | I | ||||
| III |
Table 6: Average rejection rates for MNIST, RetinaMNIST, and BUSI image outcomes at . Scenario I reports Type-I error; Scenarios II and III report power. Effect strengths are and 1.5 for MNIST II and III, and 4.0 for RetinaMNIST II and III, and for BUSI III. Values are means one standard error across 20 independent outer repetitions.
Fake-MNIST. We now consider a treatment that changes the source dataset of the sampled image, adapting the comparison of Liu et al. (2020) between real MNIST images and images generated by a generative adversarial network (GAN). We use a single digit covariate , sampled uniformly, and assign treatment according to
where 4.5 and are the respective mean and standard deviation of a uniformly sampled digit, and is a scaling hyperparameter.
Under , we sample real MNIST images of digit under both interventions. Under , we sample a GAN-generated image of digit with probability
and a real MNIST image otherwise, where is a scaling hyperparameter. Outcomes under are thus always real images, while outcomes under can be real or GAN-generated. Larger digits are more likely to be assigned and, under , to be replaced by a GAN-generated image.
Average Type-I error and power at and are reported in Table 7. Under , DR-KTE-Deep exceeds all baselines at both sample sizes. DR-KTE-Opt slightly improves power over DR-KTE. Under , rejection rates range from 0.050 to 0.054 across all methods and sample sizes, close to the nominal level.
| Scenario | DR-KTE | DR-KTE-Opt | DR-KTE-Deep | |
|---|---|---|---|---|
| 1500 | ||||
| 3000 | ||||
Table 7: Type-I error () and power () for Fake-MNIST at . Values are means one standard error across 20 independent outer repetitions.
D.2 Causal-Blob
We evaluate our method on a Gaussian mixture dataset adapted from the Blob dataset of Liu et al. (2020) to a causal setting with covariates. For each unit, we sample a mode index uniformly with centres . The covariate is then a noisy version of the mode location:
Treatment is sampled as in Equation (42). The potential outcomes follow the mode-centred Gaussians
where is isotropic and shared across modes, while has the same diagonal entries as but a mode-dependent off-diagonal entry . We use and . The two outcome distributions thus have the same mean but differ in higher-order moments under .
Table 8 shows that DR-KTE-Deep achieves the highest power on Causal-Blob at both sample sizes, with the largest gain over DR-KTE-Opt at . DR-KTE-Opt also improves power over DR-KTE. Type-I error for all three tests remains close to the nominal level at both sample sizes.
| N | Power/Type-I error () | ||
|---|---|---|---|
| DR-KTE | DR-KTE-Opt | DR-KTE-Deep | |
| 1500 | |||
| 3000 | |||
Table 8: Power and Type-I error for Causal-Blob at . Each cell reports , with means one standard error across 20 independent outer repetitions.
D.3 Scalar Outcomes
We also evaluate our method on scalar outcomes. We adapt the scalar-outcome scenarios of Muandet et al. (2021) with binary treatments. Covariates and treatments are sampled as in Equations (41) and (42), and we use the scalar outcomes of Equation (44) directly. Scenarios I, II and III cover the null hypothesis, a mean shift and a mean-preserving distributional shift respectively. We additionally consider Scenario IV of Zenati et al. (2025b), with , where . This represents a change in both the mean and variance of the outcome distributions.
Table 9 reports average Type-I error for Scenario I and average power for Scenarios II-IV. Type-I error is close to the nominal level for the kernel tests at both sample sizes. Power is close to one in Scenarios II and IV, with little improvement from learning a deep kernel. Scenario III is more challenging, although power increases substantially with sample size. DR-KTE-Opt achieves the highest estimated power in Scenario III at both sample sizes.
| N | Scenario | Power/Type-I error () | ||
|---|---|---|---|---|
| DR-KTE | DR-KTE-Opt | DR-KTE-Deep | ||
| 1500 | II | |||
| III | ||||
| IV | ||||
| 3000 | II | |||
| III | ||||
| IV | ||||
Table 9: Power and Type-I error for scalar outcomes at , with and . Each cell reports , with means one standard error across 20 independent outer repetitions.
D.4 Estimator Comparison
We study how the choice of estimator affects test power and Type-I error, using the same learned outcome kernel for all methods. We consider the continuous-treatment construction of Zenati et al. (2025b). We compare doubly robust estimation with inverse-propensity weighting (IPW) and a kernel policy test. For each unit, we sample the covariate as
and treatment is assigned as
The outcome is then
where are fixed coefficient vectors.
We compare two interventions and and set . We consider four policy-test scenarios adapted from Zenati et al. (2025b) with continuous treatments. Scenario I tests the null hypothesis with , where and , so the two interventions induce the same marginal outcome distribution. In Scenario II, . In Scenario III, is an equal mixture of the distributions and . Finally, in Scenario IV, is an equal mixture of the distributions and .
We compare our doubly robust estimator, DR-KTE-Deep, to a cross-U IPW estimator, IPW-Cross, obtained by setting in the plug-in estimator of Equation (1). We additionally compare our method to a kernel policy test, KPT, following Zenati et al. (2025b). All methods use the same deep outcome kernel, learned with the doubly robust criterion. We divide the data into four equal samples for learning, validation, nuisance fitting and testing. For this comparison, checkpoint selection uses variance regularisation , and the final cross-U statistics are unregularised. KPT uses 10,000 permutations to calibrate its test. These choices hold the learned kernel and data budget fixed while comparing the test estimators.
Table 10 shows that DR-KTE-Deep achieves higher estimated power than IPW-Cross and KPT in all three alternative scenarios, with the largest gains in Scenario III. Under the null hypothesis, its rejection rate is close to the nominal level of , while IPW-Cross and KPT have higher Type-I error.
| Scenario | Power/Type-I error () | ||
|---|---|---|---|
| DR-KTE-Deep | IPW-Cross | KPT | |
| Scenario II | |||
| Scenario III | |||
| Scenario IV | |||
Table 10: Power and Type-I error at , and for different choices of estimator. Each cell reports , with means one standard error across 20 independent outer repetitions.
D.5 Robustness to Outcome Model Misspecification
We analyse the contribution of fitting the conditional outcome embedding with the logging policy known. We compare the fitted embedding with , while maintaining and a learned deep outcome kernel. We evaluate the comparison on Causal-Blob (Section D.2) and the four scalar-outcome scenarios of Section D.3.
Table 11 shows similar Type-I error for the fitted and zero outcome embeddings, with rejection rates close to the nominal level. Using the fitted outcome embedding improves power on Causal-Blob and in Scenarios II and III, with the largest gain in Scenario III. Both estimators achieve power close to one in Scenario IV.
| Environment | Power/Type-I error () | |
|---|---|---|
| Fitted | ||
| Causal-Blob | ||
| Scenario II | ||
| Scenario III | ||
| Scenario IV | ||
Table 11: Power and Type-I error at , and . Each cell reports , with means one standard error across 20 independent outer repetitions.
D.6 Training Objective Comparison
We test whether our power learning objective improves detection compared to a reconstruction objective. On OCT-Drusen and Fake-MNIST, we compare DR-KTE-Deep with a frozen randomly initialised CNN and a pixel autoencoder. All variants share the same encoder architecture, initial encoder weights, learning and validation observations, and test datasets.
DR-KTE-Deep has the highest power on both constructions under (Table 12), while Type-I error remains close to the nominal level for all methods.
| Scenario | Random Weights | Pixel Autoencoder | DR-KTE-Deep | |
|---|---|---|---|---|
| OCT-Drusen | ||||
| Fake-MNIST | ||||
Table 12: Power under and Type-I error under at . Values are means and one standard error across 20 independent outer repetitions.
D.7 Text Representation Ablation
We consider an alternative representation for the text outcomes described in Section 5, mapping each outcome to a fixed-length vector using the Qwen3-Embedding-0.6B (Zhang et al., 2025) embedding model. Since a language-model embedding can capture semantic information, a simple Gaussian kernel may be well suited to detecting differences in outcome distributions.
Table 13 shows that all three methods achieve high, similar power using this representation. Type-I error remains close to the nominal level for Oncology Notes and Clinical Notes, while all three methods are conservative on Movie Reviews.
However, this embedding is not guaranteed to be injective: distinct texts can collapse to the same embedding. A Gaussian kernel, even if characteristic on the embedding space, might therefore not detect every difference between the original text outcome distributions. Additionally, this representation can be more costly than a sequence of tokens, as it requires inference over an embedding model.
| Scenario | Power/Type-I error () | ||
|---|---|---|---|
| DR-KTE | DR-KTE-Opt | DR-KTE-Deep | |
| Oncology Notes | |||
| Movie Reviews | |||
| Clinical Notes | |||
Table 13: Power () and Type-I error () at and for text outcomes represented as text embeddings.
D.8 Effect of Ensemble Size
We evaluate the effect of memberwise averaging by varying the number of separately trained kernels included in the ensemble. We perform five independent batches, each consisting of 20 independent outer repetitions. In each repetition, we train five members and form ensembles with , using the first members. All ensemble sizes share the same observations, nuisance estimates and member kernels. We use Causal-Blob and OCT-Drusen at and , following the procedure in Section C.1.
For each outer repetition and ensemble size, we estimate power as the rejection rate over 200 fresh test datasets under , at . We then compute the mean and sample standard deviation of the 20 power estimates within each batch. For each statistic, we report its mean and one standard error across five independent batches.
On OCT-Drusen, power increases slightly with ensemble size, and its standard deviation is lower at than at . On Causal-Blob, average power increases from 0.350 to 0.394, while variability does not decrease consistently (Table 14 and Figure 13).
While Proposition B.3 establishes variance reduction for the population discrepancy with the training data fixed, it does not imply that empirical power becomes less variable across repetitions.
| Dataset | Statistic | ||||
|---|---|---|---|---|---|
| Causal-Blob | Power | ||||
| SD | |||||
| OCT-Drusen | Power | ||||
| SD |
Table 14: Mean and standard deviation (SD) of empirical power at and . Each statistic is computed across 20 independent outer repetitions within each batch; values are means one standard error across five independent batches.


Figure 13: Average standard deviation of empirical power against ensemble size at and . Shaded bands show one standard error across five independent batches.
D.9 Weisfeiler-Lehman Outcome Kernel
We consider an alternative base kernel for the graph-outcome experiments. We replace the Gaussian kernel used as with a Weisfeiler-Lehman (WL) subtree kernel (Shervashidze et al., 2011) and denote the resulting tests by DR-KTE-WL and DR-KTE-WL-Deep. Since the WL kernel is not generally characteristic, these methods do not retain the same omnibus guarantees as the Gaussian-based ones.
Table 15 reports average power under and average Type-I error under for both WL-based methods. Learning the outcome kernel increases power from 0.743 to 0.964 on LLM Code Repairs. On Contact Networks, the two variants achieve similar power, with a slightly higher average for the learned kernel. Type-I error remains close to the nominal level for both constructions and methods.
| Scenario | Power/Type-I error () | |
|---|---|---|
| DR-KTE-WL | DR-KTE-WL-Deep | |
| LLM Code Repairs | ||
| Contact Networks | ||
Table 15: Power () and Type-I error () for graph outcomes using Weisfeiler-Lehman base kernels at . Each cell reports , with means one standard error across 20 outer repetitions. Gaussian-kernel results are given in Table 3.
D.10 Linear Outcome Kernel
We compare DR-KTE-Deep with DR-ATE, using a linear outcome kernel , where is the numerical representation of the structured outcome. DR-ATE therefore only tests for average treatment effects.
For the medical-image experiments, Causal-Blob and the scalar outcomes Scenario III, which construct a mean-matched but distributional effect, DR-KTE-Deep has high power, while DR-ATE rejects around the nominal rate (Tables 16, 20 and 21). In the remaining experiments, where the construction introduces a mean-shift in interventional outcomes, DR-ATE often has high power, but DR-KTE-Deep always achieves higher rejection rates (Tables 17 to 19).
| Scenario | Power/Type-I error () | |
|---|---|---|
| DR-ATE | DR-KTE-Deep | |
| Breast-Tumor | ||
| Chest-Cardiomegaly | ||
| Chest-Effusion | ||
| Chest-Mass | ||
| Derma-Melanoma | ||
| OCT-CNV | ||
| OCT-DME | ||
| OCT-Drusen | ||
| Pneumonia | ||
| Retina-Severe | ||
Table 16: Comparison with DR-ATE for medical-image outcomes at . Each cell reports , with means one standard error across 20 outer repetitions.
| Dataset | Scenario | DR-ATE | DR-KTE-Deep |
|---|---|---|---|
| MNIST | I | ||
| II | |||
| III | |||
| Retina-MNIST | I | ||
| II | |||
| III | |||
| BUSI | I | ||
| III | |||
| Fake-MNIST | |||
Table 17: Comparison with DR-ATE for MNIST, RetinaMNIST, BUSI and Fake-MNIST at . Scenario I and Fake-MNIST report Type-I error; Scenarios II and III and Fake-MNIST report power. Values are means one standard error across 20 outer repetitions.
| Scenario | Power/Type-I error () | |
|---|---|---|
| DR-ATE | DR-KTE-Deep | |
| Oncology Notes | ||
| Movie Reviews | ||
| Clinical Notes | ||
Table 18: Comparison with DR-ATE for text outcomes at . Each cell reports , with means one standard error across 20 outer repetitions.
| Scenario | Power/Type-I error () | |
|---|---|---|
| DR-ATE | DR-KTE-Deep | |
| LLM Code Repairs | ||
| Contact Networks | ||
Table 19: Comparison with DR-ATE for graph outcomes at . Each cell reports , with means one standard error across 20 outer repetitions.
| Scenario | Power/Type-I error () | |
|---|---|---|
| DR-ATE | DR-KTE-Deep | |
| Causal-Blob | ||
Table 20: Comparison with DR-ATE on Causal-Blob at . Each cell reports , with means one standard error across 20 outer repetitions.
| Scenario | Power/Type-I error () | |
|---|---|---|
| DR-ATE | DR-KTE-Deep | |
| Scenario II | ||
| Scenario III | ||
| Scenario IV | ||
Table 21: Comparison with DR-ATE for scalar outcomes at . Each alternative is paired with the shared Scenario I null. Each cell reports , with means one standard error across 20 outer repetitions.
D.11 Scaling with Outcome Dimension
We compare DR-ATE, DR-KTE, DR-KTE-Opt and DR-KTE-Deep as the outcome dimension increases. We use Causal-Blob (Section D.2), where we vary the outcome dimension by appending independent noise coordinates to the two-dimensional outcomes. For , the augmented outcome is
where is independent of the covariates, treatment and original outcome . Since the appended coordinates have the same distribution under both treatments, the treatment effect is confined to the first two coordinates.
Figure 14 shows that DR-KTE-Opt improves power over DR-KTE, while DR-KTE-Deep achieves substantially higher power through . DR-ATE has little power beyond its null rejection rate throughout, as expected for this mean-preserving alternative. At and , all four methods have little power beyond their null rejection rates. Type-I error is above the nominal level for all four methods.
DR-ATE
DR-KTE
DR-KTE-Opt
DR-KTE-Deep
(a) Type-I error

(b) Power ( )

Figure 14: Causal-Blob at N = 4000 when varying the outcome dimension, with under and under . Shaded bands show one standard error across 20 independent outer repetitions. The dotted grey line marks .
D.12 Effect of Joint Maximisation
We compare DR-KTE-Deep to a variant that jointly maximises the power learning criterion of the averaged ensemble. In DR-KTE-Deep, each kernel member is trained and selected separately. The final ensemble can therefore be composed of members selected from different training epochs. The joint maximisation variant instead selects a single ensemble checkpoint on the validation sample. Joint maximisation therefore removes the flexibility to select each member at its own best validation checkpoint.
Joint maximisation generally yields similar or lower estimated power than DR-KTE-Deep, while improving on DR-KTE (Table 22). OCT-Drusen is the exception, with higher power under joint maximisation. Type-I error remains close to the nominal level.
| Scenario | Power/Type-I error () | ||
|---|---|---|---|
| DR-KTE | DR-KTE-Deep | Joint maximisation | |
| Breast-Tumor | |||
| Chest-Cardiomegaly | |||
| Chest-Effusion | |||
| Chest-Mass | |||
| Derma-Melanoma | |||
| OCT-CNV | |||
| OCT-DME | |||
| OCT-Drusen | |||
| Pneumonia | |||
| Retina-Severe | |||
| Oncology Notes | |||
| Movie Reviews | |||
| Clinical Notes | |||
| LLM Code Repairs | |||
| Contact Networks | |||
Table 22: Effect of joint maximisation at and . Each cell reports , with means one standard error across 20 outer repetitions.