Manuscript Offprint
arXiv:2610.40884Robust-by-Design Distributional Learning from Contaminated Samples
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Modern data analysis pipelines increasingly rely on large datasets assembled through retrieval, scraping, automated filtering, and post-hoc curation, where the observed sample is often a contaminated mixture rather than the target population. Standard distributional objectives either ignore contamination and converge to the wrong target, or retain only a small trusted subset and discard most of the data. We study supervised and unsupervised learning when a clean reference sample is compared with a pooled sample from , where is the latent target distribution and is an unknown contaminant. Motivated by settings with noisy membership scores for all observations and exact labels for a small audited subset, we propose contamination-corrected maximum mean discrepancy (CC-MMD), a design-based estimator that combines proxy scores with audited residual corrections to recover the oracle MMD that would have been computed from the latent clean sample. CC-MMD requires no calibration assumption on the proxy scores and no structural assumptions on the contaminant beyond standard kernel regularity. We prove finite-population design-unbiasedness of the corrected kernel sums, establish asymptotic normality of the audit correction, and show consistency for the target discrepancy . Empirically, CC-MMD tracks the oracle under increasing contamination, improves parameter recovery and prediction in contaminated regression, and enables generative models trained on heavily corrupted mixtures to recover the clean target distribution. These results show that contaminated data need not be discarded or treated as the estimand. With sparse trusted labels and abundant noisy supervision, distributional objectives can be made robust by design.
1 Introduction
Ancient DNA research was reshaped by the problem of contamination [1–3]. Early attempts to recover DNA from ancient human remains repeatedly encountered modern human DNA introduced during excavation, handling, and laboratory processing, and later work showed that such contamination can bias downstream genetic analyses toward the ancestry of the contaminating source [4, 5]. Consequently, paleogenomics adopted authentication protocols, clean-room standards, and explicit contamination-estimation methods as part of the inferential pipeline [6]. Recent work continues to show that contamination can distort downstream procedures such as genotype imputation and PCA-based population-genetic analysis [7]. Modern machine learning confronts an analogous structural problem at web scale: datasets built through scraping, retrieval, automated filtering, and post-hoc curation often mix target examples with observations drawn from the wrong population, whether as out-of-domain documents in a web corpus [8, 9], false positives in a clinical cohort [10], or interlopers in an astronomical catalog [11, 12]. In each case, the observed sample is not simply the population of interest but a contaminated mixture, and procedures applied naively to that sample risk learning or inferring the wrong distribution.
40th Conference on Neural Information Processing Systems (NeurIPS 2026).
We study distribution matching under mixture contamination [13, 14]. The observed pool follows
where denotes the target distribution and an unknown contaminating distribution. When procedures are applied directly to the observed pool target , discrepancy estimation, parameter recovery, and generative learning can converge to the wrong objective even with very large samples.
Many data analysis pipelines already produce partial information about sample membership [15–19]. Automated systems assign classifier scores, retrieval scores, or heuristic quality flags to every example, and a smaller subset can often be audited through expert review or higher-fidelity measurement. This yields a common regime of abundant noisy supervision and sparse trusted labels. Existing practice often takes one of two unsatisfactory routes. Either most of the data is discarded, and only the audited subset is used, or the full contaminated pool is used, and bias toward the mixture accepted. For instance, see signal-to-noise cuts in spectroscopic surveys [20], quality-control pipelines in genomics [21, 22], and threshold-based event selection in high-energy physics [23]. Neither route utilizes the full potential of available information.
This gap is especially visible in distribution-based learning and inference applications. Kernel discrepancies and related distribution-matching objectives are used to compare samples [24, 25], fit implicit models [26], estimate parameters [27], and train generative models [28, 29]. Under contamination, naive objectives absorb the contaminant component and push the analysis toward the wrong population. Our experiments (Section 4) demonstrate this behavior: contamination biases discrepancy estimation, distorts regression-style parameter recovery, and degrades generative modeling when standard objectives are optimized on the contaminated pool.
We fill this gap by constructing a contamination-corrected distributional objective that combines proxy membership scores for all observations with a design-based residual correction from a small audited subset. In the kernel setting studied here, this construction recovers the oracle kernel sums in expectation under the audit design, does not require calibrated proxy scores, and supports learning objectives for inferential, predictive, and generative models. These results show that large contaminated datasets can still support valid inference and faithful generation when the learning objective targets the latent clean component rather than the observed mixture.
Problem Setup. Suppose Hüber's contamination setup [14, 30]. See Appendix for illustrative, real-world examples. Let denote the observation space and let be a bounded positive definite kernel. We observe two samples: a clean reference sample
and a pooled sample
where is the target distribution of interest and is an unknown nuisance distribution. The pooled sample mixes valid target points with contaminants. To formalize this, each pooled point has an unobserved membership indicator , where means that is genuinely drawn from target , and means that it comes from distribution . We do not observe directly for most points. Instead, we observe a proxy score (e.g., confidence score of a classifier), intended to approximate ; the special case corresponds to hard classification. We make no calibration assumption on . In particular, we do not assume . Such posterior calibration is difficult to guarantee in practice [31–33]. The true conditional law of given is unknown, proxy scores are typically produced by learned models fitted to finite, possibly shifted data, and empirical diagnostics can only assess calibration approximately on limited labeled samples. In high-dimensional settings, verifying exact conditional calibration is generally infeasible. Our setup, therefore, treats only as an imperfect proxy, not as a trusted posterior probability.
To correct this proxy, we assume access to a small audited subset , with , for which the true labels are observed without error. We model as a simple random sample without replacement from the pooled indices, so that and , . Throughout this section, expectations are taken with respect to the random draw of , conditional on the realized pooled sample and proxy scores. On labeled points, we define the residual . The quantity measures the local error of the proxy score on audited examples and will be used to debias estimators constructed from .
In this work, we treat the noisy proxy labels or scores , the audited labels , and the analysis sample as fixed outputs of an upstream data collection and processing pipeline. The downstream analyst may lack the access, authority, labels, computational resources, or time required to retrain or redesign that pipeline. Our goal is therefore to enable statistically valid downstream learning and inference from these fixed outputs when only a limited audited subset is available. Appendix I discusses this setup further.
Target Quantity and Oracle Estimator. Our goal is to estimate the squared MMD between the clean reference distribution p and the target distribution q,
where and are independent.
If the true membership indicators were observed for the pooled sample , we could estimate the q-terms by restricting to the latent target points, equivalently by weighting each by . Using ordered pairs with diagonals excluded, define
(4)
The corresponding oracle estimator is
This is the oracle estimator we aim to estimate. Specifically, our aim is to recover it, in expectation over the audit design, using only the proxy scores and the audited subset L.
Contamination-Corrected MMD Estimator. We treat as a noisy proxy for the unobserved indicator and use the audited subset to correct its error. Let
denote the observed residual on audited points. Automatically, we get algebraic decompositions
We estimate the residual terms by Horvitz–Thompson reweighting under the simple-random-sampling design for L [34]. For the qq term, define
(7)
For the term, define
Let and be defined by replacing with 1 throughout. See Equation (22) in Supplementary Materials. The component is fully observed and requires no correction. We then define the contamination-corrected estimator by plugging these corrected sums into the oracle ratio form:
By construction, the correction leaves the directly observed term unchanged and adjusts the and terms using the audited residuals. See Algorithm 1 in Supplementary Materials.
Design-based guarantees. We show that, under the simple random labeling design, the corrected unnormalized kernel sums are unbiased for their oracle counterparts. This design-based recovery is analogous to the unbiased recovery of pair counts in prediction-powered inference [35] and related Horvitz–Thompson corrections for spatial and point-process U-statistics [36].
Theorem 2.1. Let and be finite. Under Assumption A.4, conditioned on the realized reference sample , we have , , , and .
Theorem 2.1 states that the corrected unnormalized kernel sums match the oracle kernel sums in expectation over the labeled subset, with no assumptions on the quality of . Ratios of unbiased estimators are generally biased; hence, the ratio estimator Equation (9) is not necessarily unbiased. The estimator requires kernel sums over , , and interactions, with additional terms restricted to . These sums can be computed exactly (via kernel matrices) or approximately (via mini-batching or random feature maps), without changing the algebra of the correction.
3 Asymptotic and Finite Sample Guarantees
We now relate the CC-MMD estimator to both the oracle finite-sample estimator and the population target . The analysis has two layers. First, we show that the audit correction is design-unbiased for the oracle kernel sums, conditional on the realized pooled sample. Second, we show that the oracle estimator itself is consistent for, and asymptotically normal around, the population quantity . A key takeaway is that no structural assumptions on the contaminant distribution are needed when the kernel is bounded .
These results rely on two distinct notions of unbiasedness. The first is design-unbiasedness: conditional on the realized finite population . This justifies CC-MMD as an unbiased recovery of the oracle estimator under the labeling design. The second is statistical unbiasedness: under the mixture-with-indicator model, the oracle estimator targets the population discrepancy . The first statement is finite-population and design-based; the second links the finite-sample oracle to the underlying population parameter. We formalize these two steps next.
Theorem 2.1 shows that the corrected kernel sums are design-unbiased for their oracle counterparts. This is the key first step, but it does not by itself imply that the ratio-form CC-MMD estimator is unbiased. To control the estimator's bias, we use a deterministic ratio expansion. This isolates the leading contribution of numerator and denominator errors and shows that the discrepancy between CC-MMD and the oracle estimator is controlled.
Lemma 3.1 (Ratio linearization). Let , and let be random variables such that almost surely. Then
In this case, boundedness alone controls the relevant kernel terms under the mixture . When k is unbounded, the required regularity enters only through moment conditions under the mixture distribution.
where
and therefore
We note that each nontrivial component of CC-MMD, and , is a ratio estimator. Lemma 3.1 shows that once the corrected sums and denominators concentrate around their oracle counterparts, the induced ratio error is second-order up to the explicit remainder term. In particular, combined with Theorem 2.1, it reduces the analysis of CC-MMD to controlling the finite-population fluctuations of the corrected sums and guarantees that the oracle denominators remain nondegenerate.
Design-based Asymptotic Normality and CLT. The following result complements Theorem 2.1. Design-unbiasedness shows that the correction recovers the oracle sums in expectation, while the central limit theorem below quantifies the scale of the remaining design fluctuation. With Lemma 3.1, it implies that the discrepancy between CC-MMD and the oracle ratio estimator is asymptotically Gaussian at the scale, provided the denominators remain nondegenerate.
Theorem 3.2 (CLT). Under Assumptions A.1–A.8, conditionally on the realized samples,
for some finite covariance matrix . If Assumption A.9 also holds, the difference between and the oracle estimator is asymptotically Gaussian at rate .
The theorem shows that, with a proportional audit budget , the audit correction does not introduce a slower asymptotic scale than the underlying empirical MMD fluctuations. A complete discussion, including separate CLTs for the linear pq terms and quadratic qq terms, the decomposition of the sampled-pair correction, and full proofs, is deferred to Appendix C.1. We now transfer the design-based CLT for the corrected kernel sums into a corresponding result for the ratio-form CC-MMD estimator in Equation (9). Specifically, the result below shows that the same behavior carries over to the full ratio estimator, provided the denominators remain nondegenerate.
Recall and . Under the mixture-with-indicator model, the number of genuine target points in the pool is , so that and . Thus, if the pool contains a nonvanishing fraction of genuine -points, both oracle denominators are of the natural orders and , respectively. Assumption A.9 makes this requirement explicit and also ensures that the corrected denominators remain positive with high probability.
Theorem 3.3. Under Assumptions A.1–A.9, condition on the realized samples and . Then, as ,
and moreover
for some finite variance , determined by the joint design-based covariance of
Population Consistency. Theorem 3.3 is purely design-based. Conditional on the realized finite population, it shows that CC-MMD asymptotically reproduces the oracle estimator that would have been computed if the true membership labels were fully observed. The remaining discrepancy is due solely to finite audit noise, which vanishes at the standard rate. To conclude consistency for the population target , it remains to relate the oracle estimator to the population expectations in Equation (3).
Theorem 3.4 (Consistency). Under Assumptions A.1–A.9,
where the probability is over all sources of randomness in the sample generation and audit design.
Theorem 3.4 combines the two parts of the analysis. The design-based results show that auditing corrects the proxy labels well enough to recover the oracle estimator, while the population argument shows that the oracle estimator itself converges to the desired discrepancy between and . In this sense, CC-MMD is consistent even though the target sample is contaminated and the proxy labels may be arbitrarily miscalibrated.
Remark 3.5 (Asymptotic Normality.). The assumptions developed so far are sufficient for consistency, but not by themselves for a full population-level CLT around . To strengthen Theorem 3.4 into asymptotic normality, one would additionally need a limit theorem for the oracle empirical MMD itself (see Corollary 16 in [24]), and then combine that oracle fluctuation with the design-based fluctuation from Theorem 3.3.
Remark 3.6. If but , the correction remains consistent for the oracle quantities, but the design variance is larger because it scales with the smaller audit size. In practice, this means slower convergence and greater sensitivity to audit noise.
Remark 3.7 (Choosing the audit size). The audit size required in practice is governed primarily by the variance of the audit correction, , in Equation (15). It is generally not controlled by the number of contamination mechanisms present in the pool. In this respect, the audit plays a role similar to a validation sample in prediction-powered inference [35]: once it estimates the discrepancy between proxy scores and true labels with sufficient precision, additional audits yield diminishing returns, as observed in our audit-size ablation, Figure 12.
When the contamination structure is unknown, one can begin with a pilot audit, estimate the correction variance, , and then choose so that falls below a target threshold, such as the variance of the audit-only MMD estimator. When contamination structure can be modeled or simulated, the correction and MMD variances can instead be estimated through simulation to guide the audit budget.
4 Experiments
The details of all experiments and additional results are in the Appendix. The code to reproduce our experiments is publicly available at https://github.com/NevenaGligic/CC-MMD.
Experiment 1 – MMD Estimation
Figure 1 evaluates the proposed estimator across increasing contamination levels in a setting where the reference and target distributions coincide, so the population target is . Thus, departures from zero reflect contamination-induced or finite-sample bias. The oracle estimator, which uses the true latent membership indicators, remains centered near zero and serves as the benchmark. In contrast, the naïve estimator increasingly overestimates the discrepancy as grows, reflecting bias from treating the contaminated pool as the target sample. The audit-only estimator is unbiased but has a higher variance due to a smaller sample size. CC-MMD closely follows the oracle throughout the contamination sweep (Theorems 3.3 and 3.4), indicating that the audit-based
residual correction removes most contamination-induced bias while retaining the efficiency benefits of using the full pool.

