[Paper Review] A Higher-Order Kolmogorov-Smirnov Test
This paper introduces a higher-order Kolmogorov-Smirnov test that enhances sensitivity to distributional differences in the tails by extending the classical KS test using an integral probability metric over a higher-order total variation ball. The method employs a representer theorem and efficient algorithms (exact for $k \leq 5$, nearly linear for $k \geq 6$), with asymptotic null distribution derived and shown to be preserved under approximation.
We present an extension of the Kolmogorov-Smirnov (KS) two-sample test, which can be more sensitive to differences in the tails. Our test statistic is an integral probability metric (IPM) defined over a higher-order total variation ball, recovering the original KS test as its simplest case. We give an exact representer result for our IPM, which generalizes the fact that the original KS test statistic can be expressed in equivalent variational and CDF forms. For small enough orders ($k \leq 5$), we develop a linear-time algorithm for computing our higher-order KS test statistic; for all others ($k \geq 6$), we give a nearly linear-time approximation. We derive the asymptotic null distribution for our test, and show that our nearly linear-time approximation shares the same asymptotic null. Lastly, we complement our theory with numerical studies.
Motivation & Objective
- To address the limited sensitivity of the classical two-sample Kolmogorov-Smirnov test to differences in the tails of distributions.
- To develop a theoretically grounded, computationally feasible extension of the KS test that enhances detection of tail discrepancies.
- To provide a representer theorem generalizing the variational and CDF forms of the original KS test to higher-order derivatives.
- To derive the asymptotic null distribution of the new test statistic and ensure consistency with its approximation.
- To design efficient algorithms for computing the test statistic, with exact linear-time computation for small $k$ and nearly linear-time approximation for larger $k$.
Proposed method
- The test statistic is defined as an integral probability metric (IPM) over a function class $\mathcal{F}_k$ with bounded $k$th-order total variation and zero initial conditions at 0, ensuring finite and well-behaved functions.
- A key representer theorem is established, showing the IPM can be equivalently expressed as the $L^\infty$-norm of the $k$-fold integral of the CDF difference, enabling efficient computation.
- For $k \leq 5$, an exact linear-time algorithm computes the test statistic by leveraging piecewise polynomial structure and dynamic programming over order statistics.
- For $k \geq 6$, a nearly linear-time approximation is developed using sampling and interpolation of the $k$-fold integral of the empirical CDF difference.
- The adjoint of the $k$-fold integral operator is derived, enabling the transformation of the IPM into a supremum over a bounded function class, which is crucial for the representer result.
- The asymptotic null distribution is derived using functional central limit theory, and it is shown that the approximation preserves this distribution under mild regularity conditions.
Experimental results
Research questions
- RQ1Can a higher-order extension of the KS test improve sensitivity to tail differences in two-sample nonparametric testing?
- RQ2What is the exact form of the test statistic when the function class is constrained by higher-order total variation and boundary conditions?
- RQ3Can an efficient algorithm compute the higher-order KS test statistic in linear or nearly linear time?
- RQ4Does the asymptotic null distribution of the higher-order test match that of its approximation?
- RQ5Is there a general representer theorem that unifies the variational and CDF-based forms of the test for all orders $k$?
Key findings
- The higher-order KS test achieves improved sensitivity to tail differences by using $k$th-degree piecewise polynomial witness functions, which are more responsive to tail discrepancies than the step functions in the classical KS test.
- An exact representer theorem is proven, showing the test statistic equals the $L^\infty$-norm of the $k$-fold integral of the difference between the empirical CDFs.
- For $k \leq 5$, the test statistic can be computed in $O(N)$ time, where $N = m + n$, using a dynamic programming approach over the ordered joint sample.
- For $k \geq 6$, a nearly linear-time approximation is developed with $O(N \log N)$ complexity, preserving the asymptotic null distribution of the exact test.
- The asymptotic null distribution of the higher-order KS test is derived and shown to be identical for both the exact and approximate versions under regularity conditions.
- The method ensures that the IPM remains finite and computable by imposing boundary conditions at zero, preventing divergence due to polynomial growth.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.