mlsanityData to 7 Oct 2026

A Kernel-Based Conditional Two-Sample Test Using Nearest Neighbors (with Applications to Calibration, Regression Curves, and Simulation-Based Inference)

arXiv 2407.16550 ↗First posted 23 Jul 2024stat.ME math.ST stat.MLcited by 5

Not on the map. Why?

Abstract (arXiv)

In this paper we introduce a kernel-based measure for detecting differences between two conditional distributions. Using the `kernel trick' and nearest-neighbor graphs, we propose a consistent estimate of this measure which can be computed in nearly linear time (for a fixed number of nearest neighbors). Moreover, when the two conditional distributions are the same, the estimate has a Gaussian limit and its asymptotic variance has a simple form that can be easily estimated from the data. The resulting test attains precise asymptotic level and is universally consistent for detecting differences between two conditional distributions. We also provide a resampling based test using our estimate that applies to the conditional goodness-of-fit problem, which controls Type I error in finite samples and is asymptotically consistent with only a finite number of resamples. A method to de-randomize the resampling test is also presented. The proposed methods can be readily applied to a broad range of problems, ranging from classical nonparametric statistics to modern machine learning. Specifically, we explore three applications: testing model calibration, regression curve evaluation, and validation of emulator models in simulation-based inference. We illustrate the superior performance of our method for these tasks, both in simulations as well as on real data. In particular, we apply our method to (1) assess the calibration of neural network models trained on the CIFAR-10 dataset, (2) compare regression functions for wind power generation across two different turbines, and (3) validate emulator models on benchmark examples with intractable posteriors and for generating synthetic `redshift' associated with galaxy images.

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 48 of its 132 references that are in the map. First posted on arXiv 23 Jul 2024.

Builds on

48 of 132 references.

References · 48

  1. 2014Adam: A Method for Stochastic Optimizationcited by 36,960
  2. 2017On Calibration of Modern Neural Networkscited by 4,860
  3. 2019Normalizing Flows for Probabilistic Modeling and Inferencecited by 1,315
  4. 2016Revisiting Classifier Two-Sample Testscited by 258
  5. 2018Sequential Neural Likelihood: Fast Likelihood-free Inference with Autoregressive Flowscited by 217
  6. 2019Automatic Posterior Transformation for Likelihood-Free Inferencecited by 216
  7. 2021Conditional Image Generation with Score-Based Diffusion Modelscited by 195
  8. 2019Evaluating model calibration in classificationcited by 165
  9. 2021Benchmarking Simulation-Based Inferencecited by 160
  10. 2018Validating Bayesian Inference Algorithms with Simulation-Based Calibrationcited by 118
  11. 2023Flow Matching for Scalable Simulation-Based Inferencecited by 97
  12. 2020On Contrastive Learning for Likelihood-free Inferencecited by 96
36 more
  1. 2020A Measure-Theoretic Approach to Kernel Conditional Mean Embeddingscited by 86
  2. 2021MMD Aggregated Two-Sample Testcited by 74
  3. 2024All-in-one simulation-based inferencecited by 71
  4. 2022Conditional Simulation Using Diffusion Schr"odinger Bridgescited by 58
  5. 2018Conditional Density Estimation with Bayesian Normalising Flowscited by 54
  6. 2023Sampling-Based Accuracy Testing of Posterior Estimators for General Inferencecited by 45
  7. 2022Variational methods for simulation-based inferencecited by 43
  8. 2022Truncated proposals for scalable and hassle-free simulation-based inferencecited by 40
  9. 2022GATSBI: Generative Adversarial Training for Simulation-Based Inferencecited by 36
  10. 2023Autoregressive Conditional Neural Processescited by 32
  11. 2022Metrics of calibration for probabilistic predictionscited by 31
  12. 2021Sequential Neural Posterior and Likelihood Approximationcited by 30
  13. 2021Diagnostics for Conditional Density Models and Bayesian Inference Algorithmscited by 26
  14. 2016Conditional Generative Moment-Matching Networkscited by 24
  15. 2021Wasserstein Generative Learning of Conditional Distributioncited by 24
  16. 2022T-Cal: An optimal test for the calibration of predictive modelscited by 24
  17. 2022Calibration tests beyond classificationcited by 20
  18. 2023Classifier Calibration with ROC-Regularized Isotonic Regressioncited by 19
  19. 2020Confidence Sets and Hypothesis Testing in a Likelihood-Free Inference Settingcited by 17
  20. 2021HNPE: Leveraging Global Parameters for Neural Posterior Estimationcited by 17
  21. 2023L-C2ST: Local Diagnostics for Posterior Approximations in Simulation-Based Inferencecited by 17
  22. 2024Diffusion posterior sampling for simulation-based inference in tall data settingscited by 17
  23. 2023Wasserstein Generative Regressioncited by 12
  24. 2021Likelihood-Free Frequentist Inference: Bridging Classical Statistics and Machine Learning for Reliable Simulator-Based Inferencecited by 10
  25. 2023Boosting the Power of Kernel Two-Sample Testscited by 10
  26. 2019Likelihood-free MCMC with Amortized Approximate Ratio Estimatorscited by 9
  27. 2022Evaluating Aleatoric Uncertainty via Conditional Generative Modelscited by 8
  28. 2023Simulation-based Inference for High-dimensional Data using Surjective Sequential Neural Likelihood Estimationcited by 8
  29. 2018Dynamic Likelihood-free Inference via Ratio Estimation (DIRE)cited by 7
  30. 2023A generative flow for conditional sampling via optimal transportcited by 7
  31. 2024De-Biased Two-Sample U-Statistics With Application To Conditional Distribution Testingcited by 6
  32. 2019Validation of Approximate Likelihood and Emulator Models for Computationally Intensive Simulationscited by 5
  33. 2021MD-split+: Practical Local Conformal Inference in High Dimensionscited by 5
  34. 2022Distance and Kernel-Based Measures for Global and Local Two-Sample Conditional Distribution Testingcited by 5
  35. 2023Distribution-Free Model-Agnostic Regression Calibration via Nonparametric Methodscited by 3
  36. 2020SBI -- A toolkit for simulation-based inferencecited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 3; 2026: 1.

5 papers.