Unity by Diversity: Improved Representation Learning in Multimodal VAEs

Thomas M. Sutter, Yang Meng, Andrea Agostini, Daphné Chopard, Norbert Fortin, Julia E. Vogt, Babak Shahbaba, Stephan Mandt

TL;DR

Standard multimodal Variational Autoencoders (VAEs) often force different data modalities into a single shared latent space using rigid aggregation constraints, which severely degrades data reconstruction quality. This paper introduces the Multimodal Variational Mixture-of-Experts Prior (MMVM) VAE, which replaces these hard constraints with a soft-alignment mechanism via a data-dependent prior. The result is a framework that learns superior shared representations while preserving the fine-grained, modality-specific details necessary for high-quality data imputation.

What Problem Does This Paper Address?

When dealing with multimodal data (such as paired images and text, or frontal and lateral medical X-rays), we want machine learning models to do two things simultaneously: learn a unified representation that captures the shared concept, and accurately reconstruct or predict missing modalities (imputation).

Existing multimodal VAEs typically achieve information sharing by aggregating the outputs of individual modality encoders into a single joint posterior distribution. However, this creates a harsh trade-off. Forcing different modalities through a strict mathematical bottleneck (like a product or mixture of experts) introduces "aggregation disturbances." The model struggles to balance the shared concepts with the unique, uncompressed features of each individual modality (e.g., retaining a specific image background when the paired text modality only describes the foreground object).

Methods

Instead of forcing a hard aggregation in the latent space, the authors propose the MMVM VAE. This architecture allows each modality to maintain its own independent encoder and decoder pipeline, completely avoiding aggregation disturbances during data reconstruction.

Figure 1: Independent VAEs (Figure 1a) provide reconstructions for individual modalities but lack information sharing across modalities. Multimodal VAEs with joint posterior approximation (Figure 1b) aggregate unimodal posteriors into a joint posterior but may incur poor reconstruction quality. Our proposed MMVM VAE (Figure 1c) enhances independent VAEs with a data-dependent prior, h(z | X), allowing soft-sharing of information between modalities while preserving modality- specific reconstructions.

To facilitate information sharing, MMVM introduces a novel multimodal, data-dependent prior distribution $h(z|X)$. This prior is formulated as a mixture-of-experts of all the unimodal posteriors for a given data sample.

Mathematically, maximizing the Evidence Lower Bound (ELBO) with this prior is equivalent to minimizing the Jensen-Shannon (JS) divergence between all unimodal posterior approximations. This acts as a "soft constraint" or alignment mechanism. Much like contrastive learning, it minimizes the distance between positive pairs (different views of the same sample) in the latent space without forcing them into an identical bottleneck.

Datasets

The authors evaluated MMVM VAE across three controlled benchmarks and two complex, real-world datasets:

  1. Translated PolyMNIST: Three image modalities of digits with different backgrounds and random spatial translations.
  2. Bimodal CelebA: Face images paired with text descriptions of their attributes.
  3. CUB Image-Captions: Bird images paired with human-generated captions.
  4. Hippocampal Neural Activities: A real-world neuroscience dataset recording brain activity from five different rats (treated as five modalities) exposed to four distinct odor stimuli.
  5. MIMIC-CXR: A large-scale medical dataset consisting of paired frontal and lateral chest X-rays used to identify cardiopulmonary diseases.

Key Insights and Ideas

  • Soft Alignment over Hard Aggregation: By shifting the responsibility of cross-modal fusion from the encoder output to a data-dependent prior, the model allows individual encoders to preserve modality-specific information better.
  • Generative-Contrastive Bridge: The regularization term derived from the MMVM prior directly optimizes for pairwise similarities between positive pairs. This elegantly links the representation-learning benefits of contrastive learning with the generative capabilities of VAEs.
  • Overcoming Modality Imbalance: In real-world tasks, one modality is often weaker or less informative than another (e.g., lateral vs. frontal X-rays). MMVM's soft-sharing mechanism allows the weaker modality's representation to benefit significantly from the stronger one during training.

Key Results

The MMVM VAE consistently outperformed strong baselines (including AVG, PoE, MoE, MoPoE, and MMVAE+) across all datasets.

Benchmarks

On PolyMNIST, CelebA, and CUB, MMVM achieved the best balance, sitting in the top-right corner of evaluation plots with both the lowest reconstruction errors and the highest classification accuracy/generation coherence.

Experimental results on benchmark datasets showing classification accuracy vs. reconstruction error.

Neuroscience Application

In the rat hippocampus experiment, MMVM successfully aligned the latent spaces of all five rats to clearly separate the four odor stimuli. Baseline aggregation models like AVG completely failed, clustering the latent space by individual rats rather than by the shared experience of the odors.

Latent space visualizations showing clear odor separation by MMVM compared to baselines.

Medical Diagnosis (MIMIC-CXR)

When classifying 14 cardiopulmonary conditions on the MIMIC-CXR dataset, the latent representations learned by MMVM yielded an average AUROC of 73.1%. This outperformed independent VAEs (68.0%) and all aggregated multimodal VAE baselines, even surpassing a fully supervised deep ResNet baseline (70.5%).

Limitations and Future Work

The primary limitation of the MMVM VAE stems from its data-dependent prior: because the prior $h(z|X)$ requires an input $X$, unconditional generation is no longer natively supported. To generate entirely new samples from scratch, users must rely on post-hoc techniques like learning an ex-post density estimator or incorporating pseudo-inputs. Additionally, scaling the method to massive datasets requires substantial computational resources.

For future work, the authors suggest adapting this soft-alignment mixture prior to other powerful generative frameworks, such as diffusion models or multimodal masked autoencoders.

Summary updated

BibTeX
@inproceedings{sutter2024unity,
  author = {Thomas M. Sutter and Yang Meng and Andrea Agostini and Daphné Chopard and Norbert Fortin and Julia E. Vogt and Babak Shahbaba and Stephan Mandt},
  title = {{Unity by Diversity: Improved Representation Learning in Multimodal VAEs}},
  booktitle = {AABI},
  year = {2024},
  url = {https://openreview.net/forum?id=ZgGIM0MXWA},
}
Figure