Search arXivSearch

arXiv · 2407.16550

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

Abstract

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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Anirban Chatterjee, Ziang Niu, Bhaswar B. Bhattacharya. 2024-08-29. A Kernel-Based Conditional Two-Sample Test Using Nearest Neighbors (with Applications to Calibration, Regression Curves, and Simulation-Based Inference). https://arxiv.org/abs/2407.16550

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Generalised Covariances and Correlations

The covariance of two random variables measures the average joint deviations from their respective means. We generalise this well-known measure by replacing the means with other statistical functionals such as quantiles, expectiles, or thresholds. Deviations from these functionals are defined via generalised errors, typically induced through identification or moment functions. As a normalised measure of dependence, a generalised correlation is constructed. Replacing the common Cauchy--Schwarz normalisation by a novel Fréchet--Hoeffding normalisation, we obtain attainability of the entire interval $[-1, 1]$ for any given marginal distributions. We uncover favourable properties of these new dependence measures and establish consistent estimators. The families of quantile and threshold correlations make it possible to measure local dependence and give rise to function-valued distributional correlations, exhibiting the entire dependence structure. Quantile correlations also lead to tail correlations, new measures of tail dependence, closely related to and refining classical coefficients of tail dependence. Finally, we construct summary covariances (correlations), a class of regional or global dependence measures, which arise as (normalised) weighted averages of distributional covariances. We retrieve covariance, Pearson and Spearman correlation as special cases. The usefulness of our new dependence measures is illustrated on demographic data from the Panel Study of Income Dynamics.

stat.ME

Compressive Bayesian non-negative matrix factorization for mutational signatures analysis

Non-negative matrix factorization (NMF) is a popular tool for dimensionality reduction, especially for count matrices. However, inferring an appropriate number of factors is challenging. Existing approaches based on information criteria or nonparametric sparsity-inducing priors tend to be computationally burdensome or highly sensitive to prior choices. Moreover, theoretical properties of the posterior distribution of Poisson NMF parameters endowed with shrinkage priors remain under-explored. This paper introduces a novel Bayesian NMF method that automatically infers the number of factors while also incorporating information on the latent factors from previous studies. This is achieved using compressive hyperpriors, which are hierarchical priors that make the sample-specific weights of unneeded factors concentrate near zero in the posterior. We provide novel distribution theory for posterior inference to elucidate this shrinkage mechanism, both in finite samples and asymptotically. We apply our method to mutational signatures analysis in cancer genomics, in simulations and on real data from breast cancer. Compared to state-of-the-art alternatives, our method is more robust to mild overdispersion and improves detection and estimation of signatures aligned with prior information.

stat.ME

On Relative Cumulative Residual Information Measure and Its Applications

We develop a relative cumulative residual information measure (RCRI) that aims to quantify the divergence between two survival functions. The dynamic relative cumulative residual information (DRCRI) measure is also introduced. We establish some characterization results under the assumption of the proportional hazards model. Additionally, we obtained the non-parametric estimators of RCRI and DRCRI measures based on the kernel density type estimator for the survival function. The effectiveness of the estimators are assessed through an extensive Monte Carlo simulation study. We consider data from the third Gaia data release (Gaia DR3) to demonstrate the use of the proposed measure. For this study, we have collected epoch photometry data for the objects Gaia DR3 4111834567779557376 and Gaia DR3 5090605830056251776. RCRI-based image analysis is conducted using Chest X-ray data from the publicly available dataset.

stat.ME