Papers
Topics
Authors
Recent
Search
2000 character limit reached

Kernel Quantile Discrepancies

Updated 5 July 2026
  • Kernel Quantile Discrepancies are defined via RKHS directional quantile embeddings that generalize mean embeddings to capture distributional quantiles.
  • They aggregate directional quantile differences across levels using weighting measures, yielding near-linear estimators for effective two-sample testing.
  • KQDs ensure identifiability and enhanced separation power under weaker kernel conditions compared to MMD, making them applicable even with non-characteristic kernels.

Kernel Quantile Discrepancies (KQDs) are a family of kernel-based probability metrics built from kernel quantile embeddings (KQEs), rather than from kernel mean embeddings alone. In the RKHS formulation introduced in "Kernel Quantile Embeddings and Associated Probability Metrics" (Naslidnyk et al., 26 May 2025), a distribution is represented through directional quantiles of the canonical feature map, and discrepancies are obtained by aggregating quantile differences across quantile levels and RKHS directions. This construction extends the mean-based logic of the maximum mean discrepancy (MMD), yields probability metrics under weaker kernel assumptions than MMD, recovers kernelised sliced Wasserstein distances when quantile levels are uniformly weighted, and admits near-linear estimators that were shown to be competitive in two-sample testing (Naslidnyk et al., 26 May 2025).

1. RKHS quantiles and kernel quantile embeddings

Let XX be a Borel space, let k:X×XRk:X\times X\to\mathbb R be a measurable positive definite kernel, and let (H,,H)(\mathcal H,\langle\cdot,\cdot\rangle_{\mathcal H}) be its RKHS with unit sphere SH={uH:uH=1}S_{\mathcal H}=\{u\in\mathcal H:\|u\|_{\mathcal H}=1\}. Writing the canonical feature map as ψ(x)=k(x,)\psi(x)=k(x,\cdot), each direction uSHu\in S_{\mathcal H} induces an RKHS linear functional

ϕu(h)=u,hH.\phi_u(h)=\langle u,h\rangle_{\mathcal H}.

For a probability measure PP, the pushforward u#P:=ϕu#(ψ#P)u_\#P:=\phi_u{}_\#(\psi_\#P) is therefore the one-dimensional distribution of u(X)u(X) when k:X×XRk:X\times X\to\mathbb R0 (Naslidnyk et al., 26 May 2025).

The directional kernel quantile embedding at quantile level k:X×XRk:X\times X\to\mathbb R1 is

k:X×XRk:X\times X\to\mathbb R2

where k:X×XRk:X\times X\to\mathbb R3 is the univariate k:X×XRk:X\times X\to\mathbb R4-quantile of the real-valued law k:X×XRk:X\times X\to\mathbb R5. Hence KQEs are obtained by first projecting k:X×XRk:X\times X\to\mathbb R6 onto a one-dimensional RKHS direction, then taking an ordinary univariate quantile, and finally re-embedding that scalar quantile along the same direction. The family

k:X×XRk:X\times X\to\mathbb R7

is the KQE of k:X×XRk:X\times X\to\mathbb R8.

A centered variant is also defined. If k:X×XRk:X\times X\to\mathbb R9 denotes the kernel mean embedding, then

(H,,H)(\mathcal H,\langle\cdot,\cdot\rangle_{\mathcal H})0

Centering restores location equivariance for quantiles of (H,,H)(\mathcal H,\langle\cdot,\cdot\rangle_{\mathcal H})1. For discrepancies between two distributions, however, the location non-equivariance of the uncentered KQE cancels, so the uncentered form is typically used (Naslidnyk et al., 26 May 2025).

These objects are generalized quantiles in a precise sense. They are standard univariate quantiles computed after projection in (H,,H)(\mathcal H,\langle\cdot,\cdot\rangle_{\mathcal H})2. In finite-dimensional (H,,H)(\mathcal H,\langle\cdot,\cdot\rangle_{\mathcal H})3, they coincide with multivariate directional quantiles of the feature vector. This places KQEs alongside projection-based multivariate quantile constructions, but specifically in RKHS geometry.

2. Discrepancy families and their relation to MMD and sliced Wasserstein

Given (H,,H)(\mathcal H,\langle\cdot,\cdot\rangle_{\mathcal H})4, a measure (H,,H)(\mathcal H,\langle\cdot,\cdot\rangle_{\mathcal H})5 on (H,,H)(\mathcal H,\langle\cdot,\cdot\rangle_{\mathcal H})6, and a direction (H,,H)(\mathcal H,\langle\cdot,\cdot\rangle_{\mathcal H})7, the directional discrepancy is

