NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Weakly Supervised Disentangled Generative Causal Representation Learning

Xinwei Shen, Furui Liu, Hanze Dong, Qing Lian, Zhitang Chen, Tong Zhang

TL;DR

Standard disentanglement methods enforce statistical independence among latent variables, causing them to fail when generative factors are causally related in the real world. This paper introduces DEAR (Disentangled gEnerative cAusal Representation), a bidirectional generative framework that replaces the standard factorized prior with a learnable Structural Causal Model (SCM). Trained via adversarial gradient estimation with weak supervision, DEAR achieves causally controllable generation, recovers causal graphs, and significantly improves downstream sample efficiency and out-of-distribution robustness.

What Problem Does This Paper Address?

Disentangled representation learning seeks latent variables where each dimension corresponds to a distinct real-world factor of variation (e.g., lighting, object pose, or facial attributes). Most prior work assumes these underlying factors are mutually independent.

However, real-world factors are often causally linked—for example, lighting angle and object position directly cause shadow length and shadow position. The authors formally prove (Proposition 4) that bidirectional generative models equipped with independent priors fundamentally fail to disentangle causally related factors, even when provided with supervised ground-truth factor labels. The unsupervised generative loss and the supervised alignment loss pull the model in contradictory directions, forcing it toward an entangled solution unless the latent prior itself explicitly models causal structure.

Methods

To resolve this unidentifiability, the authors propose DEAR:

  • SCM Prior: Instead of an isotropic Gaussian prior, latent codes $z$ follow an invertible non-linear Structural Causal Model: $$z = f\left((I - A^\top)^{-1} h(\epsilon)\right)$$ where $\epsilon \sim \mathcal{N}(0, I)$, $A$ is the weighted adjacency matrix of a Directed Acyclic Graph (DAG), and $f, h$ are element-wise transformations (with $f$ being linear or piece-wise linear invertible functions).

  • Composite Prior: For unknown factor dimensionality $M$, DEAR sets latent dimension $k \ge m$ (where $m$ is the number of factors of interest). The first $m$ latents follow the SCM prior, while the remaining $k-m$ latents follow standard Gaussians to capture unstructured background variation.

  • Weak Supervision and Structural Priors: Rather than discovering causal graphs entirely from scratch, DEAR leverages known causal ordering or a known super-graph (which naturally enforces acyclicity), learning the edge weights jointly during training. Ground-truth factor supervision is applied via a supervised regularizer $\lambda L_{\text{sup}}(E)$ on a small subset of labeled data (as few as ~100 samples).
  • Adversarial Training: Because implicit conditionals and SCM priors lack tractable analytical densities, DEAR trains jointly using a bidirectional GAN formulation with a joint discriminator $D(x, z)$ to estimate the gradient of the Kullback-Leibler divergence between the encoder and generator joint distributions.

Datasets

The authors evaluate DEAR on synthetic and real datasets with causal dependencies, as well as an independent benchmark:

  1. Pendulum (Synthetic): 4 continuous factors: pendulum angle, light angle, shadow length, and shadow position related via physical projection laws, with added measurement noise and 20% corrupted disturbance samples.
  2. CelebA (Real Face Images): Evaluated on two causal subgraphs with binary attributes:
  3. CelebA-Smile: smile, cheekbone, mouth open, chubby, narrow eye, gender.
  4. CelebA-Attractive: young, gender, chubby, makeup, receding hairline, eye bag.
  5. MPI3D (Independent Benchmark): MPI3D-simu and MPI3D-real datasets (1M+ images with 7 independent factors of variation) used to verify performance in non-causal settings.

Key Insights and Ideas

  • Theoretical Conflict of Independent Priors: The core "aha" insight is why supervised independent-prior VAEs fail: enforcing an independent prior forces the latent marginals to factorize, but disentangling causal variables forces the inferred representations not to factorize. Thus, minimizing both objectives simultaneously is impossible without an SCM prior (Proposition 5).
  • Intervention vs. Traversal: Conventional latent traversals manipulate one variable while holding all others fixed. In a causal system, an intervention on a cause (e.g., $do(\text{pendulum\_angle} = c)$) must propagate to its descendants (shadow position/length) via ancestral sampling, while intervening on an effect leaves parent causes invariant.
  • Generalization to Unseen Interventions: By decomposing the joint distribution into modular causal mechanisms, the model can generate never-before-seen interventional images (e.g., female faces with beards, or bald female faces) from purely observational training data.

Key Results

  • Sample Efficiency in Downstream Classification: Classifiers trained on DEAR latents achieved superior sample efficiency. On CelebA with 100 training samples, DEAR achieved 84.44% test accuracy (vs. 71.78% for S-$\beta$-VAE, 77.10% for S-TCVAE, and 68.06% for a ResNet baseline). On Pendulum with 100 samples, DEAR achieved 90.62% vs. 79.95% for S-$\beta$-VAE.
  • Distributional Robustness Under Spurious Correlation: When spurious correlations (80% correlation with target) were injected into training:
  • On CelebA, baseline methods collapsed on the worst-case group to ~50–64%, while DEAR maintained 76.98% worst-case accuracy (averaging 83.60%).
  • On Pendulum, S-VAE dropped to 20.78% worst-case accuracy, whereas DEAR maintained 75.39%.
  • Causal Structure Recovery: When initialized with only the causal topological order, DEAR successfully pruned redundant edges, recovering the ground-truth adjacency weights on Pendulum and closely matching the true DAG on CelebA.

Limitations and Future Work

  • Prior Graph Knowledge: DEAR requires a causal topological ordering or a super-graph as prior knowledge. In scenarios where causal order is unknown, fully scratch causal DAG discovery remains an open challenge.
  • Confounding and Selection Bias: In complex real datasets with hidden confounders or selection biases (e.g., spurious correlations between age and gender in CelebA), DEAR can struggle to prune all spurious edges without stronger structural constraints.
  • IID Observational Restriction: The theoretical formulation assumes IID observational training data; extending DEAR to non-IID active intervention environments (e.g., reinforcement learning) remains an avenue for future work.

Summary updated

BibTeX
@article{shen2022weakly,
  author = {Xinwei Shen and Furui Liu and Hanze Dong and Qing Lian and Zhitang Chen and Tong Zhang},
  title = {{Weakly Supervised Disentangled Generative Causal Representation Learning}},
  journal = {J. Mach. Learn. Res.},
  year = {2022},
  url = {https://openreview.net/forum?id=ZQNHoNJdJUv},
}

Loading related content...

Figure