An Improved Semi-Supervised VAE for Learning Disentangled Representations

Weili Nie, Zichao Wang, Ankit B. Patel, Richard G. BaraniukarXiv 2020

Introduction

In representation learning, the goal is to achieve "disentangled" representations where individual latent variables correspond to independent factors of variation. For instance, in an image of a red square, one part of the latent code should represent "red" and another "square." Changing the "red" variable should not affect the "square" attribute.

While unsupervised disentanglement is a popular research area, theoretical results suggest it is impossible without inductive bias or supervision. Semi-supervised learning—using a small fraction of labeled data—offers a practical solution. However, existing methods often use labels primarily to supervise the encoder. This paper argues that supervising the decoder with these labels is equally critical.

Methods: Label Replacement VAE (LaRVAE)

The authors propose LaRVAE, derived from a formal joint negative log-likelihood objective. The core innovation is the Label Replacement ($\mathcal{L}_{rep}$) loss term.

Comparison of graphical models for (a) a standard semi-supervised VAE and (b) the proposed LaRVAE.

Unlike standard semi-supervised VAEs that rely solely on label reconstruction (penalizing the encoder's guess $\hat{y}$ against the true label $y$), LaRVAE introduces a generative path where the ground-truth label $y$ is plugged directly into the decoder. This forces the decoder to learn the precise mapping from ground-truth factors to pixel space, providing a stronger gradient signal for the entire model.

Key Insights

  • The Decoder as a Teacher: Regularizing the generative process with labels stabilizes learning and improves disentanglement quality.
  • Principled Derivation: The Label Replacement term is not an ad-hoc addition but emerges naturally from decomposing the joint probability $p(x, y)$.
  • Nuisance Variables ($z$): Allocating a larger latent space for "nuisance" factors (unlabeled variations) prevents information leakage into the label-specific dimensions.

Evaluation and Results

LaRVAE was evaluated on synthetic benchmarks (dSprites, 3DShapes, Isaac3D) and the real-world CelebA dataset. It consistently outperforms state-of-the-art baselines like SS-$\beta$-TCVAE and SS-FactorVAE, particularly at low label rates (1% to 2.5%).

Quantitative comparison showing LaRVAE achieving lower error compared to the SS-beta-TCVAE baseline across different noise levels.

Quantitatively, it achieves higher Mutual Information Gap (MIG) scores. Qualitatively, latent traversals demonstrate that LaRVAE successfully isolates attributes, whereas baselines often suffer from "entanglement" where changing one factor inadvertently alters others.

Conclusion and Future Work

While effective, LaRVAE assumes fully observed labels for any labeled sample. Future work includes extending the framework to handle partially observed labels and testing on more complex, unconstrained real-world datasets.

Summary updated

BibTeX
@misc{nie2020improved,
  author = {Weili Nie and Zichao Wang and Ankit B. Patel and Richard G. Baraniuk},
  title = {{An Improved Semi-Supervised VAE for Learning Disentangled Representations}},
  year = {2020},
  eprint = {2006.07460},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.07460},
}
Figure