When researchers cluster patients from several hospitals to find disease subtypes, the clusters often sort patients by hospital rather than by biology. Hospitals differ in how often they draw labs, which units they report, how they fill gaps in the record, and what they bill for. An algorithm that groups patients by their largest sources of variation will pick up these "fingerprints." The textbook fix is adversarial domain adaptation. A second network, the discriminator, tries to guess which hospital a patient came from, and the encoder that turns raw records into compact patient summaries is trained to defeat it. That fix has a basic flaw for subtype discovery. It makes the overall distribution of patients look the same at every hospital. Real hospitals do not see the same patients: a tertiary referral center has more of the sickest subtype than a community ICU. Forcing their patient distributions to match can push real subtypes together.
We propose to align each subtype separately rather than aligning hospitals as a whole. The method learns patient clusters and the share of each cluster at each hospital at the same time. The adversary is asked a narrower question: within a given cluster, can you tell which hospital a patient came from? If the answer is no, measurement artifacts are gone. Each hospital remains free to have more or fewer patients in any cluster, so true differences in case mix (the mix of patients a hospital treats) survive. The two-sentence version: standard alignment erases real differences in who each hospital treats along with differences in how they measure, and we keep the first while removing the second. We test this on intensive care unit (ICU) records, using planted ground truth and real multi-hospital data.
Core Claim
The goal for multi-site phenotyping is not that the patient summary $z$ carries no information about the site $s$. It is that $z$ carries no information about $s$ once the subtype $k$ is known:
$$ I(z; s \mid k) = 0 \quad \text{rather than} \quad I(z; s) = 0, $$
where $I$ denotes mutual information. Under the first condition, the site-specific subtype proportions $\pi_{s,k}$ (the fraction of site $s$'s patients in subtype $k$) can differ freely. Under the second, they are forced to be equal. Our claim is that on ICU data with realistic case-mix differences between sites, enforcing the subtype-specific condition recovers subtypes more faithfully than three alternatives: no alignment, marginal adversarial alignment, and simple per-site harmonization. "More faithfully" means agreement with planted truth, replication across hospitals, and separation of outcomes not used in training.
Where This Sits
The phenotyping side supplies the motivation and the base pipeline. Suresh et al. compress 24–48 hours of MIMIC-III vital signs into embeddings with a sequence autoencoder and cluster them with a Gaussian mixture. They show these latent cohorts beat care-unit groupings for downstream mortality models, but they work within a single hospital and have no way to separate biology from acquisition artifacts. Boussina et al. derive four sepsis phenotypes at UC San Diego and check them at UC Irvine. That check is external validation after the fact, not alignment during training. Static clustering studies such as Zhao et al. (immune subtypes of sepsis), Varoquaux et al. (schizophrenia subtypes from eight sites), and Wu et al. (self-organizing-map subgroups in SPRINT and ACCORD) show that discovered subgroups can carry large differences in prognosis and treatment response. That is the signal an overly aggressive alignment would destroy.
The adaptation side supplies the method and its main known failure. Chen et al. (BSP) show that standard adversarial alignment lets one dominant direction take over the feature space and suppresses the directions that separate classes. Lu et al. and Shi et al. report related collapse, and Zhang et al. and Nejjar et al. show that forced invariance strips useful domain-specific signal. These results constrain the design. Every existing remedy we found, including BSP, minimax entropy from Saito et al., and the disentangling autoencoders DIVA and UAI, relies on labeled classes to hold decision boundaries in place. Phenotyping has no such labels.
The closest clinical bridging work is entirely supervised. Cee et al. adversarially align GRU features from a sepsis source to COVID-19 targets for mortality and length-of-stay prediction. KnowRare aligns rare ICU conditions to similar conditions chosen from a knowledge graph, and its "phenotyping" means supervised multi-label prediction of diagnosis codes. ExtraCare splits eICU and OCHIN representations into site-stable and site-sensitive parts for supervised diagnosis prediction. None of these discovers subtypes, and none asks whether alignment erases them. We borrow from ExtraCare the habit of reporting what is site-sensitive, but our target is cluster structure, not a predictor.
Research Program
The model has four parts. The first is a sequence autoencoder in the style of Suresh et al., with inputs that include missingness masks; sampling frequency is itself a known site fingerprint. The second is a differentiable mixture head that gives each patient a soft cluster assignment $q(k \mid z)$ and keeps a learnable proportion vector $\pi_s$ for each site. The third is a site discriminator that receives the patient summary jointly with the cluster assignment, through an outer product as in conditional adversarial methods. It is trained with a gradient reversal layer, a layer that passes values unchanged going forward and flips the sign of gradients going backward, so the encoder learns to defeat the discriminator. The discriminator is scored against the baseline accuracy implied by $\pi_{s,k}$. It is therefore rewarded only for site information beyond what the case mix already explains. The fourth part is reconstruction, which keeps $z$ informative.
Training alternates between updating the clusters and proportions, as in expectation-maximization, and updating the encoder against the discriminator. The total objective is
$$ \mathcal{L} = \mathcal{L}_{\text{rec}} + \beta\, \mathcal{L}_{\text{mix}} - \lambda\, \mathcal{L}_{D}(z, q) + \gamma \max\!\big(0,\ \hat{I}(k; s) - \tau\big), $$
where $\mathcal{L}_{\text{rec}}$ is reconstruction error, $\mathcal{L}_{\text{mix}}$ is the mixture negative log-likelihood, and $\mathcal{L}_D$ is the cluster-conditioned discriminator's cross-entropy. The last term caps $\hat{I}(k;s)$, the estimated mutual information between cluster and site, at a budget $\tau$. The coefficients $\beta$, $\lambda$, and $\gamma$ weight the terms.
The cap is necessary. Without it, there is a degenerate solution in which the clusters simply become the sites. The conditional adversary cannot see this, because all the site information then lives in the cluster label rather than in $z$. We set $\tau$ in two ways and compare them. One is a hyperparameter sweep. The other is an estimate of case-mix shift computed from variables that hospital practice affects little, such as age, sex, and admission type, fit with a small mixture model on those variables alone.
The second deliverable is an evaluation protocol for multi-site phenotyping, because real multi-hospital data come without ground-truth subtypes. It has three parts. The first is a semi-synthetic benchmark built from a single hospital, MIMIC-III processed with MIMIC-Extract. Because only one hospital is involved, a reference clustering fit there has no site confound and can serve as ground truth. We split patients into pseudo-sites, oversampling some reference clusters at some sites to control case-mix shift. We then corrupt chosen pseudo-sites with controlled measurement artifacts: unit and calibration offsets on lab values, lab measurements dropped to half their usual frequency, extra missingness, and copy-forward filling. The second part is real multi-hospital data from eICU, using its highest-volume hospitals, plus MIMIC-III versus eICU as a two-domain shift. The third is a set of real-data checks that do not depend on labels: cross-site replication, outcome separation, and residual site leakage.
Baselines
The naive reference point is the Suresh et al. pipeline on pooled multi-site data with no site handling: the same sequence autoencoder, then a Gaussian mixture. It represents what practitioners do now, and it is the configuration whose clusters we expect to track hospitals. The only reported number for it is downstream: 24-hour mortality Macro-AUC improved from 0.809 to 0.823 on MIMIC-III when latent cohorts routed patients to separate prediction heads. We reproduce that single-site figure first to validate our implementation. No reported result was found on Lacuna for cross-site cluster recovery or cluster–site leakage on eICU, so every unsupervised comparison here is new and is run by us.
The strongest simple competitor is per-site harmonization. Every input variable is standardized within each hospital, or modeled with a site-specific offset inside the mixture, before the same autoencoder and clustering. It is cheap and widely used. It is a real threat when artifacts are additive shifts.
The strongest existing adaptation method is marginal adversarial alignment, a domain-adversarial autoencoder with gradient reversal. We also run it with Batch Spectral Penalization from Chen et al., which reported CDAN+BSP at 88.5% versus 86.6% for CDAN on Office-31 and is the published fix for the collapse we worry about. For context, ExtraCare reports a 12–16% relative F1 gain over DANN on eICU for supervised diagnosis prediction. That figure is not an unsupervised clustering result and cannot be compared directly. We also run an unsupervised DIVA-style variant that keeps a separate site latent in place of the class latent, to test whether generative disentanglement alone is enough.
Fairness is controlled throughout. All methods share the encoder architecture, input features, number of clusters (chosen by the same stability criterion), training epochs, and a fixed tuning budget of the same number of configurations each. Model selection uses only label-free criteria computed on a held-out split. Our planted labels and outcomes are never used for selection.
Three ablations isolate the key ingredient. Removing the cluster conditioning from the discriminator reduces our model to marginal alignment. Removing the cap on cluster–site information exposes the degenerate solution. Freezing clusters from a first pass, instead of updating them jointly, tests whether co-adaptation matters.
Beating the baselines means four things. On the semi-synthetic benchmark, adjusted Rand index against the reference clustering must be higher than that of every baseline across case-mix-shift levels. The per-site proportions $\pi_s$ must be recovered more accurately than in a post-hoc mixture fit. On eICU, cross-site replication must be higher at equal or lower leakage. Mortality separation across clusters, adjusted for site, must be no worse than in the unaligned model.
Why not just…?
Why not just standardize each variable within each hospital? Standardizing removes site means and variances whatever their cause, so a hospital that really has sicker patients gets shifted toward the average. This is the same erasure that marginal alignment performs, done linearly. It also leaves non-additive fingerprints untouched, such as sparser sampling and copy-forward filling. The semi-synthetic benchmark measures both effects directly, because we control the case-mix and artifact types separately. If harmonization with site-specific mixture offsets matches our method when only additive artifacts are present, we will say so. The claimed contribution would then shrink to the missingness and frequency artifacts, where a linear offset cannot help.
Why not just use domain-adversarial training, with a spectral penalty to prevent collapse? BSP restores spread in the feature space, but it still targets $I(z;s)=0$. Under true case-mix shift, that target is wrong, not merely hard to optimize. The ablation that removes cluster conditioning while keeping BSP tests exactly this. Our prediction is that the gap over BSP grows with the planted case-mix shift and disappears when site proportions are equal. If no gap appears at high case-mix shift, the core claim is false.
Why not just cluster each hospital separately and match clusters across hospitals? Clustering within a site avoids site confounds by construction. But small hospitals give unstable clusters, and matching assumes the same number of subtypes at every site, which fails when a subtype is rare at one site. This is the data-scarcity regime that KnowRare documents. It also gives no shared representation for routing patients at a new hospital. We include it as a baseline, report results stratified by site size, and expect it to be competitive only for the largest eICU hospitals.
Why not just stratify by established severity scores or care units? Suresh et al. found latent cohorts beat care units downstream, and Wu et al. found that an aggregate risk score hid a harmed subgroup. We still report severity-score bins as a floor for outcome separation, so that any learned clustering has to justify its complexity.
Proposed Experiments
The first decisive check is the semi-synthetic sweep on MIMIC-III pseudo-sites. We cross three levels of case-mix shift (equal proportions, moderate, and one cluster enriched at least threefold at one site) with four artifact types and plot adjusted Rand index for every method. The proposal succeeds if the conditional method's advantage over marginal alignment and harmonization grows with case-mix shift and stays at least even under equal proportions. It fails if harmonization matches it everywhere.
The second check is on real eICU hospitals. We fit on one group of hospitals and assign patients at held-out hospitals. Replication is measured by agreement between those transferred assignments and clusters fit natively on the held-out hospitals. Leakage is the accuracy of predicting the hospital from cluster labels, beyond what the demographic case-mix model predicts. Mortality and length-of-stay separation across clusters is measured with site as a covariate, and outcomes are never seen during training.
The third check repeats the MIMIC-III-to-eICU transfer and the Suresh-style multitask routing on a held-out site. The question is whether aligned clusters keep or improve the downstream gain that unaligned clusters show within a single hospital.
Throughout, we report learned $\pi_s$ against the demographic estimate. We also report which input variables carry the site signal that was removed, so a clinician can see what the alignment discarded. A result in which aligned clusters replicate across hospitals but lose outcome separation would count as a negative finding. It would mean the invariance came at the cost of the biology, and we would report it as such.
References
- Learning Tasks for Multitask Learning: Heterogenous Patient Populations in the ICU
- Representation Learning and Spectral Clustering for the Development and External Validation of Dynamic Sepsis Phenotypes: Observational Cohort Study
- Immune Subtypes in Sepsis: A Retrospective Cohort Study Utilizing Clustering Methodology
- Patterns of schizophrenia symptoms: hidden structure in the PANSS questionnaire
- Heterogeneity of Treatment Effects for Intensive Blood Pressure Therapy by Individual Components of FRS: An Unsupervised Data-Driven Subgroup Analysis in SPRINT and ACCORD
- Transferability vs. Discriminability: Batch Spectral Penalization for Adversarial Domain Adaptation
- When Unsupervised Domain Adaptation Meets Tensor Representations
- Information-Theoretical Learning of Discriminative Clusters for Unsupervised Domain Adaptation
- Adaptive Risk Minimization: Learning to Adapt to Domain Shift
- Uncertainty-guided alignment for unsupervised domain adaptation in regression
- Semi-Supervised Domain Adaptation via Minimax Entropy
- DIVA: Domain Invariant Variational Autoencoders
- Unsupervised Adversarial Invariance
- Domain-invariant Clinical Representation Learning by Bridging Data Distribution Shift across EMR Datasets
- Bridging data gaps of rare conditions in ICU: a multi-disease adaptation approach for clinical prediction
- Exploring Accurate and Transparent Domain Adaptation in Predictive Healthcare via Concept-Grounded Orthogonal Inference
- MIMIC-Extract: a data extraction, preprocessing, and representation pipeline for MIMIC-III