Manuscript Offprint
arXiv:2610.11863Conditional Kernel Stein Discrepancy
Abstract
Kernel Stein discrepancies (KSDs) provide a versatile tool for comparing distributions. One of their main applications is in quantifying the goodness-of-fit (GoF) between a data-generating distribution and a prescribed target distribution. In this work, we study the related problem of conditional GoF quantification: given only a (possibly non-normalized) conditional target model, without information on the distribution of its covariates, and samples from a joint distribution, the goal is to assess how well the conditional distribution of the samples matches the target. To tackle this setting, we present a framework that allows lifting unconditional KSDs to the conditional setting through an operator-valued kernel on the covariate space, going beyond the known Euclidean case. We establish that our suggested statistic vanishes if and only if the conditional model and the true conditional distribution agree for almost all covariates and deploy it to test conditional GoF on smooth manifolds and on discrete spaces. Our experiments on level, power, and runtime demonstrate the viability of testing on these domains using the proposed statistic.
1 INTRODUCTION
Given a sampling distribution P and a target distribution Q, quantifying and testing their goodness-of-fit (GoF) is a fundamental problem in machine learning and statistics (Ingster and Suslina, 2003; Lehmann and Romano, 2021), with a history dating back at least to Kolmogorov (1933); Smirnov (1948). A recent approach for tackling this problem builds on kernel Stein discrepancies (KSDs; Liu et al., 2016; Chwialkowski et al., 2016; Liu et al., 2026), which combine Stein's method (Stein, 1972; Chen, 2021; Anastasiou et al., 2023) and reproducing kernel Hilbert spaces (RKHS;
Florian Kalinke
Karlsruhe Institute of Technology
Aronszajn, 1950; Steinwart and Christmann, 2008; Paulsen and Raghupathi, 2016). In particular, KSDs involve a Stein operator—associated to Q—and consider the RKHS norm of the kernel mean embedding (Berlinet and Thomas-Agnan, 2004; Smola et al., 2007; Gretton et al., 2012; Muandet et al., 2017) of P into an RKHS of functions mapped with this operator.
Part of the appeal of KSDs stems from the fact that some Stein operators, such as the Langevin-Stein operator on Euclidean spaces (Gorham and Mackey, 2015; Liu et al., 2016; Chwialkowski et al., 2016; Oates et al., 2017; Gorham and Mackey, 2017), allow handling targets Q of which the Lebesgue density is known only up to normalization, a setting arising, for instance, in Bayesian contexts or in the analysis of restricted Boltzmann machines. Stein operators are known on multiple other domains, such as manifolds (Xu and Matsuda, 2020, 2021; Barp et al., 2022; Qu and Vemuri, 2025), Hilbert spaces (Wynne et al., 2025), discrete sets (Yang et al., 2018), point-processes (Yang et al., 2019), random graphs (Xu and Reinert, 2021), sequential models (Baum et al., 2023), and time-to-event data (Fernandez et al., 2020). Indeed, KSDs enjoy numerous successful applications, for example, in testing if samples come from a generative model (Jitkrittum et al., 2017; Schrab et al., 2022), in medical contexts (Fernandez et al., 2020), for handling wind data (Xu and Matsuda, 2021), in Bayesian or variational inference (Liu and Wang, 2016; Matsubara et al., 2022; Yu et al., 2026), and in geophysics (Hou et al., 2025). We note that all KSDs listed so far can be realized as instances of the general KSD framework (Hagrass et al., 2026; Kalinke et al., 2026).
A (presumably) different setting is that of assessing the GoF of conditional distributions (Andrews, 1997; Zheng, 2000), arising, for example, in model criticism (Stute and Zhu, 2002; Moreira, 2003). For tackling conditional GoF, by building on the Langevin-Stein operator and vector-valued RKHSs (Schwartz, 1964; Carmeli et al., 2006, 2010), Jitkrittum et al. (2020) introduced the kernel conditional Stein discrepancy (KCSD), allowing for model criticism also of non-normalized models. In turn, the KCSD has found suc-cessful applications, for example, in evaluating graph neural networks for multi-agent trajectory prediction (Li et al., 2021), in statistical testing under distribution shift (Thams et al., 2023), in model calibration testing (Glaser et al., 2023), and in prediction explanation (Sarvmaili et al., 2025). However, apart from specialized extensions, for example, Glaser et al. (2024) in computational biology, KCSDs are limited to Euclidean spaces and do not feature the broad applicability enjoyed by KSDs.
In this work, we establish that the general KSD framework encapsulates quantifying conditional GoF; we dub the construction conditional kernel Stein discrepancy (CKSD) to emphasize that it is a KSD. In particular, our main contributions are as follows.
- The CKSD statistic allows lifting known unconditional KSDs to the conditional setting, expanding the domain of applicability of KSD-based conditional GoF tests beyond the Euclidean case.
• Our main results (Theorem 5 and Corollary 8) establish that the proposed CKSD statistic is zero if and only if the conditional model correctly captures the data-generating distribution.
• We illustrate CKSD on smooth manifolds and on discrete sets. Our experiments regarding level, power, and runtime show its successful deployment on these domains.
Outline Section 2 introduces our notation and recalls the general KSD framework. In Section 3, we discuss the conditional GoF problem, our CKSD statistic, and properties of its estimator. Section 4 instantiates CKSD on smooth manifolds and on discrete spaces. Experiments are in Section 5.
2.1 Notation
Our notation is as follows.
General The set of positive integers is . We write for the vectors of zeros and ones, respectively. For a matrix , denotes the transpose. If ( ), is its trace, and is its determinant. For , we write their Hadamard product as . For sets and , is the set of all functions; (with and fixed) emphasizes that for all . is used for big notation.
Probability Let be a separable topological space. We write for the set of probability measures on , understood w.r.t. the measurable space , where denotes the Borel -algebra induced by , unless otherwise specified. For , the Dirac measure is written as , that is, if and 0 otherwise (). Given another separable topological space , a conditional model . on is a probability kernel . With , (taken w.r.t. the product -algebra ) means the measure . For a random variable taking values in , we define the random measure . Let be a real separable Hilbert space and . denotes the Hilbert space of (equivalence classes of) measurable such that . For measurable, , where the integral is meant in Bochner's sense; the integral exists if . For a real-valued random variable , denotes the 1-Orlicz-norm; if , is called sub-exponential. For a positive real-valued sequence and a sequence of real-valued random variables , means that is bounded in probability.
(Reproducing Kernel) Hilbert Spaces Let and be real separable Hilbert spaces. For , is the product Hilbert space of copies of endowed with the inner product , where , . A linear operator is called bounded if , denotes the set of bounded linear operators, and we write for the identity on . For , we write the adjoint as ; it is the unique satisfying for all , . Let be a locally compact second-countable topological space. An -valued reproducing kernel Hilbert space on is a Hilbert space such that (i) and (ii) for all there exists a such that for all ; in this case, for any , the evaluation map , is a bounded linear operator, and the -reproducing kernel associated to is defined as , .
Our code is available at https://github.com/DrCohomology/CKSD.
Conversely, if is any real separable Hilbert space and , then there exists an -RKHS of which (with ) is the -kernel. Let be the space of continuous functions vanishing at infinity. An -kernel is called if ; a -kernel is called -universal if is dense in for any . If in the definitions of -RKHS and -kernel, by using that , one recovers scalar-valued RKHSs; we omit the ‘’ in this case. Let be a measurable kernel with separable RKHS . For , the map is written as is called canonical feature map. The kernel mean embedding of relative to is defined, if , as
the condition is guaranteed if , in which case is called bounded. For such that and exist, we define the maximum mean discrepancy (MMD) as
2.2 Kernel Stein Discrepancy
We first recall Stein operators, Stein discrepancies, and, in particular, their kernel variant.
A Stein operator associated to a target probability measure on a topological space is a linear operator acting on a class of functions on ; it characterizes relative to if, for any ,
for all . The operator satisfies the Stein identity (relative to ) if for all . Given and , one may define a Stein discrepancy
where is a suitable norm and ; if is characterizing relative to , then iff (Anastasiou et al., 2023).
Choosing as a Hilbert space of functions on and a map that is Bochner-integrable and satisfies
Defining KSDs in terms of Pettis integrals is also possible (Barp et al., 2024); for simplicity, we only consider Bochner integrals throughout this manuscript.
one obtains a Stein operator on H associated to Q by
which satisfies, for any ,
where the last equality follows by exchanging the expectation with the inner product (Steinwart and Christmann, 2008, (A.32)) and (3). In other words, satisfies the Stein identity relative to
Now, specializing (2) by using the Stein operator (4), choosing , and using as ‘the suitable norm’ the standard absolute value on ( ) yields the kernel Stein discrepancy (Hagrass et al., 2026, (1))
where is as in (1) with a kernel on given by
having associated RKHS ; exists if . We note that both the feature map and the canonical feature map induce the kernel , despite mapping to different Hilbert spaces.
3 CONDITIONAL KERNEL STEIN DISCREPANCY
In this section, we recall the conditional GoF testing problem, define our statistic for tackling it, and provide its main statistical and computational guarantees.
3.1 Problem Statement
We start with the following assumption.
Assumption 1. is a topological space and is a Polish space.
Remark 2. Assumption 1 guarantees the existence of regular conditional probability measures (Kallenberg, 2021, Theorem 8.5).
Given Assumption 1, a conditional model , and samples , we test
(8)
We refer to Kalinke et al. (2026, Proposition 1) regarding further properties of .
where is the marginal distribution of on and . Notice that the data-generating distribution , also called sampling distribution in the following, is unknown and only observed through the sample ; moreover, the model . does not specify the marginal distribution of . Indeed, this is the main difference between testing a joint model for and a conditional model.
To tackle this problem, we design an appropriate statistic in the next section.
3.2 Proposed Statistic
In the following, we impose the assumption below, expanding Assumption 1.
Assumption 3. (i) is a locally compact second-countable topological space, is a Polish space, and and are real separable Hilbert spaces. (ii) There exists a P-Bochner integrable family of conditional Stein feature maps , satisfying, for -a.e. ,
Remark 4.
(a) Topological requirements. The second-countability and local compactness of X ensure that the H-RKHS associated to a -universal kernel is dense in by Carmeli et al. (2010, Theorem 1), which will be at the root of our main result (Theorem 5).
(b) Conditional Stein feature maps. We show in Section 4 that existing unconditional kernel Stein feature maps can be leveraged to construct -s satisfying (9). Moreover, we recall that one of the key benefits of using KSDs for GoF testing is their ability to also handle non-normalized target distributions. If the unconditional Stein feature maps are agnostic to normalization, the induced conditional ones are so as well.
Given Assumption 3, let be a family of uniformly bounded linear operators and define
With , , and in (4), we get the Stein operator on , that is, for ,
Importantly, these definitions put us into the context of the general KSD framework detailed in Section 2.2 and exhibit two key properties: (i) does not depend on the unknown ; (ii) satisfies a Stein identity relative to G for
where is arbitrary, as we establish next. Indeed, we obtain
(12)
where in (a) we disintegrate the measure (valid by Remark 2) and use (10); in (b), we exchange the integral with the bounded linear operator, valid by Steinwart and Christmann (2008, (A.32)). As a direct consequence, using the linearity of the -s and (9), we have
(13)
Hence, as in (5), for any , we get that (with as in (11)), that is, inherits a Stein identity from the characterizing property of the -s.
We establish the converse to (13) in the following result, proved in Appendix A.1. The result can be seen as an extension of Jitkrittum et al. (2020, Theorem 1) to general spaces. In particular, we do not require the measures to be absolutely continuous w.r.t. the Lebesgue measure on .
Theorem 5 ( is characterizing). Given Assumption 3, let with be a -universal -kernel, and as in (10). Further assume that . Then iff .
With the above result in place, we next present our test statistic and its validity. Performing the substitutions stated underneath (10) in (7), we get
(14)
where in (a) we consider the adjoint of ; in (b) we use , as in Theorem 5.
We identify with the corresponding subset of consisting of -independent functions.
Finally, collecting our previous derivations and combining them with (6) motivates our following conditional kernel Stein discrepancy (CKSD) statistic.
Definition 6 (CKSD Statistic). Given Assumption 3 and as in (14), define
For , let
Remark 7. Restricting the definition of to ensures that the population quantity is well defined.
The following corollary (proved in Appendix A.2) justifies leveraging the standard KSD framework to test for (8).
Corollary 8 (Validity of ). Under the assumptions of Theorem 5, it holds for that
Given a sample , a V-statistic-based estimator of is obtained by replacing with the empirical measure and squaring, captured in the following lemma, which we derive in Appendix A.3.
Lemma 9 (V-statistic-based CKSD Estimator). Given the setting of Definition 6 and a sample ,
with . Moreover, if is a kernel and , then
where and .
We next detail the properties of the V-statistic-based CKSD estimator.
3.3 Additional Guarantees
This section collects additional guarantees on the estimator (16). In particular, the next result (proved in Appendix A.4) establishes its consistency; we comment on its null distribution, runtime complexity, and a possible acceleration after elaborating the result.
Consistency The following lemma establishes the rate of (16), implying its consistency.
Lemma 10 ( -rate). Let , as in (15), , the square root of (16), and a -kernel. If , it holds that
Remark 11.
(a) Sub-exponential assumption. Classical results on the convergence of kernel mean embedding-based estimators assume bounded feature maps (Smola et al., 2007; Gretton et al., 2012; Lopez-Paz et al., 2015; Tolstikhin et al., 2017). However, in the context of KSDs, feature maps are often unbounded (Kalinke et al., 2025, Example 1; Hagrass et al., 2026, Remark 4). Imposing a sub-Gaussian (Kalinke et al., 2025, Theorem 3) or a weaker sub-exponential (Kalinke et al., 2026, Theorem 4) assumption—as in Lemma 10—allows one to obtain the parametric -rate. We note that Kalinke et al. (2025, Example 3) illustrates the analytical verification of a KSD feature map satisfying sub-Gaussianity in a simple case.
(b) Optimal rate. It is known (Cribeiro-Ramallo et al., 2026a,b; Gogolashvili, 2026) that the -rate, guaranteed to hold in the setting of Lemma 10, is asymptotically optimal in the minimax sense.
Null Distribution The distribution of (16) under both the null and the alternative hypotheses follows from known results on V-statistics (Serfling, 1980); it is similarly implied by known results on the general KSD (Kalinke et al., 2026, Theorem 6). However, in general, the null distribution is analytically intractable. If is a metric space and , one may instead use the wild (also known as i.i.d. weighted) bootstrap to approximate the null distribution (Dehling and Mikosch, 1994; Chwialkowski et al., 2016; Kalinke et al., 2026). Indeed, given (fixed) , let
where the -s are Rademacher random variables, that is, they are with equal probability. Under , and (18) have the same distributional limit, and one may approximate quantiles by numerically approximating the law of (18).
Runtime The computation of in (16) requires evaluations of for computing . Summing these entries and normalizing the result also costs , which leads to a total runtime complexity of . The estimator (17) requires computing two matrices, each costing , and their Hadamard product, which is also . Summing and normalizing the result is in ; hence, the total cost of computing (17) is .
Acceleration We note that Kalinke et al. (2025, 2026) have shown that KSD estimators and KSD-based tests can be accelerated by the Nyström method (Williams and Seeger, 2001; Rudi et al., 2015; Chatalic et al., 2022; Kalinke and Szabó, 2023). As we are within the general KSD framework, these accelerations can be applied to our proposed method, to allow tackling large-scale settings.
4 EXAMPLE APPLICATIONS
In this section, we illustrate the application of our framework when is either a manifold or a discrete set, with as in Assumption 3. In particular, we separately instantiate (14) with a suitably chosen family of conditional Stein feature maps .
Let be a -universal kernel, and a -universal -kernel. We assume that , where is a kernel.
4.1 Smooth Manifolds
Additional Notation Let be a -dimensional smooth manifold with boundary and a coordinate system in an open subset of , that is, is homeomorphic to an open subset of via (except on ). For , let be the partial derivative in the -th direction. For a smooth , its gradient is . Let be the volume element at ; if is embedded in for some , that is, , where is the Jacobian matrix of .
Assumption 12. (i) is a coordinate system that covers a.e. (ii) is smooth. Either (iii) or (iii)'s for any , vanishes on .
Xu and Matsuda (2021) introduce the Stein feature map associated to with smooth probability density function (pdf)
and show that, given Assumption 12 and , iff .
It is known that K is -universal if and only if k is (Carmeli et al., 2010, Example 14).
We now define the related conditional Stein feature maps. For -a.e. , let be the smooth pdf of and, with the score function , define the conditional Stein feature map as
which satisfies Assumption 3 (ii) by Xu and Matsuda (2021, Theorem 1). Finally, using
and that gives an explicit form of in (14), allowing the computation in practice.
To conclude this section, we note that the -s are agnostic to the normalization constant of the conditional pdf . Moreover, choosing , , , and in the above, we recover Jitkrittum et al. (2020, Proposition 2).
4.2 Discrete Sets
Additional Notation Let be the product of copies of a finite set with an arbitrary ordering. Define a cyclic permutation , whose inverse we denote with . For , let . For a function , we define the partial difference operator and write . Similarly, let be the difference operator w.r.t. .
Yang et al. (2018) introduce the Stein feature map associated to a with probability mass function (pmf) with full-support, in the form
where . They show that, given , iff .
For -a.e. , assume that has pmf with full support. Next, defining the score vector as , the conditional Stein feature map then takes the form
and satisfies Assumption 3 (ii) by Yang et al. (2018, Lemma 8). Next, using that and
one obtains an explicit form of in (14).
Finally, we note that the -s are agnostic to the normalization constant of the conditional pmf .
5 EXPERIMENTS
In this section, we perform conditional GoF tests with the proposed CKSD on manifolds (rotamers) and on discrete sets (permutations), assessing the type I error, power, and runtime.
As a baseline, we use a two-sample test based on the MMD with kernel , defined by , with kernels and as in Section 4. The following lemma (proved in Appendix A.5) motivates using two-sample testing.
Lemma 13 (Two-sample formulation). Let and . be as in Section 3.1. Then iff .
To perform the test, we split the sample into and . From we construct by replacing with for every . Notice that and , and that Lemma 13 guarantees that and follow the same distribution iff in (8) holds. As test statistic we therefore use the V-statistic-based estimator , where and denote the empirical measures associated to and , respectively. We use a permutation approach for simulating the null distribution.
5.1 Rotamers
The conformation of a protein is partially described by a pair of (backbone) torsion angles, angles of rotation about chemical bonds (Mardia et al., 2007). For proteins, a rotation about a single bond has finitely many energy minima: the torsion angles tend to concentrate around these minima, forming clusters called rotamers (Shapovalov and Dunbrack, 2011).
Formalization For simplicity, we formalize a rotamer as an element of . The two torsion angles define a coordinate system on the torus (embedded in ) as
The conditional distribution of the torsion angles given a rotamer can be modeled with a cosine model, that is, a product of von Mises distributions on the two -s and a coupling term (Mardia et al., 2007). The cosine model (conditional on a rotamer x) has density
where , , both and depend on , and is a normalizing constant.
Stein Kernel As Y is a smooth manifold, we apply the Stein kernel of Section 4.1. In the coordinate system (19), the volume element is .
On we use the Gaussian kernel with . On , we use the product of two von Mises kernels on the individual components, that is,
with . As the von Mises kernel is -universal (Park et al., 2022) and is locally compact Polish, is -universal (Szabó and Sriperumbudur, 2018).
Experimental Setup We set , a uniform distribution on , and assume that has density with , ensuring that the distribution is unimodal (Mardia et al., 2007) and, thus, describes one rotamer. We show the results of the test for three models . ( ) with respective conditional densities
We compute the rejection rates at level for the models over 1000 wild bootstrap (resp. permutations for the MMD) repetitions for various sample sizes n. Figure 1 shows the results. In particular, we observe in (a) that both tests achieve the nominal level (up to statistical fluctuations). (b) shows that
As manifolds and discrete sets are locally compact Polish spaces, the -universality of k and ensures that of (Szabó and Sriperumbudur, 2018).

