EconBase
← Back to paper

Distance Profile Embedding for Independence and Conditional Independence Testing of Random Objects

Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.

112,158 characters · 24 sections · 94 citation commands

Rendered from LaTeX for readability, not typeset faithfully. Citation keys are highlighted; maths is left as source; figures, tables and equation environments are summarised rather than reproduced; unrecognised commands are greyed out so nothing is silently dropped. Email addresses are removed.

Distance Profile Embedding for Independence and Conditional Independence Testing of Random Objects

abstractTesting independence or conditional independence is fundamental to statistical inference, yet existing methods for non-Euclidean random objects often face a difficult trade-off between geometric flexibility and theoretical tractability. We introduce the Distance Profile Embedding (DPE), a novel representation that maps random objects from general metric spaces into a Hilbert space of square-integrable functions. We prove that this mapping is injective and preserves full distributional information without requiring isometric Hilbert embeddings or one-to-one correspondence conditions. Leveraging the DPE, we develop a unified framework for marginal and conditional independence testing of random objects that enjoys a rigorous asymptotic theory for both size and power. Notably, our framework is the first in the literature to accommodate object-valued conditioning variables when testing conditional independence, overcoming the Euclidean or Hilbertian constraints of existing methodologies. We facilitate the calculation of analytic $p$-values using closed-form asymptotic null distributions, which avoids the computational burden of permutation tests common in existing metric-based methods. The numerical properties of our methods are demonstrated through both simulations and two real-world applications involving gut microbiome compositions and global human mortality distributions, respectively.

\noindentKeywords: Distance profile; independence test; conditional independence test; metric statistics; non-Euclidean data.

Introduction

Testing independence and conditional independence is essential to statistical inference, forming the basis for dimension reduction, variable selection, and causal discovery. Traditional nonparametric testing methods have been well developed for Euclidean data Hoeffding1948, szekely2007measuring, sejdinovic2013equivalence, shao2014martingale, wang2015conditional, zhu2020distance,fan2024test. These approaches rely fundamentally on linear structure, natural ordering, or the existence of characteristic functions that are intrinsic to Euclidean spaces.

Modern scientific studies, however, increasingly involve complex non-Euclidean data (also known as “random objects") that take values in general metric spaces, with representative examples including phylogenetic trees, microbiome compositions, brain networks, and probability measures in Wasserstein space. The need for rigorous inference about independence and conditional independence for such objects arises naturally across a wide range of scientific domains. In microbial ecology, for example, testing the association between the microbiome composition and the outcomes of interest is a primary problem COMBO2011Gary. The compositional nature of these data and their underlying phylogenetic relationships often require the use of tree-based metrics, such as UniFrac li_microbiome_2015, which capture biological similarity more effectively than the standard Euclidean distance zhao2015testing. The inherent difficulty of this problem lies in the lack of a vector space structure, rendering the analytical machinery of classical inference inapplicable. Because methods based on ranks, projections, or characteristic functions cannot be directly extended to random objects, new theoretical frameworks are required to accommodate the intrinsic geometry of general metric spaces.

A prevailing strategy for analyzing random objects is to embed the metric space isometrically into a Hilbert space, thereby enabling the use of classical linear and kernel-based tools. In the context of independence testing, the validity of distance covariance (dCov) requires the metric space to be of strong negative type, which necessarily admits an isometric Hilbert embedding szekely2007measuring. Similarly, the Hilbert-Schmidt Independence Criterion (hSIC) consistently detects dependence only when the underlying kernel is characteristic gretton2007kernel. Standard kernel choices, such as distance-induced or Gaussian-type kernels, are characteristic primarily under strong negative type assumptions sejdinovic2013equivalence, ziegel2024characteristic. This reliance on strong negative type limits the scope of these methods. Notably, many important non-Euclidean domains, including spheres equipped with geodesic distance, multi-dimensional Wasserstein spaces, and phylogenetic trees bhattacharjee2025doubly, are not of strong negative type and do not admit Hilbert space embeddings.

To circumvent the restrictive requirement of isometric embedding into Hilbert spaces, a recent line of work represents the distribution of a random object through its {\em distance profile}---the collection of distances from the object to a set of reference points in the metric space. As shown in Table (ref), notable examples include the Ball Covariance (Ball) wang_nonparametric_2024, the Distance Profile-based Mutual Independence Test (DiPMInd) chen2024testing, and the Profile Association (PA) zhou2025association. These methods broaden the applicability of independence testing in metric spaces by reducing inference on complex objects to real-valued distance variables. However, their theoretical guarantees rely on a stringent structural assumption of one-to-one correspondence Christensen1970, Hoffmann1975, which requires that the collection of distance summaries uniquely determines the underlying probability measure (see Section (ref) for details). This condition is often difficult to verify and can fail in general metric spaces, as demonstrated by a counterexample in Davies_1971. The need for an alternative framework that preserves full distributional information without requiring such identifiability conditions leads to an important open problem:

center[center omitted — 199 chars of source]
table[table omitted — 1,404 chars of source]

The structural and theoretical constraints of existing frameworks become even more pronounced in the context of conditional independence, a concept central to many statistical areas such as graphical modeling and causal discovery. While the current literature on random objects focuses on characterizing marginal associations, learning dependence structures in graphical models or isolating direct causal effects requires conditioning on variables that may themselves be random objects. This challenge is exemplified in global health, particularly in investigating the relationship between childbearing and female survival WHO2019MaternalMortality. Rigorous evaluation of the dependence between fertility and mortality distributions requires controlling for shared socioeconomic and environmental confounders. A principled strategy involves conditioning on the male mortality distribution, which serves as a proxy for these latent factors. However, the development of systematic procedures for independence tests conditioning on such infinite-dimensional random objects remains an important open problem.

table[table omitted — 1,248 chars of source]

Existing frameworks for conditional independence testing impose stringent structural conditions that limit their generalizability. For instance, the Profile Association (PA) test zhou2025association restricts the conditioning variable to Euclidean spaces. {The Kernel Conditional Independence (KCI) test zhang2012kernel relies on characteristic kernels that, as previously noted, require Hilbert structures for all variables. Adding to the structural constraints, KCI lacks universal consistency } in the alternative for conditional tests involving general metric spaces, as summarized in Table (ref). The pervasive need to overcome these geometric and theoretical bottlenecks leads to a subsequent fundamental question:

center[center omitted — 178 chars of source]

In this paper, we address both ($Q1$) and ($Q2$) by developing a unified framework for testing the independence or conditional independence of random objects in general metric spaces. We introduce a novel representation, termed the Distance Profile Embedding (DPE), which maps each random object to an integrable function on the metric space defined by its distances to reference points. This representation induces a Hilbertian structure at the level of the embedded objects, facilitating the assessment of dependence via cross-covariance operators in the reproducing kernel Hilbert spaces (RKHS). Crucially, unlike existing approaches, the DPE preserves the full distributional information of the original random objects without requiring isometric Hilbert embeddings or one-to-one correspondence conditions, thereby resolving ($Q1$). Furthermore, it addresses ($Q2$) by accommodating object-valued conditioning variables within an RKHS-based conditional independence framework.

To translate this DPE representation into a practical inferential tool, we establish the large-sample theory and computational framework necessary for hypothesis testing. We develop computationally efficient statistics with analytically tractable asymptotic distributions under the null hypothesis of independence or conditional independence, avoiding the need for computationally intensive permutation procedures. The theoretical consistency and power of our methods are established through rigorous proofs and validated via numerical simulations on metric spaces that do not admit isometric Hilbert embeddings. Finally, we demonstrate the practical utility of our framework through applications to complex real-world datasets, including gut microbiome compositions and human mortality distributions.

More specifically, we summarize our contributions as follows:

itemize• Distance Profile Embedding for General Metric Spaces. The DPE is a novel mapping from a general metric space to a Hilbert space of square-integrable functions. We prove that the DPE is injective and measurable, thus preserving the full distributional information of the original random objects without requiring the underlying metric space to admit an isometric Hilbert embedding (see Theorem (ref) and Corollaries (ref)--(ref)). Beyond the scope of independence and conditional independence testing, the DPE provides a principled bridge between random objects in general metric spaces and classical Hilbert-space theory. • Independence Testing for Random Objects without One-to-One Correspondence. We address the open problem ($Q1$) by leveraging the DPE representation to develop a general framework for independence testing that is free from restrictive structural conditions. Recent methods wang_nonparametric_2024, zhou2025association rely heavily on the one-to-one correspondence assumption Christensen1970, Hoffmann1975, which may not hold as pointed out by wang_nonparametric_2024. • Conditional Independence Testing with Object-Valued Conditioning Variables. To the best of our knowledge, this is the first framework for conditional independence testing that operates when all variables, including the conditioning variable, are random objects in metric spaces. Unlike existing approaches that require Euclidean covariates zhou2025association or Hilbertian structures for all variables zhang2012kernel, our method accommodates object-valued conditioning without requiring such restrictive geometries, resolving the fundamental question ($Q2$). • Comprehensive Asymptotic Theory for Size and Power. As shown in Tables (ref) and (ref), while asymptotic size control and power consistency have been established in some settings (e.g., chen2024testing and zhou2025association), a unified theory, particularly for testing conditional independence, has remained unaddressed. We provide the asymptotic theory that includes: (i) central limit theorems for our proposed measures of independence and conditional independence; (ii) explicit asymptotic characterizations of the test statistics under both null and alternative hypotheses; and (iii) theoretically justified $p$-value calculations and local power analyses. • Analytic Inference without Resampling. Existing nonparametric tests for random objects, such as chen2024testing, zhou2025association, often rely on permutation-based procedures, which are computationally prohibitive in high-dimensional or large-scale settings. Our framework enables analytic inference by providing test statistics with tractable asymptotic null distributions. This achieves significant computational savings while maintaining numerical stability, precise size control, and competitive power across various regimes.

The remainder of the paper is organized as follows. Section (ref) reviews distance profiles and discusses their limitations. Section (ref) formalizes our DPE framework and establishes its fundamental distributional properties. Section (ref) develops our DPE-based independence testing procedures, providing the associated asymptotic theory and implementation details. Section (ref) extends the framework to conditional independence testing and presents a rigorous asymptotic analysis for the object-valued setting. Section (ref) discusses the selection and construction of reference measures in practice. Section (ref) evaluates the finite-sample performance of our methods in simulation studies, and Section (ref) demonstrates the practical utility through applications to gut microbiome compositions and human mortality distributions. Section (ref) includes a few concluding remarks. All technical proofs are presented in the supplement.

Preliminaries

\def\ca#1{{\cal #1}}

We introduce some basic notation and assumptions used in this paper.

Random objects. Let $(\Omega, \ca F, P)$ be a probability space and let $\Omega_X$ and $\Omega_Y$ be two complete separable metric spaces, equipped with metrics $d_X(\cdot, \cdot)$ and $d_Y(\cdot, \cdot)$, respectively. Let $\ca F _ X$ and $\ca F _ Y$ be the Borel $\sigma$-fields generated by open sets in $\Omega _ X$ and $\Omega _ Y$, respectively. Let $X: \Omega \to \Omega _ X$ be a random element measurable with respect to $\ca F / \ca F _ X$, and $Y: \Omega \to \Omega _ Y$ measurable with respect to $\ca F/ \ca F _ Y$. Then, $(X, Y): \Omega \to \Omega _ X \times \Omega _ Y$ is measurable with respect to $\ca F / ( \ca F _ X \times \ca F _ Y)$, where $\ca F _ X \times \ca F _ Y$ is the product $\sigma$-field. Let $P _ X = P \circ X ^{-1}$, $P _ Y = P \circ Y ^{-1}$, and $P _ {XY} = P \circ (X, Y)^{-1}$ be the distributions of $X$, $Y$, and $(X,Y)$, respectively.

For each $u \in \Omega _ X$ and $v \in \Omega _ Y$, we assume that $d _ X (u, X) $ and $d _ Y (v, Y)$ have finite first moments: $\int _ {\Omega _ X} d_X(u, x) dP_X(x) < \infty$, and $\int _ {\Omega _ Y} d_Y(v, y) dP_Y(y) < \infty$. We use $X \overset{\mathcal D}{=} X^\prime$ to indicate that random objects $X$ and $X^\prime$ are identically distributed. The support of a measure $\lambda$ on a metric space $\mathcal M$ is defined as the set $\operatorname{supp} (\lambda)=\{x\in \mathcal M: \lambda(\mathcal I(x))>0\text{ for every neighborhood $\mathcal I(x)$ of $x$}\}$. For a random element $R$ on $(\Omega, \ca F, P)$, we also use $\operatorname{supp} (R)$ to denote the support of the distribution of $R$; that is, $\operatorname{supp} (R) = \operatorname{supp} (P \circ R ^{-1})$.

Distance Profile. The distance profile introduced by dubey2024metrics will be important for our development. Formally, the distance profile of a random object $X$ at a fixed location $u\in \Omega_X$ is defined as the cumulative distribution function (CDF) of the distance $d_X(u, X)$, that is, $ F^X_u(t) = P(d_X(u, X)\le t), \; t \ge 0. $ The collection $\{F^X_u: u \in \Omega_X\}$ forms a family of univariate distribution functions. Distance profiles have emerged as a pivotal tool for object-valued inference chen2024testing, zhou2025association, providing an interpretable summary of the underlying distribution of object-valued data by leveraging the marginals of the stochastic process $\{ d_X(u, X): u \in \Omega_X \}$.

The One-to-One Correspondence Condition. A critical structural assumption in current profile-based inference is that the collection of probabilities assigned to all closed metric balls, specifically, $P(d_X(X, u)\le r)$ for all $u\in \Omega_X\,, r \ge 0$, uniquely characterizes the underlying probability measure $P_X$. This condition implies that two random objects $X$ and $X'$ taking values in $\Omega_X$ are identically distributed if and only if $d_X(u,X)$ and $d_X(u,X')$ are identically distributed for all $u \in \Omega_X$. This property, called the one-to-one correspondence, has its roots in early foundational work on the geometry of measures Christensen1970, Hoffmann1975.

