Semi-Supervised Generation with Cluster-aware Generative Models

Lars Maaløe, Marco Fraccaro, Ole WintherarXiv 2017

Introduction

Deep generative models, particularly Variational Auto-Encoders (VAEs), have revolutionized our ability to learn complex data distributions. However, these models often suffer from two significant limitations. First, the inactive unit problem occurs in deep hierarchical VAEs when higher latent layers collapse into noise, as lower layers become sufficient to explain the data. Second, standard generative models often fail to utilize the small amounts of labeled data typically available in real-world scenarios, treating labels as secondary to the unsupervised learning task.

To address these issues, we introduce the Cluster-aware Generative Model (CaGeM). CaGeM flips the traditional semi-supervised learning paradigm: instead of using unlabeled data to improve a classifier, it uses a small amount of labeled data to significantly boost the performance of the generative model itself.

Problem Formulation: The Inactive Unit Problem

In standard hierarchical VAEs, the model learns a mapping from data $x$ to latent variables $z_1, z_2, \dots$. As shown in Figure 4, the inference and generative paths are typically symmetric. However, during training, the model often finds a shortcut where the higher-level latent variables (e.g., $z_2$) are ignored, a phenomenon known as "pruning."

Standard hierarchical VAE architecture showing the generative and inference paths.

Methodology: Cluster-aware Generative Model (CaGeM)

CaGeM addresses these challenges by incorporating a discrete latent variable $y$ that explicitly models data clusters or classes. The model hierarchy consists of:

  • $z_1$: Captures low-level features.
  • $y$: A discrete variable representing the cluster or class.
  • $z_2$: Captures high-level global features.

Generative and Inference Innovation

The core innovation of CaGeM is its cluster-aware dependency structure. As illustrated in Figure 6, the generative model $p_\theta$ forces the higher latent layer $z_2$ to remain active by making the cluster selection $y$ dependent on it. This structural bottleneck ensures that the model cannot simply ignore $z_2$ if it is to accurately represent the data clusters.

The CaGeM generative model incorporates a discrete cluster variable $y$ to anchor the latent hierarchy.

For inference, CaGeM employs a bottom-up path ($x \to z_1 \to y \to z_2$) that mimics human-like feature extraction, moving from raw pixels to abstract concepts. The training objective combines the standard VAE Evidence Lower Bound (ELBO) with a classification loss. To prevent overfitting on small labeled sets, only parameters specifically related to the cluster variables are updated during labeled training steps.

Key Results and Insights

CaGeM was evaluated on the MNIST and OMNIGLOT datasets, yielding several key insights:

  • State-of-the-Art Generation: On permutation-invariant MNIST, CaGeM achieved a log-likelihood of -79.38 nats, outperforming established benchmarks like IWAE and LVAE.
  • Active Latent Space: Unlike standard VAEs where higher layers often collapse, CaGeM maintained high activity (measured by KL divergence) in its upper latent layers, proving the effectiveness of the cluster-aware bottleneck.
  • Competitive Classification: Despite its generative focus, CaGeM achieved a 1.16% error rate on MNIST using only 100 labels, demonstrating that a better understanding of data structure directly benefits categorization.
  • Disentangled Representations: PCA analysis revealed that CaGeM creates clearly separated, dense clusters in the latent space corresponding to actual data classes, whereas standard VAEs often produce disorganized representations.

Conclusion

CaGeM demonstrates that labels can act as "causal anchors," helping generative models disentangle factors of variation and maintain active hierarchical representations. By treating labels as a primary signal for structuring the latent space, CaGeM achieves superior generation and robust classification. Future work will explore scaling this approach to more complex architectures like Convolutional Neural Networks and datasets with larger numbers of categories.

Summary updated

BibTeX
@misc{maale2017semi,
  author = {Lars Maaløe and Marco Fraccaro and Ole Winther},
  title = {{Semi-Supervised Generation with Cluster-aware Generative Models}},
  year = {2017},
  eprint = {1704.00637},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1704.00637},
}
Figure