Disentangling Variational Autoencoders

Rafael PastranaarXiv 2022 · DOI

Abstract

Variational Autoencoders (VAEs) are powerful generative models, yet their latent spaces often remain entangled, limiting their utility in precise design workflows. This study investigates the transformation of VAEs into controllable tools by isolating interpretable visual attributes. By leveraging the $\beta$-VAE framework and class-label conditioning, we demonstrate the successful disentanglement of latent dimensions corresponding to line weight, tilt, and width in the MNIST dataset.

Introduction

In professional creative workflows, the ability to manipulate specific visual attributes independently is paramount. However, standard VAEs often produce "entangled" latent spaces where a single variable change affects multiple features simultaneously—such as altering both the tilt and identity of a digit. This research explores methods to achieve independence and interpretability within these latent representations, transforming them from black-box generators into deliberate design tools.

Methodology

The study evaluates three distinct VAE configurations using Multi-Layer Perceptrons (MLPs) for both encoder and decoder components, with a fixed latent space size of $J=10$.

The VAE architecture utilizes an MLP-based encoder and decoder to map input images to a latent space z.
  1. Standard VAE: The baseline model following the original Kingma and Welling formulation.
  2. $\beta$-VAE: An extension introducing a hyperparameter $\beta > 1$ to the loss function. This increases pressure on the latent bottleneck, encouraging the discovery of the most efficient, statistically independent factors of variation.
  3. Conditional $\beta$-VAE: This model incorporates class labels (e.g., digit identity) during training. By offloading the representation of "identity" to the labels, the latent space is free to focus exclusively on "style" attributes.

Key Insights and Results

The transition from standard VAEs to conditional $\beta$-VAEs reveals a significant improvement in latent space organization and controllability.

Comparison of latent traversals for (a) Standard VAE, (b) $\beta$-VAE, and (c) Conditional $\beta$-VAE, highlighting the isolation of weight, tilt, and width.

The Reconstruction-Disentanglement Trade-off

Increasing $\beta$ forces the model to prioritize the most efficient factors of variation, often resulting in "dead" or inactive dimensions. While this improves control, it introduces a trade-off: higher $\beta$ values typically lead to blurrier reconstructions as fine-grained details are discarded to satisfy the bottleneck pressure.

Successful Attribute Isolation

The Conditional $\beta$-VAE (with $\beta=10$) successfully mapped specific latent dimensions to interpretable properties:

  • $z_6$: Controls line weight (thickness).
  • $z_9$: Controls lateral tilt.
  • $z_{10}$: Controls digit width.

These disentangled dimensions remained consistent across different digit classes; for example, the "tilt" dimension functioned identically whether the model was generating a '1' or an '8'. Furthermore, the conditioned model achieved a 15% lower negative ELBO (Evidence Lower Bound) compared to its unconditioned counterpart, indicating a more efficient fit.

Conclusion and Future Work

While class-label conditioning significantly enhances disentanglement, it relies on supervised data. Future research should investigate unsupervised alternatives, such as Independent Component Analysis (ICA), to achieve similar results without labels. Additionally, replacing MLPs with Convolutional Neural Networks (CNNs) could improve image fidelity and better capture spatial symmetries inherent in visual data. The development of quantitative metrics for disentanglement remains a critical step toward moving beyond visual heuristics.

Summary updated

BibTeX
@misc{pastrana2022disentangling,
  author = {Rafael Pastrana},
  title = {{Disentangling Variational Autoencoders}},
  year = {2022},
  eprint = {2211.07700},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.07700},
}
Figure