However, this correspondence does not hold in general. Davies_1971 provided a counterexample by constructing distinct probability measures that assign identical probabilities to all closed metric balls, thereby inducing indistinguishable distance profiles. Despite this fundamental limitation, most existing methods for object-valued independence testing rely on assumptions that presume this one-to-one correspondence; see Section S1.1 of the Supplementary Material for more details. While the one-to-one correspondence provides a convenient bridge between object-valued independence and the factorization of distance profiles, its lack of universality and the inherent difficulty of its verification motivate the development of a new framework that offers rigorous theoretical guarantees without imposing such restrictive geometric conditions.

{

Distance Profile Embedding

This section introduces the distance profile embedding (DPE) to encode a random object as a function in a Hilbert space. Unlike the previously developed embedding-based methods, our embedding does not impose additional structure on the metric space, such as a negative-type metric or a Riemannian manifold. We begin with DPE for a single random object, and then move to DPE of several random objects. The multiple-object embedding is needed for the subsequent development because the independence test involves two random objects, and the conditional independence test involves three random objects. The main theoretical issue involved in this construction is measurability: we need the embedded objects to be measurable with respect to appropriate product $\sigma$-fields so that independence and conditional independence can be built on a firm theoretical foundation.

Distance Profile Embedding of a Single Random Object

Let $\lambda _ X$ be a measure on $(\Omega _ X, \ca F _ X)$, which we call {\em the reference measure}. It can be, but need not be, the probability measure. Let $L _ 2 (\Omega _ X, \lambda _ X) $ be the class of real-valued measurable functions on $\Omega _ X$ that are square-integrable with respect to $\lambda _ X$, which is a Hilbert space with an inner product $\langle f_1, f_2 \rangle_{\lambda_X} = \int f_1(u) f_2(u) \, d\lambda_X(u)$; that is, $L _ 2 (\Omega_X, \lambda _ X) = \{ f : \ \int _ {\Omega _ X} f(u)^2 \, d\lambda_X(u) < \infty \}$.

assumptionFor each $x \in \Omega _ X$, $d _ X (\cdot, x) \in L _ 2 (\Omega _ X, \lambda _ X) $.

We make the above assumption. Under Assumption (ref), we define the map $\Phi _ X: \Omega _ X \to L _ 2 (\Omega _ X, \lambda _ X) $ by $\Phi _ X (x) = d _ X ( \cdot, x)$. That is, for each $x \in \Omega _ X$, $\Phi _ X(x)$ is the function $u \mapsto d _ X (u, x)$. We use $[\Phi _ X(x)](u)$, or simply $\Phi _ X (x)(u)$, to denote the real number $d _ X (u, x)$. Letting $X: \Omega \to \Omega _ X$ be a random object in $(\Omega _ X, \ca F _ X)$, we formally define the DPE of $X$.

definitionThe distance profile embedding (DPE) of $X$ is the mapping \begin{align*} \Phi _ X (X): \Omega \to L _ 2 (\Omega _ X, \lambda _ X) , \quad \omega \mapsto \Phi _ X (X (\omega)). \end{align*}

As we will show in Subsection (ref), in a more general setting, $\Phi _ X(X)$ is a random element in $L _ 2 (\Omega _ X, \lambda _ X)$ under mild conditions.

Distance Profile Embedding of Several Random Objects

Let $(\Omega _ {X ^ i}, d _ {X ^ i}): i = 1, \ldots, m$ be $m$ metric spaces. For example, in Section (ref), $m=2$, and in Section (ref), $m=3$. We use superscripts to label the metric spaces and reserve the subscript for indexing the subjects later. For $i=1, \ldots, m$, let $\ca F _ {X ^ i}$ be a $\sigma$-field on the set $\Omega _ {X ^ i}$, and $\lambda _ {X ^ i}$ be a measure on $\ca F _ {X ^ i}$.

assumptionFor each $i=1, \ldots, m$ and $x ^ i \in \Omega _ {X ^ i}$, $d _ {X ^ i}(\cdot, x ^ i) \in L _ 2 ( \Omega _ {X ^ i}, \lambda _ {X ^ i})$.

We make the above assumption. Under Assumption (ref), we define the map

align*[align* omitted — 335 chars of source]

Let $(X ^ 1, \ldots, X ^ m) : \Omega \to \Omega _ {X ^ 1} \times \cdots \times \Omega _ {X ^ m}$ be a multivariate random object measurable with respect to the product $\sigma$-field $\ca F _ {X ^ 1} \times \cdots \times \ca F _ {X ^ m}$. We now define the DPE of $(X ^ 1, \ldots, X ^ m)$.

definitionThe distance profile embedding (DPE) of $(X ^ 1, \ldots, X ^ m)$ is the mapping \begin{align*} \Phi _ {X ^ 1 \cdots X ^ m} (X ^ 1, \ldots, X ^ m): \Omega &\ \, \to L _ 2 (\Omega _ {X ^ 1}, \lambda _ {X ^ 1 }) \times \cdots \times L _ 2 ( \Omega _ {X ^ m} , \lambda _ {X ^ m}), \\ \omega &\ \, \mapsto (\Phi _ {X ^ 1}(X ^ 1 (\omega)), \ldots, \Phi _ {X ^ m} (X ^ m (\omega))). \end{align*}

Note that this definition does not guarantee that $\Phi _ {X ^ 1 \cdots X ^ m} (X ^ 1, \ldots, X ^ m)$ is a random object in the product measurable space, but this is true under mild conditions, as we will show in the next subsection.

Injectivity, Continuity and Measurability

For each $i=1, \ldots, m$, let $\ca T _ {X ^ i}$ be the topology on $\Omega _ {X ^ i}$ induced by the metric $d _ {X ^ i}$, $\ca F _ {X ^ i}$ a $\sigma$-field on $\Omega _ {X ^ i}$, and $\lambda _ {X ^ i}$ a measure on $(\Omega _ {X ^ i}, \ca F _ {X ^ i})$. Let $\ca T _ {\tilde X ^ i}$ be the topology on $L _ 2 (\Omega _ {X ^ i}, \lambda _ {X ^ i})$ induced by its inner product, and $\ca F _ {\tilde X ^ i}$ a $\sigma$-field on $L _ 2 (\Omega _ {X ^ i}, \lambda _ {X ^ i})$. For $k$ generic topological spaces $\ca T _ 1, \ldots, \ca T _ k$, let $\ca T _ 1 \times \cdots \times \ca T _ k$ denote their product topology. For $k$ generic $\sigma$-fields $\ca F _ 1, \ldots, \ca F _ k$, let $\ca F _ 1 \times \cdots \times \ca F _ {k}$ denote their product measurable space. For $k$ generic measures $\mu _ 1, \ldots, \mu _ k$, let $\mu _ 1 \times \cdots \times \mu _ {k}$ denote their product measure. For a topology $\ca T$, let $\ca B (\ca T)$ be the Borel $\sigma$-field generated by $\ca T$.

Let $A$ be a subset of $\{1, \ldots, m \}$. Let $\Omega _ {X ^ A} = \underset{i \in A}{\mbox{\LARGE{$\times$}}} \Omega _ {X ^ i}$, $\ca T _ {X ^ A} = \underset{i \in A}{\mbox{\LARGE{$\times$}}} \ca T _ {X ^ i}$, $\ca F _ {X ^ A} = \underset{i \in A}{\mbox{\LARGE{$\times$}}} \ca F _ {X ^ i}$, and $\lambda _ {X ^ A} = \underset{i \in A}{\mbox{\LARGE{$\times$}}} \lambda _ {X ^ i}$. Similarly, let $\ca T _ {\tilde X ^ A} = \underset{i \in A}{\mbox{\LARGE{$\times$}}} \ca T _ { \tilde X ^ i}$ and $\ca F _ {\tilde X ^ A} = \underset{i \in A}{\mbox{\LARGE{$\times$}}} \ca F _ {\tilde X ^ i}$ be the product topology and product $\sigma$-field on the Cartesian product $\underset{i \in A}{\mbox{\LARGE{$\times$}}} L _ 2 (\Omega _ {X ^ i}, \lambda _ {X ^ i})$. In the following, we use $(v _ i: i \in A)$ to denote the vector corresponding to the set $\{v _ i: i \in A\}$. There is a subtle difference between the vector $(v _ i : i \in A )$ and the set $\{v _ i: i \in A \}$. For example, if $A = \{1, 2, 5\} $. Then $(v _ i: i \in A )$ is the vector $(v _ 1, v _ 2, v _ 5)$, which is an ordered sequence of members of the set $\{v _ 1, v _ 2, v _ 5 \}$. Mathematically, a vector is a mapping from $i \in A$ to $\{v _ i: i \in A \}$, which is slightly different from the set $\{v _ i: i \in A \}$ itself: a set is the range of the map that defines the corresponding vector. Using this vector notation, we define $\Phi _ {X ^ A}$ as the mapping

align*[align* omitted — 216 chars of source]

We introduce a metric in $\mbox{\LARGE{$\times$}} _ {i \in A} L _ 2 ( \Omega _ {X ^ i}, \lambda _ {X ^ i})$ as

align*[align* omitted — 185 chars of source]

It is easy to verify that this metric generates the product topology $\ca T _ {\tilde X ^ A}$. We also introduce $d_{X^A}$ on $\mbox{\LARGE{$\times$}} _ {i \in A} \Omega _ {X ^ i}$ analogously. There are many topologically equivalent metrics on $\mbox{\LARGE{$\times$}} _ {i \in A} L _ 2 (\Omega _ {X ^ i}, \lambda _ {X ^ i})$, but the above is convenient and sufficient for our discussion. In the following, let $\mathrm{supp}(\mu)$ denote the support of a measure $\mu$. The next theorem lays out some fundamental properties of the mapping $\Phi _ {X ^ A}$.

theoremSuppose Assumption (ref) is satisfied and let $A$ be a subset of $\{1, \ldots, m \}$. \begin{enumerate} • If \ $\operatorname{supp} ( \lambda _ {X ^ i}) = \Omega _ {X ^ i}$ \ for each $i=1, \ldots, m$, then the mapping $\Phi _ {X ^ A}$ is injective in terms of the metrics $d _ {X ^ A}$ and $d _ {\tilde X ^ A}$. • If, for each $i = 1, \ldots, m$, $\lambda _ {X ^ i}$ is a finite measure, then $\Phi _ {X ^ A}$ is continuous with respect to the product topologies $\ca T _ {X ^ A}$ and $\ca T _ {\tilde X ^ A}$. • If, in addition, $\Omega _ {X ^ i}$ is a Polish metric space and $\ca F _ {X ^ i} = \ca B ( \ca T _ {X ^ i})$, $\ca F _ {\tilde X ^ i} = \ca B ( \ca T _ {\tilde X ^ i})$ for $i =1, \ldots, m$, then $\Phi _ {X ^ A}$ is measurable with respect to the product $\sigma$-fields $\ca F _ {X ^ A}$ and $\ca F _ {\tilde X ^ A}$. \end{enumerate}

Thus, under the conditions in Theorem (ref), $\Phi _ {X ^ A } (X ^ A)$ is a random element taking values in $\mbox{\LARGE{$\times$}} _ {i \in A} \, L _ 2 (\Omega _ {X ^ i}, \lambda _ {X ^ i}) $. A realization of this random element is $\Phi _ {X ^ A } ( X ^ A (\omega))$, a member of $\mbox{\LARGE{$\times$}} _ {i \in A} \, L _ 2 (\Omega _ {X ^ i}, \lambda _ {X ^ i}) $. The evaluation of this realization at $x ^ A$ is $\Phi _ {X ^ A } (X ^ A (\omega)) (x ^ A )$, which is a real (and nonnegative at all elements) vector. Two important special cases of $\Phi _ {X ^ A}$ are obtained when $A = \{i\}$ is a singleton and when $A=\{1,\ldots,m\}$; these correspond to the DPE of a single random object $X ^ i$ and the joint DPE of $(X ^ 1, \ldots, X ^ m)$, respectively. Note that, via DPE, we can turn any random object (or vector of random objects) into a Hilbert-space valued random function (or a vector of Hilbert-space valued functions) without requiring the metric space $\Omega _ X$ to be of negative type. The cost of not having the negative-type condition is that we do not have an isometric embedding, but measurability and injectivity are all we need to preserve independence or conditional independence as we move from metric spaces to Hilbert spaces. Below, we summarize the conditions made in Theorem (ref) as the next assumption.

assumptionFor each $i = 1, \ldots, m$, $\Omega _ {X ^ i}$ is a Polish metric space, $\lambda _ {X ^ i}$ is a finite measure such that $\operatorname{supp}(\lambda_{X^i}) = \Omega _ {X ^ i}$, $\ca F _ {X ^ i} = \ca B ( \ca T _ {X ^ i})$ and $\ca F _ {\tilde X ^ i} = \ca B ( \ca T _ {\tilde X ^ i})$.

It is also worth noting that the distance profile introduced by dubey2024metrics relies on the total boundedness of $\Omega_X$ as a prerequisite, which is a topological constraint consistently imposed in recent literature chen2024testing, wang_nonparametric_2024, zhou2025association. With mild conditions in Assumptions (ref)--(ref), our DPE framework extends the applicability of profile-based inference to metric spaces that may not be totally bounded.}

