Abstract
We present a principled approach to incorporating labels in VAEs that captures the rich characteristic information associated with those labels. While prior work has typically conflated these by learning latent variables that directly correspond to label values, we argue this is contrary to the intended effect of supervision in VAEs—capturing rich label characteristics with the latents. To this end, we develop the CCVAE, a novel VAE model and concomitant variational objective which captures label characteristics explicitly in the latent space, eschewing direct correspondences between label values and latents. Through judicious structuring of mappings between such characteristic latents and labels, we show that the CCVAE can effectively learn meaningful representations of the characteristics of interest across a variety of supervision schemes. In particular, we show that the CCVAE allows for more effective and more general interventions to be performed, such as smooth traversals within the characteristics for a given label, diverse conditional generation, and transferring characteristics across datapoints.
Introduction
In standard semi-supervised Variational Autoencoders (VAEs), such as the classic M2 model, labels (e.g., "Smiling" or "Young") are typically treated as discrete latent variables. If a label is present, the model is forced to set a specific latent variable to that value. However, this approach fails to capture the rich visual complexity inherent in such attributes. A label like "Young" is not just a binary category; it encompasses a wide range of visual features that vary significantly between individuals.
The authors argue that forcing labels to occupy single discrete points in the latent space leads to several fundamental issues. First, rich "characteristic" information (e.g., the specific way a person looks young) is often pushed into unlabeled contextual latents, leading to entanglement. Second, binary latents prevent the generation of diverse variations for a single label. Finally, discrepancies often exist between the generative prior and the actual label distribution in the training data.
Methodology
The Characteristic Capturing VAE (CCVAE) addresses these limitations by decoupling labels from the latent variables themselves. Instead of the label being the latent, the latent space is partitioned into two components: $z_c$ (characteristic latents) and $z_{\setminus c}$ (contextual latents). The characteristic latents $z_c$ are specifically tasked with capturing the information required to predict the labels $y$.
Key technical components include:
- Structured Mappings: Specific dimensions of $z_c$ are mapped to specific labels, ensuring that only relevant information influences the corresponding classification.
- Natural Classifier: A classifier term $q(y|z_c)$ is derived naturally from the variational objective, avoiding the need for ad-hoc heuristic additions common in other semi-supervised models.
- Generative Prior: A conditional prior $p(z_c | y)$ is learned, allowing the model to represent the distribution of "styles" or characteristics associated with a given label.
Results and Discussion
The CCVAE was evaluated on diverse datasets, including CelebA (face attributes), CheXpert (chest X-rays), and MNIST/FashionMNIST.
Classification Performance
CCVAE demonstrated robust performance across various supervision rates. On the CelebA dataset with 100% labels, it achieved a classification accuracy of 90.0%, outperforming the M2 baseline (89.3%). Notably, the model maintained high performance even with minimal supervision, matching or beating specialized models when only 0.4% of the data was labeled.
Interventions and Style Transfer
The continuous nature of $z_c$ enables smooth traversals across characteristics. Unlike binary models, CCVAE allows for gradual adjustments in intensity, such as slowly increasing the breadth of a smile. Furthermore, the model enables "characteristic swaps," where the specific style of an attribute (e.g., a particular smile) can be transferred from one image to another while preserving the target image's identity and context. Quantitatively, CCVAE was superior at preserving label probabilities after such swaps, indicating successful disentanglement.
Conclusion
The CCVAE represents a shift in how labels are utilized in generative modeling, treating them as guides to structure the latent space rather than targets to be occupied. While the model shows great promise in disentanglement and diverse generation, future work may address hyperparameter sensitivity in balancing reconstruction and classification, as well as optimizing inference complexity for conditional generation in multi-class settings.
Summary updated