(H,,H)(\mathcal H,\langle\cdot,\cdot\rangle_{\mathcal H})8

Because both embeddings are scalar multiples of (H,,H)(\mathcal H,\langle\cdot,\cdot\rangle_{\mathcal H})9, the RKHS norm simplifies to

SH={uH:uH=1}S_{\mathcal H}=\{u\in\mathcal H:\|u\|_{\mathcal H}=1\}0

KQDs arise by aggregating these one-dimensional discrepancies over directions (Naslidnyk et al., 26 May 2025).

Object Definition Role
SH={uH:uH=1}S_{\mathcal H}=\{u\in\mathcal H:\|u\|_{\mathcal H}=1\}1-KQDSH={uH:uH=1}S_{\mathcal H}=\{u\in\mathcal H:\|u\|_{\mathcal H}=1\}2 SH={uH:uH=1}S_{\mathcal H}=\{u\in\mathcal H:\|u\|_{\mathcal H}=1\}3 Expected discrepancy over directions
sup-KQDSH={uH:uH=1}S_{\mathcal H}=\{u\in\mathcal H:\|u\|_{\mathcal H}=1\}4 SH={uH:uH=1}S_{\mathcal H}=\{u\in\mathcal H:\|u\|_{\mathcal H}=1\}5 Maximal directional discrepancy
Centered variants Replace SH={uH:uH=1}S_{\mathcal H}=\{u\in\mathcal H:\|u\|_{\mathcal H}=1\}6 by SH={uH:uH=1}S_{\mathcal H}=\{u\in\mathcal H:\|u\|_{\mathcal H}=1\}7 Adds an MMD-related mean term

The weighting measure SH={uH:uH=1}S_{\mathcal H}=\{u\in\mathcal H:\|u\|_{\mathcal H}=1\}8 determines how quantile levels are emphasized. The default choice is Lebesgue measure SH={uH:uH=1}S_{\mathcal H}=\{u\in\mathcal H:\|u\|_{\mathcal H}=1\}9 on ψ(x)=k(x,)\psi(x)=k(x,\cdot)0, but alternative densities can up- or down-weight tails. With ψ(x)=k(x,)\psi(x)=k(x,\cdot)1, the directional discrepancy becomes exactly a one-dimensional Wasserstein distance:

ψ(x)=k(x,)\psi(x)=k(x,\cdot)2

Consequently,

ψ(x)=k(x,)\psi(x)=k(x,\cdot)3

and

ψ(x)=k(x,)\psi(x)=k(x,\cdot)4

These are kernelised analogues of expected sliced Wasserstein and max-sliced Wasserstein. When ψ(x)=k(x,)\psi(x)=k(x,\cdot)5, ψ(x)=k(x,)\psi(x)=k(x,\cdot)6, and ψ(x)=k(x,)\psi(x)=k(x,\cdot)7 is uniform on the Euclidean unit sphere, they recover standard expected sliced Wasserstein and max-sliced Wasserstein (Naslidnyk et al., 26 May 2025).

The comparison with MMD is structural. The squared MMD is

ψ(x)=k(x,)\psi(x)=k(x,\cdot)8

so MMD compares means in RKHS, whereas KQDs compare directional quantiles. For ψ(x)=k(x,)\psi(x)=k(x,\cdot)9 and uSHu\in S_{\mathcal H}0, the centered expected KQD satisfies

uSHu\in S_{\mathcal H}1

with an analogous identity for sup-KQD. The accompanying thesis describes the centered construction as a “mid-point” interpolant between MMD and sliced-Wasserstein-type terms, in a sense analogous to Sinkhorn divergences, though with flexible kernel choice rather than an entropic regularization scheme tied to the energy distance (Naslidnyk, 25 Feb 2026).

3. Identifiability and probability-metric structure

The central theoretical claim is that KQEs determine distributions under weaker conditions than those usually required for MMD. The relevant assumptions are:

  • uSHu\in S_{\mathcal H}2 is Hausdorff, separable, and uSHu\in S_{\mathcal H}3-compact;
  • uSHu\in S_{\mathcal H}4 is continuous and separating on uSHu\in S_{\mathcal H}5, meaning uSHu\in S_{\mathcal H}6 for uSHu\in S_{\mathcal H}7.

Under these assumptions, the paper proves an RKHS analogue of the Cramér–Wold theorem: the map