Preservation of Independence and Conditional Independence

In this subsection, we show that DPE preserves independence and conditional independence, so that we can equivalently test them in the original metric spaces or the embedded Hilbert spaces. Intuitively, these equivalences hold because independence and conditional independence are inherent properties of $\sigma$-fields, and measurable and injective mappings do not change $\sigma$-fields.

Let $X$ and $Y$ be random objects defined on $(\Omega _ X, d _ X)$ and $(\Omega _ Y, d _ Y)$, and $(\tilde X, \tilde Y)$ the DPE of $(X, Y)$. From Theorem (ref) we know that, under Assumptions (ref) and (ref), $(\tilde X, \tilde Y)$ is a random element taking values in the measurable space $(L _ 2 ( \Omega _ X, \lambda _ X) \times L _ 2 (\Omega _ Y, \lambda _ Y), \ca F _ {\tilde X} \times \ca F _ {\tilde Y})$.

corollaryUnder Assumptions (ref)--(ref), if $(X, Y)$ is a random object taking values in the product measurable space $(\Omega _ X \times \Omega _ Y, \ca F _ X \times \ca F _ Y)$ and $(\tilde X, \tilde Y)$ is DPE of $(X, Y)$, then $X \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, Y$ if and only if $\tilde X \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, \tilde Y$.

Now let $Z$ be a third random object defined on a metric space $(\Omega _ Z, d _ Z)$. Under Assumptions (ref) and (ref), $(\tilde X, \tilde Y, \tilde Z)$ is a random object taking values in the product measurable space $\left( L _ 2 (\Omega _ X, \lambda _ X) \times L _ 2 (\Omega _ Y, \lambda _ Y) \times L _ 2 (\Omega _ Z, \lambda _ Z), \ \ca F _ {\tilde X} \times \ca F _ {\tilde Y} \times \ca F _ {\tilde Z} \right)$.

corollaryUnder Assumptions (ref)--(ref), if $(X, Y, Z)$ is a random object taking values in the product measurable space $ ( \Omega _ X \times \Omega _ Y \times \Omega _ Z, \ \ca F _ X \times \ca F _ Y \times \ca F _ Z)$ and $(\tilde X, \tilde Y, \tilde Z)$ is the DPE of $(X, Y, Z)$, then $X \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, Y |Z $ if and only if $\tilde X \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, \tilde Y | \tilde Z$.

Construction of DPE-Based Independence Test

Built on Corollary (ref), we now develop a principled and computationally tractable testing procedure for the independence between the Hilbertian random elements $\tilde X$ and $\tilde Y$.

DPE-Based Characterization of Independence

Let $\kappa_{\tilde X}$ and $\kappa_{\tilde Y}$ be continuous kernels on $L _ 2 (\Omega _ X, \lambda _ X)$ and $L _ 2 (\Omega _ Y, \lambda _ Y)$, and let $\mathcal H_{\tilde X}$ and $\ca H _ {\tilde Y}$, respectively, be the reproducing kernel Hilbert spaces (RKHS) generated by them. Following gretton2007kernel and li2018linear, let $\Sigma_{\tilde Y\tilde X}: \mathcal H_{\tilde X} \rightarrow \mathcal H_{\tilde Y}$ be the following operator

equation[equation omitted — 285 chars of source]

where, for example, for $\tilde x \in L _ 2(\Omega_X, \lambda_X)$, $\kappa _ {\tilde X} (\cdot, \tilde x)$ is the function $\tilde u \mapsto \kappa _ {\tilde X }(\tilde u, \tilde x)$, and for $f \in \ca H _ {\tilde X}$ and $g \in \ca H _ {\tilde Y}$, $g \otimes f$ is the linear operator defined by $ \ca H _ {\tilde X} \to \ca H _ {\tilde Y}, \ h \mapsto g \langle f, h \rangle _ {\ca H _ {\tilde X}}$. Furthermore, the expectation in ((ref)) is defined by Bochner's integral (see hsing2015theoretical). Under the assumption $\mathbb{E} [ \kappa _ {\tilde X} (\tilde X, \tilde X) ^ {1/2} \, \kappa _ {\tilde Y} (\tilde Y, \tilde Y) ^ {1/2} ] < \infty$, $\Sigma _ {\tilde Y \tilde X}$ is a bounded operator satisfying $ \langle g, \Sigma_{\tilde Y\tilde X} f\rangle_{\mathcal H_{\tilde Y}} = \mathrm{cov} [ f(\tilde X), g (\tilde Y )] $ for any $f \in \ca H _ {\tilde X}$ and $g \in \ca H _ {\tilde Y}$. For this reason, $\Sigma _ {\tilde Y \tilde X}$ is called the cross-covariance operator. We assume a slightly stronger condition as follows.

assumption$\mathbb{E}[\kappa_{\tilde X}(\tilde X, \tilde X)] < \infty$, and $\mathbb{E}[\kappa_{\tilde Y}(\tilde Y, \tilde Y)] < \infty$.

A kernel $\kappa$ is said to be {\em characteristic} if it uniquely determines a distribution. More specifically, if $\kappa$ is a positive definite kernel and $\ca H$ is the RKHS generated by it, then $\kappa$ is characteristic if, for two random elements $X$ and $X'$, $\mathbb{E} f(X) = \mathbb{E} f(X')$ for all $f \in \ca H$ implies $X \overset{\ca D}{=} X'$ (see zhang2012kernel). When $\kappa_{\tilde X}$ and $\kappa_{\tilde Y}$ are characteristic, $\Sigma_{\tilde Y\tilde X}$ is the zero operator if and only if $\tilde X \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, \tilde Y$, providing a criterion for independence testing in the embedded space gretton2007kernel. We record this fact in the next theorem.

theoremSuppose that Assumptions (ref), (ref), and (ref) are satisfied. If $\kappa_{\tilde X}$ and $\kappa_{\tilde Y}$ are characteristic, then $\tilde X \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, \tilde Y$ if and only if $\Sigma_{\tilde Y\tilde X}=0$.

By Theorem 3.1 of ziegel2024characteristic, the Gaussian kernel on a separable Hilbert space is a canonical example of a characteristic kernel (see also zhang2024dimension,zhang2024nonlinear for more examples). This yields the following corollary, which is important for the implementation of our proposed framework.

corollarySuppose Assumptions (ref) and (ref) are satisfied. If $\kappa _ {\tilde X}$ and $\kappa _ {\tilde Y}$ are Gaussian radial basis kernels: $\kappa_{\tilde X}(f_1, f_2) = \exp(-\gamma_X \|f_1-f_2\|^2_{\lambda_X})$, and $\kappa_{\tilde Y}(f_1, f_2) = \exp(-\gamma_Y \|f_1-f_2\|^2_{\lambda_Y})$, where $\gamma_X > 0$, $ \gamma_Y >0$, then $\tilde X \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, \tilde Y$ if and only if $\Sigma_{\tilde Y\tilde X}=0$.

DPE-Based Test Statistic

Having shown that the independence of the random objects $(X,Y)$ is equivalent to the vanishing of the cross-covariance operator between their DPEs, we now develop a corresponding DPE-based test of independence. By Theorem (ref), it boils down to testing the hypothesis

equation[equation omitted — 55 chars of source]

Let $(X _ 1, Y _ 1), \ldots, (X _ n, Y _ n)$ be independent and identically distributed observations on $(X, Y)$, let $(\tilde X _ 1, \tilde Y _ 1), \ldots, (\tilde X _ n, \tilde Y_ n)$ be their DPEs, and let $\mathbb{E} _ n$ denote the sample average; that is, $\mathbb{E} _ n H(\tilde X, \tilde Y) = n ^{-1} \sum _ {i=1} ^ n H (\tilde X _ i, \tilde Y _ i)$ for any function $H$. We estimate the cross-covariance operator $\Sigma_{\tilde Y\tilde X}$ by

equation[equation omitted — 294 chars of source]

Let $\mathcal B_{_{\mathrm{HS}}}(\mathcal H_{\tilde X},\mathcal H_{\tilde Y})$ denote the space of Hilbert--Schmidt operators from $\mathcal H_{\tilde X}$ to $\mathcal H_{\tilde Y}$. For a linear operator $T:\mathcal H_{\tilde X}\to\mathcal H_{\tilde Y}$, the Hilbert--Schmidt norm is defined as $\|T\|_{_{\mathrm{HS}}}^2=\sum_{k\ge1}\|T e_k\|_{\mathcal H_{\tilde Y}}^2,$ where $\{e_k\}$ is any orthonormal basis of $\mathcal H_{\tilde X}$. We denote the tensor product on $\mathcal B_{_{\mathrm{HS}}}(\mathcal H_{\tilde X},\mathcal H_{\tilde Y})$ by $\otimes_{_{\mathrm{HS}}}$. The following theorem establishes the Central Limit Theorem (CLT) for the empirical cross-covariance operator $\hat\Sigma_{\tilde Y\tilde X}$.

theoremSuppose that Assumptions (ref) and (ref) are satisfied, and the kernels $\kappa_{\tilde X}$ and $\kappa_{\tilde Y}$ are bounded. Then, as $n \to \infty$: \begin{equation} \sqrt{n} (\hat\Sigma_{\tilde Y\tilde X} - \Sigma_{\tilde Y\tilde X}) \overset{\mathcal D}{\rightarrow} \mathcal N(0, \Gamma_{\tilde Y\tilde X}), \end{equation} where $\Gamma_{\tilde Y\tilde X}: \mathcal B_{_{\mathrm{HS}}}(\mathcal H_{\tilde X},\mathcal H_{\tilde Y}) \to \mathcal B_{_{\mathrm{HS}}}(\mathcal H_{\tilde X},\mathcal H_{\tilde Y})$ is the covariance operator defined by $\Gamma_{\tilde Y\tilde X} = \mathbb{E}_{ \tilde X \tilde Y}[\{C_{\tilde Y \tilde X} - \Sigma_{\tilde Y\tilde X}\}\otimes_{\mathrm{HS}} \{C_{\tilde Y \tilde X} - \Sigma_{\tilde Y\tilde X}\}]$ with $C_{\tilde Y \tilde X} = \{\kappa_{\tilde Y}(\,\cdot\,,\,\tilde Y) - \mathbb{E}_{\tilde Y}[\kappa_{\tilde Y}(\,\cdot\,,\,\tilde Y)]\} \otimes \{\kappa_{\tilde X}(\,\cdot\,,\,\tilde X) - \mathbb{E}_{\tilde X} \kappa_{\tilde X}(\,\cdot\,,\,\tilde X) \}$.

As shown in Theorem (ref), the proposed DPE-based framework does not require the structural assumptions typically required for the uniformly consistent estimation of profile-based distribution functions. Existing distance-profile-based approaches wang_nonparametric_2024, chen2024testing, zhou2025association depend on the total boundedness and additional regularity conditions for the underlying distribution functions, such as finite entropy, covering number constraints, or Lipschitz-type assumptions, to ensure the convergence of the associated empirical processes. In contrast, the proposed framework does not treat distance profiles as intermediate nonparametric objects to be estimated pointwise. Instead, it operates directly through their global embedding to obtain a single element of a Hilbert space, thereby avoiding the restrictive regularity conditions inherent in the nonparametric estimation of univariate distributions.

The Central Limit Theorem established in Theorem (ref) motivates our proposed test statistic, defined as the squared Hilbert--Schmidt norm of the empirical cross-covariance operator:

equation[equation omitted — 73 chars of source]

