Abstract
Widely used deep latent variable models (DLVMs), in particular Variational Autoencoders (VAEs), employ overly simplistic priors on the latent space. To achieve strong clustering performance, existing methods that replace the standard normal prior with a Gaussian mixture model (GMM) require defining the number of clusters to be close to the number of expected ground truth classes a-priori and are susceptible to poor initializations. We leverage VampPrior concepts (Tomczak and Welling, 2018) to fit a Bayesian GMM prior, resulting in the VampPrior Mixture Model (VMM), a novel prior for DLVMs. In a VAE, the VMM attains highly competitive clustering performance on benchmark datasets. Integrating the VMM into scVI (Lopez et al., 2018), a popular scRNA-seq integration method, significantly improves its performance and automatically arranges cells into clusters with similar biological characteristics.
Introduction
Deep Latent Variable Models (DLVMs), such as the Variational Autoencoder (VAE), are fundamental tools for dimensionality reduction and representation learning. A common limitation of these models is the assumption of a simple, unimodal Gaussian distribution for the latent space. This assumption often fails to capture the inherent multi-modal structure of complex datasets, such as distinct cell types in genomics or discrete classes in image data.
Existing approaches to incorporate Gaussian Mixture Models (GMMs) as priors face significant challenges:
- Initialization Sensitivity: Models often fail to converge to meaningful clusters without precise initialization.
- Cluster Selection: The number of clusters ($K$) typically must be specified a-priori.
- The VampPrior Paradox: While the original VampPrior (Variational Mixture of Posteriors) improved initialization, it often suffered from "over-clustering" and a mathematical conflict between low-variance data encoding and high-variance prior components.
The VMM Approach
The VampPrior Mixture Model (VMM) addresses these issues by treating the prior as a Bayesian GMM with a truncated Dirichlet Process (DP) approximation. Key innovations include:
- Pseudo-inputs: Cluster centers are defined by "pseudo-inputs"—synthetic data points passed through the model's encoder. This couples the prior directly to the learned data representation, ensuring robust initialization.
- Automatic Pruning: Using a Bayesian framework, the model can initialize with a large number of potential clusters (e.g., $K=100$) and automatically prune redundant components during training.
- Alternating Optimization: Training alternates between Variational Inference for data representation and Empirical Bayes for prior updates.
- Precision Parameterization: The VMM introduces separate precision (inverse variance) matrices for each cluster, resolving the "precision paradox" by allowing the model to balance precise data encoding with flexible prior coverage.
Experimental Evaluation
The VMM was evaluated on two primary domains:
- Computer Vision: Unsupervised clustering benchmarks using MNIST and Fashion MNIST.
- Single-Cell Genomics: Integration into the
scVIframework for single-cell RNA-seq (scRNA-seq) analysis across datasets including Cortex, PBMC, Split-seq, and a Lung Atlas. These datasets are characterized by high noise and technical "batch effects."
Results and Discussion
The VMM demonstrates superior performance in both clustering accuracy and biological data integration.
Benchmark Performance
On the MNIST dataset, the VMM achieved a state-of-the-art unsupervised clustering accuracy of 96.0%, significantly outperforming other GMM-VAE variants such as VaDE (85.7%) and the original VampPrior (94.5%).
Biological Application
When applied to scRNA-seq data, the VMM improved the ability of scVI to preserve biological signals while mitigating technical noise. In the Lung Atlas dataset, which involves 16 donors and 17 cell types, the VMM notably enhanced "Bio Conservation" metrics compared to the standard normal prior.
Qualitative Insights
The VMM exhibits high interpretability, discovering semantically meaningful sub-clusters. For instance, it successfully distinguished between different styles of the same digit (e.g., "slashed" vs. "regular" 7s) and different types of apparel (e.g., "handbags" vs. "shoulder bags") without explicit labels. The model's granularity can be controlled via the Empirical Bayes learning rate and batch size, where larger batches typically justify a higher number of utilized clusters.
Conclusion
The VampPrior Mixture Model provides a robust and flexible framework for learning structured latent spaces. By resolving the initialization and variance issues of previous GMM-based priors, it enables automatic discovery of data clusters in both image and genomic domains. Future work will explore VMM as a drop-in prior for multi-modal and spatial transcriptomics models.
Summary updated