Figure 1: MMD estimation under increasing contamination. Naïve MMD becomes increasingly biased as grows, whereas CC-MMD tracks the oracle and is less variable than the audit-only estimator.
Experiment 2 – Regression.
Table 1 evaluates parameter recovery in a contaminated linear regression problem over 200 independent realizations. Clustered outliers induce bias in least-squares estimation, pulling the fitted line toward the contaminant clusters and away from the ground truth, so MSE substantially underestimates the slope. Robust regression does not meaningfully mitigate this effect: Huber regression and Tukey's biweight reduce this bias but do not remove it, and remain highly variable across realizations. The uncorrected MMD objective is less sensitive to outliers, consistent with known robustness properties of MMD under Huber contamination [37], but it still targets the contaminated mixture and overestimates the slope. An audit-only baseline avoids contamination entirely but discards most of the sample, at a cost in precision.
In contrast, CC-MMD uses the proxy scores and audited labels to correct the distribution-matching objective, and is both the least biased and the least variable method: its mean intercept and slope are centered on the true values, with the smallest standard deviation of any method on both parameters. Its mean error is about 35% lower than that of audit-only, the strongest baseline, and six to thirteen times lower than MSE, Huber and Tukey. The margin over audit-only is what the corrected objective recovers from the unaudited observations that audit-only discards. This holds even though the proxy is weak (AUROC ), reflecting that the audit correction requires no assumption on proxy quality (Theorem 2.1). These results illustrate the distinction between stability and correction. Bounded-kernel MMD can limit the influence of contamination [37, 38, 26], explaining the relative performance of naïve MMD, but with fixed non-negligible , the contamination-induced estimand shift persists asymptotically and can be relatively large. CC-MMD removes most of this bias while retaining the distribution-matching advantages of MMD. Individual realizations and the full distribution of estimates are shown in Appendix F, Figures 6 and 7.
| Method | Intercept | Slope | error |
|---|---|---|---|
| True | 1.000 | 2.000 | - |
| MSE | 0.621 ± 0.854 | 0.923 ± 0.634 | 1.449 ± 0.573 |
| Huber | 0.859 ± 0.670 | 1.319 ± 0.654 | 0.888 ± 0.756 |
| Tukey | 0.924 ± 0.622 | 1.452 ± 0.725 | 0.733 ± 0.825 |
| Naïve MMD | 0.966 ± 0.231 | 2.146 ± 0.136 | 0.259 ± 0.164 |
| Audit-only | 0.988 ± 0.164 | 1.994 ± 0.106 | 0.169 ± 0.098 |
| CC-MMD | 1.000 ± 0.105 | 2.001 ± 0.072 | 0.110 ± 0.063 |
Table 1: Regression task benchmarking. Mean ± s.d. over 200 independent realizations; best in bold. CC-MMD is centered on the true parameters and has the smallest spread of any method on both, attaining 35% lower error than audit-only, the strongest baseline.

Figure 2: Prediction task benchmarking. Shaded regions denote standard deviation over 20 seeds. Left: Test MSE vs. . CC-MMD is the best-performing method trained on full data for , achieving up to 39% lower MSE than the next-best baseline. Right: Test MMD between predicted and true output distributions vs. . CC-MMD maintains near-zero divergence across all contamination levels, matching the Oracle, while other methods trained on full data diverge monotonically.
Experiment 3 – Prediction (Concrete Compressive Strength).
Figure 2 evaluates CC-MMD in a supervised prediction task on the UCI Concrete Compressive Strength dataset [39]. We construct a natural contamination setting by treating 28-day cured concrete as the target population, , and early-cured concrete ( days) as contaminants, . The curing-age variable is removed from the features, so the contaminating samples are not trivially identifiable. Unlike the synthetic outliers in Experiment 2, these contaminants are not extreme residual outliers: they occupy overlapping feature support but induce a systematic downward shift in the conditional relationship between material composition and compressive strength. This makes the experiment a harder and more realistic test of whether the method can correct distributional contamination rather than merely resist large residuals.
For each contamination level , we train MLP regressors on a contaminated dataset containing 300 samples, fixed, from the target population and the rest from the contaminating population. The performance is tested on a clean held-out test set with 125 samples from . The audit budget is 20% of the contaminated training dataset. All methods use the same architecture and optimizer. Implementation details are provided in Appendix G. We compare the oracle model trained on the true inliers, audit-only training, MSE, Huber, Tukey's biweight, naïve MMD, and CC-MMD.
At , CC-MMD is competitive with the oracle and standard losses, indicating that the correction introduces no meaningful degradation when the pool is clean. As contamination increases, however, the baselines deteriorate sharply. MSE and Huber reach test errors of approximately 0.76 and 0.77 at , respectively, showing that Huber robustness does not help when contaminants have moderate residuals. Tukey's biweight performs even worse at high contamination, reaching approximately 0.95, because the contaminating distribution inflates the residual scale and causes unreliable downweighting. Naïve MMD also fails, reaching approximately 0.98. In contrast, CC-MMD is the best-performing non-oracle method which uses full training data for every . At , it obtains test MSE , a 34% reduction relative to the next-best baseline; at , it obtains , a 25% reduction. The gains are the largest at intermediate contamination levels, where CC-MMD improves over MSE by up to 39%. The right panel of Figure 2 shows the same pattern distributionally: CC-MMD maintains test MMD near the oracle level, while all uncorrected methods which use full training data diverge as contamination increases.
Figure 9 shows that, at , MSE, Huber, Tukey, and naïve MMD underpredict high-strength concrete because early-cured contaminants pull predictions downward. In contrast, CC-MMD tracks the oracle and stays close to the identity line. Figure 10 confirms this pattern: CC-MMD recovers the clean marginal output distribution, while the baselines compress the predicted range. These results show that robustness alone does not correct contamination; CC-MMD uses audit information to adjust the distribution-matching objective and recover clean-target performance.
Experiment 4 – Image Generation.
We evaluate CC-MMD on image generative modeling with contaminated data. The target is clean MNIST [40], and the contaminating distributions are K-MNIST [41] and Omniglot [42]. We construct a contaminated training pool with images and severe contamination, . We audit images (10% of the pool) and evaluate three generator architectures: inverse autoregressive flow (IAF, [43]), variational autoencoders (VAE, [44]), generative moment matching networks (GMMN, [28]). For each architecture, CC-MMD is compared against naïve MMD and the corresponding architecture's standard training objective: sliced Wasserstein distance (SWD, [45]) for IAF; ELBO with MSE and Huber reconstruction for VAE; adversarial training for GMMN (GAN, [46]). All comparisons fix the architecture, initialization, optimizer, and training budget. Implementation details are provided in Appendix H. We evaluate generated samples against 10,000 clean MNIST test images using test MMD and Fréchet Inception Distance (FID). See Figure 3 for the results.
Under contamination, uncorrected baselines optimize distances to the contaminated training pool, thus, learning mixtures that retain substantial contaminant structure. This results in poor generative performance. CC-MMD instead uses audit-informed proxy scores to correct the distribution-matching loss toward the clean MNIST target. Across all three architectures and both contamination settings, CC-MMD achieves substantially lower test MMD than all baselines. FID improvements are consistent for IAF and under Omniglot contamination, where baselines degrade most severely. For VAE and GMMN under K-MNIST contamination, ELBO-based reconstruction and adversarial training achieve competitive FID despite higher test MMD, suggesting these objectives partially capture perceptual quality while still fitting the contaminated distribution. The main result is that, regardless of the architecture, the CC-MMD loss improves performance under severely contaminated data conditions.
The contamination-rate ablation varies from 0 to 0.8 while fixing , , proxy AUROC , and run 20 random realizations with IAF (Figure 4). Naïve MMD and SWD degrade rapidly as contamination increases. At , naïve MMD reaches test MMD, more than two orders of magnitude above the oracle baseline of 0.00055. CC-MMD is robust to this degradation. It obtains test MMD at and 0.00371 at , giving and reductions relative to naïve MMD. Audit-only training performs competitively at very high

Figure 3: Generative modeling on MNIST. Comparison of test MMD (top) and FID (bottom) at , for K-MNIST (left) and Omniglot (right) contaminants, across three architectures and respective baselines. Each method run on 5 seeds with error bars showing std.
contamination because it discards the contaminated pool, but CC–MMD outperforms audit-only for on test MMD by using non-audited clean samples through the corrected full-pool objective.
The proxy-quality and audit-size ablations show that CC–MMD benefits from a larger audit sample but does not require a near-perfect proxy to improve over contaminated distribution matching. As proxy AUROC increases, performance weakly improves, consistent with the interpretation that proxy quality mainly affects finite-sample efficiency and optimization rather than the validity of the correction itself (Figure 11). Increasing the audit budget significantly improves performance by producing stronger proxy scores and more stable clean-audit kernel estimates (Figure 12), as anticipated by Theorem 3.2. The gains are largest when moving from very small to moderate audit sizes, after which returns diminish. Even with a small audit set, CC–MMD meaningfully outperforms naïve MMD trained on the full contaminated pool, indicating that limited but informative audit supervision is enough to correct much of the contamination-induced bias.


