arXiv:2610.18292cs.LGOct 2026

Manuscript Offprint

arXiv:2610.18292

Reliable Risk Estimation with Kernel Mean Matching under Dependent Sampling

Alexey Zaytsev, Diana Koldasbayeva, Egor Serov

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Kernel Mean Matching (KMM) estimates risk under covariate shift by reweighting labelled source samples so that their kernel mean embedding matches that of unlabeled target samples. Existing finite-sample guarantees are usually stated for independent samples, although many applications involve temporal, spatial, or clustered dependence. We give a finite-sample KMM analysis under dependent sampling by replacing nominal sample sizes with effective sample sizes in the concentration steps used by the classical proof. The approach uses Bernstein inequalities for geometrically strongly mixing processes and derives a model-based effective sample size. The resulting bound separates overlap, dependence, and smoothness effects with specific constants derived under a Gaussian process assumption. This analysis yields an additional tradeoff: smoother losses preserve more input dependence and therefore reduce effective sample size, while also reducing function complexity and empirical-to-population risk gaps. Applying the result to prediction yields confidence intervals that achieve near-nominal coverage in synthetic experiments and substantially reduce undercoverage on real monitoring data.

1 INTRODUCTION

Machine learning models often face distribution shift: labelled training samples come from a source distribution, while predictions are required under a different target distribution. This mismatch complicates reliable evaluation, particularly in scientific domains where observations are collected along spatial transects, temporal monitoring campaigns, or clustered sampling schemes (Roberts et al., 2017). Specifically, under covariate shift, the conditional response law remains unchanged, while the marginal covariate distribution changes. In ecological and geospatial modelling, spatial transects and temporal monitoring campaigns produce structured observations, while uneven sampling may leave labelled source data systematically unrepresentative of the deployment region (Koldas-bayeva and Zaytsev, 2025).

A standard approach to estimating target risk from labelled source samples and unlabelled target covariates is to reweight source losses by the ratio of target to source covariate densities (Shimodaira, 2000; Sugiyama et al., 2007). Estimating this ratio can be unstable when overlap is poor, source observations are sparse in high-ratio regions, or the ratio model is misspecified (Kouw and Loog, 2019). Kernel Mean Matching (KMM) provides an alternative to explicit density-ratio estimation: it computes source weights that align the empirical source and target kernel mean embeddings in a reproducing kernel Hilbert space (RKHS) (Huang et al., 2006; Gretton et al., 2009; Serov et al., 2026).

Despite KMM's practical success, its standard finite-sample theory relies on independent observations (Yu and Szepesvári, 2012). This assumption is routinely violated in real-world settings characterized by temporal persistence, spatial autocorrelation, environmental gradients, or cluster sampling. For these dependent regimes, treating the data as independent leads to overconfidence, as the nominal sample size substantially overstates the true amount of statistical information.

This paper develops a dependent-sampling foundation for KMM risk-estimation guarantees. The guiding principle of our approach is that the standard i.i.d. proof structure remains valid if standard concentration inequalities are replaced by their dependent counterparts, substituting the nominal sample size n with an effective sample size neffn_{eff}. Although neffn_{eff} is a long-standing cornerstone for diagnosing cor-

∗^{*}Equal contribution.

†^{\dagger}e.serov@applied-ai.ru relation in Markov Chain Monte Carlo (Kass et al., 1998; Vehtari et al., 2019), bounding weight degradation in importance sampling (Martino et al., 2017), and estimating spatial degrees of freedom (Bretherton et al., 1999), our work formally integrates this concept into non-parametric RKHS generalization bounds (Gretton et al., 2012) for domain adaptation. This allows us to derive risk-estimation bounds under covariate shift and non-i.i.d. sampling that decompose the distinct roles of distribution overlap, data dependence, and function smoothness. Furthermore, our theoretical analysis reveals an important underlying tradeoff: smoother target or loss functions have lower statistical complexity, but when evaluated along a correlated covariate sequence, they preserve more dependence, which inherently reduces the effective sample size.

Specifically, our main contributions are as follows:

  1. We formulate an effective-concentration condition, based on a Bernstein inequality for strongly β\beta-mixing sequences, under which the classical finite-sample KMM guarantee naturally extends to dependent data.

  2. We explicitly decompose the generalization bottleneck into three components: independent noise, density-ratio overlap, and dependent sampling-sequence persistence.

  3. We characterize how covariate dependence and response smoothness determine effective sample size, deriving a closed-form GP-induced neffn_{eff} that yields a practical dependence correction for KMM risk estimation.

  4. We validate the GP-induced effective-size mechanism in controlled synthetic experiments and evaluate the resulting confidence correction on three real-world monitoring datasets, where it consistently reduces empirical undercoverage relative to the i.i.d. interval.