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
Distance Profile Embedding for Independence and Conditional Independence Testing of Random Objects
\noindentKeywords: Distance profile; independence test; conditional independence test; metric statistics; non-Euclidean data.
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:
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.
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:
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:
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.
\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.
{
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.
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 \}$.
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$.
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.
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}$.
We make the above assumption. Under Assumption (ref), we define the map
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)$.
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.
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
We introduce a metric in $\mbox{\LARGE{$\times$}} _ {i \in A} L _ 2 ( \Omega _ {X ^ i}, \lambda _ {X ^ i})$ as
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}$.
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.
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.}
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})$.
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)$.
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$.
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
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.
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.
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.
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
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
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}$.
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:
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
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:
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}$.
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.
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.
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.
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:
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.
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).
{ 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
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,
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.
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:
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.
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.
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.
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.
To construct a test statistic for conditional independence, we first write the conditional cross-covariance operator in (ref) equivalently as
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}$.
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}$.
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:
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.
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
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).
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.
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.
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.
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
We now discuss several strategies for constructing $\lambda _ X$ according to the nature of $\Omega _ X$.
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.
We consider the following three scenarios:
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$.
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.
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.
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.
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.
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$.
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.
To show the practical utility of our DPE-based testing framework, we apply our methods to two real-world problems involving complex random objects.
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.
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.
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.
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.
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.