uSHu\in S_{\mathcal H}8

is injective, and the kernel is therefore quantile-characteristic (Naslidnyk et al., 26 May 2025).

A further theorem establishes that every mean-characteristic kernel is quantile-characteristic, but not conversely. The converse fails; bounded-degree polynomial kernels are given as examples of kernels that are not mean-characteristic but are quantile-characteristic under the RKHS Cramér–Wold theorem. The immediate consequence is that KQDs can separate distributions in settings where MMD cannot. Whenever uSHu\in S_{\mathcal H}9, an injective KQD also yields ϕu(h)=u,hH.\phi_u(h)=\langle u,h\rangle_{\mathcal H}.0, but the reverse implication need not hold.

The metric statements follow from the injectivity result together with full-support conditions on the aggregation measures. If ϕu(h)=u,hH.\phi_u(h)=\langle u,h\rangle_{\mathcal H}.1 has full support on ϕu(h)=u,hH.\phi_u(h)=\langle u,h\rangle_{\mathcal H}.2, then sup-KQDϕu(h)=u,hH.\phi_u(h)=\langle u,h\rangle_{\mathcal H}.3 is a distance. If, in addition, ϕu(h)=u,hH.\phi_u(h)=\langle u,h\rangle_{\mathcal H}.4 has full support on ϕu(h)=u,hH.\phi_u(h)=\langle u,h\rangle_{\mathcal H}.5, then ϕu(h)=u,hH.\phi_u(h)=\langle u,h\rangle_{\mathcal H}.6-KQDϕu(h)=u,hH.\phi_u(h)=\langle u,h\rangle_{\mathcal H}.7 is a distance. A concrete example of such a direction law is the pushforward to ϕu(h)=u,hH.\phi_u(h)=\langle u,h\rangle_{\mathcal H}.8 of a centered Gaussian measure on ϕu(h)=u,hH.\phi_u(h)=\langle u,h\rangle_{\mathcal H}.9 with non-degenerate covariance operator (Naslidnyk et al., 26 May 2025).

This weaker dependence on kernel assumptions is one of the main distinctions from MMD. MMD is a probability metric only when the kernel is characteristic. KQDs, by contrast, are probability metrics under continuous, separating kernels together with support assumptions on PP0 and PP1. This suggests that the quantile representation is not merely an alternative parameterization of the same information carried by the RKHS mean; it is strictly richer in separation power for some non-characteristic kernels.

4. Estimation, computational schemes, and statistical guarantees

For samples PP2 and a fixed direction PP3, the empirical KQE is based on order statistics of the projected values PP4. Denoting by PP5 the PP6-th order statistic,

PP7

Thus empirical KQEs require projection and sorting rather than pairwise kernel summation (Naslidnyk et al., 26 May 2025).

For the expected discrepancy, a Monte Carlo estimator draws directions PP8 and computes

PP9

where u#P:=ϕu#(ψ#P)u_\#P:=\phi_u{}_\#(\psi_\#P)0 is the density of u#P:=ϕu#(ψ#P)u_\#P:=\phi_u{}_\#(\psi_\#P)1. When u#P:=ϕu#(ψ#P)u_\#P:=\phi_u{}_\#(\psi_\#P)2, u#P:=ϕu#(ψ#P)u_\#P:=\phi_u{}_\#(\psi_\#P)3.

A practical sampling scheme for directions uses a centered Gaussian measure u#P:=ϕu#(ψ#P)u_\#P:=\phi_u{}_\#(\psi_\#P)4 on u#P:=ϕu#(ψ#P)u_\#P:=\phi_u{}_\#(\psi_\#P)5 with covariance operator

u#P:=ϕu#(ψ#P)u_\#P:=\phi_u{}_\#(\psi_\#P)6

for a reference measure u#P:=ϕu#(ψ#P)u_\#P:=\phi_u{}_\#(\psi_\#P)7 with full support. With reference points u#P:=ϕu#(ψ#P)u_\#P:=\phi_u{}_\#(\psi_\#P)8 and u#P:=ϕu#(ψ#P)u_\#P:=\phi_u{}_\#(\psi_\#P)9, one forms

u(X)u(X)0

normalizes u(X)u(X)1, projects the data along u(X)u(X)2, sorts the projected values, and averages the resulting directional discrepancies. Per direction, the cost is u(X)u(X)3 for evaluations, u(X)u(X)4 for u(X)u(X)5 via u(X)u(X)6, and u(X)u(X)7 for sorting. The total cost is

u(X)u(X)8

