Unsupervised Learning of Global Factors in Deep Generative Models

Ignacio Peis, Pablo M. Olmos, Antonio Artés

TL;DR

This paper introduces the Unsupervised Global VAE (UG-VAE), a novel deep generative model that learns interpretable global factors of variation in data without explicit supervision. By combining a structured local latent space with a global Gaussian latent variable, UG-VAE achieves unsupervised domain alignment and can disentangle complex group-level features in datasets like faces and handwritten digits.

What Problem Does This Paper Address?

Traditional Variational Autoencoders (VAEs) often assume data is independent and identically distributed (i.i.d.). While effective for many tasks, this assumption limits their ability to capture higher-level dependencies between data points, which are crucial for understanding complex structures and relationships within datasets. Existing methods for modeling these dependencies often rely on semi-supervised approaches or require careful tuning of hyperparameters to achieve disentanglement. This paper aims to bridge this gap by proposing a fully unsupervised method that can learn interpretable global factors that influence entire groups of data, going beyond individual data point variations.

Methods

The core of the proposed method is the Unsupervised Global VAE (UG-VAE). It builds upon the VAE framework by introducing two key innovations:

  • Structured Local Latent Space: Instead of a simple prior for the local latent variables ($z$), UG-VAE uses a Gaussian mixture model. This mixture is conditioned on a discrete variable ($d$) that acts as a clustering mechanism, allowing the model to separate fundamental data features within groups.
  • Global Gaussian Latent Variable ($\beta$): A global latent variable $\beta$ is introduced, which influences the parameters of the local latent space mixture. This $\beta$ is shared across a group of data samples and is designed to capture overarching, group-level features. The model learns a joint distribution over local ($z, d$) and global ($\beta$) latent variables.

The inference model is also structured to efficiently approximate the posterior distributions of these latent variables. Notably, the UG-VAE does not require additional hyperparameters in the Evidence Lower Bound (ELBO) to enforce disentanglement, unlike some prior works.

Datasets

The UG-VAE was trained and evaluated on the following datasets:

  • CelebA: A large-scale face attributes dataset.
  • MNIST: A dataset of handwritten digits.
  • 3D FACES: A dataset of 3D scanned faces.
  • 3DCars: A dataset of car images.
  • 3D Chairs: A dataset of chair images.
  • Cars Dataset: Another dataset of car images.

The paper emphasizes that training batches were constructed randomly, without explicit group labels, to ensure unsupervised learning.

Key Insights and Ideas

  • Unsupervised Disentanglement of Global Factors: The UG-VAE successfully learns interpretable disentangled representations in the global latent space ($\beta$) without any user-defined regularization terms in the ELBO. This is a significant advantage over methods that require explicit disentanglement objectives.
  • Domain Alignment via Global Latent Space: The global latent variable $\beta$ proves capable of capturing domain-specific information. The model can interpolate between different datasets in this global space, enabling unsupervised domain alignment.
  • Clustering-Induced Interpretability: The combination of a structured local latent space (Gaussian mixture) and the global variable $\beta$ is crucial. Without the clustering mechanism in the local space, the global factors become less interpretable.
  • Hierarchical Feature Learning: The model effectively learns a hierarchy of features, where the global variable $\beta$ captures broad, group-level characteristics (e.g., domain, hair color), and the local variable $z$ captures fine-grained variations within those characteristics (e.g., hair style, digit shape).

Key Results

  • Interpretable Global Factors: For CelebA, the global latent space $\beta$ was shown to disentangle features like skin color, beard presence, and face contrast. For MNIST, it captured handwriting characteristics like cursive style, thickness, and contrast.
  • Unsupervised Domain Alignment: The UG-VAE demonstrated successful interpolation between CelebA and 3D FACES datasets. By interpolating in the global space, the model could transform images from one domain to another, with $\beta$ capturing the domain shift.
  • Discrimination of Structured Batches: The model could discriminate between batches of images with non-trivial underlying structures, such as groups of people with black vs. blond hair, or men vs. women, solely based on the posterior distribution of $\beta$. This was quantitatively validated using SVM classifiers, achieving high accuracy.
  • Extended Experiments: Similar domain alignment and structured batch discrimination capabilities were shown with other datasets like 3D Cars and 3D Chairs, and for structured MNIST batches (even, odd, Fibonacci, prime numbers).

Limitations and Future Work

  • Interpretability of Local Factors: While the global factors are interpretable, the paper notes that the disentanglement of individual dimensions within the local latent space ($z$) is not explicitly studied or guaranteed.
  • Impact of Local Structure: The authors emphasize that the interpretability of global factors is heavily dependent on the structured clustering prior in the local latent space. Without it, the global space becomes less informative.
  • Hyperparameter Sensitivity: Although the model avoids explicit disentanglement hyperparameters, the number of clusters ($K$) and latent dimensions ($d, g$) still need to be set.
  • Future Work: The paper suggests exploring the impact of different local space structures and further investigating the disentanglement properties of the local latent variables. The potential for applying UG-VAE to more complex datasets and tasks requiring nuanced understanding of data dependencies is also implied.

Summary updated

Abstract

We present a novel deep generative model based on non i.i.d. variational autoencoders that captures global dependencies among observations in a fully unsupervised fashion. In contrast to the recent semi-supervised alternatives for global modeling in deep generative models, our approach combines a mixture model in the local or data-dependent space and a global Gaussian latent variable, which lead us to obtain three particular insights. First, the induced latent global space captures interpretable disentangled representations with no user-defined regularization in the evidence lower bound (as in beta-VAE and its generalizations). Second, we show that the model performs domain alignment to find correlations and interpolate between different databases. Finally, we study the ability of the global space to discriminate between groups of observations with non-trivial underlying structures, such as face images with shared attributes or defined sequences of digits images.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
CelebA · batch classification: Black · 0 vs blond (1UG-VAETest accuracy0.98split: test · batch-size=128 · classifier=RBF SVM
Source quote
L179: RBF SVM │ 1.0 │ 0.98
CelebA · batch classification: Black · 0 vs blond · 1 vs random (UG-VAETest accuracy0.54split: test · batch-size=128 · classifier=linear SVM
Source quote
L181: \multirow{2}{*}{Black (0) vs blond (1) vs random (2)} │ Linear SVM │ 0.91 │ 0.54
CelebA · batch classification: Black · 0 vs blond · 1 vs random (UG-VAETest accuracy0.56split: test · batch-size=128 · classifier=RBF SVM
Source quote
L182: RBF SVM │ 0.85 │ 0.56
CelebA · batch classification: Male · 0 vs female · 1 vs random (UG-VAETest accuracy0.66split: test · batch-size=128 · classifier=linear SVM
Source quote
L187: \multirow{2}{*}{Male (0) vs female (1) vs random (2)} │ Linear SVM │ 0.84 │ 0.66
CelebA · batch classification: Male · 0 vs female · 1 vs random (UG-VAETest accuracy0.63split: test · batch-size=128 · classifier=RBF SVM
Source quote
L188: RBF SVM │ 0.89 │ 0.63
BibTeX
@article{peis2023unsupervised,
  author = {Ignacio Peis and Pablo M. Olmos and Antonio Artés},
  title = {{Unsupervised Learning of Global Factors in Deep Generative Models}},
  journal = {Pattern Recognition},
  year = {2023},
  doi = {10.1016/j.patcog.2022.109130},
}
Figure