Research
Beyond Pooling: Matching for Robust Generalization under Data Heterogeneity
Overview Research area: Machine learning — specifically representation learning from pooled multi-domain (heterogeneous) datasets, causal/propensity-score-style matching, and zero-shot medical anomaly
- arXiv
- 2602.07154
- Published
- 2026-02-06
- Authors
- Ayush Roy, Rudrasis Chakraborty, Lav Varshney, Vishnu Suresh Lokhande
AI summary
Overview
Research area: Machine learning — specifically representation learning from pooled multi-domain (heterogeneous) datasets, causal/propensity-score-style matching, and zero-shot medical anomaly detection.
Technical level: Advanced. The paper is primarily a theoretical treatment (convergence theorems, finite-sample error bounds, normalizing-flow transport guarantees) supported by synthetic simulations and a large zero-shot anomaly-detection benchmark.
Scope (one sentence): The paper compares three ways of combining data drawn from many heterogeneous domains — naive pooling, uniform subsampling, and a proposed centroid-based matching strategy — and shows theoretically and empirically that matching is the only one that removes inter-domain variance and avoids performance deterioration as new domains are added, especially in zero-shot medical anomaly detection.
What This Paper Is About
Organizations and hospitals often combine datasets from many sources to get larger sample sizes, but pooling data from different institutions, scanners, or populations can make results worse rather than better, because the pooled distribution drifts away from the distribution the model must eventually be tested on. The authors formalize this as a hierarchical data-generation process where each domain is a Gaussian centered on a domain mean drawn from a meta-distribution, and then ask which aggregation strategy converges to the true target distribution. Their answer is a matching framework that admits or rejects entire domains based on their distance from an adaptively updated centroid, which they analyze asymptotically, at finite sample sizes under symmetry and asymmetry, for non-Gaussian data, and for multimodal data.
Key Contributions
-
A matching framework cast as propensity-score matching. Domain inclusion is treated as a "treatment" via an indicator
W_k = 1(M(μ_k − c_t) < τ), with the domain mean as the covariate. The authors connect this to the causal-inference assumptions of ignorability, positivity, and consistency, and argue that this structure yields double robustness: consistency holds if either the inclusion rule (propensity model) or the outcome model (centroid update) is correctly specified. -
A three-way theoretical comparison of pooling strategies. Naive pooling (Definition 1), uniform subsampling (Definition 2), and matching (Definition 3) are analyzed in the limit K → ∞ (Theorem 1), at finite K under a symmetric meta-distribution (Theorem 2), and at finite K under asymmetry with incrementally added domains (Theorem 3), with a practical threshold-selection criterion in Corollary 2.
-
Generalization beyond Gaussian data. Theorem 4 gives a "Normalizing Flow Transport Theorem with Lipschitz Guarantees," showing that universal approximation, Lipschitz control (
L_T ≤ ∏ C_ℓ), variance preservation (≤ L_T² τ²), and a concentration guarantee (|x̄ − T(c_z)|₂ ≤ L_T τ) carry the matching guarantees to compactly supported, non-Gaussian data. -
Extension to multimodal distributions and a zero-shot medical benchmark. Definition 5 defines an M-modal distribution, per-mode centroids and radii
{c_{n,m}},{τ_m}are introduced, Lemma 1 gives M-modal convergence, and the method is evaluated on the BMAD benchmark for zero-shot anomaly classification (AC) and segmentation (AS), alongside a new evaluation metric, the Data Addition Score (DA).
Main Findings
-
All three strategies converge to the right center, but only matching has the right spread. Theorem 1 shows that as K → ∞, naive pooling and uniform subsampling both converge to
N(μ_*, σ²I_d + Σ_μ), retaining the inter-domain varianceΣ_μ, while matching converges toN(μ_*, σ²I_d)— exactly the target test distributionD_test = N(μ_*, σ²I_d). -
Under a symmetric meta-distribution, all three methods are unbiased for finite K. Theorem 2 establishes
E[μ̄_K] = μ_*for naive pooling,E[μ̄_I] = μ_*for uniform subsampling, andE[μ̄_S] = μ_*for matching (with centroid initialized at the target). The authors note matching still converges toμ_*even ifc^(0) ≠ μ_*, given appropriateτ. -
Under asymmetry, only matching has non-deterioration guarantees. Theorem 3: naive pooling can suffer
ε_{K+1} ≥ ε_K + Θ(1), i.e., unbounded per-step deterioration for adversarial new domains; subsampling has worst-case per-step deteriorationΩ(1/m); matching limits worst-case increase toO(1/|S_K|)and gives high-probability non-deteriorationPr(ε_{K+1} ≤ ε_K) ≥ 1 − exp(−Ω(|S_K|)). Since|S_K|typically grows with K, the perturbation shrinks as more domains are added. -
The theoretical advantages survive reduced per-domain sample size. In synthetic experiments with small finite N (rather than the large-N assumption used in the theory), all strategies degraded, but subsampling suffered the largest errors due to
√(d/N)variance amplification, while pooling and matching remained relatively stable. Experiments used 10 seeds, an L2 metric, robust median initialization, and convergence criterion|c_{t+1} − c_t|₂ < 10⁻⁴. -
Zero-shot anomaly detection results are mixed by dataset but strongest on several. On the BMAD benchmark, the proposed method reports AC/AS AUC (in %) of HIS AC 75.41, ChestXray AC 74.94, OCT17 AC 97.21, BrainMRI AC 87.67 / AS 90.29, LiverCT AC 80.26 / AS 98.75, and RESC AC 89.42 / AS 95.09. The highest values reported in the comparison table for ChestXray AC, OCT17 AC, BrainMRI AC, LiverCT AS, RESC AC, and RESC AS come from this method, while the highest HIS AC is AnomalyCLIP* at 80.27 and the highest BrainMRI AS is APRIL-GAN at 91.79.
-
Baselines for context. AnomalyCLIP* (80.27 / 69.11 / 94.60 / 79.72 / 90.47 / 78.72 / 97.88 / 88.49 / 91.14), MVFA-AD* (78.88 / 69.11 / 96.62 / 75.05 / 90.33 / 80.77 / 98.06 / 88.53 / 91.27), BiLORA* (77.68 / 66.75 / 97.05 / 87.65 / 89.40 / 80.64 / 98.53 / 89.15 / 93.46), APRIL-GAN (72.36 / 57.49 / 92.61 / 76.43 / 91.79 / 70.57 / 97.05 / 75.67 / 85.23), and WinCLIP (69.85 / 70.86 / 46.64 / 66.49 / 85.99 / 64.20 / 96.20 / 42.51 / 80.56). AdaCLIP and Mao et al. are only reported on OCT17 (68.8 and 91.2) and BrainMRI AC (73.1 and 73.7).
-
A new metric measures monotonic improvement, not just peak accuracy. The Data Addition Score (DA) is defined over a performance sequence
y = [y₁, y₂, y₃, y₄, y₅]with weightss = [0.1, 0.2, 0.3, 0.4]emphasizing later stages:DA(y) = Σ_{i=1}^{4} 1{y_{i+1} ≥ y_i} · (1 + ((y_{i+1} − y_i)/10) · s_i), so a drop in performance scores zero for that step. The DA analysis shown in Figure 1 reports MVFA scores clustered around 2 (for example 2.2365 for HIS, 2.1146 for Chest-XRay, 2.0501 for OCT17, 2.0466 for Brain MRI AC, 2.0335 for Liver CT AC), AnomalyCLIP scores ranging from 1.0102 to 3.2632, BiLORA scores such as HIS AC 4.0, ChestXray AC 3.145, OCT17 AC 4.0, BrainMRI AC 4.0, BrainMRI AS 4.012, LiverCT AC 3.158, LiverCT AS 4.030, RESC AC 3.081, RESC AS 4.072, and the proposed method at or exceeding 4.0 for all datasets and tasks, with peaks of 4.0736 for Brain MRI AC and 4.0484 for Brain MRI AS. -
Multimodal convergence holds mode-by-mode. Under the conditions of Lemma 1, matching guarantees
ε_{K+1,m} ≤ ε_{K,m}for all modesm = 1, …, Mwith high probability, following from applying Theorem 3 to each mode independently and requiring sufficient separation of the M modes.
Methodology in Plain English
The authors start by writing down a simple generative story for pooled data. First, a domain mean is drawn from a meta-distribution D_μ; that mean defines a domain distribution Q_k = N(μ_k, σ²I_d); then data points are sampled from that domain. The shape of D_μ — symmetric or asymmetric — determines whether the collection of domains is balanced or skewed, and the target is always the isotropic Gaussian D_test = N(μ_*, σ²I_d).
They then define three ways to build a training set. Naive pooling keeps everything. Uniform subsampling picks domains at random and keeps only a small number of samples (n ≪ N_k) from each. Matching keeps all samples from a domain only if the domain's mean lies within a τ-radius ball of an adaptive centroid c_t, and then updates that centroid using the samples it just admitted — repeatedly, until convergence.
With these definitions they prove three levels of results: what happens as the number of domains goes to infinity; what happens at finite K when the meta-distribution is symmetric; and what happens at finite K when it is asymmetric and domains arrive one at a time. The matching rule is re-interpreted as a propensity-score model, borrowing the causal-inference vocabulary of ignorability, positivity, and consistency, which is what produces the double-robustness argument: as long as either the threshold rule or the centroid update is right, the limit is right. They then push the same guarantees through an invertible normalizing flow so the reasoning applies to non-Gaussian data, and generalize from one centroid to one centroid per mode for multimodal data.
Empirically, they run controlled synthetic Gaussian experiments on a fixed target N(0, σ²I_d) with deliberately small per-domain sample sizes, and then test on the BMAD benchmark of medical images (brain MRI, liver CT, retinal OCT, chest X-ray, digital histopathology) using a leave-one-out protocol: train on {D₁, …, D_{i−1}} and test on the unseen D_i. They report image-level AUC for anomaly classification and pixel-level AUC for segmentation, plus their new DA metric.
Why This Matters
Impact on research. The paper reframes data pooling — usually treated as a data-engineering choice — as a causal-inference problem with explicit assumptions, and it identifies a precise theoretical mechanism (inter-domain variance Σ_μ that pooling retains and matching removes) for why adding more data can hurt. The non-deterioration result for matching (error bounded by O(1/|S_K|), versus Θ(1) for pooling and Ω(1/m) for subsampling) gives the field a way to reason about whether a new data source will help or hurt. The DA metric also shifts evaluation away from a single peak accuracy number toward the monotonicity of improvement across sequentially added domains.
Real-world applications:
- Multi-institution medical AI. Combining scans from different hospitals is the paper's motivating setting; matching offers a way to admit only domains that align with the target population rather than pooling everything.
- Zero-shot anomaly detection in radiology and pathology. The evaluated tasks span chest X-ray, brain MRI, liver CT, retinal OCT, and digital histopathology, where anomalies are subtle and often overlap with normal anatomical variation.
- Federated or incrementally growing data archives. Because the analysis is explicitly sequential — the transition from K to K+1 domains — it fits settings where institutions join a study over time.
- Any domain with skewed source distributions. The theory requires only a meta-distribution over domain means, so the framework applies to pooled sensor networks, multi-site surveys, or any representation-learning pipeline that aggregates heterogeneous sources.
Industry relevance. Teams that continuously ingest new data sources — healthcare networks, imaging vendors, and platform companies building general-purpose vision models — face exactly the failure the paper describes, where more data degrades the hardest subgroups. A per-domain accept/reject rule with a tunable threshold τ, plus a metric like DA, gives engineering teams a deployable filter and a way to monitor whether each newly added source is helping. The paper notes code is available on GitHub.
Future Directions
- Turning the threshold criterion into an algorithm. Corollary 2 gives a practical criterion for choosing
τto ensure safe domain addition; how well this can be automated in high-dimensional learned feature spaces is left open. - Learning the mode structure rather than assuming it. The multimodal extension requires M modes with sufficient separation (Lemma 1), but real medical data may not come with a known M or cleanly separated components.
- Closing the gap between theory and small per-domain samples. The theoretical results assume large N, while the synthetic experiments deliberately used small finite N and showed all methods degrade; the paper's own framing suggests robust adaptation must handle finite-N asymmetries rather than relying on asymptotic guarantees.
- Broader evaluation on the DA metric and beyond medical imaging. The DA analysis in Figure 1 covers a limited set of baselines and tasks, and the anomaly-detection section is evaluated on the BMAD benchmark — extending both to more datasets, modalities, and non-medical domains is a natural next step.
Target Audience
This paper is best suited to machine learning researchers working on domain generalization, distribution shift, and data pooling; statisticians interested in propensity-score and causal matching applied to deep representation learning; and applied researchers in medical imaging or multi-institution studies who need to
Authors’ abstract
Pooling heterogeneous datasets across domains is a common strategy in representation learning, but naive pooling can amplify distributional asymmetries and yield biased estimators, especially in settings where zero-shot generalization is required. We propose a matching framework that selects samples relative to an adaptive centroid and iteratively refines the representation distribution. The double robustness and the propensity score matching for the inclusion of data domains make matching more robust than naive pooling and uniform subsampling by filtering out the confounding domains (the main cause of heterogeneity). Theoretical and empirical analyses show that, unlike naive pooling or uniform subsampling, matching achieves better results under asymmetric meta-distributions, which are also extended to non-Gaussian and multimodal real-world settings. Most importantly, we show that these improvements translate to zero-shot medical anomaly detection, one of the extreme forms of data heterogeneity and asymmetry. The code is available on https://github.com/AyushRoy2001/Beyond-Pooling.