Identifying Latent Causal Content for Multi-Source Domain Adaptation

Yuhang Liu, Zhen Zhang, Dong Gong, Mingming Gong, Biwei Huang, Kun Zhang, Javen Qinfeng Shi

TL;DR

Most multi-source domain adaptation (MSDA) methods assume that the label distribution remains identical across domains, an assumption that frequently breaks in real-world scenarios. This paper proposes Latent Covariate Shift (LCS), a causal framework where the distribution of latent content shifts across domains while the label-generation mechanism stays invariant. By combining nonlinear Independent Component Analysis (ICA) with source label supervision, the authors prove that latent causal content can be identified up to scaling and introduce iLCC-MSDA, a method that outperforms standard representation-matching baselines when label distributions diverge.

What Problem Does This Paper Address?

In multi-source domain adaptation, a model is trained on labeled data from multiple source domains (e.g., medical images from several hospitals) to generalize to an unlabeled target domain (a new hospital).

Prevailing MSDA approaches assume conditional shift ($p_D(x|y)$ varies across domains while the label prior $p_D(y)$ is identical). Guided by this view, existing models attempt to map inputs $x$ into domain-invariant representations. However, in practice, label distributions vary significantly between environments (e.g., disease prevalence differs across hospital demographics). Theoretical results show that forcing representation invariance when label distributions differ leads to an unavoidable performance ceiling. When $p_D(y)$ changes, enforcing identical feature representations forces the model to blend or discard class-discriminative signals.

Methods

The authors formalize the data-generating process using a latent structural causal model:

  • Domain indicator ($D$) acts as an observed context variable.
  • Exogenous noise variables ($n_c, n_s$) determine the latent content ($z_c$) and latent style ($z_s$), respectively.
  • Causal structure: $n_c \to z_c \to y$, $z_c \to z_s$, and both $(z_c, z_s) \to x$. Here, $z_c$ represents invariant semantic content directly determining the label $y$, while style $z_s$ generates domain-specific rendering variations.

Under this causal graph:

  1. Identifiability via Nonlinear ICA: Leveraging identifiability theory for identifiable VAEs (iVAE), the noise variables $n = [n_c, n_s]$ can be recovered from $x$ conditioned on $D$ up to component-wise scaling and permutation.
  2. Resolving Permutation with Supervision: While nonlinear ICA leaves a permutation ambiguity (we cannot tell which recovered dimension is content vs. style), the authors prove that computing the mutual information between candidate latents and source labels $y^S$ isolates the content variables $n_c$ (and thereby $z_c$). The remaining scaling ambiguity is absorbed by the downstream non-linear classifier.
  3. iLCC-MSDA Objective: The framework optimizes: $$\max \lambda \Big( \mathbb{E}_{q}[\log p(x|D)] - \beta D_{\mathrm{KL}}(q(n|D, x) \,\|\, p(n|D)) \Big) + \mathbb{E}_{q}[\log p(y^S | n_c^S)] + \gamma \mathcal{L}_{\mathrm{ent}}$$
  4. ELBO term: Recovers latent factors up to permutation and scaling.
  5. $\beta$ weight: Enhances statistical independence among latent dimensions when the number of domains is small.
  6. Classification loss: Maximizes mutual information between $n_c^S$ and $y^S$.
  7. Target entropy regularization ($\mathcal{L}_{\mathrm{ent}}$): Minimizes conditional entropy $H(\hat{y}^T | n_c^T)$ to encourage decisive target predictions.
Domain (D) ───► Prior p(n|D)
                      │ (KL Divergence)
Input (x)  ───► Encoder q(n|D, x) ──► Latent Noise [nc, ns] ──► Decoder ──► Recon (x)
                                              │
                                              └──► Classifier p(y|nc) ──► Label (y)

Datasets

  • Synthetic Dataset: A 5-domain benchmark (4 source, 1 target) generated using a nonlinear structural causal model with known ground-truth latents ($z_c, z_s$) and polynomial mixing.
  • Resampled PACS: Standard PACS (Photo, Art, Cartoon, Sketch) has nearly uniform label distributions across domains ($D_{\mathrm{KL}} \approx 0.1$). The authors subsampled the classes to construct three benchmark variants exhibiting increasing label distribution shift:
  • $\text{PACS } (D_{\mathrm{KL}} \approx 0.3)$
  • $\text{PACS } (D_{\mathrm{KL}} \approx 0.5)$
  • $\text{PACS } (D_{\mathrm{KL}} \approx 0.7)$
  • Terra Incognita: Real-world camera trap data across four geographical locations (L28, L43, L46, L7) classifying 7 wildlife categories. This benchmark naturally exhibits severe, location-dependent class imbalance.

