Improving Bi-directional Generation between Different Modalities with Variational Autoencoders

Masahiro Suzuki, Kotaro Nakayama, Yutaka MatsuoarXiv 2018

Abstract

We investigate deep generative models that can exchange multiple modalities bi-directionally, e.g., generating images from corresponding texts and vice versa. A major approach to achieve this objective is to train a model that integrates all the information of different modalities into a joint representation and then to generate one modality from the corresponding other modality via this joint representation. We simply applied this approach to variational autoencoders (VAEs), which we call a joint multimodal variational autoencoder (JMVAE). However, we found that when this model attempts to generate a large dimensional modality missing at the input, the joint representation collapses and this modality cannot be generated successfully. Furthermore, we confirmed that this difficulty cannot be resolved even using a known solution. Therefore, in this study, we propose two models to prevent this difficulty: JMVAE-kl and JMVAE-h. Results of our experiments demonstrate that these methods can prevent the difficulty above and that they generate modalities bi-directionally with equal or higher likelihood than conventional VAE methods, which generate in only one direction. Moreover, we confirm that these methods can obtain the joint representation appropriately, so that they can generate various variations of modality by moving over the joint representation or changing the value of another modality.

Introduction

In multimodal machine learning, a primary goal is to achieve bi-directional generation between disparate data types, such as synthesizing images from text descriptions and generating descriptive text from images. A common strategy involves mapping multiple modalities into a shared latent space, or "joint representation."

However, researchers have identified a significant challenge termed the "missing modality difficulty." This occurs when there is a substantial imbalance in information density between modalities—for instance, a high-dimensional image versus a low-dimensional attribute label. In such cases, standard joint Variational Autoencoders (VAEs) often experience "representation collapse." During training, the model may become overly dependent on the high-dimensional modality to structure the latent space. Consequently, if that modality is absent during inference (e.g., generating an image from only a label), the latent representation fails to provide the necessary structure, resulting in poor-quality, blurry, or noisy outputs.

Methodology

To address the representation collapse in joint multimodal models, this study proposes two novel architectures: JMVAE-kl and JMVAE-h.

Conceptual overview of the Joint Multimodal Variational Autoencoder (JMVAE) framework for bi-directional generation between images and attributes.
  1. JMVAE-kl: This architecture introduces modality-specific encoders in addition to the primary joint encoder. During the training phase, Kullback-Leibler (KL) divergence is employed as a regularization term to minimize the discrepancy between the distributions produced by the modality-specific encoders and the joint encoder. This ensures that the latent variable $z$ retains sufficient structural information to generate a missing modality even when only a single, lower-dimensional input is provided at test time.
  2. JMVAE-h: This model utilizes a stochastic hierarchical structure. By employing multiple layers of latent variables ($z_1, z_2, \dots$), the model increases its expressive capacity and robustness. This hierarchical approach prevents the latent space from collapsing by distributing the representational burden across multiple levels, which is particularly effective when dealing with complex, high-dimensional data.

Experimental Results

The proposed models were evaluated using the MNIST and CelebA datasets. MNIST provided a baseline for bi-directional generation between 784-dimensional handwriting images and 10-dimensional digit labels. CelebA presented a more complex challenge, involving 64x64 pixel facial images paired with 40 binary attributes (e.g., "smiling," "wearing glasses").

Quantitative analysis on the MNIST Label $\to$ Image task showed that JMVAE-kl achieved a conditional log-likelihood of -422.4, significantly outperforming the baseline JMVAE (-977.2) and even the standard one-way Conditional VAE (CVAE) at -448.8.

Qualitative results on the CelebA dataset demonstrated that while the baseline JMVAE failed to produce recognizable images from attributes, JMVAE-kl generated clear, accurate faces that faithfully reflected input prompts, such as adding eyeglasses or altering facial expressions. Furthermore, the models demonstrated the ability to navigate a continuous, meaningful latent manifold, allowing for the generation of varied images by moving through the joint representation space.

Discussion and Conclusion

The success of JMVAE-kl and JMVAE-h highlights that latent space collapse is a fundamental issue rooted in information density imbalances between modalities. By using encoder matching as a form of regularization, JMVAE-kl effectively teaches the model to infer missing visual details from minimal text prompts.

While JMVAE-h offers greater robustness through its hierarchical structure, it involves more computationally intensive iterative sampling. Future work may explore combining these VAE architectures with Generative Adversarial Networks (GANs) to improve the sharpness of high-frequency visual details, as VAEs alone can sometimes produce slightly blurred results. Overall, these methods provide a scalable and efficient framework for bi-directional multimodal generation, outperforming traditional models that are limited to single-direction conditional generation.

Summary updated

BibTeX
@misc{suzuki2018improving,
  author = {Masahiro Suzuki and Kotaro Nakayama and Yutaka Matsuo},
  title = {{Improving Bi-directional Generation between Different Modalities with Variational Autoencoders}},
  year = {2018},
  eprint = {1801.08702},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1801.08702},
}
Figure