TL;DR
Goodness-of-fit testing using Kernel Stein Discrepancy (KSD) is a powerful tool for validating statistical models, but its quadratic runtime complexity makes it painfully slow for large datasets. This paper proves that accelerating KSD tests using the low-rank Nyström method drastically cuts down computation time without sacrificing any statistical power or test validity. The authors demonstrate that the accelerated test preserves crucial properties like asymptotic level and local consistency, delivering exact-test performance at a fraction of the computational cost.
What Problem Does This Paper Address?
Goodness-of-fit (GoF) testing answers a fundamental question in statistics: Does a given set of data samples actually come from our hypothesized target distribution? Kernel Stein Discrepancy (KSD) has become a go-to framework for this because it elegantly bypasses the need to compute normalization constants—a notorious bottleneck in complex Bayesian models and deep generative architectures.
However, classical KSD testing hits a wall when scaling up. It suffers from two major computational headaches:
- Quadratic Scaling: Computing the test statistic scales quadratically ($O(n^2)$) with the number of samples $n$.
- Intractable Null Distributions: The theoretical distribution of the test statistic under the null hypothesis is usually impossible to compute analytically. To determine whether a test result is statistically significant, researchers must use a technique called the "wild bootstrap," which repeatedly recalculates the $O(n^2)$ statistic over hundreds or thousands of iterations.
While the Nyström method has previously been used to speed up KSD estimation, its mathematical impact on the bootstrap-based testing framework remained an open question. This paper fills that gap by proving that Nyström acceleration speeds up the entire testing pipeline without degrading its ability to detect subtle deviations from the target distribution.
Methods
The authors introduce and theoretically validate N-KSD (Nyström-accelerated KSD) combined with an accelerated wild bootstrap.
The core technique relies on the Nyström method, which approximates a massive $n \times n$ kernel matrix by randomly selecting a much smaller subset of $m$ landmark points ($m \ll n$). This reduces the computational complexity of both the test statistic and the bootstrap iterations from $O(n^2)$ to $O(mn + m^3)$.
The paper's primary contribution is a rigorous operator-theoretic proof showing that this low-rank approximation behaves beautifully under the wild bootstrap. They demonstrate that the Nyström-accelerated bootstrap successfully mimics the exact limiting null distribution and preserves the test's local consistency—meaning its mathematical capacity to distinguish between the target distribution and a sequence of closely related alternative distributions remains fully intact.
Datasets
The authors evaluated their method using synthetic benchmarks designed to replicate challenging, non-Euclidean data spaces:
- Directional Data: Samples generated on $d$-dimensional unit spheres ($S^{d-1}$ for $d=2,3$). The target was a uniform distribution on the sphere, tested against a von Mises-Fisher alternative distribution.
- Functional Data: Infinite-dimensional data where the target distribution is a Brownian motion process over the interval $[0,1]$, evaluated against "clipped" and "sinusoid" alternative sampling distributions.
Key Insights and Ideas
- Speed with Zero Statistical Sacrifice: The most profound insight is that you don't have to trade accuracy for speed. The Nyström-accelerated test achieves the exact same local separation rate as the full quadratic-time test.
- Mathematical Equivalence: The authors successfully bridged the gap between numerical linear algebra (low-rank matrix approximations) and mathematical statistics (operator-theoretic projections) to guarantee that the accelerated bootstrap tracks the exact bootstrap with high probability.
- Domain Agnostic: Unlike other acceleration methods like Random Fourier Features (RFF), which typically require data to reside in standard Euclidean spaces ($\mathbb{R}^d$), the Nyström approach works seamlessly across manifolds, spheres, and infinite-dimensional functional spaces.
Key Results
The theoretical guarantees established by the authors are comprehensively mapped out in the paper, confirming that N-KSD matches its classical counterpart across all critical statistical dimensions:
The authors also validated these properties through auxiliary proofs:
In practical simulations, the empirical results perfectly mirrored the theory:
- Directional Data ($d=3$): With a sample size of $n=200$, the N-KSD test achieved identical statistical power to the exact KSD test while operating orders of magnitude faster.
- Functional Data: For $n=200$, the Nyström-accelerated test cut the total runtime roughly in half compared to the quadratic approach, while maintaining an identical rejection rate.
Limitations and Future Work
- Landmark Selection: The current framework relies on uniform random sampling to select the $m$ Nyström points. While theoretically sound, uniform sampling might miss critical regions in highly complex or sparse data distributions.
- Hyperparameter Sensitivity: The performance gains depend on choosing an optimal number of Nyström points $m$. If $m$ is too small, the test loses power; if it is too large, the computational benefits disappear.
- Future Directions: The authors suggest exploring data-dependent landmark selection strategies, such as leverage-score-based sampling, specifically optimized for the bootstrap testing context to further improve stability and power.
Summary updated