Skip to main content
QUICK REVIEW

[Paper Review] A Linear-Time Kernel Goodness-of-Fit Test

Wittawat Jitkrittum, Wenkai Xu|arXiv (Cornell University)|May 22, 2017
Stochastic Gradient Optimization TechniquesComputer Science23 references14 citations
TL;DR

This paper proposes a linear-time kernel goodness-of-fit test that learns optimal test features via Stein's method to maximize statistical power, avoiding the need to compute the model's normalizing constant. The method achieves performance comparable to quadratic-time kernel tests while enabling interpretable visualization of model-data discrepancies, with theoretical guarantees on superior Bahadur efficiency over prior linear-time tests.

ABSTRACT

We propose a novel adaptive test of goodness-of-fit, with computational cost linear in the number of samples. We learn the test features that best indicate the differences between observed samples and a reference model, by minimizing the false negative rate. These features are constructed via Stein's method, meaning that it is not necessary to compute the normalising constant of the model. We analyse the asymptotic Bahadur efficiency of the new test, and prove that under a mean-shift alternative, our test always has greater relative efficiency than a previous linear-time kernel test, regardless of the choice of parameters for that test. In experiments, the performance of our method exceeds that of the earlier linear-time test, and matches or exceeds the power of a quadratic-time kernel test. In high dimensions and where model structure may be exploited, our goodness of fit test performs far better than a quadratic-time two-sample test based on the Maximum Mean Discrepancy, with samples drawn from the model.

Motivation & Objective

  • To develop a computationally efficient, linear-time goodness-of-fit test that maintains high statistical power.
  • To learn test features that maximize power by minimizing false negative rates, without requiring the normalizing constant of the model.
  • To enable interpretable detection of where a probabilistic model fails to fit observed data.
  • To theoretically establish superior asymptotic Bahadur efficiency compared to prior linear-time kernel tests.
  • To outperform both two-sample tests and quadratic-time kernel tests in high-dimensional and structured model settings.

Proposed method

  • The test uses Stein's method to construct features that are zero under the model $p$ but sensitive to deviations in the data distribution $q$.
  • Optimal test features are learned by maximizing the empirical expectation of the Stein-transformed functions under $q$, subject to smoothness constraints.
  • The test statistic is computed in $\mathcal{O}(n)$ time using a single-pass computation over the data, avoiding the $\mathcal{O}(n^2)$ cost of U-statistics.
  • The method leverages reproducing kernel Hilbert spaces (RKHS) to define the function class for test features, ensuring consistency and interpretability.
  • The null and alternative distributions of the test are analyzed to derive a power-optimization criterion for feature selection.
  • The approach is extended to visualize discrepancies by locating features where the model most significantly deviates from the data.

Experimental results

Research questions

  • RQ1Can a linear-time goodness-of-fit test be constructed that matches the power of quadratic-time kernel tests?
  • RQ2Does learning test features to maximize power improve efficiency and interpretability compared to random or fixed features?
  • RQ3Is the proposed test asymptotically more efficient than prior linear-time kernel tests under mean-shift alternatives?
  • RQ4Can the method detect subtle, localized model misfit in high-dimensional or structured models where two-sample tests fail?
  • RQ5Can the learned features provide interpretable visualizations of model-data discrepancies?

Key findings

  • The proposed FSSD-opt test achieves test power comparable to the quadratic-time KSD test in all evaluated scenarios, including Gaussian, Laplace, and RBM models.
  • In high-dimensional settings with structured models, the FSSD-opt test significantly outperforms two-sample MMD and ME tests, which fail to detect subtle differences even with large sample sizes.
  • The method maintains correct type-I error rates (around 5%) under the null hypothesis, confirming no inflation due to feature optimization.
  • For mean-shift alternatives, the proposed test has strictly greater asymptotic Bahadur efficiency than the linear-time test of [22], regardless of kernel bandwidth choice.
  • The learned test features provide interpretable visualizations of model misfit, such as identifying right-tail discrepancies in Chicago robbery data that a 2-component GMM fails to capture.
  • The runtime of FSSD-opt is an order of magnitude faster than KSD at large sample sizes, making it scalable to large datasets.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.