Key Insights and Ideas

  • Shift the Content, Keep the Mechanism: Instead of trying to force latent representations to align across domains, the model allows the distribution of content $p_D(z_c)$ to shift while keeping the causal mechanism $p(y|z_c)$ strictly invariant.
  • Full Graph Discovery is Unnecessary: Due to causal transitivity ($n_c \to z_c \to x$ vs. $n_c \to z_c \to z_s \to x$), completely identifying the full latent graph is ill-posed without restrictive parametric assumptions. However, identifying $z_c$ up to scaling is sufficient to learn an invariant, generalizable predictor.
  • Labels Break the ICA Permutation Indeterminacy: Unsupervised nonlinear ICA can recover latent factors only up to an arbitrary permutation. Source labels act as an anchor, identifying which recovered coordinates carry causal content.

Key Results

  • Synthetic Latent Recovery: iLCC-MSDA achieved a Mean Correlation Coefficient (MCC) of 0.96 between true and estimated $n_c$, translating to near-perfect generalization on the target domain.
  • Resampled PACS: As label distribution divergence increased, traditional representation-matching methods (MCDA, M3SDA, LtC-MSDA, T-SVDNet) degraded severely—eventually performing worse than standard Empirical Risk Minimization (ERM). In contrast, iLCC-MSDA maintained top accuracy across all shift levels:
  • At $D_{\mathrm{KL}} = 0.7$: iLCC-MSDA reached 86.0%, outperforming ERM (84.7%) and invariant representation methods (81.8%–83.6%).
  • Terra Incognita: iLCC-MSDA achieved an average accuracy of 63.2% (compared to ERM's 58.9% and LaCIM's 58.8%), with a standout gain on the difficult $\to$ L7 domain transfer (80.8% vs. 74.5% for ERM).
  • Ablation Findings: Removing the target entropy regularization ($\gamma = 0$) degraded Terra Incognita performance from 63.2% to 58.4%, demonstrating the importance of encouraging low-entropy predictions in the target domain.

Limitations and Future Work

  • Domain Richness Requirements: Nonlinear ICA identifiability requires that the auxiliary variable ($D$) modulates latent distributions across sufficiently many diverse environments (theoretically $2d+1$ domains). Real-world datasets often feature only 3–5 domains, requiring heuristic regularizers ($\beta$-weighting) to compensate.
  • Two-Stage Feature Pipeline: Because training identifiable VAEs directly on raw high-resolution pixels is computationally unstable, experiments relied on frozen ResNet-18 embeddings rather than end-to-end pixel generation.
  • Transitivity Blindspot: The method cannot differentiate direct effects from mediated paths in the style mechanism ($z_c \to z_s \to x$), meaning style latents remain unidentifiable without additional structural constraints.

Summary updated

Abstract

Multi-source domain adaptation (MSDA) learns to predict the labels in target domain data, under the setting that data from multiple source domains are labelled and data from the target domain are unlabelled. Most methods for this task focus on learning invariant representations across domains. However, their success relies heavily on the assumption that the label distribution remains consistent across domains, which may not hold in general real-world problems. In this paper, we propose a new and more flexible assumption, termed \textit{latent covariate shift}, where a latent content variable $\mathbf{z}_c$ and a latent style variable $\mathbf{z}_s$ are introduced in the generative process, with the marginal distribution of $\mathbf{z}_c$ changing across domains and the conditional distribution of the label given $\mathbf{z}_c$ remaining invariant across domains. We show that although (completely) identifying the proposed latent causal model is challenging, the latent content variable can be identified up to scaling by using its dependence with labels from source domains, together with the identifiability conditions of nonlinear ICA. This motivates us to propose a novel method for MSDA, which learns the invariant label distribution conditional on the latent content variable, instead of learning invariant representations. Empirical evaluation on simulation and real data demonstrates the effectiveness of the proposed method.
BibTeX
@article{liu2025identifying,
  author = {Yuhang Liu and Zhen Zhang and Dong Gong and Mingming Gong and Biwei Huang and Kun Zhang and Javen Qinfeng Shi},
  title = {{Identifying Latent Causal Content for Multi-Source Domain Adaptation}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2025},
}
Figure