To simplify notation, we define the empirically centered kernels $\hat\rho_{\tilde X}(\cdot,\tilde X_i) := \kappa_{\tilde X}(\cdot,\tilde X_i)-\mathbb{E}_n\{\kappa_{\tilde X}(\cdot,\tilde X)\}$ and $\hat\rho_{\tilde Y}(\cdot,\tilde Y_i) := \kappa_{\tilde Y}(\cdot,\tilde Y_i)-\mathbb{E}_n\{\kappa_{\tilde Y}(\cdot,\tilde Y)\}$. The empirical operator can then be expressed as $\hat\Sigma_{\tilde Y\tilde X} = \mathbb{E}_n[\hat\rho_{\tilde Y}(\cdot,\tilde Y_i)\otimes \hat\rho_{\tilde X}(\cdot,\tilde X_i)],$ which implies

align*[align* omitted — 441 chars of source]

Asymptotic Properties

In this subsection, we characterize the asymptotic behavior of the proposed test statistic under both the null and alternative hypotheses. In addition to relaxing the conditions, our DPE framework provides an analytically tractable null distribution, which serves as a computationally efficient alternative to permutation-based resampling.

We begin by introducing two more empirical covariance operators:

align*[align* omitted — 326 chars of source]

These operators are needed for characterizing the asymptotic null distribution of $T _ n$. The next theorem gives the asymptotic null distribution of $T _ n$ and an approximation formula for its quantiles. In the following, we denote the $j$-th eigenvalue of an operator $T$ by $\lambda_j(T)$, and denote the set of natural numbers $\{1, 2, \ldots \}$ by $\mathbb{N}$.

theoremUnder the assumptions of Theorem (ref), let $\{W_{ij}: i,j \in \mathbb N\}$ be i.i.d. standard normal random variables. Then, under the null hypothesis $H_0: \Sigma_{\tilde Y\tilde X} = 0$, \begin{enumerate} • $T_n \overset{\mathcal D}{\rightarrow} \sum_{j=1}^\infty \lambda_j(\Gamma_{\tilde Y\tilde X}) W_{1, j}^2$, as $n\to \infty$; • For every $t\in \mathbb R$, $P(T_n \le t) - P\bigl(\textstyle\sum_{i,j=1}^{n}\lambda_i(\hat\Sigma_{\tilde X\tilde X})\lambda_j(\hat\Sigma_{\tilde Y\tilde Y}) W_{i, j}^2 \le t\bigr) \rightarrow 0,$ as $n \to \infty$. \end{enumerate}

Theorem (ref) provides the explicit asymptotic null distribution of the test statistic $T _ n$ and an empirical approximation formula, building on the CLT for the estimated RKHS covariance operator from Theorem (ref). This marks a direct theoretical advance over the kernel methods gretton2007kernel, zhang2012kernel, whose analysis was confined to scalar statistics. By directly characterizing the RKHS operators, our framework simultaneously provides the approximation tool, which is not available in gretton2007kernel, and eliminates the need to truncate infinite summations in the null distribution as required by zhang2012kernel.

While Theorem (ref) ensures the asymptotic validity of the test, Theorem (ref) follows from Theorem (ref) and characterizes the asymptotic behavior of the test statistic under a fixed alternative.

theoremUnder the assumptions of Theorem (ref), if $H_1$ is a fixed alternative with $\Sigma_{\tilde Y\tilde X} \neq 0$, then $$ \sqrt{n}\left(\|\hat\Sigma_{\tilde Y\tilde X}\|_{\mathrm{HS}}^2 - \|\Sigma_{\tilde Y\tilde X}\|_{\mathrm{HS}}^2\right) \overset{\mathcal D}{\rightarrow} N(0, 4\langle \Gamma_{\tilde Y\tilde X} \Sigma_{\tilde Y\tilde X}, \Sigma_{\tilde Y\tilde X}\rangle_{\mathrm{HS}}). $$

Theorem (ref) indicates that, under any fixe alternative $\Sigma_{\tilde Y\tilde X} \neq 0$, our test statistic $T_n \overset{P}{\rightarrow} \infty$, confirming the consistency of the DPE-based independence test in the presence of any non-vanishing dependence between the random objects $X$ and $Y$.

Motivated by Theorem (ref)(ii), define the surrogate variable \[ \hat R_n := \sum_{i,j=1}^{n} \lambda_i(\hat\Sigma_{\tilde X\tilde X})\lambda_j(\hat\Sigma_{\tilde Y\tilde Y})W_{ij}^2, \] and let $q_{1-\alpha}(\hat R_n)$ denote its $(1-\alpha)$-quantile. We reject the null at significance level $\alpha$ if $T_n > q_{1-\alpha}(\hat R_n)$. The next theorem further characterizes the sensitivity of our test statistic to the departure from the null hypothesis by examining its behavior under local alternatives. Specifically, we establish the limiting distribution of our test statistic when the sequence of local alternative hypotheses approaches the null hypothesis at a contiguous rate as the sample size goes to infinity.

theoremUnder the assumptions of Theorem (ref), consider the sequence $H^{(n)}_1: \Sigma_{\tilde Y\tilde X} = a_n \Sigma_a$, where $\|\Sigma_a\|_{\mathrm{HS}} < \infty$. Then: \begin{enumerate} • If $a_n n^{1/2} \rightarrow \infty$, the test statistic $T_n \overset{P}{\rightarrow} \infty$ and the power $P(T_n > q_{1-\alpha}(\hat R_n)) \rightarrow 1$. • Suppose $a_n = n^{-1/2}$, $\Gamma_{\tilde Y\tilde X}=\sum_{j=1}^\infty \lambda_j(v_j\otimes v_j)$ for some orthonormal basis $\{v_1, v_2,\dots\}$ in $\mathcal B_{_{\mathrm{HS}}}(\mathcal H_{\tilde X},\mathcal H_{\tilde Y})$, and $\Sigma_a=\sum_{j=1}^\infty \sigma_jv_j$ with $\|\Sigma_a\|_{\mathrm{HS}} < \infty$. Then, \( T_n \overset{\mathcal D}{\rightarrow} \sum_{j=1}^\infty\lambda_j \tilde W_j^2, \) where $\tilde W_j$ are independently distributed as $\mathcal{N}(\sigma_j/\sqrt{\lambda_j},1)$. \end{enumerate}

Among the current literature, only chen2024testing and zhou2025association provided asymptotic consistency results for independence testing of random objects. {Although chen2024testing established consistency under shrinking alternatives and minimax rate optimality, while zhou2025association derived a minimax separation bound, neither work derives explicit asymptotic distributions of the test statistics under such alternatives.} In contrast, Theorem (ref) provides a more specific characterization of the test statistic under local alternatives, establishing an explicit noncentral chi-squared limiting distribution. This result offers new insights into the local power and asymptotic efficiency of distance-profile-based tests that have thus far been absent from the existing literature.

Numerical Implementation

Let $K_{\tilde X}\in \mathbb R^{n\times n}$ be the Gram matrix with entries $(K_{\tilde X})_{ij} = \kappa_{\tilde X}(\tilde X_i, \tilde X_j)$, and let $Q = I_n - \frac 1 n 1_n 1_n^T$ denote the centering matrix, where $1_n$ is the $n$-dimensional vector of ones. This is the orthogonal projection onto the orthogonal complement of the linear subspace spanned by $1 _ n$. By the reproducing property of the RKHS, the inner product of the centered kernels satisfies $\langle \hat\rho_{\tilde X}(\cdot,\tilde X_i),\hat\rho_{\tilde X}(\cdot,\tilde X_j)\rangle_{\mathcal H_{\tilde X}} = (QK_{\tilde X}Q)_{ij},$ and a similar result holds for $Y$. The squared Hilbert-Schmidt norm of $\hat \Sigma _ {\tilde X \tilde Y}$ admits the following trace representation: $$ \|\hat\Sigma_{\tilde Y\tilde X}\|_{_{\mathrm{HS}}}^2 =\frac{1}{n^2}\sum_{i,j=1}^n (QK_{\tilde X}Q)_{ij} (QK_{\tilde Y}Q)_{ij} =\frac{1}{n^2}\mathrm{tr}\!\big(K_{\tilde X}QK_{\tilde Y}Q\big), $$ where we used $Q^\top=Q$ and $Q^2=Q$. Thus, the test statistic $T_n$ admits the explicit form:

equation[equation omitted — 98 chars of source]

This formulation identifies $T_n$ as the empirical Hilbert--Schmidt Independence Criterion (hSIC) statistic gretton2007kernel. While hSIC is utilized for Euclidean data, our framework extends its utility to complex random objects by embedding their metric structures via the DPE.

To compute the surrogate variable $\hat R_n$, we obtain $\lambda_j(\hat\Sigma_{\tilde X\tilde X})$ using the coordinate mappings for $\hat\Sigma_{\tilde X\tilde X}$ and the notation of li2018sufficient. Let $\mathcal B_{\tilde X} = \{\kappa_{\tilde X}(\,\cdot\,,\, \tilde X_i) - \mathbb{E}_n[\kappa_{\tilde X}(\,\cdot\,,\, \tilde X)]: i=1,\dots n\}$ as a basis of the linear space $\mathrm{ran}(\hat\Sigma_{\tilde X\tilde X})$. According to li2018sufficient, the coordinate representation is \( _{\mathcal B_{\tilde X}}[\hat\Sigma_{\tilde X\tilde X}]_{\mathcal B_{\tilde X}} = n^{-1}QK_{\tilde X}Q. \) Thus, we obtain $\lambda_j(\hat\Sigma_{\tilde X\tilde X})$ by computing the eigenvalues of $n^{-1}QK_{\tilde X}Q$. This applies to $\hat\Sigma_{\tilde Y\tilde Y}$ analogously. Following gretton2007kernel and zhang2012kernel, we can also utilize a Gamma approximation to provide a computationally efficient estimate of $q_{1-\alpha}(\hat R_n)$ and compute the associated $p$-value.

DPE-Based Conditional Independence Testing

This section extends our DPE framework to the problem of testing conditional independence among three random objects. Again, our method does not require any structural assumptions on the underlying metric spaces, such as the negative-type property, mirroring the flexibility achieved in Section (ref).

DPE-Based Characterization of Conditional Independence

{ As in Subsection (ref), let $(X, Y, Z)$ be a random object taking values in the product measurable space $( \Omega _ X \times \Omega _ Y \times \Omega _ Z, \ \ca F _ X \times \ca F _ Y \times \ca F _ Z)$, and let $(\tilde X, \tilde Y, \tilde Z)$ be the DPE of $(X, Y, Z)$. By Corollary (ref), testing $X\;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, Y | Z$ is equivalent to testing $\tilde X \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, \tilde Y | \tilde Z$, where all random elements involved are Hilbertian. The key idea behind testing the conditional independence of two Hilbertian random elements given a third is to regress out the effect of the conditioning variable and then assess whether any dependence remains. This remains the guiding principle in our setting as well.

Following the notation in Section (ref), we use $\Phi _ {XZ}(X,Z)$ to represent the DPE of $(X, Z)$ and abbreviate it by $(\tilde X, \tilde Z)$. Let $\kappa_{\tilde Z}: L _ 2 (\Omega _ Z, \lambda _ Z) \times L _ 2 (\Omega _ Z, \lambda _ Z) \to \mathbb{R} $ be a positive definite kernel. }