and taking u(X)u(X)9 yields an overall k:X×XRk:X\times X\to\mathbb R00 estimator (Naslidnyk et al., 26 May 2025).

Statistically, the empirical KQE has the classical k:X×XRk:X\times X\to\mathbb R01 rate for fixed k:X×XRk:X\times X\to\mathbb R02 and k:X×XRk:X\times X\to\mathbb R03 when the density of k:X×XRk:X\times X\to\mathbb R04 is bounded away from zero. For k:X×XRk:X\times X\to\mathbb R05-KQDk:X×XRk:X\times X\to\mathbb R06, if k:X×XRk:X\times X\to\mathbb R07 has a density and k:X×XRk:X\times X\to\mathbb R08 and k:X×XRk:X\times X\to\mathbb R09, then with probability at least k:X×XRk:X\times X\to\mathbb R10,

k:X×XRk:X\times X\to\mathbb R11

with k:X×XRk:X\times X\to\mathbb R12. For k:X×XRk:X\times X\to\mathbb R13, the same k:X×XRk:X\times X\to\mathbb R14 rate is attainable under integrability conditions on k:X×XRk:X\times X\to\mathbb R15 and k:X×XRk:X\times X\to\mathbb R16 (Naslidnyk et al., 26 May 2025).

For two-sample testing, the statistic is typically calibrated by permutation. The pooled sample is relabeled k:X×XRk:X\times X\to\mathbb R17 times, with the paper using values such as k:X×XRk:X\times X\to\mathbb R18, and the empirical k:X×XRk:X\times X\to\mathbb R19-quantile is used to control Type I error at level k:X×XRk:X\times X\to\mathbb R20, such as k:X×XRk:X\times X\to\mathbb R21. The reported experiments show that near-linear k:X×XRk:X\times X\to\mathbb R22-KQD often outperforms near-linear MMD approximations, while quadratic centered k:X×XRk:X\times X\to\mathbb R23-KQD performs similarly to quadratic MMD statistics (Naslidnyk et al., 26 May 2025).

5. Empirical behavior and practical deployment

The empirical study includes several benchmark regimes. In a power-decay experiment with k:X×XRk:X\times X\to\mathbb R24 and k:X×XRk:X\times X\to\mathbb R25, sample size k:X×XRk:X\times X\to\mathbb R26, and dimension ranging from k:X×XRk:X\times X\to\mathbb R27 to k:X×XRk:X\times X\to\mathbb R28, near-linear k:X×XRk:X\times X\to\mathbb R29-KQD exhibited the slowest power decay among the reported methods, outperforming near-linear MMD-Multi and remaining competitive with quadratic-time MMD. In a one-dimensional Laplace-versus-Gaussian experiment with polynomial kernel degree k:X×XRk:X\times X\to\mathbb R30, MMD failed because matched moments yielded identical KMEs, whereas KQDs gained power with sample size and detected the difference. On Galaxy MNIST and CIFAR-10 versus CIFAR-10.1, near-linear KQDs were reported to outperform near-linear MMD-Multi, while quadratic centered k:X×XRk:X\times X\to\mathbb R31-KQD and quadratic MMD showed similar power. Runtime measurements aligned with the k:X×XRk:X\times X\to\mathbb R32 analysis, and Type I error was controlled at the nominal level under permutation calibration (Naslidnyk et al., 26 May 2025).

Practical guidance in the paper and thesis is correspondingly explicit. Any continuous, separating kernel suffices for KQD to be a metric; characteristicness is not required. RBF and Laplacian kernels are presented as good defaults, with the median heuristic for RBF bandwidth. Polynomial kernels are also admissible and are especially useful for demonstrating the gap between mean-characteristicness and quantile-characteristicness (Naslidnyk, 25 Feb 2026).

The choice of k:X×XRk:X\times X\to\mathbb R33 controls sensitivity across the distribution. Uniform k:X×XRk:X\times X\to\mathbb R34 recovers kernelised sliced Wasserstein. Non-uniform k:X×XRk:X\times X\to\mathbb R35 can emphasize tails or central mass. The direction distribution k:X×XRk:X\times X\to\mathbb R36 requires special care because there is no uniform measure on the sphere of an infinite-dimensional RKHS; the Gaussian construction on k:X×XRk:X\times X\to\mathbb R37 addresses this directly. A practical reference measure is the balanced empirical mixture k:X×XRk:X\times X\to\mathbb R38, though Gaussian or uniform reference distributions scaled by the data interquartile range are also proposed (Naslidnyk et al., 26 May 2025).