(a) holds

(b) (global) holds

(c) (local) holds

(d) Average runtime
Figure 1: Comparison of CKSD with an MMD-based test w.r.t. level, power, and runtime on rotamers.

(a) holds

(b) (global) holds

(c) (local) holds
(d) Average runtime
Figure 2: Comparison of CKSD with an MMD-based test w.r.t. level, power, and runtime on permutations.
both tests have a similar power under a global shift, while (c) shows that CKSD achieves higher power in the more challenging setting of a local shift. As (d) illustrates, the runtime of both methods is comparable, with that of CKSD being slightly larger.
5.2 Permutations
Permutations are a common discrete data type with applications, among others, in label ranking (Fotakis et al., 2022), in sports results analysis (Dong et al., 2026), and in the analysis of experimental results (Matteucci et al., 2023). They often depend on covariates, such as, respectively, instances, competitors, or experimental factors.
Formalization We consider and , the symmetric group on , whose elements are permutations , being the rank of item .
Stein Kernel As is discrete, we apply the Stein kernel described in Section 4.2 with . We order according to the Steinhaus-Johnson-Trotter ordering (Chapter 29; Bird 2010), which guarantees that two adjacent permutations—including first and last—have the ranks of consecutive items swapped. For example, two consecutive terms might be (123456) and (123465). We use the Gaussian kernel with on and the Mallows kernel on (Jiao and Vert, 2015). In the latter, is the number of discordant pairs ( ) and .
Experimental Setup We set and assume that has pmf for fixed . We compare three models . , whose respective pmfs are
(global shift)
(local shift)
We use the same settings for level, bootstrap (resp. permutation) repetitions, and n as in Section 5.1. Figure 2 shows the results. While both CKSD and the MMD achieve the nominal level (up to sampling errors) in (a) and comparable power under a global shift in (b), CKSD obtains a higher power under a local shift in (c), which is barely detected by the MMD. The run-times of both approaches, displayed in (d), are similar.
AI use statement
In this work, we used generative AI tools to help implement the proposed method. We have not used generative AI tools for synthetic-data generation, to help with theoretical models or conceptual developments, to prove mathematical claims, to assist in the writing of proofs, to propose or refine research methodology, to assist in translation, to clean and reformat datasets, to support qualitative data analysis, nor in the interpretation of results. We have reviewed all AI-assisted work. LLM-generated code was verified and tested for correctness by the lead author. We take responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of generative AI.
Acknowledgements
FK is funded by the KiKIT (The Pilot Program for Core-Informatics at the KIT) of the Helmholtz Association.
References
Andreas Anastasiou, Alessandro Barp, François-Xavier Briol, Bruno Ebner, Robert E. Gaunt, Fatemeh Ghaderinezhad, Jackson Gorham, Arthur Gretton, Christophe Ley, Qiang Liu, Lester Mackey, Chris J. Oates, Gesine Reinert, and Yvik Swan. Stein's method meets computational statistics: A review of some recent developments. Statistical Science, 38(1):120–139, 2023.
Donald W. K. Andrews. A conditional Kolmogorov test. Econometrica, 65(5):1097–1128, 1997.
Nachman Aronszajn. Theory of reproducing kernels. Transactions of the American Mathematical Society, 68:337–404, 1950.
Alessandro Barp, Chris J. Oates, Emilio Porcu, and Mark Girolami. A Riemann–Stein kernel method. Bernoulli, 28(4):2181–2208, 2022.
Alessandro Barp, Carl-Johann Simon-Gabriel, Mark Girolami, and Lester Mackey. Targeted separation and convergence with kernel discrepancies. Journal of Machine Learning Research, 25(378):1–50, 2024.
Jerome Baum, Heishiro Kanagawa, and Arthur Gretton. A kernel Stein test of goodness of fit for sequential models. In International Conference on Machine Learning (ICML), pages 1936–1953, 2023.
Alain Berlinet and Christine Thomas-Agnan. Reproducing Kernel Hilbert Spaces in Probability and Statistics. Kluwer, 2004.
Richard Bird. Pearls of Functional Algorithm Design. Cambridge University Press, 2010.
Claudio Carmeli, Ernesto De Vito, and Alessandro Toigo. Vector valued reproducing kernel Hilbert spaces of integrable functions and Mercer theorem. Analysis and Applications, 4(4):377–408, 2006.
Claudio Carmeli, Ernesto De Vito, Alessandro Toigo, and Veronica Umanità. Vector valued reproducing kernel Hilbert spaces and universality. Analysis and Applications, 8(1):19–61, 2010.
Antoine Chatalic, Nicolas Schreuder, Alessandro Rudi, and Lorenzo Rosasco. Nyström kernel mean embeddings. In International Conference on Machine Learning (ICML), pages 3006–3024, 2022.
Louis H. Y. Chen. Stein's method of normal approximation: Some recollections and reflections. The Annals of Statistics, 49(4):1850–1863, 2021.
Kacper Chwialkowski, Heiko Strathmann, and Arthur Gretton. A kernel test of goodness of fit. In International Conference on Machine Learning (ICML), pages 2606–2615, 2016.
Jose Cibeiro-Ramallo, Agnideep Aich, Florian Kalinke, Ashit Baran Aich, and Zoltán Szabó. The minimax lower bound of kernel Stein discrepancy estimation. In International Conference on Artificial Intelligence and Statistics (AISTATS), pages 901–909, 2026a.
Jose Cibeiro-Ramallo, Florian Kalinke, and Zoltán Szabó. Minimax lower bounds of kernel discrepancy estimation: MMD, HSIC, KSD. Technical report, 2026b. https://arxiv.org/abs/2607.24235.
Herold Dehling and Thomas Mikosch. Random quadratic forms and the bootstrap for U-statistics. Journal of Multivariate Analysis, 51(2):392–413, 1994.
Pinjun Dong, Ruijian Han, Binyan Jiang, and Yiming Xu. Statistical ranking with dynamic covariates. Journal of the Royal Statistical Society Series B: Statistical Methodology, 88(1):221–238, 2026.
Tamara Fernandez, Nicolas Rivera, Wenkai Xu, and Arthur Gretton. Kernelized Stein discrepancy tests of goodness-of-fit for time-to-event data. In International Conference on Machine Learning (ICML), pages 3112–3122, 2020.
Dimitris Fotakis, Alkis Kalavasis, and Eleni Psaroudaki. Label ranking through nonparametric regression. In International Conference on Machine Learning (ICML), pages 6622–6659, 2022.
Pierre Glaser, David Widmann, Fredrik Lindsten, and Arthur Gretton. Fast and scalable score-based kernel calibration tests. In Conference on Uncertainty in Artificial Intelligence (UAI), pages 691–700, 2023.
Pierre Glaser, Steffanie Paul, Alissa M. Hummer, Charlotte Deane, Debora Susan Marks, and Alan Nawzad Amin. Kernel-based evaluation of conditional biological sequence models. In International Conference on Machine Learning (ICML), pages 15678–15705, 2024.
Davit Gogolashvili. Minimax estimation of kernel Stein discrepancy: Trace versus Hilbert-Schmidt scales. Technical report, 2026. https://arxiv.org/abs/2607.03367.
Jackson Gorham and Lester Mackey. Measuring sample quality with Stein's method. In Advances in Neural Information Processing Systems (NeurIPS), pages 226–234, 2015.
Jackson Gorham and Lester Mackey. Measuring sample quality with kernels. In International Conference on Machine Learning (ICML), pages 1292–1301, 2017.
Arthur Gretton, Karsten Borgwardt, Malte Rasch, Bernhard Schölkopf, and Alexander Smola. A kernel two-sample test. Journal of Machine Learning Research, 13(25):723–773, 2012.
Omar Hagrass, Bharath Sriperumbudur, and Krishnakumar Balasubramanian. Minimax optimal goodness-of-fit testing with kernel Stein discrepancy. Bernoulli, 32(1):299–324, 2026.
Zhewen Hou, Jiajin Sun, Subashree Venkatasubramanian, Peter Jin, Shuolin Li, and Tian Zheng. Calibrating geophysical predictions under constrained probabilistic distributions. Technical report, 2025. https://arxiv.org/abs/2512.03081.
Yuri I. Ingster and Irina A. Suslina. Nonparametric Goodness-of-fit Testing under Gaussian Models. Springer, 2003.
Yunlong Jiao and Jean-Philippe Vert. The Kendall and Mallows kernels for permutations. In International Conference on Machine Learning (ICML), pages 1935–1944, 2015.
Wittawat Jitkrittum, Wenkai Xu, Zoltán Szabó, Kenji Fukumizu, and Arthur Gretton. A linear-time kernel goodness-of-fit test. In Advances in Neural Information Processing Systems (NeurIPS), pages 262–271, 2017.
Wittawat Jitkrittum, Heishiro Kanagawa, and Bernhard Schölkopf. Testing goodness of fit of conditional density models with kernels. In Conference on Uncertainty in Artificial Intelligence (UAI), pages 221–230, 2020.
Florian Kalinke and Zoltán Szabó. Nyström M-Hilbert-Schmidt independence criterion. In Conference on Uncertainty in Artificial Intelligence (UAI), pages 1005–1015, 2023.
Florian Kalinke, Zoltán Szabó, and Bharath K. Sriperumbudur. Nyström kernel Stein discrepancy. In International Conference on Artificial Intelligence and Statistics (AISTATS), pages 388–396, 2025.
Florian Kalinke, Zoltán Szabó, and Bharath K. Sriperumbudur. Nyström kernel Stein discrepancy tests.
Technical report, 2026. https://arxiv.org/abs/2605.25173.
Olav Kallenberg. Foundations of Modern Probability. Springer, 3rd edition, 2021.
Andrey N. Kolmogorov. Sulla determinazione empirica delle leggi di probabilità. Giornale dell'Istituto Italiano degli Attuari, 4(1), 1933.
Erich L. Lehmann and Joseph P. Romano. Testing Statistical Hypotheses. Springer, 2021.
Longyuan Li, Jian Yao, Li Wenliang, Tong He, Tianjun Xiao, Junchi Yan, David Wipf, and Zheng Zhang. GRIN: Generative relation and intention network for multi-agent trajectory prediction. In Advances in Neural Information Processing Systems (NeurIPS), pages 27107–27118, 2021.
Qiang Liu and Dilin Wang. Stein variational gradient descent: A general purpose Bayesian inference algorithm. In Advances in Neural Information Processing Systems (NeurIPS), pages 2370–2378, 2016.
Qiang Liu, Jason Lee, and Michael Jordan. A kernelized Stein discrepancy for goodness-of-fit tests. In International Conference on Machine Learning (ICML), pages 276–284, 2016.
Qiang Liu, Lester Mackey, and Chris Oates. Probabilistic inference and learning with Stein's method. Technical report, 2026. https://arxiv.org/abs/2603.07467.
David Lopez-Paz, Krikamol Muandet, Bernhard Schölkopf, and Iliya Tolstikhin. Towards a learning theory of cause-effect inference. In International Conference on Machine Learning (ICML), pages 1452–1461, 2015.
Kanti V. Mardia, Charles C. Taylor, and Ganesh K. Subramaniam. Protein bioinformatics and mixtures of bivariate von Mises distributions for angular data. Biometrics, 63(2):505–512, 2007.
Takuo Matsubara, Jeremias Knoblauch, François-Xavier Briol, and Chris J. Oates. Robust generalised Bayesian inference for intractable likelihoods. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84(3):997–1022, 2022.
Federico Matteucci, Vadim Arzamasov, and Klemens Böhm. A benchmark of categorical encoders for binary classification. In Advances in Neural Information Processing Systems (NeurIPS), pages 54855–54875, 2023.
Marcelo J. Moreira. A conditional likelihood ratio test for structural models. Econometrica, 71(4):1027–1048, 2003.
Krikamol Muandet, Kenji Fukumizu, Bharath K. Sriperumbudur, and Bernhard Schölkopf. Kernel mean embedding of distributions: A review and beyond. Foundations and Trends in Machine Learning, 10(1-2):1–141, 2017.
Chris J. Oates, Mark Girolami, and Nicolas Chopin. Control functionals for Monte Carlo integration. Journal of the Royal Statistical Society Series B: Statistical Methodology, 79(3):695–718, 2017.
Junyoung Park, Changwon Yoon, Cheolwoo Park, and Jeongyoun Ahn. Kernel methods for radial transformed compositional data with many zeros. In International Conference on Machine Learning (ICML), pages 17458–17472, 2022.
Vern I. Paulsen and Mrinal Raghupathi. An Introduction to the Theory of Reproducing Kernel Hilbert Spaces. Cambridge University Press, 2016.
Xiaoda Qu and Baba C. Vemuri. Theory and applications of kernel Stein's method on Riemannian manifolds. Technical report, 2025. https://arxiv.org/abs/2501.00695.
Alessandro Rudi, Raffaello Camoriano, and Lorenzo Rosasco. Less is more: Nyström computational regularization. In Advances in Neural Information Processing Systems (NeurIPS), pages 1657–1665, 2015.
Mahtab Sarvmaili, Hassan Sajjad, and Ga Wu. Data-centric prediction explanation via kernelized Stein discrepancy. In International Conference on Learning Representations (ICLR), pages 18191–18208, 2025.
Antonin Schrab, Ilmun Kim, Benjamin Guedj, and Arthur Gretton. Efficient aggregated kernel tests using incomplete U-statistics. In Advances in Neural Information Processing Systems (NeurIPS), pages 18793–18807, 2022.
Laurent Schwartz. Sous-espaces hilbertiens d'espaces vectoriels topologiques et noyaux associés (noyaux reproduisants). Journal d'Analyse Mathématique, 13:115–256, 1964.
Robert J. Serfling. Approximation Theorems of Mathematical Statistics. John Wiley & Sons, 1980.
Maxim V. Shapovalov and Roland L. Dunbrack. A smoothed backbone-dependent rotamer library for proteins derived from adaptive kernel density estimates and regressions. Structure, 19(6):844–858, 2011.
Nikolai V. Smirnov. Table for estimating the goodness of fit of empirical distributions. Annals of Mathematical Statistics, 19:279–281, 1948.
Alexander Smola, Arthur Gretton, Le Song, and Bernhard Schölkopf. A Hilbert space embedding for distributions. In Algorithmic Learning Theory (ALT), pages 13–31, 2007.
Charles Stein. A bound for the error in the normal approximation to the distribution of a sum of dependent random variables. In Berkeley Symposium on Mathematical Statistics and Probability, pages 583–602. Univ. California Press, Berkeley, CA, 1972.
Ingo Steinwart and Andreas Christmann. Support Vector Machines. Springer, 2008.
Winfried Stute and Li-Xing Zhu. Model checks for generalized linear models. Scandinavian Journal of Statistics, 29(3):535–545, 2002.
Zoltán Szabó and Bharath K. Sriperumbudur. Characteristic and universal tensor product kernels. Journal of Machine Learning Research, 18(233):1–29, 2018.
Nikolaj Thams, Sorawit Saengkyongam, Niklas Pfister, and Jonas Peters. Statistical testing under distributional shifts. Journal of the Royal Statistical Society Series B: Statistical Methodology, 85(3):597–663, 2023.
Ilya Tolstikhin, Bharath Sriperumbudur, and Krikamol Muandet. Minimax estimation of kernel mean embeddings. Journal of Machine Learning Research, 18(86):1–47, 2017.
Christopher Williams and Matthias Seeger. Using the Nyström method to speed up kernel machines. In Advances in Neural Information Processing Systems (NeurIPS), pages 682–688, 2001.
George Wynne, Mikolaj J. Kasprzak, and Andrew B. Duncan. A Fourier representation of kernel Stein discrepancy with application to goodness-of-fit tests for measures on infinite dimensional Hilbert spaces. Bernoulli, 31(2):868–893, 2025.
Wenkai Xu and Takeru Matsuda. A Stein goodness-of-fit test for directional distributions. In International Conference on Artificial Intelligence and Statistics (AISTATS), pages 320–330, 2020.
Wenkai Xu and Takeru Matsuda. Interpretable Stein goodness-of-fit tests on Riemannian manifold. In International Conference on Machine Learning (ICML), pages 11502–11513, 2021.
Wenkai Xu and Gesine Reinert. A Stein goodness-of-test for exponential random graph models. In International Conference on Artificial Intelligence and Statistics (AISTATS), pages 415–423, 2021.
Jiasen Yang, Qiang Liu, Vinayak Rao, and Jennifer Neville. Goodness-of-fit testing for discrete distributions via Stein discrepancy. In International Conference on Machine Learning (ICML), pages 5561–5570, 2018.
Jiasen Yang, Vinayak A. Rao, and Jennifer Neville. A Stein-Papangelou goodness-of-fit test for point processes. In International Conference on Artificial In-telligence and Statistics (AISTATS), pages 226–235, 2019.
Longlin Yu, Ziheng Cheng, Shiyue Zhang, and Cheng Zhang. A kernel approach for semi-implicit variational inference. Technical report, 2026. https://arxiv.org/abs/2601.12023.
John Xu Zheng. A consistent test of conditional parametric distributions. Econometric Theory, 16(5):667–691, 2000.
A PROOFS
This section is dedicated to the proofs of the results presented in the main text. The proof of Theorem 5 is in Appendix A.1 and that of Corollary 8 is in Appendix A.2. We derive Lemma 9 in Appendix A.3, prove Lemma 10 in Appendix A.4, and show Lemma 13 in Appendix A.5.
A.1 Proof of Theorem 5
We have shown in (13) that if , then . To complete the proof, we show the converse in the following (with a similar idea to Jitkrittum et al. (2020, Proof of Theorem 1) but weakened conditions). In other words, for the function
we show that if , then .
We start with an auxiliary observation. Let be defined by
As is -universal, is injective (Carmeli et al., 2010, Theorem 2) (recalled in Theorem B.1). Using that , and Steinwart and Christmann (2008, (A.32)) for exchanging the integral with the bounded linear operator, we get that
where in (a) we define the linear operator . We show that is injective. Indeed, as is linear, implies . In the other direction, by the linearity of , implies ; as this holds for every , we have and, by injectivity of , . Thus, is injective.
To prove the claim, we now observe that
which, by the injectivity noted above, implies that .
A.2 Proof of Corollary 8
We have the chain of equivalences
with the following details. In (a), we use that iff and the equivalence
where (d) follows as in a Hilbert space the norm is induced by its inner product. In (e), we apply twice Steinwart and Christmann (2008, (A.32)) to interchange the integral with the inner product, and the reproducing property. (f) is by Steinwart and Christmann (2008, (A.32)), and (g) as the inner product induces the norm. (b) follows by Theorem 5. (c) holds by Assumption 3. This proves the corollary.
A.3 Proof of Lemma 9
By the definition of CKSD in (15) and substituting , we get
which is the first part of the lemma. For the second part, we notice that the definition of in (14) and the assumption of imply that, for and ,
by the linearity of the inner product. Hence,
which concludes the derivation.
A.4 Proof of Lemma 10
By Kalinke et al. (2026, Theorem 4) (recalled in Theorem B.3), it suffices to show that
which follows from the chain of (in)equalities,
with the following details. In (a), we use that is feature map induced [(14)]. (b) is by a property of the operator norm and the monotonicity of the -norm. In (c), we also use the monotonicity of the -norm. (d) holds by using that for the kernel , we have by Carmeli et al. (2010, Proposition 2) (recalled in Theorem B.2) that there exists such that . Hence, using the -property of the operator norm, we have, for any , . The finiteness in (e) now follows from and as was assumed.
A.5 Proof of Lemma 13
For any , we have
If , the l.h.s.-s are equivalent and therefore . As this holds for any , . Conversely, if , the r.h.s.-s are equivalent and following the chain of equalities, we have that .
B EXTERNAL RESULTS
This section collects the external results that we use; for brevity, we recall only the parts that we invoke.
Theorem B.1 (Theorem 2; Carmeli et al. 2010). Let be a locally compact second-countable topological space, a real separable Hilbert space, and a -kernel. The following are equivalent.
(i) K is -universal.
(ii) For all , the operator given by
is injective.
Theorem B.2 (Proposition 2; Carmeli et al. 2010). Let be a locally compact second-countable topological space, a real separable Hilbert space, and an -kernel. If is then the function is bounded for all .
Theorem B.3 (Theorem 4; Kalinke et al. 2026). Let be a separable topological space, , , a continuous kernel, and . If , then