{ {We construct the product kernel $\kappa_{\tilde X \tilde Z}=\kappa_{\tilde X}\kappa_{\tilde Z}$, which is the map

align*[align* omitted — 231 chars of source]

Let $\mathcal H_{\tilde X \tilde Z}, \mathcal H_{\tilde Y}$, and $\mathcal H_{\tilde Z}$ denote the RKHSs generated by $\kappa_{\tilde X \tilde Z}, \kappa_{\tilde Y }$, and $\kappa_{\tilde Z}$, respectively. Let $\Sigma _ { \tilde Y (\tilde X \tilde Z) }: \ca H _ { \tilde X \tilde Z} \to \ca H _ { \tilde Y},$ $\Sigma _ {(\tilde X \tilde Z) \tilde Z }: \ca H _ { \tilde Z} \to \ca H _ { \tilde X \tilde Z}$ and $\Sigma _ { \tilde Y \tilde Z }: \ca H _ { \tilde Z} \to \ca H _ { \tilde Y }$ be the covariance operators defined according to the same rule used in ((ref)). For example,

align*[align* omitted — 371 chars of source]

To construct the desired operator for testing $\tilde X \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, \tilde Y | \tilde Z$, we need to introduce the Moore-Penrose inverse and a related range condition. For a linear operator $A: \ca H \to \ca K$ between Hilbert spaces $\ca H$ and $\ca K$, we let $\mathrm{ran} (A)$ denote the range of $A$: $\mathrm{ran} (A) = \{A f: f \in \ca H\}$, let $\overline{\mathrm{ran}} (A)$ denote the closure of $\mathrm{ran}(A)$, let $\mathrm{ker} (A)$ denote the kernel of $A$: $\mathrm{ker} (A) = \{ f \in \ca H: Af = 0 \}$. For a self-adjoint operator $A: \ca H \to \ca H$, $\overline{\mathrm{ran}}(A) = \mathrm{ker}(A) ^ \perp$. If $\tilde A = A | \overline{\mathrm{ran}} (A)$ is $A$ restricted to $\overline{\mathrm{ran}} (A)$, then $\tilde A$ is an injection, and its inverse mapping $\tilde A ^{-1}$ is defined. We call this inverse the Moore-Penrose inverse of $A$, and denote it by $A ^ \dagger$. See hsing2015theoretical and li2018sufficient. Since the domain of $A ^ \dagger$ is $\mathrm{ran} (A)$, for an operator of the form $A ^ \dagger B$ to be defined, we need to assume $\mathrm{ran}(B) \subseteq \mathrm{ran} (A)$. For this reason, we make the following assumption.

assumption$\mathrm{ran} ( \Sigma _ {\tilde Z( \tilde X \tilde Z)} ) \subseteq \mathrm{ran} ( \Sigma _ {\tilde Z \tilde Z} )$, and $\mathrm{ran} ( \Sigma _ {\tilde Z \tilde Y } ) \subseteq \mathrm{ran} ( \Sigma _ {\tilde Z \tilde Z} )$.

Under this assumption, the operators $\Sigma _ {\tilde Z \tilde Z} ^ \dagger \Sigma _ {\tilde Z ( \tilde X \tilde Z)}$ and $\Sigma _ {\tilde Z \tilde Z} ^ \dagger \Sigma _ {\tilde Z \tilde Y }$ are defined, and therefore the following operator is also defined:

equation[equation omitted — 237 chars of source]

This operator was introduced by fukumizu2007kernel. Intuitively, it captures the residual dependence between $(\tilde X, \tilde Z)$ and $\tilde Y$ after removing the effect of $\tilde Z$ by Hilbert-space regression.

To provide a rigorous characterization of conditional independence, we introduce the following assumption regarding the representability of the conditional expectation.

assumptionFor every $f\in \mathcal H_{\tilde X \tilde Z}$ and $ g\in \mathcal H_{\tilde Y }$, the conditional expectations satisfy that $\mathbb{E}[f(\tilde X, \tilde Z )| \tilde Z ] \in \mathcal H_{\tilde Z}$, and $\mathbb{E}[g(\tilde Y )|\tilde Z ] \in \mathcal H_{\tilde Z}$.

This assumption is to guarantee that conditional expectations are contained within the RKHS of the conditioning variable $\tilde Z$, enabling the use of kernel-based projection to isolate the residual components of variation. This is a standard condition in the theory of kernel-based conditional dependence tests fukumizu2004dimensionality. Under this assumption, by fukumizu2004dimensionality, it can be shown that the conjoined conditional covariance operator satisfies the first equality below: $$ \langle g, \Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z} f\rangle_{\mathcal H_{\tilde Y}} = \mathbb{E}_{\tilde Z} [\mathrm{cov} (f(\tilde X, \tilde Z ), g(\tilde Y)| \tilde Z ) ]= \mathbb{E}_{ Z} [\mathrm{cov} (f(\tilde X, \tilde Z), g(\tilde Y)| Z) ], $$ where the second equality holds because $Z$ and $\tilde Z$ generates the same sub-$\sigma$-field in $\ca F$. We now establish that the vanishing of this operator, i.e., $\Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z}=0$, is equivalent to conditional independence when characteristic kernels are employed. Let $P_{\tilde Z}:=P\circ\tilde Z^{-1}$ denote the distribution of $\tilde Z$ on $L _ 2(\Omega_Z,\lambda_Z)$. In what follows, let $L _ 2 (L _ 2 (\Omega _ Z, \lambda _ Z), P_{\tilde Z})= \{f: L _ 2 (\Omega _ Z, \lambda _ Z) \rightarrow \mathbb R,\ \mathbb{E}_{\tilde Z}[f^2(\tilde Z)] < \infty\}$ denote the collection of all real-valued functions defined on $L _ 2 (\Omega _ Z,\lambda _ Z)$ that are square-integrable with respect to $P_{\tilde Z}$. This notation reflects the underlying embedding structure of our method.

The next theorem establishes a general criterion for conditional independence that requires no Euclidean structure, relying on a characteristic product kernel defined on the DPE spaces.

theoremSuppose Assumptions (ref), (ref), (ref), and (ref) are satisfied and the kernels $\kappa_{\tilde X}$, $\kappa_{\tilde Y}$, and $\kappa_{\tilde Z}$ are bounded. Assume that the product kernel $\kappa_{\tilde X} \kappa_{\tilde Y} \kappa_{\tilde Z}$ is characteristic, and that $\mathcal H_{\tilde Z} + \mathbb R$ is dense in $L _ 2(L _ 2(\Omega_Z,\lambda_Z), P_{\tilde Z})$. Then \begin{equation} \Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z} = 0 \, \Leftrightarrow \, \tilde X\;\, \rule[0em]{.03em}{.6em} \rule[0em]{.65em}{.03em} \rule[0em]{.03em}{.6em}\;\, \tilde Y | \tilde Z. \end{equation}

Gaussian radial basis kernels satisfy the characteristic-product and density conditions in Theorem (ref), as shown in the Supplementary Material. We record this important special case in the next corollary.

corollaryIf Assumptions (ref), (ref), (ref), and (ref) are satisfied, and $\kappa_{\tilde X}, \kappa_{\tilde Y}, \kappa_{\tilde Z}$ are Gaussian radial basis kernels, then equivalence ((ref)) holds.

Theorem (ref) and Corollary (ref), along with Corollary (ref), establish the equivalence between conditional independence $X \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, Y |Z$ and the vanishing of the conditional cross-covariance operator $\Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z}$. This equivalence provides a general criterion for testing the conditional independence of random objects that relies on a characteristic product kernel and on mild conditions on the reference measures and metric spaces involved. It constitutes the novel contribution of our approach as highlighted in Table (ref). In contrast to the PA test by zhou2025association, which restricts the conditioning variable to Euclidean spaces, and the KCI framework by zhang2012kernel, which requires Hilbert structures for all variables, our approach does not impose any geometric restrictions on the conditioning random object.

DPE-Based Test Statistic and its Asymptotic Properties

To construct a test statistic for conditional independence, we first write the conditional cross-covariance operator in (ref) equivalently as

equation[equation omitted — 417 chars of source]

Since $\Sigma _ {\tilde Z \tilde Z}$ is a Hilbert-Schmidt operator when it is defined (see, for example, li2018linear), $\Sigma _ {\tilde Z \tilde Z} ^ \dagger$ is an unbounded operator and cannot be estimated consistently. However, as argued in li2018linear, it is reasonable assume $\Sigma_{\tilde Z\tilde Z}^\dagger \Sigma_{\tilde Z (\tilde X \tilde Z)}$ and $\Sigma_{ \tilde Y \tilde Z}\Sigma_{\tilde Z\tilde Z}^\dagger $ to be bounded. In fact, to ensure an appropriate convergence rate, we impose stronger conditions on these two operators. Define the population-centered feature map by $\rho_{\tilde X}(\cdot,\tilde x)=\kappa_{\tilde X}(\cdot,\tilde x)-\mathbb{E}\{\kappa_{\tilde X}(\cdot,\tilde X)\}$, and define $\rho_{\tilde Y}$, $\rho_{\tilde Z}$, and $\rho_{(\tilde X\tilde Z)}$ analogously. Let $\Lambda_{(\tilde X \tilde Z) \tilde Z} = \mathbb{E}[{\rho}_{\tilde X}(\cdot,\tilde X)\kappa_{\tilde Z}(\cdot,\tilde Z) \otimes {\rho}_{\tilde Z}(\cdot,\tilde Z)]$. This operator has an additional layer of centering compared with $\Sigma _ {(\tilde X \tilde Z) \tilde Z}$. Let $\mu_{\tilde X}$ be the mean element $\mathbb{E} [\kappa _ {\tilde X} ( \cdot, \tilde X)]$. Then $\Sigma_{(\tilde X \tilde Z) \tilde Z} =\mu_{\tilde X} \Sigma_{\tilde Z \tilde Z} + \Lambda_{(\tilde X \tilde Z ) \tilde Z}$, where $\mu_{\tilde X}\Sigma_{\tilde Z\tilde Z}: \ca H _ {\tilde Z} \to \ca H _ {\tilde X \tilde Z}$ is the linear operator defined by $( \mu_{\tilde X} \Sigma _ {\tilde Z \tilde Z} ) f = \mu_{\tilde X} (\Sigma _ {\tilde Z \tilde Z} f)$ for any $f \in \ca H _ {\tilde Z}$. We impose the following assumption on $\Lambda_{(\tilde X\tilde Z)\tilde Z}$ and $\Sigma_{\tilde Y\tilde Z}$.

assumptionThere exist bounded linear operators $S_{\tilde Y\tilde Z}:\mathcal H_{\tilde Z}\to\mathcal H_{\tilde Y}$ and {$S_{(\tilde X\tilde Z)\tilde Z}: \mathcal H_{\tilde Z}\to\mathcal H_{\tilde X\tilde Z}$}, and $\beta>0$, such that {\(\Sigma_{\tilde Y\tilde Z} =S_{\tilde Y\tilde Z}\Sigma_{\tilde Z\tilde Z}^{1+\beta}\)}, and {\(\Lambda_{(\tilde X\tilde Z)\tilde Z} =S_{(\tilde X\tilde Z)\tilde Z} \Sigma_{\tilde Z\tilde Z}^{1+\beta}. \)}

This is essentially a smoothness condition. For more insights and concrete examples about this assumption, see tang_CCCO_2026, bing2017SDR, bhattacharjeeNonlinearGlobalFrechet2023, and sang_nonlinear_2022. For two nonnegative sequences $\{a_j\}$ and $\{b_j\}$, we write {$a_j\preceq b_j$} if there exists a constant $C>0$ such that $a_j\le Cb_j$ for all $j$. We make the following assumption about $\Sigma _ {\tilde Z \tilde Z}$.

assumptionThe eigenvalues of $\Sigma_{\tilde Z \tilde Z}$ satisfy $\lambda_j(\Sigma_{\tilde Z \tilde Z}) \preceq j^{-\eta}$ for some $\eta > 1$.

The equivalent formulation (ref) motivates a plug-in estimator obtained by replacing the population covariance operators with their empirical counterparts. To estimate the Moore--Penrose pseudoinverse $\Sigma_{\tilde Z\tilde Z}^\dagger$, we employ Tikhonov regularization. Let the empirical version of the cross-covariance operators be defined in analogy to $\hat\Sigma_{\tilde Y\tilde X}$, and $\hat\Sigma_{\tilde Z\tilde Z}^{\dagger}=(\hat\Sigma_{\tilde Z\tilde Z} + \epsilon_n I)^{-1}$ is the regularized inverse with a tuning constant $\epsilon_n > 0$. We introduce the plug-in estimator:

equation[equation omitted — 440 chars of source]

Let $a \wedge b := \min(a, b)$, and let $\mathcal B _{\mathrm{HS}} (\mathcal H_{ \tilde X \tilde Z }, \mathcal H_{ \tilde Y })$ denote the space of Hilbert-Schmidt operators from $\mathcal H_{ \tilde X \tilde Z }$ to $\mathcal H_{ \tilde Y }$. We write $a_n \asymp b_n$ if $a_n/b_n$ converges to a positive constant as $n \to \infty$.

Let $C_{ \tilde Y (\tilde X \tilde Z)| \tilde Z} = D_{ \tilde Y \tilde Z} \otimes D_{(\tilde X \tilde Z) \tilde Z},$ where $D_{ \tilde Y \tilde Z} = \rho_{ \tilde Y }(\,\cdot\,,\, \tilde Y) - \Sigma_{ \tilde Y \tilde Z} \Sigma_{\tilde Z \tilde Z}^\dagger \rho_{\tilde Z}(\,\cdot\,,\, \tilde Z)$, $D_{(\tilde X \tilde Z) \tilde Z} = \rho_{(\tilde X \tilde Z)}(\,\cdot\,,\, (\tilde X,\tilde Z)) - \Sigma_{(\tilde X \tilde Z)\tilde Z} \Sigma_{\tilde Z \tilde Z}^\dagger \rho_{\tilde Z}(\,\cdot\,,\, \tilde Z)$. Now, define $B_{ \tilde Y (\tilde X \tilde Z)| \tilde Z} = C _{ \tilde Y (\tilde X \tilde Z)| \tilde Z} - \Sigma _{ \tilde Y (\tilde X \tilde Z)| \tilde Z},$ and $\Gamma_{ \tilde Y (\tilde X \tilde Z)| \tilde Z} = \mathbb{E}( B_{ \tilde Y (\tilde X \tilde Z)| \tilde Z} \otimes B_{ \tilde Y (\tilde X \tilde Z)| \tilde Z}).$

