On the Robustness of Kernel Goodness-of-Fit Tests
Xing Liu, François-Xavier Briol
TL;DR
The paper tackles the robustness gap in kernel-based GOF testing by introducing a robust kernel GOF framework built on kernel Stein discrepancy (KSD) balls. It analyzes the lack of robustness of standard KSD tests with stationary kernels, shows that tilted kernels can achieve qualitative robustness, and then proposes a robust KSD test that controls Type I error for distributions inside a KSD-ball around the reference model, with practical guidance for radius selection. The work provides theoretical guarantees (calibration and consistency) and empirical evidence across synthetic and real-model settings (RBMs, KEF, multimodal models), demonstrating improved robustness to outliers and tail misspecification while maintaining reasonable power. This framework enables robust GOF testing for unnormalized models and complex densities, with practical applicability through bootstrap-based thresholds and routine radius selection.
Abstract
Goodness-of-fit testing is often criticized for its lack of practical relevance: since ``all models are wrong'', the null hypothesis that the data conform to our model is ultimately always rejected as the sample size grows. Despite this, probabilistic models are still used extensively, raising the more pertinent question of whether the model is \emph{good enough} for the task at hand. This question can be formalized as a robust goodness-of-fit testing problem by asking whether the data were generated from a distribution that is a mild perturbation of the model. In this paper, we show that existing kernel goodness-of-fit tests are not robust under common notions of robustness including both qualitative and quantitative robustness. We further show that robustification techniques using tilted kernels, while effective in the parameter estimation literature, are not sufficient to ensure both types of robustness in the testing setting. To address this, we propose the first robust kernel goodness-of-fit test, which resolves this open problem by using kernel Stein discrepancy (KSD) balls. This framework encompasses many well-known perturbation models, such as Huber's contamination and density-band models.
