Conditional Flow Variational Autoencoders for Structured Sequence Prediction

Apratim Bhattacharyya, Michael Hanselmann, Mario Fritz, Bernt Schiele, Christoph-Nikolas Straehle

Introduction

Predicting future states in dynamic environments—such as autonomous driving or robotic navigation—is inherently difficult due to the multi-modal nature of the future. A single past context can lead to multiple distinct, equally plausible outcomes. For instance, a vehicle approaching an intersection might turn left, right, or continue straight. Capturing this "one-to-many" mapping requires models that can represent complex probability distributions over sequences.

The Problem: Posterior Collapse in CVAEs

Conditional Variational Autoencoders (CVAEs) are widely used for structured sequence prediction. They utilize a latent variable $z$ to capture the underlying "intent" or "style" of a sequence. However, standard CVAEs typically assume a simple, uni-modal Gaussian prior for $z$. This assumption imposes a significant model bias, forcing the model to map a multi-modal reality into a single-mode latent space.

This mismatch often leads to "posterior collapse," a phenomenon where the model ignores the latent variables entirely. When the decoder finds it easier to rely solely on the past context $x$ rather than the constrained latent space, it produces "average" predictions that fail to capture the diversity of potential futures, often missing critical outliers.

Methodology: Conditional Flow Variational Autoencoders (CF-VAE)

To address these limitations, this paper introduces the Conditional Flow Variational Autoencoder (CF-VAE). The primary innovation is the replacement of the fixed Gaussian prior with an expressive, Conditional Normalizing Flow.

Comparison of standard Gaussian priors in CVAEs versus the proposed Conditional Flow priors in CF-VAE, demonstrating the resulting diversity in clustered predictions.

1. Conditional Normalizing Flows

Instead of a static bell curve, CF-VAE uses a sequence of invertible, non-linear transformations to warp a simple base distribution into a complex, multi-modal shape. Crucially, these transformations are conditioned on the past context $x$, allowing the latent space's topology to adapt to the specific scenario (e.g., a highway vs. a crowded intersection).

2. Regularization for Stability and Diversity

Training complex flows can be unstable. The authors propose two key regularization techniques:

  • Posterior Regularization (pR): This stabilizes training by fixing the variance of the posterior distribution, preventing the model from over-optimizing the latent space at the expense of data reconstruction.
  • Condition Regularization (cR): To combat posterior collapse, the authors occasionally withhold the direct context $x$ from the decoder. This "blinding" forces the decoder to extract essential information from the latent variable $z$, ensuring the flow-based prior is effectively utilized.

Experimental Evaluation

The CF-VAE was evaluated across three diverse datasets:

  • MNIST Sequences: Modeling handwriting strokes, where a single starting point can lead to various digits (e.g., '1', '8', or '9').
  • Stanford Drone Dataset (SDD): Real-world trajectories of pedestrians and cyclists in complex campus environments.
  • HighD Dataset: High-fidelity vehicle trajectories on German highways, featuring rare but critical events like lane changes.

Results and Discussion

The experimental results demonstrate the superiority of the CF-VAE framework:

  • Quantitative Gains: On the MNIST sequence task, CF-VAE achieved a 20% improvement in Negative Conditional Log-Likelihood (-CLL) compared to state-of-the-art baselines.
  • Trajectory Realism: In the SDD and HighD datasets, the model produced more realistic and fine-grained trajectory clusters. While standard CVAEs often collapsed to predicting straight-line "mean" paths, CF-VAE successfully maintained a diverse set of possible futures, including rare lane-change maneuvers.
  • Prior Expressivity: The results confirm that the prior is often the bottleneck in generative modeling. By making the prior context-dependent and multi-modal, the model significantly improves its ability to represent uncertainty.

Conclusion

The Conditional Flow Variational Autoencoder (CF-VAE) provides a robust solution for multi-modal sequence prediction. By leveraging conditional normalizing flows and targeted regularization, the model overcomes the limitations of Gaussian priors and avoids posterior collapse. This approach paves the way for more reliable and diverse predictions in safety-critical applications like autonomous systems.

Summary updated

BibTeX
@inproceedings{bhattacharyya2019conditional,
  author = {Apratim Bhattacharyya and Michael Hanselmann and Mario Fritz and Bernt Schiele and Christoph-Nikolas Straehle},
  title = {{Conditional Flow Variational Autoencoders for Structured Sequence Prediction}},
  booktitle = {MPG.PuRe},
  year = {2019},
}
Figure