Under a suitable convergence rate of $\epsilon _ n$, we next establish the asymptotic normality of the plug-in estimator $\hat\Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z}$ in (ref) in the following theorem.

theoremSuppose that Assumptions (ref)--(ref) are satisfied and (ref)--(ref) hold for some $\beta,\eta$ satisfying $\beta>\frac{\eta-1}{2 \eta}$ and $\frac{\eta(\beta \wedge 1)}{2 \eta(\beta \wedge 1)+\eta+1}>\frac{1}{4}$. Suppose also that the kernels $\kappa_{\tilde X}$, $\kappa_{\tilde Y}$, and $\kappa_{\tilde Z}$ are bounded. If, moreover, \ $\epsilon_n \asymp n^{-\frac{\eta(\beta \wedge 1)}{2 \eta(\beta \wedge 1)+\eta+1}}$, \ then \begin{equation} \sqrt{n}\left(\hat\Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z}-\Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z}\right) \xrightarrow{\mathcal{D}} N\left(0, \Gamma_{ \tilde Y (\tilde X \tilde Z)| \tilde Z}\right). \end{equation}

Theorem (ref) establishes a Central Limit Theorem for the empirical conditional cross-covariance operator. While previous work, such as fukumizu2007kernel and liu2025sparse, obtained the convergence rate for such operators, the explicit asymptotic normality has remained largely undeveloped. By characterizing the limiting behavior of the conditional operator, Theorem (ref) provides the necessary theoretical framework to rigorously evaluate the validity and statistical power of the DPE-based conditional independence test.}}

Our test statistic for the conditional independence test is

equation[equation omitted — 113 chars of source]

Parallel to the unconditional independence test case, the above statistic can be represented as the trace of an $n \times n$ matrix. Define the $n \times n$ Gram matrices for $\kappa_{ \tilde X \tilde Z }, \kappa_{ \tilde Y }$ and $\kappa_{\tilde Z}$: $K_{ \tilde X \tilde Z } =\{ \kappa _ { \tilde X \tilde Z } ( ( \tilde X _ i, \tilde Z _ i ),( \tilde X _ j, \tilde Z _ j )): i,j =1, \ldots, n \},$ $K_{ \tilde Y }= \{ \kappa _ { \tilde Y } ( \tilde Y _ i , \tilde Y _ j ): i,j =1, \ldots, n \},$ $K_{\tilde Z}=\{ \kappa _ { \tilde Z } ( \tilde Z _ i, \tilde Z _ j ): i,j =1, \ldots, n \},$ and their centered versions: $G_{ \tilde X \tilde Z } = Q K_{ \tilde X \tilde Z } Q$, $G_{ \tilde Y } = QK_{ \tilde Y } Q$, $G_{\tilde Z} = Q K_{ \tilde Z } Q$, where $Q$ is as defined in Section (ref). Let $R_{\tilde Z} = I-G_{\tilde Z}(G_{\tilde Z}+n\epsilon_n I)^{-1}$, and then let $G_{(\tilde X\tilde Z)\mid\tilde Z} = R_{\tilde Z}G_{ \tilde X \tilde Z }R_{\tilde Z}$ and $G_{\tilde Y\mid\tilde Z}=R_{\tilde Z} G_{ \tilde Y } R_{\tilde Z}$. As shown in Lemma S3 of the Supplementary Material, $S_n$ can be rewritten as the following trace of a matrix: $$ S_n = n ^{-1} \, \mathrm{tr}(G_{(\tilde X\tilde Z)\mid\tilde Z}G_{\tilde Y\mid\tilde Z}). $$ The statistic $S_n$ preserves the computational structure of the DPE-based independence test (ref), highlighting the intrinsic structural simplicity of our DPE framework.

Leveraging the central limit theorem established in Theorem (ref), we derive the asymptotic null distribution of $S_n$ in Theorem (ref).

theoremUnder the assumptions of Theorem (ref) and the null hypothesis $H_0: \Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z} = 0$, we have $S_n \overset{\mathcal D}{\rightarrow} \sum_{j=1}^\infty \, \lambda_j(\Gamma_{\tilde Y(\tilde X\tilde Z)\mid\tilde Z}) \, W_{j}^2,$ where $\lambda_j(\Gamma_{\tilde Y(\tilde X\tilde Z)\mid\tilde Z})$'s are the eigenvalues of the operator $\Gamma_{\tilde Y(\tilde X\tilde Z)\mid\tilde Z}$ in Theorem (ref), and $\{W _ 1, W _ 2, \ldots \}$ are i.i.d. standard normal variables.

In what follows, we provide an explicit form of the null distribution for the conditional independence test statistic $S_n$. Theorems (ref) and (ref) significantly advance the theoretical framework of zhang2012kernel, which lacked operator-level asymptotic distribution and, as a result, did not provide a formal analytical benchmark distribution to perform local power analysis.

In practice, the eigenvalues $ \lambda_j(\Gamma_{\tilde Y(\tilde X\tilde Z)\mid\tilde Z})$ in Theorem (ref) are unknown. We construct a surrogate null distribution which provably approximates the true null following the Proposition 5 of zhang2012kernel. Specifically, we approximate the null distribution of $S_n$ via the surrogate variable: $$ \ddot R_n := n^{-1}\textstyle \sum_{j=1}^n \lambda_j(G_{\tilde X \tilde Z| \tilde Z} \odot G_{\tilde Y\mid\tilde Z}) W_{j}^2, $$ where $G_{\tilde X \tilde Z| \tilde Z} \odot G_{\tilde Y\mid\tilde Z} \in \mathbb{R} ^ {n \times n}$ is the Hadamard product matrix with its $(i,j)$-th entry being $ (G_{(\tilde X\tilde Z)\mid\tilde Z})_{ij}(G_{\tilde Y\mid\tilde Z})_{ij}$, which is positive semidefinite by Schur's theorem. Let $ q_{1-\alpha}(\ddot R_n)$ denote the $(1-\alpha)$-quantile of $\ddot R_n$. We reject the null hypothesis at significance level $\alpha$ if $$S_n > q_{1-\alpha}(\ddot R_n).$$ Compared to zhang2012kernel, our approach reduces the computational burden by requiring only half as many eigen-decompositions, while preserving the exact distribution of the surrogate variable $\ddot R_n$, see Lemma S4 of the Supplementary Material. For practical implementation, the distribution of $\ddot R_n$ can be efficiently approximated using a Gamma distribution, as detailed in Section S1.3 of the Supplementary Material.

Next, we establish the consistency of the DPE-based conditional independence test. The following result is a direct consequence of Theorem (ref) and characterizes the asymptotic behavior of the test statistic $S_n$ under a fixed alternative.

theoremUnder the assumptions of Theorem (ref) and a fixed alternative hypothesis with $\Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z} \neq 0$, we have: \begin{align*} \sqrt{n}\left(\|\hat\Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z}\|_{\mathrm{HS}}^2 - \|\Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z}\|_{\mathrm{HS}}^2\right) \overset{\mathcal D}{\rightarrow} \mathcal N\left(0, 4\langle \Gamma_{\tilde Y(\tilde X\tilde Z)\mid\tilde Z} \Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z}, \Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z}\rangle_{\mathrm{HS}}\right). \end{align*}

Under a fixed alternative, Theorem (ref) implies that $ S_n \overset{P}{\rightarrow} \infty$, establishing the consistency of the proposed test. We next characterize the asymptotic properties of $S_n$ under local alternative distributions.

theoremUnder the assumptions of Theorem (ref), consider the sequence of local alternatives $\Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z} = a_n \ddot\Sigma_a$ with $0<\|\ddot \Sigma_a\|_{\mathrm{HS}} < \infty$. Then: \begin{enumerate} • If $a_n n^{1/2} \rightarrow \infty$, then $S_n \overset{P}{\rightarrow} \infty$ and the power $P(S_n > q_{1-\alpha}(\ddot R_n)) \rightarrow 1$. • Suppose $a_n = n^{-1/2}$. Let $\Gamma_{\tilde Y(\tilde X\tilde Z)\mid\tilde Z}$ have spectral decomposition $\sum_{j=1}^\infty \lambda_j( v_j\otimes v_j)$, where $ v_1, v_2,\dots$ is an orthonormal basis of $\mathcal B_{_{\mathrm{HS}}}(\mathcal H_{\tilde X\tilde Z}, \mathcal H_{\tilde Y})$ and assume $ \ddot\Sigma_a=\sum_{j=1}^\infty \sigma_j v_j$. Then \( S_n \overset{\mathcal D}{\rightarrow} \sum_{j=1}^\infty\lambda_j \tilde W_j^2, \) where $\tilde W_j$ are independently distributed as $\mathcal{N}(\sigma_j\lambda_j^{-1/2},1)$. \end{enumerate}

As highlighted in Table (ref), existing conditional testing framework KCI zhang2012kernel lack theoretical consistency guarantees, largely because of the intrinsic difficulty of modeling conditional structures in non-Euclidean spaces. {The conditional PA test zhou2025association established rejection consistency for alternatives, but does not derive the explicit limiting distribution or local power function under boundary-rate alternatives.} We address the limitations by explicitly deriving the asymptotic behavior of our statistic under both fixed and local alternatives. Theorems (ref) and (ref) provide a rigorous characterization of the test’s sensitivity.

In summary, Section (ref) addresses an important gap in the literature by establishing a comprehensive framework for DPE-based conditional independence testing. The proposed framework provides rigorous guarantees for validity, asymptotic convergence, and power when analyzing object-valued data in general metric spaces. These theoretical results underscore the fundamental role of DPE in studying conditional independence among random objects in a general metric space without requiring any additional structure.

Implementation and Choice of Reference Measure

One of the key components of DPE is the choice of the reference measures $\lambda_X$, $\lambda_Y$, and $\lambda_Z$, which, as shown in Sections (ref) and (ref), determine the geometry of the embedding. In this section, we propose several natural choices for these measures, with particular emphasis on metric spaces that do not admit an isometric Hilbert embedding, where the DPE framework is especially needed. Specifically, as shown in Corollaries (ref) and (ref), constructing both the unconditional and conditional independence tests requires reference measures for the kernels of the RKHSs involved. Taking $X$ as an illustration, the kernel $\kappa _ {\tilde X}$ is constructed from the squared $L _ 2 (\Omega _ X, \lambda _ X)$ norm

equation[equation omitted — 142 chars of source]

We now discuss several strategies for constructing $\lambda _ X$ according to the nature of $\Omega _ X$.

itemize• Explicit Integration via Spherical Harmonics. For certain structured triples $(\Omega_X,d_X,\lambda_X)$, the integral in (ref) admits an explicit representation. A representative example is the sphere $\mathbb{S}^{p-1}$ equipped with the geodesic distance \( d_g(x_1,x_2)=\arccos\langle x_1,x_2\rangle. \) As shown in Lemma S2 of the Supplementary Material, $(\mathbb{S}^{p-1}, d_g)$ does not admit an isometric Hilbert embedding when $p\ge3$. Choosing $\lambda_X$ to be the normalized Euclidean surface measure on $\mathbb{S}^{p-1}$, so that the total surface measure is one, the integral in (ref) can be evaluated using spherical harmonics atkinson2012spherical. The key idea is to represent functions on the sphere using an orthogonal basis, analogous to the Fourier basis for periodic functions. This representation transforms the $\lambda_X$-inner product of geodesic distance functions into a weighted sum of simple kernel terms, yielding an exact and numerically stable implementation (see Section S1.2 of the Supplementary Material for details). • Monte Carlo Approximation. A more general approach is to let $\lambda _ X$ be a probability measure for $\lambda_X$ and use Monte Carlo integration to approximate (ref). This is applicable when it is feasible to generate random samples from a distribution defined on the underlying metric space. For example, the $p\times p$ SPD matrix space $\mathcal S_{++}^p$ is commonly equipped with Affine Invariant Riemannian Metric (AIRM), $d_R(A, B) = \|\log(A^{-1/2}BA^{-1/2})\|_F$, where $\|\cdot\|_F$ denotes the Frobenius norm. The metric has been widely used in medical imaging, continuum mechanics, radar signal processing, and computer vision said2017riemannian. Since the space $(\mathcal S_{++}^p, d_R)$ does not admit an isometric embedding into Hilbert space jayasumana2013kernel, we can approximate (ref) by sampling from a fully supported probability measure on $\mathcal S_{++}^p$, such as the Riemannian Gaussian distributions said2017riemannian and Wishart distributions. • The Empirical Reference Measure. When evaluating the integral in (ref) is computationally demanding and sampling from a distribution on the metric space is infeasible, the empirical distribution based on $\{X_1,\dots,X_n\}$ provides a natural surrogate for $\lambda_X$. Specifically, we take $ \lambda_X=\frac{1}{n}\sum_{i=1}^n\delta_{X_i}, $ where $\delta_a$ denotes the Dirac measure at $a$. Under this choice, (ref) reduces to the simple average $n ^{-1} \sum_{i=1}^n [d_X(X_i,x_1)-d_X(X_i,x_2) ]^2$. In practice, this empirical reference measure is always available and straightforward to implement when the metric space lacks a tractable reference measure or when Monte Carlo integration is computationally prohibitive. Moreover, it preserves the characteristic properties of the DPE, provided the sample provides sufficient coverage of the underlying support.

