Disentangled Recurrent Wasserstein Autoencoder

Jun Han, Martin Renqiang Min, Ligong Han, Li Erran Li, Xuan Zhang

TL;DR

R-WAE is a novel generative framework designed to learn and separate static "content" from dynamic "motion" in sequential data like videos and speech. By replacing the standard Variational Autoencoder (VAE) objective with a Wasserstein-based approach, the model achieves superior disentanglement and higher-quality video generation. It does this by explicitly maximizing the mutual information between the data and its latent representations.

The Challenge of Sequential Disentanglement

Unsupervised representation learning aims to take complex data (like a video) and compress it into a low-dimensional "latent space" where different features are neatly separated—a process known as disentanglement. For example, in a video of a person smiling, a perfectly disentangled model would have one set of variables representing the person's identity (static) and another representing the smile (dynamic).

While this has been highly successful for static images, sequential data presents a much harder challenge. Previous attempts often relied on the VAE framework, which uses KL-divergence to regularize the latent space. However, VAEs frequently struggle to match the "aggregated posterior" (the total distribution of all encoded data) to the prior distribution, leading to poor disentanglement. Furthermore, theoretical work suggests that unsupervised disentanglement is practically impossible without specific "inductive biases"—built-in assumptions about how the data is structured.

Methods: Introducing R-WAE

To overcome these limitations, the authors introduce the Recurrent Wasserstein Autoencoder (R-WAE).

Generative and Inference Models of R-WAE

Its architecture and objective function differ from standard models in four key ways:

  1. Static-Dynamic Split: The model explicitly encodes an input sequence into two distinct parts: a shared static latent code ($z^c$) and a sequence of dynamic latent codes ($z^m_t$). A recurrent prior (using LSTMs) ensures the dynamic codes remain temporally consistent.
  2. Wasserstein Objective: Instead of the KL-divergence used in VAEs, R-WAE minimizes the Wasserstein distance between the model's distribution and the true data distribution. This is implemented by regularizing the aggregated posterior using either Maximum Mean Discrepancy (MMD) or a GAN-based discriminator.
  3. Mutual Information Maximization: The authors provide a theoretical proof showing that minimizing the R-WAE loss is equivalent to maximizing the mutual information between the input data and the disentangled latent factors. This explains why R-WAE produces more "meaningful" latent codes than its VAE-based counterparts.
  4. Weak Supervision (Optional): If the number of possible actions in the sequence is known, the model can incorporate a categorical latent variable using a Gumbel-Softmax relaxation to further sharpen the separation of motions.

Key Insights

  • The Mutual Information Connection: The most significant theoretical contribution is drawing the link between Wasserstein distance and Mutual Information (MI). By regularizing the aggregated posterior, the model naturally preserves more information about the input in the latent space compared to VAEs, which often suffer from "posterior collapse" (ignoring latent dimensions).
  • Inductive Bias is Necessary: The authors embrace the idea that we must provide the model with structural hints about the world. By forcing the architecture to have a "static" path and a "recurrent dynamic" path, they provide the necessary structure for the model to learn what "content" versus "motion" means without requiring human labels.
  • Aggregated vs. Individual Matching: Standard VAEs try to force every single data point's encoding to look like a Gaussian. WAEs only care that the entire set of encodings looks like a Gaussian, giving the encoder much more freedom to organize the latent space effectively.

Experimental Results

The model was evaluated on four diverse datasets: Stochastic Moving MNIST, Sprites, MUG Facial Expression, and TIMIT (speech). R-WAE consistently outperformed baselines like DS-VAE and MoCoGAN:

  • Video Quality: On the MUG dataset, R-WAE(GAN) achieved a FID score of 10.86, significantly better than DS-VAE's 14.79 (lower is better). It also achieved the highest Inception Score (5.16).
  • Disentanglement Accuracy: On the Sprites dataset, R-WAE achieved lower classification errors when predicting attributes from the latent codes, indicating the factors were more "purely" separated.
  • Speech Verification: On the TIMIT dataset, R-WAE achieved a lower Equal Error Rate (EER) for speaker identity (4.73% vs 5.64% for DS-VAE), proving it better isolated the "timbre" of the voice from the linguistic content being spoken.
  • Consistency: Qualitative results demonstrated that R-WAE can swap the "content" of one video with the "motion" of another (style transfer) with high fidelity, even for long sequences ($T=100$).

Limitations and Future Work

While the model handles bouncing digits and simple animations exceptionally well, extremely complex or chaotic real-world motions might still challenge the recurrent prior. Interestingly, the paper notes that simpler architectures sometimes performed better at disentanglement than complex ones (like Ladder Networks), suggesting that "over-engineering" the encoder can sometimes hurt the purity of the latent factors.

Looking forward, the authors suggest extending this framework to text-to-video synthesis and video-to-video translation, where disentangled control over content and motion is highly desirable.

Summary updated

BibTeX
@inproceedings{han2021disentangled,
  author = {Jun Han and Martin Renqiang Min and Ligong Han and Li Erran Li and Xuan Zhang},
  title = {{Disentangled Recurrent Wasserstein Autoencoder}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=O7ms4LFdsX},
}
Figure