The papers further recommend k:X×XRk:X\times X\to\mathbb R39 for near-linear computation, increasing k:X×XRk:X\times X\to\mathbb R40 when lower Monte Carlo variance is desired. With respect to k:X×XRk:X\times X\to\mathbb R41, the stated guidance is that k:X×XRk:X\times X\to\mathbb R42 is more robust to outliers, while k:X×XRk:X\times X\to\mathbb R43 is often a good practical trade-off and aligns with one-dimensional k:X×XRk:X\times X\to\mathbb R44. In practice, k:X×XRk:X\times X\to\mathbb R45-KQD is described as simpler and stable, whereas exact optimization of sup-KQD is costly and NP-hard in general (Naslidnyk et al., 26 May 2025).

A common misconception is that KQDs are simply MMD with a different estimator. The construction and theorems do not support that interpretation. KQDs replace mean comparison by a directional-quantile representation and can separate distributions under strictly weaker kernel assumptions than MMD. Another misconception is that the expected discrepancy depends on a canonical “uniform” distribution over RKHS directions; in infinite-dimensional k:X×XRk:X\times X\to\mathbb R46, such a uniform measure does not exist, which is why the Gaussian pushforward construction is central.

KQDs sit within a broader landscape of quantile-based kernel methods, but adjacent constructions are not identical. On the one-dimensional real line, the MMD with the negative distance kernel k:X×XRk:X\times X\to\mathbb R47 coincides with the energy distance up to an additive constant. In "Wasserstein Gradient Flows of MMD Functionals with Distance Kernel and Cauchy Problems on Quantile Functions" (Duong et al., 2024), this discrepancy is recast in quantile space via an isometric embedding of k:X×XRk:X\times X\to\mathbb R48 into the cone of quantile functions in k:X×XRk:X\times X\to\mathbb R49. That work provides an explicit convex functional on quantiles, a subdifferential characterized through the target CDF, existence and uniqueness of the associated gradient flow, invariant sets, instantaneous smoothing for certain targets, and efficient implicit Euler updates by bisection. The relation is conceptual rather than definitional: it shows that some kernel discrepancies admit especially transparent quantile-space formulations in one dimension, whereas KQDs as introduced in (Naslidnyk et al., 26 May 2025) are RKHS directional-quantile metrics for general Borel spaces.

A separate line of work uses similar language in a regression setting. In "fastkqr: A Fast Algorithm for Kernel Quantile Regression" (Tang et al., 2024), the phrase “kernel quantile discrepancy principle” refers to fitting conditional quantile functions by minimizing the pinball loss with RKHS regularization, together with exact finite-smoothing algorithms and spectral acceleration. That object concerns conditional prediction and asymmetric residuals, not unconditional probability metrics between distributions. The distinction matters because the KQD literature addresses two-sample comparison, identifiability, and probability-metric structure, whereas kernel quantile regression addresses estimation of conditional quantiles.

The principal limitations of KQDs are also explicit in the source material. Sorting is required in every sampled direction, so the method trades quadratic pairwise kernel summation for repeated projection-and-order-statistic computations. Monte Carlo variance depends on the number of sampled directions k:X×XRk:X\times X\to\mathbb R50. Exact sup-KQD optimization is expensive. For k:X×XRk:X\times X\to\mathbb R51, retaining k:X×XRk:X\times X\to\mathbb R52 rates requires additional regularity conditions involving k:X×XRk:X\times X\to\mathbb R53. The choices of k:X×XRk:X\times X\to\mathbb R54 and k:X×XRk:X\times X\to\mathbb R55 introduce hyperparameters, and the topology induced by KQD, including its relation to weak convergence, remains an open problem in the thesis summary (Naslidnyk, 25 Feb 2026).

Open directions stated in the papers include improved KQE and KQD estimators, adaptive or learned direction sampling, better quadrature over k:X×XRk:X\times X\to\mathbb R56, kernel selection for test power, conditional quantile embeddings in RKHS, stronger finite-sample guarantees for k:X×XRk:X\times X\to\mathbb R57, and more principled optimization procedures for approximating sup-KQD. Taken together, these indicate that KQDs are best understood as a new RKHS representation of probability measures based on directional quantiles: one that strictly generalizes mean embeddings in separation power for some kernels, connects naturally to sliced Wasserstein geometry, and preserves scalable nonparametric estimation (Naslidnyk et al., 26 May 2025).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Kernel Quantile Discrepancies.