Numerical Experiments

This section evaluates the empirical performance of our DPE-based framework for testing independence and conditional independence through simulations on three metric spaces that do not admit an isometric embedding into a Hilbert space.

Metric spaces

We consider the following three scenarios:

itemize• Scenario 1: Geodesic distances on the two-dimensional sphere $\mathbb{S}^2$. • Scenario 2: SPD matrices under AIRM. The space of symmetric positive-definite (SPD) matrices $(\mathcal{S}_{++}^p, d_R)$ endowed with the AIRM $d_R(A, B) = \|\log(A^{-1/2}BA^{-1/2})\|_F$. • Scenario 3: Bivariate Gaussian distributions under Wasserstein distance. The space of bivariate Gaussian measures equipped with the Wasserstein--2 metric.

In all three scenarios, the underlying metric spaces do not admit isometric embeddings into Hilbert spaces. The non-embeddability of the first two scenarios was established in Section (ref). For Scenario 3, consider two probability measures $\mu$ and $\nu$ on $\mathbb{R}^d$ with finite second moments. The Wasserstein--2 distance is defined as $W_2(\mu,\nu) = \left( \inf_{\pi \in \Pi(\mu,\nu)} \int_{\mathbb{R}^d \times \mathbb{R}^d} \|x-y\|^2 \, d\pi(x,y) \right)^{1/2},$ where $\Pi(\mu,\nu)$ is the set of all joint distributions of $(X,Y)$ with $\mu$ and $\nu$ as marginals for $X$ and $Y$ zhang2024copula. In the special case of Gaussian distributions on $\mathbb{R}^d$, where $\mu=N(m,\Sigma)$ and $\nu=N(m',\Sigma')$, the squared Wasserstein distance admits the closed-form expression $W_2^2(\mu,\nu) = \|m-m'\|^2 + \operatorname{tr}(\Sigma) + \operatorname{tr}(\Sigma') - 2\,\operatorname{tr}\!\left\{ \bigl(\Sigma^{1/2}\Sigma'\Sigma^{1/2}\bigr)^{1/2} \right\}$, which decomposes into contributions from the mean vectors and covariance matrices, with the latter inducing the Bures-Wasserstein metric $d _ {\mathrm{BW}}$ on the space of SPD matrices. The resulting metric space $(\mathcal S_{++}^2, d_{\mathrm{BW}})$ exhibits nonnegative Alexandrov curvature and, in general, does not admit an isometric embedding into a Hilbert space xu2025wasserstein.

For the proposed DPE-based procedures, we use Gaussian kernels $\kappa(\cdot,\cdot)=\exp(-\gamma\|\cdot-\cdot\|^2)$ based on the squared DPE distances, with each bandwidth parameter $\gamma$ set to the inverse median of the corresponding pairwise squared distances, consistent with the heuristic adopted in gretton2007kernel. For the conditional independence tests, we set $\epsilon_n$ in the Tikhonov regularization $(G_{\tilde Z}+n\epsilon_n I)^{-1}$ to $0.005$.

Unconditional Independence Testing

In this subsection, we evaluate the empirical performance of the DPE-based unconditional independence test and compare it with three existing methods: Profile Association (PA) zhou2025association, Ball Covariance (Ball) wang_nonparametric_2024, and generalized distance covariance (dCov) szekely2007measuring. The dCov, and Ball methods are implemented using the R packages energy, and Ball, respectively. In each scenario, we vary the strength of dependence between $X$ and $Y$, as quantified by the parameter $0\le\rho\le1$. When $\rho=0$, $X$ and $Y$ are independent, so the empirical rejection rate estimates the type I error. As $\rho$ increases, we assess the power of the tests to detect the underlying dependence.

itemize• Scenario 1 (Spherical Data) We set the reference measures $\lambda_X$ and $\lambda_Y$ to be the normalized Euclidean surface measures on the corresponding unit spheres. Under this choice, the norm $\|\cdot\|_{\lambda_X}$ can be evaluated using the closed-form formula described in Section S1.2 of the Supplementary Material. For $i=1,\ldots,n$, we generate latent variables $\varepsilon_i=(\varepsilon_i^x,\varepsilon_i^y)\in\mathbb{R}^6$, where $\varepsilon_i^x,\varepsilon_i^y\in\mathbb{R}^3$. The entries of $\varepsilon_i$ are generated independently from the Gaussian mixture \( 0.8\,N(1,1)+0.2\,N(-1,1). \) We define the predictor objects by $X_i=\varepsilon_i^x/\|\varepsilon_i^x\|_2\in\mathbb{S}^2$ and construct the response objects by $Y_i=\eta_i/\|\eta_i\|_2\in\mathbb{S}^2$, where the intermediate vector $\eta_i\in\mathbb{R}^3$ is generated according to one of the following two settings: \begin{itemize} • Setting 1 (Multiplicative Dependence). $\eta_{ij}=\bigl[\arccos(X_{ij})\bigr]^{\rho}\,\varepsilon^y_{i,j}, $ for $j=1,2,3$; • Setting 2 (Additive Dependence). $ \eta_{ij}=\rho |X_{ij}| + (1-\rho) \varepsilon^y_{i,j}, $ for $j=1,2,3$. \end{itemize} • Scenario 2 (SPD Matrices) Letting $\mathsf{Wishart}_p(\nu,\Sigma)$ denote the Wishart distribution with dimension $p$, degrees of freedom $\nu$, and scale matrix $\Sigma $, we set the reference measures $\lambda_X$ and $\lambda_Y$ to be $\mathsf{Wishart}_3(30,I_3)$. We independently generate $X_i \overset{i.i.d.}{\sim} \mathsf{Wishart}_3(30,I_3)$ and $B_i \overset{i.i.d.}{\sim} \mathsf{Wishart}_3(30,I_3)$, and set {$F=30R$}, where $R$ is the fixed $3\times3$ equicorrelation matrix with diagonal entries one and off-diagonal entries $0.1$. The norm in (ref) is approximated by Monte Carlo integration using $n_{\mathrm{MC}}=500$ independent samples from the reference distribution $\mathsf{Wishart}_3(30,I_3)$. These Monte Carlo samples are generated independently of the observed data. We consider the following dependence structures: \begin{itemize} • Setting 1 (Multiplicative Dependence). \quad $ Y_i=(10\,d_R(X_i,F))^{\rho}\,F B_i F. $ • Setting 2 (Additive Dependence). \quad $ Y_i=0.5\,\rho\, d_R(X_i,F)\,F+(1-\rho)B_i. $ \end{itemize} • \textbf{Scenario 3 (Bivariate Gaussian Distributions)} In this case, $(X,Y)$ is a pair of dependent random bivariate Gaussian distributions. Specifically, $X$ is the random distribution $N(\mu ^ X , \Sigma ^ X)$, where $\mu ^ X \sim N(0, 5^2 I _ 2)$ and $\Sigma ^ X=\bigl(\begin{smallmatrix}1&U\\U&1\end{smallmatrix}\bigr)$, where $U \sim \mbox{Unif}(0, 0.5)$. The random distribution $Y$ is the bivariate Gaussian $N(\mu ^ Y, \Sigma ^ Y)$, where the random quantities $\mu ^ Y$ and/or $\Sigma ^ Y$ are statistically dependent on $X$. Let $(X _ 1, Y _ 1), \ldots, (X _ n, Y _ n)$ be independent copies of $(X,Y)$. We do not observe this sample. Instead, we observe 2-dimensional random vectors $X _ {i1}, \ldots, X _ {iq}$ and $Y _ {i1}, \ldots, Y _ {iq}$ such that $( X _ {i1}, \ldots, X _ {iq} | X _ i) \sim X _ i$ and $( Y _ {i1}, \ldots, Y _ {iq} | Y _ i) \sim Y _ i$. We take $q=\min(n,100)$ and use the sample means and covariance matrices to evaluate the Wasserstein distances and construct the DPE kernels. We approximate the reference-measure integrals using 500 Gaussian distributions $N(\mu_r,\Sigma_r)$ generated independently of the observed data, where $\mu_r\sim N(0,I_2)$ and $\Sigma_r\sim\mathsf{Wishart}_2(2,I_2/5)$. Following wang_nonparametric_2024, we consider two dependence structures of $Y$ on $X$, one driven by mean and one driven by variance. The strength of dependence is controlled by the parameter $\rho \in [0,1]$, with larger $\rho$ representing strong dependence, smaller $\rho$ representing weak dependence, and $\rho=0$ representing independence. \begin{itemize} • \textbf{Setting 1 (Mean-Driven Dependence).} We set $\mu ^ Y = \rho (V _ 1, V _ 2)^\top + (1-\rho) \epsilon$, where $ V _ 1= W_2 \left( N(\mu^X ,\Sigma^X ), N(0,I_2)\right)$, $ V _ 2 = W_2 \left( N(\mu^X,\Sigma^X), N((-1, 1) ^\top ,I_2)\right)$, and $\epsilon \sim N(0,5^2 I_2)$. The matrix $\Sigma ^ Y$ is set to the nonrandom value $\bigl(\begin{smallmatrix}1&-0.5\\-0.5&1\end{smallmatrix}\bigr)$. Thus, the random distribution $Y$ depends on $X$ only through its random mean $\mu ^ Y$. • \textbf{Setting 2 (Variance-Driven Dependence).} Let \(d_{X1,i}=W_2\!\left(\mathcal N(\mu_i^X,\Sigma_i^X),\mathcal N(0,I_2)\right)\), set {\(A=\bigl(\begin{smallmatrix}0.2&0.2^2\\0.2^2&0.2\end{smallmatrix}\bigr)\)}, and draw {\(B_i\overset{i.i.d.}{\sim}\mathsf{Wishart}_2(2,I_2/5)\) independently of \(X_i\)}. We set \(\mu_i^Y\equiv0\) and define {\(\Sigma_i^Y=0.1\rho d_{X1,i}A+(1-\rho)B_i\)}. \end{itemize}

For each scenario, we report empirical power curves based on 500 Monte Carlo replications, with the significance level fixed at $0.05$. We examine rejection probabilities over $\rho\in\{0,0.1,\ldots,1\}$ at sample sizes $n\in\{50,100,200\}$ for Scenario 1 and $n\in\{50,100\}$ for Scenarios 2 and 3.

figure[figure omitted — 454 chars of source]
figure[figure omitted — 873 chars of source]

As shown in Figure (ref), all methods maintain type I error rates close to the nominal level of $0.05$. Consistent with our asymptotic theory, the empirical power of the DPE-based test increases with $n$ at each fixed value of $\rho$ in each setting. These results indicate that our DPE framework effectively captures non-Euclidean dependence structures whereas traditional approaches, such as dCov, often exhibit a loss of power. Specifically, among the four tests, the proposed DPE method consistently achieves the highest power across both settings in Scenario 1. As shown in Figure (ref), Scenario 2 exhibits a similar pattern, with DPE again achieving the highest power. For Scenario 3 in Figure (ref), in Setting 1, where dependence is driven by the means of the distributions, Ball, PA, and DPE exhibit comparable power across the full range of $\rho$. In Setting 2, where the random objects are dependent through their variances, the proposed DPE test significantly outperforms the competing methods, suggesting that the DPE is more adept at capturing second-moment dependencies in the Wasserstein space.

Conditional Independence Testing

We now turn to conditional independence tests. To our knowledge, there are currently no methods specifically designed to test the conditional independence between $X$ and $Y$ given a general non-Euclidean variable $Z$. We evaluate the performance of the proposed method across the three scenarios described previously. The models for $(X, Y, Z)$ are constructed on the same non-Hilbertian geometries as those used in the unconditional case. However, the sampling strategies are modified to distinguish between conditional and unconditional associations rigorously. In all scenarios, we ensure that $X$ and $Y$ exhibit unconditional dependence to test the statistic's ability to remove the influence of $Z$, and we use a positive $\rho$ to control the strength of the unconditional dependence between $(X,Y)$. In each scenario, Setting 1 is constructed so that the null hypothesis $X \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, Y \mid Z$ holds, allowing us to evaluate empirical type I error control. Setting 2 is constructed so that $X \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, Y \mid Z$ fails, allowing us to assess the power of the test. The tuning parameter $\epsilon_n$ in the Tikhonov regularization $(G_{\tilde Z}+n\epsilon_n I)^{-1}$ is fixed at $0.005$, which provides a stable numerical approximation of the inverse while being consistent with our theory.

itemize• Scenario 1 (Spherical Data) We generate $n$ independent random vectors \(\varepsilon_i=(\varepsilon_i^x,\varepsilon_i^y)\in\mathbb R^6\), \(i=1,\dots,n\), where the six entries in $\varepsilon_i $ are i.i.d. and follow the Gaussian mixture \(0.8 N(1,1) + 0.2 N(-1,1)\). The conditioning variable $Z_i$ follows a 3-dimensional standard logistic normal distribution. The observed random objects are $X_i=\frac{\eta_i^x}{\|\eta_i^x\|_2}$ and $Y_i=\frac{\eta_i^y}{\|\eta_i^y\|_2}$, taking values in $\mathbb{S}^2$, where $\eta_i^x,\eta_i^y\in\mathbb{R}^3$ are generated according to the following settings: \begin{itemize} • Setting 1. Let $\eta_{ij}^x=\bigl[\arccos(Z_{ij})\bigr]^{\rho}\varepsilon_{ij}^x$ and $\eta_{ij}^y=\bigl[\arccos(Z_{ij})\bigr]^{\rho}\varepsilon_{ij}^y$, for $j=1,2,3$. By construction, $X_i \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, Y_i \mid Z_i$. • Setting 2. Let $\eta_{ij}^y=\arccos(Z_{ij})\,\varepsilon_{ij}^y$ and $\eta_{ij}^x=\arccos(Z_{ij}) \bigl[\rho\,\varepsilon_{ij}^y+(1-\rho)\,\varepsilon_{ij}^x\bigr]$, for $j=1,2,3$. Under this construction, $X_i \;\, \rule[0em]{.03em}{.6em} \hspace{-.25em} \rule[0em]{.65em}{.03em} \hspace{-.25em} \rule[0em]{.03em}{.6em}\;\, Y_i \mid Z_i$ fails whenever $\rho>0$. \end{itemize} • Scenario 2 (SPD Matrices) \quad In this scenario, $X$ and $Y$ are SPD matrices and $Z$ is a random object in $\mathbb{S} ^ 2$. We use the same Monte Carlo approximation procedure for the $L _ 2 ( \Omega _ X, \lambda _ X)$ and $L _ 2 (\Omega _ Y, \lambda _ Y)$ norms as in Scenario 2 of Section (ref), and the reference measure $\lambda_Z$ is defined as the uniform distribution over the sphere $\mathbb{S}^2$. We sample $A _ 1, \ldots, A _ n, B _ 1, \ldots, B _ n$ independently from $\mathsf{Wishart}_3(30,I_3)$ and generate $Z_i = |\varepsilon^z_i| / \|\varepsilon^z_i\|_2 \in \mathbb{S}^2$, where $\varepsilon ^ z _ 1, \ldots, \varepsilon^z_n$ are independently sampled from $N (0,I_3)$. Let $F_i=30{\mathrm{diag}}(Z_i){\mathrm{diag}}(Z_i)$. \begin{itemize} • Setting 1. $X_i=\rho F_i+(1-\rho)A_i$, and $ Y_i=\rho F_i+(1-\rho)B_i$. While $X_i$ and $Y_i$ are unconditionally dependent due to the common term $F_i$, they are independent given $Z_i$. • \textbf{Setting 2.} $X_i=A_i$, and $Y_i=5\rho\,d_R(A_i,30I_3)\,F_i+(1-\rho)B_i$. This creates conditional dependence where the Riemannian geometry of $X_i$ influences the scale of $Y_i$. \end{itemize} • \textbf{Scenario 3 (Bivariate Gaussians)} \quad Here, $X, Y$ are bivariate Gaussian distributions, and $Z$ is a random matrix. To calculate (ref) for $X, Y$, we use $n_{\mathrm{MC}} = 500$ samples from $N(\mu_r, \Sigma_r)$ with $\mu_r \sim N(0, I_2)$ and $\Sigma_r \sim \mathsf{Wishart}_2(20,\;I_2)$ for Monte Carlo approximation. Similarly, we use $n_{\mathrm{MC}} = 500$ samples from $\mathsf{Wishart}_2(30,\;I_2)$ to approximate the $\lambda_Z$-integral. For $i=1,\ldots,n$, we draw $Z_i\overset{i.i.d.}{\sim}\mathsf{Wishart}_2(10,I_2)$ and define $X_i=N(0,\Sigma_i^X)$ and $Y_i=N(0,\Sigma_i^Y)$. The covariance matrices $\Sigma_i^X$ and $\Sigma_i^Y$ are specified by the following settings. \begin{itemize} • \textbf{Setting 1.} Set \(\Sigma_i^X=Z_i+\tilde\Sigma_i\), where \(\tilde\Sigma_i\overset{i.i.d.}{\sim}\mathsf{Wishart}_2(10,I_2)\) independently of \(Z_i\). Let \(\eta=(-1,1)^\top\), \(\Lambda_1=\bigl(\begin{smallmatrix}1&-1\\-1&1\end{smallmatrix}\bigr)\), and \(\Lambda_2=\bigl(\begin{smallmatrix}1&1\\1&1\end{smallmatrix}\bigr)\). Independently draw \(B_i\overset{i.i.d.}{\sim}\mathsf{Wishart}_2(10,I_2)\) and define \(\Sigma_i^Y=\rho\,\mathrm{diag}(U_{1i},U_{2i})+(1-\rho)B_i\), where \(U_{1i}\) and \(U_{2i}\) are the \(W_2\) distances from \(N(0,Z_i)\) to \(N(0,\Lambda_1)\) and \(N(\eta,\Lambda_2)\), respectively. • \textbf{Setting 2.} Draw \(\Sigma_i^X\overset{i.i.d.}{\sim}\mathsf{Wishart}_2(10,I_2)\) independently of \(Z_i\), and define \(\Sigma_i^Y=\rho\,\mathrm{diag}(V_{1i},V_{2i})+(1-\rho)Z_i\), where \(V_{1i}\) and \(V_{2i}\) are the \(W_2\) distances from \(N(0,\Sigma_i^X)\) to \(N(0,\Lambda_1)\) and \(N(\eta,\Lambda_2)\), respectively. \end{itemize}

Figure (ref) shows that the proposed conditional independence test approaches the nominal type I error level as the sample size grows while achieving increasing power under the alternatives. The upper panels display the rejection rates as a function of sample size $n$ with the dependence strength fixed at $\rho = 0.5, 0.4,$ and $0.2$ for the Gaussian, SPD, and Spherical scenarios, respectively. The lower panels present the power and size as functions of $\rho$ with the sample size fixed at $n=128$.

Under the null hypothesis ($H_0$, blue curves), the empirical size is generally near the nominal level $0.05$. The SPD scenario exhibits finite-sample size inflation at the two smallest sample sizes, but the test achieves stable size control once $n$ exceeds 100, consistent with the asymptotic validity established in Theorem (ref). These results confirm that our DPE framework successfully identifies conditional independence even when $X$ and $Y$ exhibit strong unconditional dependence, demonstrating its ability to effectively adjust for the confounding influence of the object-valued variable $Z$.

figure[figure omitted — 594 chars of source]

Under the alternative hypothesis ($H_1$, red curves), the empirical power increases and converges rapidly to 1 as a function of $n$ and $\rho$. This high sensitivity to conditional dependence is consistently observed across all scenarios, validating the effectiveness of our DPE framework in non-Euclidean settings where the conditioning variable has a complex manifold structure.

We also investigate performance under local alternatives in which the cross-covariance operator $\Sigma_{\tilde Y\tilde X}$ or the conditional cross-covariance operator $\Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z}$ shrinks to zero, i.e. $\|\Sigma_{\tilde Y\tilde X}\|_{_{\mathrm{HS}}}\to 0$ and $\|\Sigma_{ \tilde Y (\tilde X \tilde Z) | \tilde Z}\|_{_{\mathrm{HS}}}\to0$. The empirical results, reported in Section S3.1 of the Supplementary Material, are consistent with the theoretical characterizations in Theorems (ref) and (ref), and demonstrate that the DPE-based test remains powerful for detecting vanishing dependencies in object-valued data.

Real Applications

To show the practical utility of our DPE-based testing framework, we apply our methods to two real-world problems involving complex random objects.

Microbiome Data: Marginal Independence Testing

The human gut microbiome is vital in nutrient digestion and metabolic regulation COMBO2011Gary, and extensive research has reported a significant association between overall gut microbial community structure and BMI tang2017,tan2025high. In the COMBO study COMBO2011Gary, gut microbiome compositions are measured as relative abundances of operational taxonomic units (OTUs). These observations reside on the compositional simplex $\mathcal S_{\ge 0}^{p-1}=\{(x_1,\dots,x_p): \sum_{j=1}^p x_j=1,\ 0\le x_j\le 1\}$. After standard data filtering and quality control, we retained $n=91$ samples for analysis. To evaluate the dependence between microbiome structure and BMI, we consider four metrics that capture distinct structural features of taxonomic data: UniFrac, generalized UniFrac (GUniFrac), weighted UniFrac (WUniFrac), and Aitchison distances li_microbiome_2015. These metrics differ significantly in their geometric properties: the Aitchison distance isometrically embeds compositions into a log-ratio Euclidean space, thereby permitting the application of standard Euclidean methodologies, and in contrast, UniFrac-based distances incorporate phylogenetic tree structures to aggregate mass differences between samples and thus are not isometrically embeddable into a Hilbert space because they fail to satisfy the negative-type property zhu2025mathematical.

table[table omitted — 775 chars of source]

To compute (ref) on the simplex $\mathcal S_{\ge 0}^{p-1}$, we employ the empirical measure $\lambda_X=n^{-1}\sum^n_{i=1}\delta_{X_i}$, where $\delta_a$ denotes the Dirac measure at $a$. Table (ref) reports the resulting $p$-values for the DPE-based test and its competitors across the four metrics. For the Aitchison distance, which isometrically embeds into a Hilbert space, all methods yield statistically significant results at the 0.05 level, confirming the presence of a strong marginal association. However, for the UniFrac-based metrics that incorporate phylogenetic tree structures, the performance of existing methods deteriorates. Only the proposed DPE-based test consistently detects a significant dependence across all UniFrac-based distances. Unlike traditional distance-based kernels that implicitly rely on the negative-type property, the DPE provides a rigorous and unified approach that remains valid across both Aitchison and UniFrac-based geometries.

Human Mortality Data: Conditional Independence Testing

Historically, the biological and systemic risks associated with reproductive history have been pivotal determinants of female longevity. We study the association between the distribution of female age-at-death and the distribution of maternal age at childbirth using the proposed distributional conditional independence framework. To isolate reproductive-specific health effects from shared environmental or socioeconomic stressors that affect a population broadly, we test whether the female mortality distribution is conditionally independent of the maternal fertility distribution, given the male age-at-death distribution. In this context, the male age-at-death distribution serves as a robust proxy for the common mortality environment and cohort-specific external risks.

We utilize the UN World Population Prospects 2019 database (\url{https://population.un.org}), which provides internationally comparable estimates of fertility and mortality for $n=201$ countries. For each country and five-year calendar period, we construct age-specific distributions of deaths (ages 0--100) and births (maternal ages 15--50) using smoothed life tables. From a statistical perspective, this problem is uniquely non-trivial: all random elements involved are probability distributions residing in the non-Euclidean Wasserstein space. This structure renders traditional conditional independence tests for vector-valued data inapplicable and necessitates the flexible embedding provided by the DPE.

figure[figure omitted — 479 chars of source]

We apply the proposed DPE-based conditional independence test to these distributional observations under each Wasserstein metric. To examine the sensitivity of our results to the choice of metric, we treat these distributions as probability measures in the Wasserstein-$p$ space equipped with the Wasserstein-$p$ distance with $p \in \{1, 2, \infty\}$. The required $L _ 2(\Omega_X,\lambda_X)$ distances are approximated via Monte Carlo integration, using standard Brownian motion trajectories scaled by a factor of 100. Figure (ref) reports the resulting $p$-values for the conditional independence tests across five-year periods. We have the following interesting findings. During 1980--1995, the $p$-values are uniformly close to zero across all choices of $p$, indicating a significant residual dependence between female mortality and fertility timing, even after conditioning on the shared mortality environment. However, the $p$-values increase steadily from the late 1990s and exceed the 5% significance level after 2000, suggesting a progressive temporal decoupling of the conditional fertility-mortality association. This temporal shift is consistent with global declines in pregnancy-related mortality and the widespread expansion of obstetric care and reproductive health services since the 1990s kassebaum2014global,WHO2019MaternalMortality. These results show the ability of our DPE framework to detect meaningful conditional dependence structures in distributional data while remaining robust to the choice of the Wasserstein metric.

Conclusion

This paper introduces the Distance Profile Embedding (DPE), a novel framework for testing independence and conditional independence between random objects in a general metric space. To our knowledge, DPE is the first general framework for testing independence and conditional independence between random objects in arbitrary metric spaces without imposing additional structural assumptions on the metric space, such as negative type or isometric embeddability. The key idea is to embed the random objects into a Hilbert space of distance profiles, though not necessarily isometrically. Because this embedding is measurable and injective, it preserves both independence and conditional independence.