Mind the Gap when Conditioning Amortised Inference in Sequential Latent-Variable Models

Justin Bayer, Maximilian Soelch, Atanas Mirchev, Baris Kayalibay, Patrick van der Smagt

Introduction

Variational Autoencoders (VAEs) are fundamental to deep generative modeling. When extended to sequential data, such as video or sensor streams, a common design choice is to employ a "causal" inference network. This network approximates the hidden state by conditioning only on past and current observations, effectively acting as a Bayesian filter. However, research from the Volkswagen Machine Learning Research Lab, presented at ICLR 2021, identifies a critical flaw in this approach: the "conditioning gap."

The Conditioning Gap

In training VAEs, the goal is to maximize the Evidence Lower Bound (ELBO). Traditionally, the gap between the ELBO and the true log-likelihood is attributed to the approximation gap (limited distribution family) and the amortization gap (suboptimal neural network parameters). This paper introduces the conditioning gap, which arises when the inference network is restricted to a subset of observations—specifically, when future data is omitted.

In sequential models, the true posterior of a latent state at time $t$ depends on the entire sequence. Restricting the inference network to partial conditioning (past and present only) doesn't just lose information; it fundamentally alters the optimization landscape, leading to biased generative models.

Theoretical Analysis: The "Veto" Effect

The authors demonstrate that when an inference network must produce a single output for multiple possible futures, the ELBO objective forces it to find a compromise that approximates a product of distributions rather than the true mixture of posteriors.

Figure 1: Comparison of the true mixture of posteriors (top) vs. the overconfident product of experts (bottom) that the ELBO approximates under partial conditioning.

In probability theory, a mixture acts like an "OR" gate, assigning mass wherever any plausible future suggests. Conversely, a product acts like an "AND" gate, assigning mass only where all plausible futures agree. This creates a "veto" effect: if even one possible future makes a state unlikely, the product distribution eliminates probability mass in that region. As shown in Figure 1, this results in overconfident, peaked posteriors that fail to capture the true multi-modal nature of the data.

Empirical Evaluation

The researchers evaluated three conditioning strategies—Partial (past only), Semi (past plus a small future window), and Full (entire sequence)—across several datasets.

Row-wise MNIST

In this task, a model observes an MNIST image row by row. The fully-conditioned model significantly outperformed the partially-conditioned one, achieving a higher log-likelihood ($\geq -88.45$ vs. $\geq -98.99$).

Figure 6: Relative frequency of digits generated by the model. The partially-conditioned model fails to capture the uniform distribution of the data, while the fully-conditioned model succeeds.

As shown in Figure 6, partial conditioning leads to "generative corruption," where the model fails to represent the diversity of the training data. The inference network's inability to see future rows during training prevents the generative model from learning the correct underlying distribution.

UAV Dynamics and Traffic Flow

On high-frequency flight data (Blackbird dataset) and stochastic traffic flow data (Seattle Loop), full conditioning consistently led to better ELBO scores and more accurate long-term predictions. In traffic scenarios, partially-conditioned models often failed to represent the multi-modal uncertainty inherent in sudden congestion events.

Conclusion

The "conditioning gap" is a significant hurdle in training sequential VAEs. While real-time applications may require causal inference, training should leverage the full sequence to avoid the "veto" effect and generative corruption. The authors conclude that for robust sequential latent-variable models, one must "mind the gap" and utilize smoothing (full conditioning) during the training phase.

Summary updated

BibTeX
@inproceedings{bayer2021mind,
  author = {Justin Bayer and Maximilian Soelch and Atanas Mirchev and Baris Kayalibay and Patrick van der Smagt},
  title = {{Mind the Gap when Conditioning Amortised Inference in Sequential Latent-Variable Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=a2gqxKDvYys},
}
Figure