Improving sequential latent variable models with autoregressive flows

Joseph Marino, Lei Chen, Jiawei He, Stephan Mandt

Introduction

Modeling high-dimensional sequences, such as video or audio, presents a significant challenge due to complex temporal dependencies and inherent data redundancies. In a typical video sequence, much of the information is static or follows highly predictable trajectories. Standard Sequential Latent Variable Models (SLVMs) and LSTMs often struggle to capture these dynamics directly from raw pixel data.

This research introduces a novel approach: instead of increasing model complexity to accommodate raw data, it proposes simplifying the data's dynamics to match the model's capacity. By employing autoregressive normalizing flows as a "temporal pre-processing" step, the authors enable models to focus on higher-level stochastic dynamics rather than low-level temporal redundancies.

Methodology: The Moving Frame of Reference

The core innovation of this work is the integration of Affine Autoregressive Normalizing Flows (AF) as a temporal normalization layer. This layer acts as a learned pre-processing step that establishes a moving frame of reference for the sequence.

Graphical representation of the autoregressive flow transformation, where the model predicts shift (μ) and scale (σ) from past observations to transform raw data x into noise y.

As illustrated in the graphical model above, for each time step $t$, the flow predicts a shift ($\mu$) and a scale ($\sigma$) based on previous observations ($x_{t-1}, x_{t-2}, ...$). The raw data $x_t$ is then transformed into a "noise" variable $y_t$ using the affine transformation:

$$y_t = \frac{x_t - \mu}{\sigma}$$

This process effectively "whitens" or decorrelates the sequence. By subtracting predictable components—such as a static background or linear motion—the flow leaves behind a residual $y_t$ that represents only the unpredictable deviations and complex motion. This transformed space is significantly easier for a high-level SLVM to model.

Temporal Decorrelation and Visualization

The effectiveness of this learned transformation can be seen in how it handles signal redundancy. Unlike hard-coded methods like finite differences (which simply model $x_t - x_{t-1}$), the autoregressive flow learns the optimal transformation for the specific dataset.

Visualization of the transformation from raw data (x) to noise (y) across a sequence of frames. The flow tracks the signal, resulting in a decorrelated noise space.

In the visualization above, the top plot shows the raw data $x$ (red/green lines) and the flow's prediction (dashed lines). The bottom plot shows the resulting noise $y$, which is centered around zero and exhibits significantly reduced temporal correlation. Quantitatively, the authors demonstrated that a 2-layer flow (2-AF) could reduce linear dependence to near zero ($|corr_y| < 0.01$).

Experimental Results

The researchers evaluated the SLVM + AF hybrid model across several benchmarks, including synthetic video (Moving MNIST), real-world activity video (KTH Actions, BAIR Robot Pushing), and various UCI time-series datasets.

Key Findings:

  • Improved Log-Likelihood: The hybrid model consistently achieved lower negative log-likelihood (NLL) than standard SLVMs. On the KTH dataset, NLL improved from $\le 4.63$ to $\le 2.39$ with the addition of a single AF layer.
  • Parameter Efficiency: The flow-based models often outperformed baselines while using fewer total parameters. For instance, on Moving MNIST, the SLVM + 1-AF model used 10.6M parameters compared to the 11.3M of the baseline SLVM, yet yielded superior results.
  • Sharper Video Synthesis: In high-capacity generative models like VideoFlow, incorporating an autoregressive flow in the latent space helped mitigate "blurriness," resulting in more physically coherent and sharper generated video samples.
  • Enhanced Generalization: By normalizing low-level appearance features that vary between training and test sets, the model focuses on the underlying dynamics, leading to better performance on unseen data.

Conclusion

By reframing sequence modeling as a data normalization problem, this paper demonstrates that autoregressive flows can significantly reduce the "workload" for latent variable models. This "temporal pre-processing" strips away predictable redundancies, allowing the model to capture the essence of complex, stochastic dynamics more effectively. While currently limited to continuous data, this approach provides a powerful framework for improving the efficiency and accuracy of high-dimensional sequence modeling.

Summary updated

BibTeX
@inproceedings{marino2021improving,
  author = {Joseph Marino and Lei Chen and Jiawei He and Stephan Mandt},
  title = {{Improving sequential latent variable models with autoregressive flows}},
  booktitle = {Machine},
  year = {2021},
  doi = {10.1007/s10994-021-06092-6},
}
Figure