Figure 4: Generative quality vs. contamination rate on MNIST. Test MMD in log scale (left) and FID (right) against the clean MNIST test set. CC-MMD uses a proxy with AUROC 0.70 and audited m/N = 10% of the training pool. Shaded bands show standard deviation over 20 random seeds.
5 Discussion
Our results show that CC–MMD addresses a central failure mode in learning from contaminated data [14, 47]: standard losses can remain stable and well optimized while still targeting the wrong distribution. MMD, SWD, MSE, and robust pointwise losses treat the contaminated pool as the target sample, so they often learn the mixture rather than the clean distribution. Robust losses such as Huber can reduce the influence of large residuals, and existing MMD robustness results explain why MMD may behave more stably than likelihood- or squared-error-based alternatives under contamination [26, 48, 49, 37, 50, 38]. However, robust losses typically control, bound, or downweight contamination; but they do not determine the target distribution. As a result, when contaminants lie within the support of the target data, a fixed contamination level can still induce nonvanishing asymptotic biases. This matters when contaminants are not residual outliers, as in the concrete prediction experiment, where off-target samples shift the conditional relationship within overlapping feature support. In contrast, CC-MMD is robust by design. It uses audit information to reweight the contaminated pool and correct the distribution-matching objective itself, shifting the estimand toward the clean target discrepancy rather than the mixture discrepancy. Thus, our contribution is not another bounded-influence guarantee, but a design-based correction that removes contamination-induced bias from the MMD estimand.
Limitations and Open Challenges. CC-MMD has not been systematically evaluated in high-dimensional settings, and how the required audit sample size should scale with dimension remains an open question. CC-MMD is most effective when the contaminated pool still contains enough clean samples and the audit set provides sufficient signal to guide reweighting. In this regime, it combines the efficiency of full-pool training with the bias reduction of audit supervision, explaining why it can outperform both naïve full-pool and audit-only training. At very high contamination, or when audits are too small, biased, or unavailable, performance may degrade because the unaudited pool contributes fewer clean samples and correction variance increases (e.g., Figure 2). Additionally, poor proxies increase variance and can make optimization more challenging, particularly at high contamination levels. Understanding the trade-offs among audit size, proxy accuracy, and estimator variance remains an avenue of further investigation.
CC-MMD inherits the computational and modeling considerations of MMD. Exact computation is dominated by pairwise kernel evaluations and therefore requires time. The additional correction terms involve the audited subset, with , and do not change the leading-order complexity. As with standard MMD, this quadratic cost may become a bottleneck for very large datasets. However, existing scalable approximations (e.g., random Fourier features [51], Nyström methods [52], block estimators [53], and linear-time MMD estimators [24]) can be adapted to CC-MMD with minimal modification because the correction is expressed through the same empirical kernel sums. Performance depends on the choice of kernel and bandwidth, and there is no guarantee that a single kernel configuration is optimal for both the full-pool and audit-correction components. Systematic kernel selection and bandwidth tuning remain open challenges. While we demonstrate strong empirical performance across inference, prediction, and generative modeling tasks, the current study focuses on settings with a single contaminating distribution and relatively simple proxy models. Real-world data may involve multiple sources of contamination, structured or adversarial shifts, and more complex dependence between features and membership. Extending or evaluating CC-MMD for these richer contamination regimes and integrating it with domain-specific models or representations presents an important avenue for future development.
Acknowledgments and Disclosure of Funding
The authors acknowledge support from the National Science Foundation under Cooperative Agreement No. 2421782 and from the Simons Foundation under Award No. MPS-AI-00010515, through the NSF–Simons AI Institute for Cosmic Origins (CosmicAI, https://cosmicai.org/). Additionally, the authors acknowledge the Texas Advanced Computing Center (TACC, http://www.tacc.utexas.edu) at The University of Texas at Austin for providing computational resources that have contributed to the research results reported within this paper.
References
[1] Michael Hofreiter, David Serre, Hendrik N Poinar, Melanie Kuch, and Svante Pääbo. ancient dna. Nature Reviews Genetics, 2(5):353–359, 2001.
[2] Morten E Allentoft. Recovering samples for ancient dna research—guidelines for the field archaeologist. Antiquity, 87:338, 2013.
[3] Nobel Prize Outreach. Discoveries concerning the genomes of extinct hominins and human evolution. https://www.nobelprize.org/prizes/medicine/2022/advanced-information/, 2026. Retrieved April 25, 2026.
[4] Fernando Racimo, Gabriel Renaud, and Montgomery Slatkin. Joint estimation of contamination, error and demography for nuclear dna from ancient humans. PLoS genetics, 12(4):e1005972, 2016.
[5] Stéphane Peyrégne and Benjamin M Peter. Authentict: a model of ancient dna damage to estimate the proportion of present-day dna contamination. Genome biology, 21(1):246, 2020.
[6] Ludovic Orlando, Robin Allaby, Pontus Skoglund, Clio Der Sarkissian, Philipp W Stockhammer, María C Ávila-Arcos, Qiaomei Fu, Johannes Krause, Eske Willerslev, Anne C Stone, et al. Ancient dna analysis. Nature reviews methods primers, 1(1):14, 2021.
[7] Antonio Garrido Marques, Simone Rubinacci, Anna-Sapfo Malaspinas, Olivier Delaneau, and Bárbara Sousa da Mota. Assessing the impact of post-mortem damage and contamination on imputation performance in ancient dna. Scientific reports, 14(1):6227, 2024.
[8] Jesse Dodge, Maarten Sap, Ana Marasović, William Agnew, Gabriel Ilharco, Dirk Groeneveld, Margaret Mitchell, and Matt Gardner. Documenting large webtext corpora: A case study on the colossal clean crawled corpus. In Proceedings of the 2021 conference on empirical methods in natural language processing, pages 1286–1305, 2021.
[9] Julia Kreutzer, Isaac Caswell, Lisa Wang, Ahsan Wahab, Daan Van Esch, Nasanbayar Ulzii-Orshikh, Allahsera Tapo, Nishant Subramani, Artem Sokolov, Claytone Sikasote, et al. Quality at a glance: An audit of web-crawled multilingual datasets. Transactions of the Association for Computational Linguistics, 10:50–72, 2022.
[10] Gowtham A Rao, Azza Shoaibi, Rupa Makadia, Jill Hardin, Joel Swerdel, James Weaver, Erica A Voss, Mitchell M Conover, Stephen Fortin, Anthony G Sena, et al. Cohortdiagnostics: phenotype evaluation across a network of observational data sources using population-level characterization. Plos one, 20(1):e0310634, 2025.
[11] Arya Farahi, August E Evrard, Eduardo Rozo, Eli S Rykoff, and Risa H Wechsler. Galaxy cluster mass estimation from stacked spectroscopic analysis. Monthly Notices of the Royal Astronomical Society, 460(4):3900–3912, 2016.
[12] Anthony R Pullen, Christopher M Hirata, Olivier Doré, and Alvise Raccanelli. Interloper bias in future large-scale structure surveys. Publications of the Astronomical Society of Japan, 68(1):12, 2016.
[13] Peter J Huber. A robust version of the probability ratio test. The Annals of Mathematical Statistics, pages 1753–1758, 1965.
[14] Peter J Huber. Robust estimation of a location parameter. In Breakthroughs in statistics: Methodology and distribution, pages 492–518. Springer, 1992.
[15] Alexander Ratner, Stephen H Bach, Henry Ehrenberg, Jason Fries, Sen Wu, and Christopher Ré. Snorkel: Rapid training data creation with weak supervision. In Proceedings of the VLDB endowment. International conference on very large data bases, volume 11, page 269, 2017.
[16] Juan M Banda, Martin Seneviratne, Tina Hernandez-Boussard, and Nigam H Shah. Advances in electronic phenotyping: from rule-based definitions to machine learning models. Annual review of biomedical data science, 1(1):53–68, 2018.
[17] Dustin Davis, Karl Gebhardt, Erin Mentuch Cooper, Robin Ciardullo, Maximilian Fabricius, Daniel J Farrow, John J Feldmeier, Steven L Finkelstein, Eric Gawiser, Caryl Gronwall, et al. The hetdex survey emission-line exploration and source classification. The Astrophysical Journal, 946(2):86, 2023.
[18] Tzu-Heng Huang, Catherine Cao, Vaishnavi Bhargava, and Frederic Sala. The alchemist: Automated labeling 500x cheaper than llm data annotators. Advances in Neural Information Processing Systems, 37:62648–62672, 2024.
[19] Xinru Wang, Hannah Kim, Sajjadur Rahman, Kushan Mitra, and Zhengjie Miao. Human-llm collaborative annotation through effective verification of llm labels. In Proceedings of the 2024 CHI conference on human factors in computing systems, pages 1–21, 2024.
[20] Shiro Mukae, Erin Mentuch Cooper, Karl Gebhardt, Dustin Davis, Lindsay R House, Mahdi Qezlou, Julian B Muñoz, Shun Saito, Daniel J Farrow, Caryl Gronwall, et al. Enhancing ly emitter identification in hetdex with a convolutional neural network. The Astronomical Journal, 171(5):318, 2026.
[21] William Hemstrom, Jared A Grummer, Gordon Luikart, and Mark R Christie. Next-generation data filtering in the genomics era. Nature Reviews Genetics, 25(11):750–767, 2024.
[22] Julia M Sealock, Franjo Ivankovic, Calwing Liao, Siwei Chen, Claire Churchhouse, Konrad J Karczewski, Daniel P Howrigan, and Benjamin M Neale. Tutorial: guidelines for quality filtering of whole-exome and whole-genome sequencing data for population-scale association analyses. Nature Protocols, 20(9):2372–2382, 2025.
[23] Mike Hance and Juan Robles. Learning selection cuts with gradients. arXiv preprint arXiv:2502.08615, 2025.
[24] Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Schölkopf, and Alexander Smola. A kernel two-sample test. The journal of machine learning research, 13(1):723–773, 2012.
[25] Arthur Gretton, Karsten Borgwardt, Malte Rasch, Bernhard Schölkopf, and Alex Smola. A kernel method for the two-sample-problem. Advances in neural information processing systems, 19, 2006.
[26] Francois-Xavier Briol, Alessandro Barp, Andrew B Duncan, and Mark Girolami. Statistical inference for generative models with maximum mean discrepancy. arXiv preprint arXiv:1906.05944, 2019.
[27] Ayush Bharti, Masha Naslidnyk, Oscar Key, Samuel Kaski, and François-Xavier Briol. Optimally-weighted estimators of the maximum mean discrepancy for likelihood-free inference. In International Conference on Machine Learning, pages 2289–2312. PMLR, 2023.
[28] Yujia Li, Kevin Swersky, and Rich Zemel. Generative moment matching networks. In International conference on machine learning, pages 1718–1727. PMLR, 2015.
[29] Chun-Liang Li, Wei-Cheng Chang, Yu Cheng, Yiming Yang, and Barnabás Póczos. Mmd gan: Towards deeper understanding of moment matching network. Advances in neural information processing systems, 30, 2017.
[30] Mengjie Chen, Chao Gao, and Zhao Ren. A general decision theory for huber's -contamination model. Electronic Journal of Statistics, 10:3752–3774, 2016.
[31] Ursula Hébert-Johnson, Michael Kim, Omer Reingold, and Guy Rothblum. Multicalibration: Calibration for the (computationally-identifiable) masses. In International Conference on Machine Learning, pages 1939–1948. PMLR, 2018.
[32] Ritwik Vashistha and Arya Farahi. I-trustworthy models. a framework for trustworthiness evaluation of probabilistic classifiers. In International Conference on Artificial Intelligence and Statistics, pages 4726–4734. PMLR, 2025.
[33] Natalie Collina, Jiuyao Lu, Georgy Noarov, and Aaron Roth. Optimal lower bounds for online multicalibration. arXiv preprint arXiv:2601.05245, 2026.
[34] Daniel G Horvitz and Donovan J Thompson. A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47(260):663–685, 1952.
[35] Anastasios N Angelopoulos, Stephen Bates, Clara Fannjiang, Michael I Jordan, and Tijana Zrnic. Prediction-powered inference. Science, 382(6671):669–674, 2023.
[36] Arya Farahi. Two-point correlation function estimation with contaminated data. Phys. Rev. D, 113:123522, Jun 2026.
[37] Badr-Eddine Chérief-Abdellatif and Pierre Alquier. Finite sample properties of parametric mmd estimation: robustness to misspecification and dependence. Bernoulli, 28(1):181–213, 2022.
[38] Pierre Alquier and Mathieu Gerber. Universal robust regression via maximum mean discrepancy. Biometrika, 111(1):71–92, 2024.
[39] I-C Yeh. Modeling of strength of high-performance concrete using artificial neural networks. Cement and Concrete research, 28(12):1797–1808, 1998.
[40] Li Deng. The mnist database of handwritten digit images for machine learning research [best of the web]. IEEE signal processing magazine, 29(6):141–142, 2012.
[41] Tarin Clanuwat, Mikel Bober-Irizar, Asanobu Kitamoto, Alex Lamb, Kazuaki Yamamoto, and David Ha. Deep learning for classical japanese literature. arXiv preprint arXiv:1812.01718, 2018.
[42] Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015.
[43] Durk P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. Advances in Neural Information Processing Systems, 29, 2016.
[44] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
[45] Julien Rabin, Gabriel Peyré, Julie Delon, and Marc Bernot. Wasserstein barycenter and its application to texture mixing. In Proceedings of the Third International Conference on Scale Space and Variational Methods in Computer Vision, pages 435–446, 2011.
[46] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. Communications of the ACM, 63(11):139–144, 2020.
[47] Frank R Hampel. The influence curve and its role in robust estimation. Journal of the american statistical association, 69(346):383–393, 1974.
[48] Badr-Eddine Chérief-Abdellatif and Pierre Alquier. Mmd-bayes: Robust bayesian estimation via maximum mean discrepancy. In Symposium on Advances in Approximate Bayesian Inference, pages 1–21. PMLR, 2020.
[49] Alessandro Barp, Francois-Xavier Briol, Andrew Duncan, Mark Girolami, and Lester Mackey. Minimum stein discrepancy estimators. Advances in Neural Information Processing Systems, 32, 2019.
[50] Charita Dellaporta, Jeremias Knoblauch, Theodoros Damoulas, and François-Xavier Briol. Robust bayesian inference for simulator-based models via the mmd posterior bootstrap. In International Conference on Artificial Intelligence and Statistics, pages 943–970. PMLR, 2022.
[51] Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. Advances in neural information processing systems, 20, 2007.
[52] Christopher Williams and Matthias Seeger. Using the nystrom method to speed up kernel machines. Advances in neural information processing systems, 13, 2000.
[53] Wojciech Zaremba, Arthur Gretton, and Matthew Blaschko. B-test: A non-parametric, low variance kernel two-sample test. Advances in neural information processing systems, 26, 2013.
[54] Krikamol Muandet, Kenji Fukumizu, Bharath Sriperumbudur, and Bernhard Schölkopf. Kernel mean embedding of distributions: A review and beyond. Foundations and Trends® in Machine Learning, 10(1-2):1–141, 2017.
[55] Kacper Chwialkowski, Dino Sejdinovic, and Arthur Gretton. A wild bootstrap for degenerate kernel tests. Advances in neural information processing systems, 27, 2014.
[56] Antonin Schrab, Ilmun Kim, Mélisande Albert, Béatrice Laurent, Benjamin Guedj, and Arthur Gretton. Mmd aggregated two-sample test. Journal of Machine Learning Research, 24(194):1–81, 2023.
[57] Arthur Gretton, Alex Smola, Jiayuan Huang, Marcel Schmittfull, Karsten Borgwardt, Bernhard Schölkopf, et al. Covariate shift by kernel mean matching. Dataset shift in machine learning, 3(4):5, 2009.
[58] Mijung Park, Wittawat Jitkrittum, and Dino Sejdinovic. K2-abc: Approximate bayesian computation with kernel embeddings. In Artificial intelligence and statistics, pages 398–407. PMLR, 2016.
[59] Matthieu Lerasle, Zoltán Szabó, Timothée Mathieu, and Guillaume Lecué. Monk outlier-robust mean embedding estimation by median-of-means. In International conference on machine learning, pages 3782–3793. PMLR, 2019.
[60] Robert A Vandermeulen and Clayton D Scott. Robust kernel density estimation by scaling and projection in hilbert space. Advances in Neural Information Processing Systems, 27, 2014.
[61] Marthinus C Du Plessis, Gang Niu, and Masashi Sugiyama. Analysis of learning from positive and unlabeled data. Advances in neural information processing systems, 27, 2014.
[62] Marthinus Du Plessis, Gang Niu, and Masashi Sugiyama. Convex formulation for learning from positive and unlabeled data. In International conference on machine learning, pages 1386–1394. PMLR, 2015.
[63] Jessa Bekker and Jesse Davis. Learning from positive and unlabeled data: A survey. Machine learning, 109(4):719–760, 2020.
[64] Yunrui Zhao, Qianqian Xu, Yangbangyan Jiang, Peisong Wen, and Qingming Huang. Dist-pu: Positive-unlabeled learning from a label distribution perspective. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 14461–14470, 2022.
[65] Clayton Scott. A rate of convergence for mixture proportion estimation, with application to learning from noisy labels. In Artificial Intelligence and Statistics, pages 838–846. PMLR, 2015.
[66] Harish Ramaswamy, Clayton Scott, and Ambuj Tewari. Mixture proportion estimation via kernel embeddings of distributions. In International conference on machine learning, pages 2052–2060. PMLR, 2016.
[67] Charles Elkan and Keith Noto. Learning classifiers from only positive and unlabeled data. In Proceedings of the 14th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 213–220, 2008.
[68] William Gemmell Cochran. Sampling techniques. john wiley & sons, 1977.
[69] Claes M Cassel, Carl E Särndal, and Jan H Wretman. Some results on generalized difference estimation and generalized regression estimation for finite populations. Biometrika, 63(3):615–620, 1976.
[70] Jean-Claude Deville and Carl-Erik Särndal. Calibration estimators in survey sampling. Journal of the American Statistical Association, 87(418):376–382, 1992.
[71] Carl-Erik Särndal, Bengt Swensson, and Jan Wretman. Model assisted survey sampling. Springer Science & Business Media, 2003.
[72] Jyotishka Datta and Nicholas G Polson. Prediction-powered inference with inverse probability weighting. arXiv preprint arXiv:2508.10149, 2025.
[73] Yilin Song, Dan M Kluger, Harsh Parikh, and Tian Gu. Demystifying prediction powered inference. arXiv preprint arXiv:2601.20819, 2026.
[74] Ross Fadely, David W Hogg, and Beth Willman. Star–galaxy classification in multi-band optical imaging. The Astrophysical Journal, 760(1):15, 2012.
[75] Wayne A Fuller. Sampling statistics. John Wiley & Sons, 2011.
[76] Aad W Van der Vaart. Asymptotic statistics, volume 3. Cambridge University Press, 2000.
[77] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015.
Related Work
Our setting (a contaminated target pool, a noisy membership score available for all pooled points, and an audited uniformly random labeled subset) touches three mature literatures: (i) kernel mean embeddings and MMD-based two-sample methodology, (ii) contamination/mixture and weak-supervision paradigms with latent membership, and (iii) design-based estimation with auxiliary information, including recent prediction-powered (“predict-then-correct”) inference.
Kernel mean embeddings, MMD, and two-sample testing. Kernel mean embeddings map probability measures into an RKHS, enabling comparison of distributions via distances between embeddings [54]. Maximum mean discrepancy (MMD) is the induced integral probability metric obtained by taking the supremum over the unit ball of the RKHS; empirical MMD estimators are typically U-statistics (unbiased) or V-statistics (biased but simpler) built from pairwise kernel evaluations [25, 24]. A substantial body of work develops calibration and power analyses for MMD two-sample tests, including asymptotic null theory for degenerate U-statistics and practical resampling methods. In particular, wild bootstrap procedures provide consistent calibration for degenerate kernel tests in settings where naïve permutation can fail (e.g., dependence) [55], and aggregated/ensemble constructions improve adaptivity and empirical power across kernel choices [56]. Most of this literature assumes direct access to i.i.d. samples from each distribution; our goal is instead to target the latent clean component when the observed target pool is a mixture.
MMD as a learning objective and distribution alignment. Beyond testing, MMD is widely used as a discrepancy to learn representations or generative models by matching distributions in feature space. In domain adaptation, MMD penalties are used to align source and target feature distributions. Under covariate shift and related dataset-shift settings, kernel mean matching (KMM) uses RKHS moment matching to construct importance weights [57]. In generative modeling, MMD objectives provide a tractable alternative to likelihoods and adversarial training; for example, generative moment matching networks minimize empirical MMD between generated and observed samples [28, 29]. More recently, MMD and related kernel discrepancies have been developed as tools for parameter estimation and likelihood-free (simulation-based) inference. In particular, kernel-based minimum-distance objectives yield consistent estimators under weak assumptions and provide a principled way to fit implicit models by matching distributions in RKHS [26]. Complementary work in simulation-based inference uses MMD as a discrepancy between observed and simulated samples (for example, kernel-embedding ABC methods such as K2-ABC and robust simulator-based Bayesian procedures based on the MMD posterior bootstrap) and further develops MMD estimators tailored to simulator-based objectives, including optimally weighted constructions that improve efficiency and sample complexity [58, 50, 27]. Collectively, this literature establishes MMD as a practical objective for estimation and inference, motivating the question of whether such objectives can be made to target a clean component when the observed sample is contaminated.
Robustness and contamination in kernel methods. A parallel literature studies the robustness of kernel mean embeddings and MMD-type quantities under outliers or Hüber/adversarial contamination. Median-of-means and related robust-mean principles have been adapted to kernel mean embedding estimation and MMD, yielding estimators with high resistance to outliers and sub-Gaussian deviation bounds under mild conditions [59]. In parametric and regression contexts, minimum-distance estimators based on MMD have been developed as “universal” estimators that can be robust to misspecification and contamination when bounded kernels are used [37, 38]. Related robust constructions in RKHSs appear in nonparametric density estimation as well [60]. These works typically pursue robustness by modifying the estimator or objective (e.g., robustification of the embedding or the empirical risk). Our focus is complementary: while similar to robustness literature, we do not attempt to model contamination; we aim to debias toward a latent clean component using an audit set, rather than to robustify against arbitrary outliers in the observed sample.
Mixtures, latent membership, and weak supervision (PU, label noise). Modeling a contaminated pool as a mixture connects to mixture proportion estimation (MPE) and to positive-unlabeled (PU) learning [61–64], where one observes samples from a component and from a mixture and seeks to recover properties of the latent component. Rates and identifiability conditions for MPE have been studied extensively [65], and kernel mean embeddings have been used to design practical MPE procedures with convergence guarantees [66]. In PU learning, classical methods exploit assumptions on the labeling mechanism to learn classifiers from positives and unlabeled data [67]. This literature motivates our latent-indicator formulation and clarifies what can and cannot be identified from mixtures alone. When a credible parametric model for the contamination process is available, likelihood-based mixture modeling — for instance via EM with latent membership indicators — offers an alternative route to the same latent component. That approach requires specifying the number and form of the mixture components and assuming their identifiability [65, 66], whereas our guarantees require no assumptions on beyond kernel regularity, and may itself be a heterogeneous mixture of unknown sources. However, unlike MPE/PU work, we assume access to a small gold-standard labeled subset sampled by a known design; this enables exact design-based bias correction of the kernel U-statistics that define MMD.
Design-based estimation with auxiliary information: HT, calibration, and two-phase sampling. Our correction is rooted in finite-population sampling theory. The Horvitz–Thompson (HT) estimator provides design-unbiased estimation of population totals under known inclusion probabilities [34], with simple random sampling without replacement (SRSWOR) as a basic case [68]. When auxiliary information is available for the whole population, model-assisted and calibration/GREG estimators improve efficiency while retaining design-based validity; a common form is “plug-in prediction + design-unbiased residual correction” [69–71]. In our setting, the proxy membership score plays the role of an auxiliary/predictive variable observed for all , while the audited subset provides unbiased estimation of residual totals. A key difference is that MMD involves pairwise (U-statistic) terms, so the correction must address both linear and quadratic components—hence the appearance of both single-unit and ordered-pair HT scalings.
Prediction-powered inference and modern audit-based correction. Recent work in prediction-powered inference (PPI) formalizes the idea of combining a large set of ML predictions with a smaller set of gold labels to obtain valid inference without requiring calibration or correct specification of the predictor [35]. These methods are conceptually close to model-assisted survey sampling but are designed for modern ML pipelines and downstream inferential targets. Extensions explicitly connect PPI rectifiers to HT/Hájek-style estimators under informative or nonuniform labeling and to bootstrap-based procedures under complex sampling [72, 73]. Our estimator can be viewed as an instance of this “predict-then-correct” template for kernel U-statistics: supplies a cheap global plug-in, and the audit set supplies an exactly unbiased design-based correction.
Positioning. Overall, our method synthesizes (i) kernel two-sample testing via MMD and its U-statistic structure [24], (ii) mixture/contamination and weak-supervision formulations with latent membership [65, 66], and (iii) design-based correction with auxiliary predictions via HT/calibration and prediction-powered inference [34, 70, 35]. The distinctive feature of our setting is that the audited sample is drawn under a known probability design (SRSWOR), enabling exact design-unbiased recovery of the oracle kernel sums without assumptions on the nuisance distribution or on the calibration of .
Extended comparison with robustness literature. The proposed estimator is complementary to, rather than a replacement for, the existing robustness literature on MMD and kernel-based inference. Classical robust statistics typically asks whether an estimator remains stable when the data-generating distribution is perturbed by outliers, misspecification, or Huber contamination [14, 47]. Recent MMD-based work follows this tradition by exploiting the boundedness and geometry of kernel mean embeddings: because bounded kernels limit the influence any single observation can have on the empirical embedding, MMD-based minimum-distance estimators can exhibit robustness to misspecification, dependence, Huber contamination, and adversarial outliers [26, 48, 49, 38]. Similar ideas appear in robust Bayesian and simulator-based inference, where the likelihood is replaced or supplemented by an MMD-based discrepancy to reduce sensitivity to model misspecification; for example, MMD-Bayes and the MMD posterior bootstrap use kernel discrepancies to obtain posterior procedures with improved stability relative to likelihood-based alternatives [48, 50]. In these settings, robustness usually means that contamination has a controlled effect on the estimator: the error bound may depend on the contamination fraction , or the estimator may remain close to the best-fitting model under a contaminated or misspecified distribution. This is an important but different notion from the one considered here. Standard MMD robustness can explain why a naive MMD estimator often behaves better than squared-error or likelihood-based methods under outliers, but it does not generally remove the estimand shift from to the contaminated mixture . With fixed , the naive empirical MMD converges to a discrepancy involving , not the desired discrepancy involving the clean target . Thus, the residual bias is not a finite-sample instability but a population-level identification problem. Our contribution addresses this different issue: when partial ground-truth membership labels are available through an audit design, one can correct the contaminated kernel sums so that the resulting estimator targets the same oracle quantity that would have been computed from the latent clean points. In this sense, existing MMD robustness is primarily stability-based: it controls the damage caused by contamination. The present approach is design-based: it uses randomized auditing to debias the contaminated sample and recover the clean-target discrepancy. The two perspectives are therefore compatible. Bounded-kernel MMD provides a stable discrepancy even before correction, while the audit-based correction changes the target from the contaminated distribution back to the scientifically relevant clean distribution.
Illustrative Examples
Example 1: LLM-assisted filtering of political content. Suppose we wish to study the distribution of social media posts related to U.S. politics (e.g., for measuring narrative dynamics or topic drift). A large collection of posts is retrieved using keyword queries and automated filtering. However, this retrieval pipeline is imperfect: some posts truly concern U.S. politics, while others are irrelevant but still appear in the pool. Hence, the pooled sample follows , where denotes genuinely relevant political posts and represents unrelated or weakly related content. Each post has a latent membership indicator , where if the post is genuinely about U.S. politics and otherwise. Manually labeling every post is infeasible, so an LLM is used as a judge to produce a relevance score , interpreted as the model's confidence that the post concerns U.S. politics. Because LLM judgments may be biased, inconsistent, or poorly calibrated, it is infeasible to assume . Instead, a small subset of posts is manually annotated by human reviewers, providing the true indicators for .
Example 2: Galaxy population inference with star contamination. In astronomical surveys, catalogs of galaxies are constructed by automated detection and classification pipelines applied to telescope images. Let denote objects classified as galaxies by the pipeline. In practice, some stars are mistakenly classified as galaxies [74], thereby contaminating the observed catalog and following the mixture , where is the true distribution of galaxies and is the distribution of misclassified objects. For each object , the latent indicator equals 1 if the object is truly a galaxy and 0 otherwise. The pipeline provides a classification score representing the algorithm's confidence that the object is a galaxy. Because classification models are trained on limited labeled data and may suffer from domain shift or instrumental artifacts, these scores are generally not perfectly calibrated posterior probabilities. A small subset of objects is therefore inspected by astronomers using higher-resolution imaging or spectroscopic follow-up, yielding the true labels for those objects.
Example 3: Species-distribution inference with environmental DNA contamination. In ecological surveys, environmental DNA (eDNA) samples are often used to study the distribution of a target species across sites or habitats. Let denote genetic sequences or site-level detections retained by an automated bioinformatic pipeline as candidate evidence for the target species. In practice, some retained detections may arise from contamination, sequencing error, barcode misassignment, or DNA transported from other locations, so the pooled sample follows , where is the distribution of genuine target-species detections and is the distribution of spurious or non-target detections. For each observation , the latent indicator equals 1 if the detection genuinely corresponds to the target species at the sampled site and 0 otherwise. The pipeline provides a confidence or assignment score , reflecting sequence quality, taxonomic match strength, or model-based confidence. Because these scores may be affected by incomplete reference databases,
PCR bias, environmental degradation, or site-specific contamination, they cannot generally be treated as calibrated posterior probabilities. A small subset is therefore validated through expert review, replicate assays, negative controls, or independent field confirmation, yielding exact labels for those observations.
A Assumptions
We separate assumptions used for (i) the design-based correction, which conditions on the realized finite population, from those used to link the oracle estimator to the population MMD.
Assumption A.1 (Kernel regularity). The kernel is bounded:
Remark A.2 (Unbounded kernels). Boundedness is used throughout our proofs. We expect the analysis to extend to unbounded kernels under the moment conditions
which require finite second moments of k under the mixture distribution r, and therefore under both q and z. A full treatment of this case would replace the uniform bounds in the proofs with arguments and is left to future work.
Assumption A.3 (Mixture-with-indicator model). The contaminated pool is generated via latent membership indicators:
independently across . In particular, conditional on , is an unbiased draw from the target distribution .
Assumption A.4 (Simple random labeling). The labeled subset is a simple random sample without replacement of size , independent of .
Assumption A.5 (Asymptotic regime). We consider such that
The case corresponds to vanishing audit rates and leads to slower convergence.
Assumption A.6 (Finite-population variance stability for linear corrections). Conditionally on the realized finite population, the per-unit residual contributions entering the linear pq corrections have stable finite-population variance. Specifically, with
their finite-population variances satisfy
along the asymptotic regime of Assumption A.5. When a nondegenerate Gaussian limit is desired, the limits are assumed strictly positive.
Assumption A.7 (Finite-population variance stability for the qq linear corrections). Conditionally on the realized finite population, the per-unit residual contributions entering the linear part of the qq corrections have stable finite-population variance. Specifically, define the rescaled per-unit contributions
where on the realized finite population. Their finite-population variances satisfy
along the asymptotic regime of Assumption A.5. When a nondegenerate Gaussian limit is desired, the limits are assumed strictly positive.
Assumption A.8 (Gaussian limit for sampled-pair corrections). Conditionally on the realized finite population, the sampled-pair Horvitz–Thompson correction terms entering and , when rescaled by , admit a joint asymptotically Gaussian limit under the simple-random-sampling design. Equivalently, the relevant incomplete U-statistic / sampled-pair averages satisfy a nondegenerate multivariate CLT at the scale. In addition, this convergence holds jointly with the centered linear correction terms entering all four corrected sums, normalized by for the terms and by for the terms, at the scale.
Assumption A.9 (Denominator nondegeneracy). The oracle and corrected denominators remain separated from zero with high probability along the asymptotic regime. In particular, for the events under consideration,
and
with probability tending to one.
Non-degeneracy of denominators. Let denote the (random) number of genuine points in the pool. Then (ordered-pair convention) and . Under A.3 and , almost surely, so denominators scale as and with high probability.
Remark A.10. Assumption A.4 implies
Assumption A.9 is required to guarantee that the ratio expansions used for CC-MMD are well defined.
Remark A.11. When the audit is not a simple random sample, Assumption A.4 can be relaxed to requiring that the inclusion probabilities and pair probabilities are strictly positive and known by design. Then, the corrected sums in Equations (7)–(8) and denominators in Equation (22) remain design-unbiased by replacing the uniform weights and with and . This is the general Horvitz–Thompson construction [34] of which our estimator is the equal-probability case. When some inclusion probabilities are very small, so that their inverses become large, self-normalized Hájek weights can be used. The extension is straightforward when the probabilities are controlled by the study design, and requires additional conditions (adequate overlap, stable weights, sufficiently accurate propensity estimation) when they must be estimated from data. Estimated inclusion probabilities and self-normalized Hájek weights do not generally preserve exact design-unbiasedness. The corresponding development for prediction-powered inference under informative labeling is given by Datta and Polson [72]; a full treatment for kernel U-statistics raises design questions specific to the audit mechanism and is beyond the scope of this work.
Remark A.12 (Computational bookkeeping for ). The latent residual is defined for every pooled unit, but is observed only for , where the true label is observed. In implementations, unaudited entries, , of the stored residual array may be set to zero, , since the estimator accesses residuals only through audit-restricted sums. In population identities and proofs, however, always denotes the latent residual, not the zero-filled computational array. So this is purely a bookkeeping device and has no effect on the estimator's value or its statistical properties.
B Extra Equations
(22)
C Proof of Lemmas, Theorems, Corollaries in the main text
Lemma C.1. Fix any finite population and let be a simple random sample without replacement of size . Then for any real-value function ,
and for any real-value function with ,
Proof. We prove Equation (23); Equation (24) is analogous.
Under simple random sampling without replacement, . Hence
For Equation (24), note that for , , and compute
Proof of Theorem 2.1. We prove the claim for ; the other three follow by identical arguments with or with the linear identity Equation (6).
Fix and define . By Equation (6),
The first term is deterministic given the finite population (it does not depend on ). For the second term in Equation (25), define
Conditionally on the realized finite population, and hence are fixed for every j and do not depend on L. Therefore,
and by Lemma C.1 (single-sum identity Equation (23)),
This is exactly the second term on the right-hand side of Equation (25). The third term is symmetric and follows by the same argument, exchanging roles of j and .
Finally, for the fourth term define
Then, by Lemma C.1 (pair-sum identity Equation (24)),
Combining the expectations of all four pieces shows .
For , apply the linear identity and Lemma C.1 for the single HT correction term. For and set .
C.1 Design-based Asymptotic Normality [proofs]
Proof of Lemma 3.1. Starting from a common denominator,
Add and subtract the first-order terms with denominator B:
and
Substituting these two identities into the previous display yields Equation (10) with remainder Equation (11). The bound Equation (12) follows immediately by the triangle inequality. □
Lemma 3.1 shows that controlling the CC-MMD estimator reduces to controlling the fluctuations of its corrected numerators and denominators. We now study those fluctuations under the audit design, conditional on the realized finite population. The linear terms are standard Horvitz–Thompson corrections for finite-population totals, so classical finite-population central limit theory applies. The quadratic terms are more delicate: in addition to a linear Horvitz–Thompson component, they contain a second-order correction over sampled ordered pairs. We therefore analyze these two cases separately before combining them into a joint limit theorem.
For any finite-population sequence , define
Theorem C.2 (Design-based CLT for the linear pq terms). Under Assumptions A.1, A.4, A.5, and A.6, condition on the realized samples and . Define
Then, as with ,
In particular, both corrected pq sums fluctuate at the scale under the audit design.
Proof of Theorem C.2. From Equation (8),
Since
we obtain
Equivalently, with ,
Thus, is exactly the Horvitz–Thompson error for the finite-population mean under simple random sampling without replacement. Standard sampling theory gives
Under Assumption A.1, and , so
Hence the finite population is uniformly bounded. When and , the first claim follows from the standard finite-population CLT [75, 68] and Assumption A.6:
If or , the same claim follows instead from Chebyshev's inequality, since the centered quantity has variance .
For , Equation (22) gives
where and . The same argument (using the CLT or Chebyshev's inequality, as appropriate), with in place of and , therefore applies, with variance
which yields the second display after multiplying by and using .
Theorem C.2 shows that the linear corrections behave exactly as in classical survey sampling: if the audit fraction vanishes, the correction becomes noisy, whereas a proportional audit budget preserves the usual scale. This is directly relevant for CC-MMD because the pq component is one of the two nontrivial ratio terms, and Lemma 3.1 turns the CLT above into first-order control of the corresponding ratio error.
We next consider the quadratic qq terms. Unlike the pq terms, these contain both a linear Horvitz–Thompson correction and a second-order sampled-pair correction. The latter is the only place where we invoke the additional high-level Gaussian-limit assumption from the appendix.
Theorem C.3 (Design-based asymptotic normality for the qq corrections). Under Assumptions A.1, A.4, A.5, A.7, and A.8, condition on the realized samples and . Then
for finite design-based variances , with possibly degenerate limits when the corresponding asymptotic variances vanish.
Proof. We first treat . Recall
and the identity
the oracle sum expands as
Likewise, by definition of ,
(29)
Subtracting (28) from (29), the proxy-only term cancels, yielding
Define the per-unit contribution
(31) and the ordered-pair contribution
Then
The first term is an ordinary Horvitz–Thompson error for the finite-population total . Define the rescaled per-unit contribution
so that, after dividing by ,
This is the standard centered sample-mean form of a Horvitz–Thompson estimator for the finite-population mean under simple random sampling without replacement.
Under Assumption A.1,
Thus the linear component is uniformly bounded after normalization. Standard sampling theory gives
Assumption A.7 provides .
A finite-population CLT for simple random sampling therefore yields
Multiplying by and rescaling by , since , by Slutsky's Theorem we have:
The second term is a second-order Horvitz–Thompson correction over sampled ordered pairs. Again by Assumption A.1,
Assumption A.8 now implies that this sampled-pair term satisfies a design-based Gaussian limit at the scale:
for some finite .
By the joint version of Assumption A.8, the vector
is asymptotically jointly Gaussian. Since
the continuous mapping theorem implies
where
for the limiting jointly Gaussian components.
The proof for is identical with the kernel replaced by the constant function . Specifically, define
and the rescaled per-unit contribution , so that
Since and ,
Therefore,
Applying the same argument, with from Assumption A.7 and the corresponding rescaled pair-CLT from Assumption A.8, yields
for some finite .
Theorem C.3 shows that the quadratic correction remains asymptotically Gaussian despite the presence of a sampled-pair term. This matters because the qq contribution is the only genuinely second-order component of CC-MMD. Together with Theorem C.2, it shows that every corrected sum entering the estimator fluctuates at a scale proportional to relative to its natural size ( and nN, respectively). This ensures the final ratio estimator achieves the standard convergence rate.
Proof of Theorem 3.2. Theorem C.2 gives asymptotic normality of the linear pq corrections, and Theorem C.3 gives asymptotic normality of the quadratic qq corrections. By Assumption A.8, the centered linear and sampled-pair components entering these four quantities converge jointly to a multivariate Gaussian limit at the scale, after normalization by nN for the pq components and by for the qq components. The displayed vector is obtained from those components by fixed linear combinations. The claim therefore follows from the Cramér–Wold device [76].
Theorem 3.2 is the design-based input needed for asymptotic analysis of CC-MMD itself. Combined with Lemma 3.1, it implies that the discrepancy between CC-MMD and the oracle estimator is asymptotically Gaussian at the scale, provided the oracle and corrected denominators remain nondegenerate. In particular, when the audit fraction satisfies , the correction does not introduce a slower rate than the usual finite-sample fluctuations of empirical MMD.
Proof of Theorem 3.3. Since the pp term is observed exactly in both estimators,
Thus it suffices to control the two ratio differences.
Apply Lemma 3.1 to the qq ratio with
and to the pq ratio with
By Assumption A.3 with , a.s., so the denominators satisfy and , while boundedness of gives and . Under Theorem 3.2,
By Assumption A.9, the oracle denominators are strictly positive and the corrected denominators are bounded away from zero with probability tending to one. Therefore, the coefficients appearing in Lemma 3.1 are well defined and . It follows that each leading linear term is , while the remainder term is
since both and are . Hence
and therefore
This proves Equation (14).
For the asymptotic normality statement, define
By Theorem 3.2,
for some finite covariance matrix . Now define the smooth map
Then
Since and are bounded away from zero on the event guaranteed by Assumption A.9, the map is continuously differentiable in a neighborhood of . Its gradient is
By the law of large numbers for bounded oracle kernel averages, converges almost surely to a limit with positive denominator coordinates. Therefore, by the multivariate delta method,
This is exactly Equation (15), with
Proof of Theorem 3.4. Decompose
We first treat term (I). By Theorem 3.3, conditional on the realized samples,
Since Assumption A.5 implies , it follows that
under the full probability law. Thus (I) 0 in probability.
We next treat term (II). Let
denote the number of genuine -points in the contaminated pool. Under Assumption A.3, the indicators are i.i.d. Bernoulli , so by the strong law of large numbers,
Because , this implies
Hence the oracle denominators are eventually well defined with probability tending to one.
Conditional on the event , the retained points are i.i.d. draws from . Therefore, conditional on , the oracle term is the usual ratio-form U-statistic based on an i.i.d. sample of size from :
Under Assumption A.1, the kernel is bounded, so the law of large numbers for U-statistics yields
Likewise,
which is the standard U-statistic estimator of based on . Again by the law of large numbers for U-statistics under bounded kernels,
For the cross term, conditional on , the oracle ratio can be written as
Equivalently, if denote the retained target points, then
Algorithm 1 Contamination-Corrected MMD with contaminated q-pool
Require: Clean sample ; pooled sample ; labeled set with true ; kernel
Ensure:
1: for ; for
2: ;
3: Compute from Equation (7); compute from Equation (22)
4: Compute from Equation (8); compute from Equation (22)
5: return
Since and are independent, boundedness of implies by the law of large numbers for averages of independent product samples that
Combining the three convergences, we obtain
Thus (II) in probability.
Since both (I) and (II) converge to zero in probability, Slutsky's theorem yields
which proves Equation (16).
The result also clarifies the role of the assumptions. Assumptions A.4, A.6, and A.8 control the audit correction, whereas Assumption A.3 is what turns the retained latent target points into an i.i.d. sample from . Without that link, one could still recover the oracle finite-sample estimator, but there would be no reason for the oracle estimator to target .
D Algorithm
Algorithm 1 computes a contamination-corrected estimate of when the reference sample is clean, but the comparison sample is observed only through a contaminated pool . Each pooled observation has a noisy membership score , while exact target-membership labels are available only on a small labeled subset . The algorithm first forms residual corrections on the labeled subset, treating unlabeled residuals as zero. These residuals are then used in the estimators , and to correct the kernel sums involving the contaminated q-pool. The clean-sample term is computed by the usual unbiased U-statistic. The final estimate combines the clean-clean, corrected pool-pool, and corrected cross-sample terms in the standard MMD decomposition, yielding a design-based contamination-corrected estimator that leverages noisy scores for all pooled observations and exact labels from the audited subset.
E Details of Simulation Experiment 1
This section describes the simulation experiment used to evaluate the contamination-corrected MMD estimator. The goal of the experiment is to study how different estimators behave when one sample is contaminated by an unknown background distribution while only a small subset of observations are audited. In particular, we compare four estimators: (i) the oracle estimator that uses the true latent labels, (ii) the naive estimator that ignores contamination, (iii) an estimator that uses only the audited subset, and (iv) the proposed contamination-corrected estimator (CC–MMD).
E.1 Reference and Target Distributions
All experiments are conducted in . The target distribution is defined as a mixture of five Gaussian clusters arranged on a circle. Let
and define the cluster centers
where the circle radius is R = 5. The target distribution is the equally weighted Gaussian mixture
where and is the identity matrix.
The clean reference distribution is identical to in the simulation. Thus any difference between the samples arises solely from contamination in the pooled sample rather than from a mismatch between and .
For each simulation replicate we draw
with n = 400 reference observations.
E.2 Contamination Model
The pooled sample is drawn from the mixture distribution
where is a nuisance distribution representing background contamination and controls the contamination level.
For each pooled observation , a latent membership indicator
is first generated. If , then is sampled from q; otherwise it is sampled from the nuisance distribution z. The pooled sample size is fixed at
E.3 Background Contamination Distribution
The nuisance distribution z is designed to produce structured contamination rather than uniform noise. Points are first drawn uniformly from the square
These candidate points are then accepted with a probability that depends on their horizontal coordinate. Let x denote the first coordinate of a candidate point. Define the normalized coordinate
The acceptance probability is
This construction induces a spatial gradient in the contamination: background points are more likely to appear on the right side of the domain than on the left. Accepted points form the nuisance distribution z. Rejection sampling is used until the required number of nuisance samples is obtained.
The purpose of this gradient structure is to produce contamination that partially overlaps with the target clusters while remaining statistically distinguishable.
E.4 Weak Proxy Classifier
Each pooled observation is assigned a proxy score
intended to approximate the latent membership indicator . This score represents the output of a weak classifier that attempts to distinguish target points from contaminants using simple geometric features.
Let
denote the radial distance of from the origin. Because the target clusters lie on a circle of radius , points close to this radius are more likely to belong to the target distribution. The classifier therefore uses the radial deviation
In addition, the background contamination distribution exhibits a gradient in the horizontal coordinate. Points with large positive values are therefore more likely to be contaminants. The classifier incorporates this information using the feature
A raw classifier score is computed as
where
is Gaussian noise with standard deviation . The noise term intentionally weakens the classifier so that the proxy scores are imperfect and miscalibrated.
The final proxy score is obtained by passing the raw score through a logistic transformation:
This construction produces scores that correlate with the true membership labels but are not calibrated probabilities. In particular, the proxy scores do not satisfy
and may systematically over- or under-estimate the true membership probability in different regions of the feature space.
E.5 Audited Subset
A small subset of pooled observations is selected for auditing. Let
denote the audited indices. The subset is sampled uniformly without replacement, with audit size
For each , the true membership label is observed without error. For the remaining points, the analyst only observes the proxy score .
E.6 Kernel and MMD Estimation
All MMD estimators use a Gaussian radial basis function kernel
with bandwidth
The following estimators are evaluated in each simulation replicate:
-
Oracle MMD. The oracle estimator uses the true membership indicators to restrict the pooled sample to genuine target observations.
-
Naive contaminated MMD. This estimator ignores contamination and computes MMD between the clean reference sample and the entire pooled sample.
-
Audit-only estimator. This estimator uses only audited points that are labeled as target samples. Because the audit subset is small, this estimator typically has high variance.
-
Contamination-corrected estimator (CC-MMD). This estimator combines the proxy scores with the audited residuals using the Horvitz–Thompson correction described in Section 2.
E.7 Contamination Sweep
To study the effect of contamination, experiments are repeated across a grid of contamination levels .
For each value of , the experiment is repeated multiple times (50) with independent random seeds. The resulting estimates are averaged to evaluate the bias and variability of the different estimators as contamination increases.
The experiment therefore isolates the impact of contamination on MMD estimation while maintaining a controlled setting in which the underlying target distribution remains fixed.
Across the contamination sweep, for seeds where , the weak proxy classifier attains AUROC against the true membership indicators (mean standard deviation over the 50 replicates at each contamination level; AUROC is undefined at , where the pool contains no contaminants). The value is essentially constant in .


Figure 5: Simulation setup for Experiment 1. Left: the clean target distribution , a mixture of five Gaussian clusters on a circle of radius 5. Middle: a contaminated pooled sample at , with clean points in blue and contaminants from in orange. Right: the same pooled sample colored by the weak proxy score of Appendix E.
F Contaminated Linear Regression Experiment
This section describes the synthetic linear regression experiment used to evaluate the behavior of standard, robust, and MMD-based estimators under clustered contamination with partial auditing.
F.1 Data Generating Process
We consider a univariate linear regression model with additive noise. The clean (inlier) data are generated according to
where the covariate is sampled as
In all experiments, the true parameters are fixed to
Contamination model. We observe a pooled dataset of size N = 300 generated from the mixture
where q denotes the clean linear model in Equation (35) and z is a nuisance distribution. The contamination rate is set to
so that 40% of the observations are outliers.
Each observation is associated with a latent indicator
where denotes target population (an inlier) and denotes a contaminated point.
Clustered contamination. The nuisance distribution z is constructed as a mixture of Gaussian clusters in the plane. Specifically, we sample K = 4 cluster centers
uniformly from rectangular domains
Each contaminated observation is then generated by first selecting a cluster index uniformly and sampling
with
This construction produces spatially localized clusters of outliers that do not follow the linear relationship, creating a challenging contamination pattern.
F.2 Proxy Scores and Auditing
For each observation, we construct a proxy score that approximates the latent indicator . The proxy is based on residuals from an initial ordinary least squares (OLS) fit.
Let denote the OLS estimate computed on the full contaminated dataset. Define residuals
We compute a robust scale estimate using the median absolute deviation (MAD),
and define a standardized residual
The proxy score is then constructed as
where denotes the logistic function. This yields a weak, noisy classifier that correlates with inlier status but is not calibrated.
Audit subset. An audited subset is drawn uniformly without replacement with size
For indices , the true labels are observed without error. The audit rate is therefore approximately 13%.
F.3 Estimators
We estimate the regression parameters using five methods:
(i) Ordinary least squares (MSE). The classical estimator minimizes
(ii) Huber regression. This estimator minimizes the Huber loss
with threshold .
(iii) Tukey biweight regression. This method uses Tukey's redescending loss applied to standardized residuals based on a robust scale estimate (MAD). The tuning constant is set to .
(iv) Simple MMD estimator. We adopt a simulation-based approach. For each candidate parameter , we generate a synthetic sample
with
where . The model sample size is
The parameter is estimated by minimizing
computed using a Gaussian kernel.
(v) Contamination-corrected MMD (CC-MMD). This method replaces the naive MMD objective with the contamination-corrected estimator described in Section 2. It combines:
-
proxy scores ,
-
audited residuals ,
to construct a Horvitz–Thompson correction of the kernel U-statistics. The resulting objective approximates the oracle MMD between and the clean distribution .
F.4 Kernel and Optimization
All MMD-based methods use a Gaussian kernel
with bandwidth
All estimators are optimized using the L-BFGS-B algorithm. The initialization for all methods is the OLS estimate computed on the full contaminated dataset. The model-based MMD objectives use a fixed synthetic sample (shared across iterations) to reduce stochastic variability and ensure a smooth optimization landscape.
F.5 Summary of Parameters
The full experimental configuration is:
| Sample size: | N = 300, |
|---|---|
| Contamination rate: | ε = 0.40, |
| Audit size: | m = 40, |
| True parameters: | (β0*, β1*) = (1.0, 2.0), |
| Noise standard deviation: | σ = 0.5, |
| Number of contamination clusters: | K = 4, |
| Model sample size: | nmodel = 10,000, |
| Kernel bandwidth: | σk = 1.0. |
This setup induces structured, non-Gaussian contamination together with imperfect proxy information, providing a challenging testbed for comparing classical robust regression methods and MMD-based approaches.
Multiple realizations under contamination. Figure 6 shows 15 independent realizations of the contaminated regression setting described above. Each panel is generated using the same data-generating process and parameter configuration, with independent random seeds 42, 1042, ..., 14042. The achieved proxy classifier's AUROC across the 15 realizations is 0.6593 ± 0.1332. The plots display the observed contaminated data (orange points), the target population (blue points), the audited subset, and the fitted regression lines obtained from each method (MSE, Huber, Tukey, naive MMD, audit-only, and CC-MMD).
Across realizations, the qualitative behavior of the estimators is consistent. The least-squares estimator is systematically biased toward the contamination clusters, while robust methods such as Huber partially mitigate this effect but still exhibit noticeable bias. Tukey's biweight shows high variability, often underestimating the slope due to aggressive downweighting. The naive MMD estimator captures the overall data geometry but remains sensitive to contamination, leading to systematic deviations. The audit-only estimator shows no systematic bias but varies markedly from panel to panel, reflecting the small number of audited inliers it relies on. In contrast, the CC-MMD estimator consistently aligns with the latent inlier structure, producing estimates that closely track the true regression line across all panels. This stability demonstrates the advantage of combining distribution matching with audit-based correction.
Parameter recovery over 200 independent realizations. Figure 7 shows the full distribution of the estimates summarized in Table 1 over 200 independent realizations of the setting above, using seeds 42, 43, ..., 241, and achieving a proxy AUROC of 0.6617 ± 0.1112. The panels show the estimated intercept, slope, and parameter error. Faint points are individual realizations; the marker and bar give the mean ± one standard deviation, and dashed lines mark the true values.

Figure 6: Fifteen independent realizations of the contaminated linear regression problem. Each panel shows the observed data, target population (latent inliers), audited points, and fitted lines for different estimators. While classical and robust methods exhibit bias or variability under clustered contamination, the CC-MMD estimator consistently recovers the true linear relationship across realizations. All realizations are generated randomly.

Figure 7: Parameter recovery over 200 independent realizations. Intercept (left), slope (middle) and parameter error (right) for every estimator at , , . Faint points show each of the 200 realizations; the filled marker and error bar give the mean one standard deviation across realizations, and dashed lines mark the true values and . CC-MMD has both the smallest bias and the smallest spread on each parameter.
G Concrete Regression under Structured Contamination
Dataset and contamination construction. We evaluate CC-MMD on the UCI Concrete Compressive Strength dataset [39], which contains measurements of compressive strength as a function of seven material components. The full dataset contains 1,030 samples.
To construct a realistic contamination scenario, we partition the data based on curing time. The target distribution, , consists of samples cured for exactly 28 days (), while the contaminating distribution, , consists of samples cured for days (). The curing time variable is removed from the feature set, ensuring that contamination is not directly observable.

Figure 8: Training pool composition at . Contaminating samples (early-cured concrete) occupy the lower tail of the strength distribution, pulling the empirical pool mean downward. Both histograms are density-normalized.
This partition induces a structured shift in the joint distribution : early-cured concrete exhibits systematically lower compressive strength, resulting in a downward shift in . Importantly, this shift is moderate in magnitude and overlaps with the support of the clean distribution, meaning contaminants are not easily separable via residual-based methods. Figure 8 visualizes the split between the latent clean distribution and the contaminating distribution.
Training pool construction. We fix the number of clean target samples at , drawn from , and augment with contaminants drawn with replacement from . The contamination level is varied as
For each , we add contaminants, so that the total pool size is and the fraction of contaminants equals by construction.
A clean test set of size 125 is held out from and used for all evaluations.
Audit design and proxy estimation. We assume access to a small audit subset of size equal to 20% of the total contaminated training dataset (), sampled uniformly from the pool. It ranges from at to at .
A Random Forest classifier, with 100 trees and maximum depth 4, is trained on the joint feature space of this noisy audit set to produce proxy membership scores for all training samples. To simulate realistic conditions of having an imperfect proxy classifier, of audited labels are randomly flipped before fitting the proxy. Note that the audit labels are flipped only for proxy fitting purposes, while the residual corrections always use the true audited memberships. The resulting proxy AUROC against ground-truth membership on the full pool rises with the contamination level, from at to at (mean standard deviation) over 20 seeds (42, 1042, ..., 19042). At the demonstration setting , seed 42, used in Figures 9 and 10, achieved proxy AUROC is 0.8633. AUROC is undefined at , where the pool contains no contaminants. For reference, when , the proxy classifier's AUROC in Figure 2 is 0.86 – 0.94, while in Figures 9 and 10, proxy AUROC is 0.9498.
See Appendix I for a discussion on the way proxy scores are obtained in Experiments 3 (Appendix G) and 4 (Appendix H) together with additional results to support the discussion.
Model and training details. All methods use the same MLP architecture with hidden layers [64, 64, 32] and ReLU activations, optimized with Adam (learning rate , weight decay ). Pointwise methods (Oracle, Audit-only, MSE, Huber) are trained for 300 epochs, while Tukey uses an additional 50-epoch MSE warm-up (350 total). For MMD-based methods, training proceeds with a 50-epoch Huber warm-up followed by optimisation of the MMD objective for 400 epochs (450 total). The kernel bandwidth is set as
where is the median pairwise distance in the joint space. The target variable is rescaled by prior to concatenation.
Methods. We compare the following MLP regressors, all using the same architecture and optimizer, as specified in the paragraph above:
-
Oracle: MSE loss on the true target subset of the pool (requires knowledge of true membership ); serves as an unattainable performance upper bound.
-
Audit-only: MSE loss restricted to the labeled target points in the audit subset (approximately 60 inlier samples in expectation: ); represents the strongest purely label-guided baseline achievable with the audit budget.
-
MSE / Huber / Tukey: Standard mean-squared error, Huber loss (), and Tukey biweight loss () applied to the full contaminated pool; 50 MSE warm-up epochs precede Tukey training.
-
Naïve MMD: MMD loss matching the joint distribution of model samples to the full contaminated pool, without any correction for membership.
-
CC-MMD: Horvitz–Thompson-corrected MMD loss, Equation (9), using bandwidth , where is the median pairwise distance in the -dimensional joint feature-target space and . The proxy score is computed by a Random Forest classifier trained on the audit subset using the joint feature space.
Evaluation protocol. All results are averaged over random seeds. We report:
-
Test mean squared error (MSE) on clean data,
-
Test MMD between predicted and true output distributions, computed with a Gaussian kernel whose bandwidth is estimated via the median heuristic on the combined sample (standard heuristic without the normalisation used during training).
Quantitative results. Figure 2 shows that at , all methods achieve comparable performance (MSE ), indicating that CC-MMD does not introduce bias in the absence of contamination. Audit-only training plateaus at higher error (), reflecting limited sample size.
As increases, standard methods degrade sharply. MSE and Huber reach – at , indicating that moderate contamination is not mitigated by residual-based robustness. Tukey performs worse (), consistent with inflated scale estimates causing indiscriminate downweighting. Naïve MMD similarly fails (), as it aligns the model with the contaminated distribution.
CC-MMD consistently outperforms all non-oracle baselines. At , it achieves MSE, representing a 34% reduction relative to the next best baseline. At , the improvement remains substantial (25% reduction). Gains are largest at intermediate contamination levels (–), reaching up to 39%.
In distribution space, CC-MMD maintains near-zero test MMD across all , closely matching the oracle, while all other methods trained on the full contaminated dataset, diverge monotonically.
Qualitative analysis. Figure 9 shows true-versus-predicted compressive strength at for a representative seed. Oracle and CC-MMD predictions concentrate tightly around the diagonal, indicating that they recover both the level and spread of the clean target relationship. In contrast, MSE, Huber, Tukey, and naïve MMD exhibit a systematic downward bias, most visibly for the largest true values. In particular, high-strength samples are underpredicted because early-cured contaminants pull the pooled conditional mean below the clean target relationship. The similar failure of naïve MMD shows that the benefit does not come merely from replacing a pointwise loss with a distributional objective, and the MMD objective itself must be corrected for contamination.
The QQ plots in Figure 10 provide a complementary distributional view. CC-MMD closely matches the marginal test distribution of , with predicted quantiles lying near the diagonal (). By contrast, the contaminated baselines compress the predicted range, underestimating high-strength samples and overestimating low-strength samples (). Thus, CC-MMD corrects not only mean-level prediction error but also the broader distributional distortion induced by contamination.
Discussion. This experiment highlights a failure mode distinct from classical outlier robustness: contamination induces a structured shift within the support, rather than extreme residuals. In this regime, both residual-based robust losses and naïve distribution matching fail.
CC-MMD succeeds because it reconstructs the clean distribution via design-based correction, leveraging both proxy scores and audit information without requiring calibrated probabilities or assumptions on the contaminating distribution.
H High-Dimensional Generative Modeling under Contamination
Overview. We evaluate CC-MMD in a high-dimensional generative modeling setting where the training data are contaminated with samples from a different distribution. The goal is to assess whether CC-MMD can guide a generative model to recover the clean target distribution despite substantial contamination in the training pool. We consider MNIST [40] as the target distribution and introduce contamination from K-MNIST [41] and Omniglot [42] (not simultaneously).
Datasets. The target dataset is MNIST, consisting of grayscale images of handwritten digits of size . The contaminating datasets are:
- K-MNIST: Kuzushiji-MNIST, containing Japanese characters with similar resolution and format.

Figure 9: True vs. predicted compressive strength on the clean test set at . Each panel reports MSE and for that method. Oracle and CC-MMD align closely with the diagonal, while the contaminated baselines exhibit a systematic downward bias in the upper range.
- Omniglot: A dataset of handwritten characters from diverse alphabets.
We use the standard MNIST training set to construct the contaminated pool and the standard MNIST test set (10,000 samples) for evaluation.
Before creating a contaminated dataset, both target and contaminating datasets undergo identical, independent preprocessing so that images live in a common feature space. Omniglot images are first resized to , while MNIST and K-MNIST are already at this resolution and require no resizing. Each grayscale image is converted to a float tensor in , clamped to with to bound values away from the endpoints, mapped to logit space via element-wise, and flattened to a 784-dimensional vector. We use continuous intensities throughout (no binarization). Unlike the other two datasets, Omniglot characters are in black pixels with background in white pixels and we do not invert this. This makes the contamination problem harder with Omniglot than with K-MNIST.
Contaminated training pool. After independent and identical preprocessing of the target and contaminating dataset, we construct a contaminated training dataset of size . A fraction of the pool consists of contaminant samples drawn from either K-MNIST or Omniglot, while the remaining fraction consists of clean MNIST samples. Samples are drawn uniformly

Figure 10: Predicted-vs-true output quantile plots at . A perfect predictor lies on the diagonal. CC-MMD recovers the full marginal distribution of , whereas contaminated baselines compress and shift the predicted quantiles, revealing distributional bias beyond mean-level degradation.
at random without replacement from each source dataset, with no explicit class-balancing constraint. After sampling, the images are concatenated and a random permutation is applied to remove any ordering by source.
Audit subset and proxy estimation. We assume access to an audit subset of size (10% of the training pool), sampled uniformly at random. For each audited sample, we observe its true membership label (clean vs. contaminant).
We use the audited subset to train a logistic regression classifier to predict membership. The classifier operates on the flattened 784-dimensional logit-space pixel vectors, the same representation used by the generative model. We use scikit-learn's LogisticRegression with regularization (inverse strength ), the SAGA solver, and a maximum of 1,000 iterations. The classifier is fit on the audited samples and applied to all points in the contaminated dataset. The trained classifier outputs the predicted probability of the membership label which we directly use as proxy scores for all samples in the training pool.
To assess CC-MMD's behavior in a realistic regime where the membership proxy is imperfect, we control proxy quality by perturbing audit labels rather than post-hoc rescaling the classifier scores.
Before fitting the logistic regression, we sample a fraction of the audit indices uniformly at random without replacement and invert their membership labels . Because indices are sampled uniformly across both classes, the induced per-class flip rate is also in expectation. Setting recovers the clean-audit setting, while larger progressively degrades the classifier and lowers its AUROC against ground-truth membership on the full pool. The resulting predicted inlier probabilities are used directly as proxy scores , with no additional rescaling. Note that the audit labels are flipped only for proxy fitting purposes, while the residual corrections always use the true audited memberships. For the main experiment we set . The resulting proxy achieves AUROC under K-MNIST contamination and under Omniglot (mean standard deviation) over five seeds (42-46), measured against ground-truth membership on the full training pool. Both are moderate operating points, well above chance (0.5) but well below a near-oracle proxy. The proxy separates Omniglot more easily because its characters are dark on a light background. For reference, when , the proxy classifier attains AUROC for K-MNIST and for Omniglot.
Appendix I provides a discussion on the way proxy scores are obtained in Experiments 3 (Appendix G) and 4 (Appendix H) together with additional results to support the discussion.
Generative model architecture. We evaluate CC–MMD across three generative model families.
-
Inverse Autoregressive Flow (IAF). The IAF [43] is implemented using the nf1ows library. Each of the 8 flow layers wraps a masked affine autoregressive transform (MADE conditioner with hidden width 512 and 2 residual blocks), producing dimension-wise affine parameters and that can be evaluated in parallel along the sampling direction. Batch normalization is applied within each MADE block and between consecutive layers. Random permutations of all 784 dimensions are inserted between layers. The base distribution is .
-
Variational Autoencoder (VAE). The VAE [44] has a symmetric MLP encoder–decoder pair with ReLU activations throughout. The encoder maps a 784-dimensional logit-space input through three hidden layers, , followed by two parallel linear heads that output the mean and log-variance of a diagonal-Gaussian approximate posterior in a 128-dimensional latent space. The decoder mirrors the encoder, , with no final activation on the final layer so that the output is in logit space as the data.
-
Convolutional Generator (GMMN). The generator follows the DCGAN architecture [77], trained with MMD-based objectives in the spirit of Generative Moment Matching Networks (GMMN) [28]. It maps a noise vector through a fully connected layer (, BN, ReLU), two transposed convolutions (channels , kernel 4, stride 2, padding 1, each followed by BN and ReLU), and a final convolution to a single channel, flattened to with no final activation. Weights are initialized as for linear and convolutional layers and for batch normalization scale parameters.
Training setup. All distribution-matching methods (SWD, Naive MMD, CC–MMD) across all three model families are trained for a maximum of 10,000 gradient steps using the Adam optimizer with default momentum parameters (, , , no weight decay). The learning rate follows a cosine annealing schedule decaying from a peak of to a minimum of over the full 10,000 steps. At each gradient step, samples are drawn from the generator. Gradients are clipped to a maximum norm of 1.0 before each parameter update. Early stopping monitors the smoothed training loss, averaged within non-overlapping windows of 100 steps. Training halts and restores the best checkpoint if no improvement is observed for 15 consecutive windows (1,500 steps of patience). All three models use identical optimization settings for their distribution-matching objectives.
The VAE introduces two additional training paradigms for the ELBO baselines (VAE+MSE and VAE+Huber). These are trained epoch-wise minimizing the ELBO: , where denotes the variational posterior, and , MSE or Huber, is summed over all 784 dimensions and averaged over the mini-batch, and . Optimization uses Adam with peak learning rate , cosine annealing to over 200 epochs, mini-batch size 256, and gradient clipping norm 5.0. A random 15% validation split is held out for early stopping with patience of 15 epochs (best model restored). The Huber loss uses a transition point of in logit space.
For the VAE distribution-matching variants (VAE+MMD and VAE+CC-MMD), a KL regularizer is computed from a fresh mini-batch of 256 training points at each step and added with weight . This small value is necessary since on 784-dimensional logit-space data is of order , while the KL term is of order 10–50, so would collapse training to prior matching. All other settings match the flow and GMMN distribution-matching experiments.
The GAN [46] baseline is trained adversarially for 30,000 steps with a batch size of 500 real and 500 fake samples. The generator uses Adam with and learning rate ; the discriminator uses Adam with the same values and learning rate . One discriminator update is performed per generator update. The discriminator is a three-layer MLP () with LeakyReLU(0.2) activations and no final activation (logit output for use with BCEWithLogitsLoss). The non-saturating generator objective is used: the generator minimizes rather than . Gradient clipping of norm 1.0 is applied to both generator and discriminator.
Loss functions. All kernel-based methods use a Gaussian kernel in the 784-dimensional logit-space. The bandwidth is the median pairwise distance among the known target points in the audit set: , , subsampled to at most 2,000 points for efficiency. Using only confirmed clean points prevents the contaminating distribution from biasing the bandwidth estimate. For both Naïve MMD and CC-MMD, all pool-side quantities that depend only on the fixed training data are computed once before training begins and cached. For Naïve MMD this is the pool self-kernel sum , while for CC-MMD these are the corrected sums , and the W-side factors of and . Only the terms involving newly generated samples and —are recomputed at each gradient step.
The loss objectives compared across all three model families are:
-
Naïve MMD. Defined in Equation 3.
-
CC-MMD. Defined in Equation 9.
-
Sliced Wasserstein Distance (SWD). [45] Approximates the 2-Wasserstein distance using random one-dimensional projections. At each training step, is subsampled to points, and the loss is the mean squared difference between sorted projections:
where are random unit vectors and is the -th order statistic. SWD is applied only to the IAF.
-
GAN (adversarial, GMMN only). [46] Non-saturating adversarial objective; see training details above. This baseline is included only for the GMMN experiment to assess whether an implicit generative model trained without any explicit kernel can resist contamination.
-
VAE+MSE and VAE+Huber (ELBO, VAE only). These baselines train the VAE by maximizing the standard ELBO with MSE or Huber reconstruction losses respectively, without any explicit distribution-matching objective.
Evaluation metrics. We evaluate generative performance using two metrics, all computed against the 10,000 clean MNIST test images.
-
Test MMD. We use the same Gaussian kernel as during training, with bandwidth estimated via the median heuristic on the test set itself (rather than the training pool). We draw 5,000 samples from the generator. The unbiased U-statistic estimator is evaluated in logit space.
-
Fréchet Inception Distance (FID). Because standard FID uses Inception-v3 features designed for RGB images, we replace the feature extractor with a small CNN
| Architecture | Method | K-MNIST | Omniglot | ||
|---|---|---|---|---|---|
| MMD² (×10⁻³) | FID | MMD² (×10⁻³) | FID | ||
| IAF | SWD | 26.5 ± 0.6 | 207.7 ± 2.5 | 447.7 ± 12.5 | 593.2 ± 32.4 |
| MMD | 25.9 ± 0.4 | 203.7 ± 6.4 | 459.5 ± 3.2 | 564.2 ± 7.5 | |
| CC-MMD | 1.1 ± 0.2 | 118.8 ± 8.8 | 1.9 ± 1.0 | 125.0 ± 10.6 | |
| VAE | MSE | 131.2 ± 4.9 | 245.6 ± 1.4 | 550.2 ± 17.0 | 516.5 ± 11.5 |
| Huber | 42.6 ± 3.5 | 190.4 ± 4.7 | 422.6 ± 33.7 | 457.0 ± 5.3 | |
| MMD | 27.9 ± 1.1 | 443.9 ± 6.2 | 452.5 ± 4.9 | 593.2 ± 27.2 | |
| CC-MMD | 2.4 ± 0.3 | 377.4 ± 15.7 | 2.7 ± 0.9 | 359.6 ± 10.9 | |
| GMMN | GAN | 27.2 ± 0.7 | 114.7 ± 4.9 | 1024.9 ± 509.5 | 745.7 ± 350.2 |
| MMD | 27.1 ± 0.8 | 160.6 ± 1.7 | 458.2 ± 7.1 | 444.1 ± 4.1 | |
| CC-MMD | 1.2 ± 0.2 | 139.6 ± 4.6 | 1.9 ± 1.2 | 138.7 ± 3.9 | |
Table 2: Test MMD² (×10⁻³) and FID on clean MNIST test images under contamination, over 5 seeds. Lower is better for both metrics. The same results are also shown on Figure 3.
trained on clean MNIST. The network applies two strided convolutions (channels , stride 2) followed by a linear projection to a 128-dimensional feature space, with a 10-class classification head used only during training. It is trained on the full 60,000-image MNIST training set for 10 epochs (Adam, lr , cross-entropy, batch size 256) and fixed before any generative model is trained. Test-set features are precomputed once and reused across all model comparisons. We use 50,000 generated samples. Generated outputs are converted to via sigmoid before feature extraction. All reported FID values use this MNIST-specific extractor.
Main results (). Table 2 and Figure 3 show the numerical results of the generative modeling under contamination experiment. We provide further detailed commentary here.
Under severe contamination, the architecture-specific baselines all fail to recover the clean MNIST distribution since each optimizes a distance to the contaminated training pool, causing the generator to reproduce the mixture rather than the target. This is reflected in high test MMD² values across all three architectures (IAF: , GMMN: , VAE: ) and correspondingly high FID scores.
Instead, CC-MMD uses audit-informed proxy scores to reweight the training objective toward the clean distribution, consistently recovering clean MNIST samples across all three architectures and both contamination sources. Test MMD² is reduced by approximately on K-MNIST and over on Omniglot relative to the best uncorrected baseline, with the larger gain on Omniglot reflecting the greater visual dissimilarity between that contaminant and MNIST. FID improvements are substantial in all settings. Under Omniglot contamination, where baselines degrade most severely, CC-MMD achieves FID versus for IAF and versus for GMMN. Under K-MNIST contamination the improvement is smaller in absolute terms but remains consistent across architectures, since the visual similarity between K-MNIST and MNIST means uncorrected baselines still produce partly digit-like outputs. Across both settings, CC-MMD results are stable across seeds, with low variance in both MMD² and FID.
Ablation study on (Robustness to contamination rate) In this ablation study, we demonstrate CC-MMD's robustness to increasing contamination rate, . We do this by examining IAF's generative quality with different loss functions as the contamination level increases, , while holding fixed , audit fraction , and proxy quality at AUROC (). Here, we focus on contamination coming from K-MNIST. We run each configuration over 20 random seeds, , where indexes and indexes the replicate, and report of test MMD² and test FID evaluated against clean MNIST test set (10,000 samples). Results are shown in Figure 4.
Naïve MMD and SWD are blind to contamination and their test MMD² grows roughly exponentially with , reaching 0.046 at . This is nearly two orders of magnitude above the oracle baseline

Figure 11: Generative quality vs. proxy scores AUROC on MNIST. Test MMD (left) and FID (right) against the clean MNIST test set. Contamination rate is fixed at and so is audit fraction at . Contamination source is K-MNIST and architecture is IAF. Shaded bands show standard deviation over 20 random seeds.
of 0.00055. SWD tracks Naïve MMD closely throughout, confirming that the insensitivity to contamination is not specific to the MMD loss.
CC–MMD tracks the oracle trend consistently across the full sweep, achieving test MMD of 0.001209 at and 0.003713 at , corresponding to and reductions relative to Naïve MMD. The gap between CC–MMD and the oracle grows modestly at high contamination rates, which is expected as at large , the effective number of confirmed clean points within the audit set shrinks, increasing the variance of the Horvitz–Thompson correction.
Training only on the audited clean subset avoids contamination entirely and performs competitively with CC–MMD at high , reaching 0.0023 at where its zero proxy error is most advantageous. At lower contamination levels ( ), however, CC–MMD consistently outperforms audit-only on MMD by leveraging the full pool through proxy correction, demonstrating advantages of such approach.
Ablation study on proxy scores quality (Robustness to proxy score estimator performance)
The theoretical guarantees of CC-MMD require no assumptions on the quality of the proxy scores . The correction remains design-unbiased regardless of how well approximates the true membership indicator (Theorem 2.1). We show this empirically.
We hold the following fixed: IAF generator, , , ( labeled points). Again, we focus on contamination coming from K-MNIST dataset. We vary proxy scores AUROC (in the way described in Paragraph H) across , and report results as a function of the achieved proxy scores AUROC. Each condition is repeated over 20 independent seeds (42 – 61) and evaluated against the clean MNIST test set using test MMD and FID. All results report .
Figure 11 summarizes the findings.
As proxy AUROC increases from near-random ( 0.50) to near-perfect ( 0.99), test MMD improves weakly, from to , with most of the change concentrated in the upper range of AUROC values and a plateau across AUROC 0.50–0.90. The widening standard-deviation bands at lower AUROC confirm that proxy quality primarily affects finite-sample efficiency and optimization rather than the validity of the correction itself. Recall that Theorem 3.2 guarantees design-unbiasedness for any proxy, so a weaker proxy increases the variance of the Horvitz–Thompson weights without introducing bias in the estimator. Taken together, these results indicate that CC-MMD does not require a near-perfect proxy to improve over naïve contaminated distribution matching and a modest audit effort yielding AUROC in the 0.60–0.80 range is sufficient to recover the bulk of the benefit.
Ablation study on (audit sample size) Here, we investigate the impact of the audit sample size on CC-MMD performance. We begin by fixing: IAF generator, , , AUROC ( varies to achieve desired AUROC across different ), K-MNIST as a contamination source. We vary audit size . Each condition is repeated over 20

Figure 12: Generative quality vs. audit size on MNIST. Test MMD (left) and FID (right) against the clean MNIST test set. Contamination rate is fixed at and proxy AUROC is across all the audit sizes. Contamination source is K-MNIST and architecture is IAF. Shaded bands show standard deviation over 20 random seeds. For reference, audit-only performance is shown too.
independent seeds (42 – 61) and evaluated against the clean MNIST test set using test MMD and FID. All results report and are shown in Figure 12.
As increases, performance improves rapidly: with only of the pool labeled (500 points), CC–MMD already corrects the bulk of the contamination-induced bias and substantially outperforms naïve MMD trained on the full contaminated pool (see Figure 3). Increasing the budget to yields a further reduction in test MMD (), driven by a more accurate bandwidth estimate from the growing clean audit set. Beyond , performance is largely stable, indicating that a moderate annotation budget captures most of the available signal and that the method does not require exhaustive labeling to operate effectively. These results confirm that even limited but informative audit supervision is sufficient to correct much of the contamination-induced bias, a practically important property when ground-truth membership labels are expensive to obtain
I Additional results and discussion on proxy scores
As specified in Section 2, the proxy scores, audited subset, and full dataset are treated as fixed inputs produced by a pre-existing data-processing pipeline. The downstream modeler does not train the proxy model to obtain proxy scores. Rather, they are generated by an upstream system, for example, labels or judgments from a pretrained LLM, scores from an automated signal-versus-noise classifier, or domain-specific classification probabilities used in astronomy to distinguish galaxies, stars, and quasars. The proxy scores exist before any audit is drawn. The modeler observes proxy scores for the full sample and true membership labels only for the audited subset; illustrative examples are provided in Appendix 5.
This reflects a distinction between two streams of research: designing the upstream data-processing pipeline to maximize information gain for downstream inference, and performing statistically valid downstream modeling and inference given whatever that pipeline produces. While the former is an interesting and important research direction, it is a fundamentally different problem from the one studied here. In astronomy, for instance, such upstream pipelines are developed over many years by large collaborations to support a broad range of scientific objectives rather than a single downstream task, and may be trained on raw data or infrastructure the downstream analyst cannot access. Therefore, the available proxy scores and audited labels are constraints imposed by the data collection and processing pipeline, not quantities the downstream analyst can readily optimize. Our work addresses the complementary problem of performing statistically valid learning given these fixed resources.
In this setting the independence Assumption A.4 requires holds by construction: the analyst does not fit the proxy, and the audit is a simple random sample drawn afterwards.
Experiments 1 and 2 in Section 4 instantiate this directly. The proxy scores there are produced by fixed score functions of W alone and never touch the audit set, so Assumption A.4 holds exactly as stated.
Table 3: Slope MSE ± SE over 50 random realizations with no upstream classifier (), under the contamination model of Experiment 2. Lower is better.
| N | m | Naïve MMD | CC-MMD () | RF prob.-weighted | RF hard-threshold |
|---|---|---|---|---|---|
| 200 | 20 | 0.0579 ± 0.0103 | 0.0367 ± 0.0073 | 0.0384 ± 0.0077 | 0.0882 ± 0.0169 |
| 200 | 40 | 0.0495 ± 0.0093 | 0.0120 ± 0.0024 | 0.0162 ± 0.0032 | 0.0280 ± 0.0054 |
| 200 | 60 | 0.0517 ± 0.0097 | 0.0112 ± 0.0022 | 0.0160 ± 0.0032 | 0.0229 ± 0.0045 |
| 300 | 20 | 0.0369 ± 0.0070 | 0.0194 ± 0.0039 | 0.0252 ± 0.0049 | 0.0923 ± 0.0168 |
| 300 | 40 | 0.0457 ± 0.0084 | 0.0118 ± 0.0024 | 0.0177 ± 0.0035 | 0.0249 ± 0.0046 |
| 300 | 60 | 0.0579 ± 0.0104 | 0.0077 ± 0.0015 | 0.0138 ± 0.0025 | 0.0201 ± 0.0036 |
| 500 | 20 | 0.0437 ± 0.0082 | 0.0167 ± 0.0033 | 0.0249 ± 0.0049 | 0.2686 ± 0.0537 |
| 500 | 40 | 0.0418 ± 0.0079 | 0.0105 ± 0.0021 | 0.0141 ± 0.0028 | 0.0294 ± 0.0057 |
| 500 | 60 | 0.0548 ± 0.0097 | 0.0097 ± 0.0019 | 0.0117 ± 0.0022 | 0.0157 ± 0.0030 |
| 1000 | 20 | 0.0421 ± 0.0079 | 0.0548 ± 0.0110 | 0.0177 ± 0.0035 | 0.0564 ± 0.0105 |
| 1000 | 40 | 0.0809 ± 0.0161 | 0.0123 ± 0.0025 | 0.0148 ± 0.0027 | 0.0207 ± 0.0038 |
| 1000 | 60 | 0.0514 ± 0.0093 | 0.0100 ± 0.0020 | 0.0085 ± 0.0017 | 0.0098 ± 0.0019 |
Since no such upstream pipeline exists for the benchmark datasets we use in Experiments 3 and 4, we must simulate one. One way to do it is to train a classifier using the audited labels. This draws attention to Assumption A.4 as it creates dependence between and . However, fitting a proxy using the audit sample is an artifact of constructing a proxy for a benchmark rather than a feature of the estimator, which never refits . An alternative is to use the audit only to fit a classifier and then either weight or filter the pool by its predictions.
To confirm that our modeling choice does not drive our conclusions, this appendix compares the two strategies, in the regression setting of Experiment 2 and in the generative setting of Experiment 4.
I.1 No Upstream Classifier
First, we consider the most challenging setting, in which no upstream classifier is available. We assume for . This represents the scenario in which the downstream method has no prior information regarding which observations may be contaminated and defaults to the assumption that all observations come from the target distribution. Here, no classifier is fit at any stage.
We compare four approaches for estimating the slope of the linear model of Experiment 2 in Section 4, using the same contamination model:
- Naïve MMD. The regression parameters are estimated by minimizing the MMD objective using all observations, without any correction for contamination.
- CC-MMD. The audit sample with verified labels is used directly to construct the CC-MMD debiasing correction, while the remaining observations are used in the standard MMD objective.
- Probability-weighted MMD. The audit sample is used to train the best random forest classifier estimating the probability of each non-audited observation being an inlier. These estimated probabilities are then used as weights in the MMD objective.
- Hard-threshold MMD. The same random forest classifier is trained on the audit sample, but only observations classified as inliers are retained in the MMD objective after removing the audited observations.
Table 3 reports the resulting MSEs for estimating the slope using 50 random realizations of data.
As expected, the naive MMD estimator performs worst since it completely ignores contamination. CC-MMD achieves the lowest slope MSE in 10 of the 12 experimental configurations and is consistently among the best-performing methods. The probability-weighted approach performs competitively, occasionally achieving the lowest error, particularly for large sample sizes coupled with very small audit sample. The hard-threshold approach is generally less stable and performs worse because classification errors permanently discard observations that may still contain useful information.
Table 4: Slope MSE ± SE over 50 random realizations with a weak upstream classifier providing noisy inlier probability estimates. Settings otherwise as in Table 3. Lower is better.
| N | m | Naive MMD | CC-MMD (weak proxy) | RF prob.-weighted | RF hard-threshold |
|---|---|---|---|---|---|
| 200 | 20 | 0.0624 ± 0.0110 | 0.0370 ± 0.0074 | 0.0343 ± 0.0068 | 0.0873 ± 0.0168 |
| 200 | 40 | 0.0491 ± 0.0093 | 0.0153 ± 0.0031 | 0.0164 ± 0.0032 | 0.0297 ± 0.0058 |
| 200 | 60 | 0.0552 ± 0.0104 | 0.0105 ± 0.0021 | 0.0154 ± 0.0030 | 0.0231 ± 0.0045 |
| 300 | 20 | 0.0355 ± 0.0068 | 0.0167 ± 0.0033 | 0.0257 ± 0.0050 | 0.0924 ± 0.0167 |
| 300 | 40 | 0.0438 ± 0.0081 | 0.0109 ± 0.0022 | 0.0185 ± 0.0036 | 0.0267 ± 0.0049 |
| 300 | 60 | 0.0541 ± 0.0095 | 0.0097 ± 0.0019 | 0.0135 ± 0.0025 | 0.0204 ± 0.0037 |
| 500 | 20 | 0.0445 ± 0.0084 | 0.0225 ± 0.0045 | 0.0273 ± 0.0054 | 0.5206 ± 0.1041 |
| 500 | 40 | 0.0408 ± 0.0076 | 0.0100 ± 0.0020 | 0.0142 ± 0.0028 | 0.0305 ± 0.0059 |
| 500 | 60 | 0.0571 ± 0.0104 | 0.0111 ± 0.0022 | 0.0119 ± 0.0022 | 0.0155 ± 0.0028 |
| 1000 | 20 | 0.0457 ± 0.0086 | 0.0253 ± 0.0051 | 0.0172 ± 0.0034 | 0.0508 ± 0.0090 |
| 1000 | 40 | 0.0919 ± 0.0183 | 0.0141 ± 0.0028 | 0.0125 ± 0.0023 | 0.0181 ± 0.0033 |
| 1000 | 60 | 0.0577 ± 0.0102 | 0.0077 ± 0.0015 | 0.0090 ± 0.0018 | 0.0113 ± 0.0022 |
I.2 Weak Upstream Classifier
We next consider a more realistic setting using a weak upstream classifier as a proxy. Here, the proxy is the fixed, miscalibrated score function of Experiment 2 in Section 4 (with ). It is a function of the pooled sample alone and never uses the audit set. The weak upstream classifier provides noisy estimates of the inlier probability for each observation, in place of the uninformative of Appendix I.1. We repeat the same set of experiments as in I.1 using these imperfect scores. The results are shown in Table 4.
In this setting, even modest predictive ability improves the performance of CC-MMD in low-audit regime since the proxy contributes information that the audited residuals alone cannot supply. The other methods do not gain from the upstream classifier because they do not use the proxy scores. The ordering across methods is otherwise unchanged from Table 3.
I.3 High-Dimensional Generative Modeling (MNIST)
To assess whether these conclusions extend beyond the linear regression simulation, we repeat the comparison on the MNIST generative experiment in Section 4 with the same settings. We use MNIST digits as target distribution contaminated at rate with either K-MNIST or Omniglot images, a 10% audited subset, and the three generative architectures, each trained under 5 random seeds.
We compare five approaches:
-
Naive MMD.
-
CC-MMD (). No upstream classifier available; we assume
so that every observation is included in the analysis (as in Appendix I.1).
-
CC-MMD (trained proxy). Proxy scores from a proxy classifier (logistic regression) and audit sample are used to construct the CC-MMD debiasing correction, as in Section 4, Experiment 4.
-
Logistic regression (LR) probability-weighted MMD.
-
Logistic regression (LR) hard-threshold MMD.
The results are presented in Table 5 below.
Both CC-MMD variants dominate across every architecture and contamination source. Crucially, CC-MMD is nearly unaffected by contamination severity: Omniglot (more severe contamination than K-MNIST) inflates the naive-MMD baseline 18-fold over K-MNIST, yet CC-MMD's error stays flat (). The classifier-trusting methods improve over naive MMD but remain worse than CC-MMD, and this gap grows larger exactly when contamination is worst — the opposite of what a robustness method should do. This matches the additional experiments 1 (I.1) and 2 (I.2):
Table 5: Test MMD² (×10⁻³) ± SE over 5 seeds on clean MNIST test images, at ε = 0.60. Lower is better.
| Naïve MMD | CC-MMD (ī ≡ 1) | CC-MMD (proxy) | LR prob.-weighted | LR hard-threshold | |
|---|---|---|---|---|---|
| K-MNIST contamination | |||||
| IAF | 25.9 ± 0.2 | 2.2 ± 0.2 | 1.1 ± 0.1 | 11.1 ± 0.5 | 10.5 ± 0.5 |
| VAE | 27.9 ± 0.5 | 3.1 ± 0.2 | 2.4 ± 0.1 | 12.4 ± 0.3 | 11.7 ± 0.6 |
| GMMN | 27.1 ± 0.4 | 2.3 ± 0.3 | 1.2 ± 0.1 | 11.3 ± 0.5 | 10.5 ± 0.6 |
| Omniglot contamination | |||||
| IAF | 459.5 ± 1.6 | 1.9 ± 0.8 | 1.9 ± 0.5 | 167.6 ± 6.6 | 132.3 ± 4.4 |
| VAE | 452.5 ± 2.5 | 3.0 ± 0.9 | 2.7 ± 0.4 | 165.7 ± 6.2 | 127.8 ± 5.6 |
| GMMN | 458.2 ± 3.5 | 1.9 ± 0.8 | 1.9 ± 0.6 | 162.7 ± 3.7 | 132.3 ± 6.0 |
using audited data in the estimator in addition to proxy scores remains the key advantage even in high-dimensional, non-linear settings.
I.4 Discussion
Although probability-weighted MMD performs well in these experiments, particularly because the simulated classifier is well calibrated, CC-MMD has two important conceptual advantages, in addition to empirical performance shown above.
First, CC-MMD is unbiased regardless of the audit and data sample sizes. The debiasing correction is constructed directly from the audited observations, yielding an unbiased estimator of the target MMD without requiring any assumptions about the quality of an auxiliary classifier. In contrast, the probability-weighted estimator is unbiased only if the estimated probabilities are well calibrated, a property that is often difficult to guarantee in practice. Our simulation intentionally uses a calibrated classifier, which explains the strong performance of the weighting approach.
Second, CC-MMD uses the audit sample more efficiently. Audited observations are typically the most valuable resource because obtaining verified labels is expensive. Using these samples solely to train a classifier and then weighting MMD uses information in a suboptimal way that could instead be used directly to correct the estimation objective. CC-MMD incorporates the audited observations explicitly into the estimator (analogous to the philosophy behind prediction-powered inference [35], where limited high-quality labels are used to debias an estimator rather than simply improve a prediction model). This direct use of audited data is particularly advantageous when learning an accurate classifier is itself difficult.
The experimental results above provide direct evidence of advantages of our method, CC-MMD, compared to the classifier-based alternatives. In particular, CC-MMD combines the efficiency of the full proxy-labeled sample with the bias correction provided by the audit.
The results are also consistent with our theory: the correction is design-unbiased for any , so proxy quality affects the variance of the estimator rather than its validity, and at the audit budget used here the audited residuals alone already suffice. Any advantage over naive MMD, therefore, cannot arise from reusing the audit set.
J Computation details and reproducibility.
All generative experiments are repeated over 5 random seeds (42–46), while the ablation studies are repeated over 20 random seeds per condition. Reported results show across seeds. All experiments were implemented in PyTorch 2.6 with CUDA 12.4. Normalizing flows use the nflops 0.14 library, proxy classifiers use scikit-learn 1.7.2. Experiments were run on NVIDIA RTX A4000 GPUs (16 GB) and on high-performance computing cluster equipped with NVIDIA H100 GPUs.