Technical Note on Equivalence Between Recurrent Neural Network Time Series Models and Variational Bayesian Models

Jascha Sohl-Dickstein, Diederik P. KingmaarXiv 2015

TL;DR

This paper reveals a surprising equivalence: the standard training objective for Recurrent Neural Networks (RNNs) on time series data is mathematically identical to a specific type of Variational Bayesian (VB) training objective. This insight opens doors for novel extensions to both RNNs and VB models, particularly by suggesting the use of multiple "particles" for RNN hidden states to better represent uncertainty.

What Problem Does This Paper Address?

Recurrent Neural Networks (RNNs) are powerful tools for modeling sequential data, like time series. They learn by maximizing a log-likelihood objective, essentially trying to predict the next data point given past information. Separately, Variational Bayesian (VB) methods offer a flexible framework for learning complex probability distributions, often by optimizing a lower bound on the data likelihood. While both are used for probabilistic modeling, their direct connections and potential for cross-pollination haven't always been explicit. This paper bridges this gap by showing that under specific conditions, the seemingly distinct training objectives of RNNs and VB models are actually the same. This equivalence suggests that insights from one field can inform the other, potentially leading to more robust and expressive models.

Methods

The core of the paper lies in a mathematical derivation that demonstrates the equivalence. The authors start by defining the standard RNN generative model and its training objective (maximizing log-likelihood). They then introduce a VB framework by defining a "generative" model (the RNN's dynamics) and an "inference" model (a way to approximate the hidden states given the observed data). Crucially, they set the inference model to be identical to the conditional distribution of the hidden states in the RNN's generative model. By deriving the variational lower bound on the log-likelihood within this VB framework, they show it mathematically collapses to the same objective function used for training standard RNNs.

As a novel extension stemming from this equivalence, the authors propose using "multiple particles" for the hidden state of an RNN. Instead of a single deterministic hidden state, they envision the hidden state being represented by multiple samples. This allows the RNN to naturally capture multimodal distributions over the visible data, which is particularly useful for tasks like language modeling where a single hidden state might struggle to represent diverse possibilities.

Datasets

Not discussed in the paper.

Key Insights and Ideas

  • RNNs as VB Models (and vice-versa): The most significant insight is that a standard RNN, when viewed through a specific VB lens, is a VB model, and its training objective is equivalent to a VB objective. This reframes how we think about these two powerful modeling paradigms.
  • Inference Model Choice is Key: The equivalence hinges on a specific choice for the VB inference model: it must perfectly match the posterior distribution of the RNN's hidden states given the observed data. This highlights the importance of carefully designing inference models in VB.
  • Uncertainty Representation with Multiple Particles: The paper proposes a novel extension: using multiple "particles" (samples) for the RNN's hidden state. This is a direct consequence of the VB perspective and offers a principled way for RNNs to represent uncertainty and multimodality in data, which is a limitation of standard deterministic RNNs.
  • Simplifying Complex Distributions: By using multiple particles, an RNN might be able to represent complex, multimodal data distributions using a lower-dimensional hidden representation, potentially reducing model complexity.

Key Results

The paper's primary result is the mathematical proof of equivalence between the standard RNN log-likelihood training objective and a specific variational Bayesian training objective. This is demonstrated through detailed derivations in Sections 2.1 and 2.2.

The paper also proposes a new training objective (Equation 17) for RNNs that incorporates multiple particles for the hidden state. This objective is derived in the Appendix and is presented as a way to improve the representation of multimodal data distributions.

Limitations and Future Work

  • Deterministic Hidden States: The paper notes that the equivalence relies on the RNN's hidden state dynamics being deterministic. If these dynamics were stochastic (i.e., not a delta function), the VB bound would still hold, but it would no longer be identical to the true log-likelihood.
  • Noise and Predictability: The authors discuss how adding noise to the hidden state (as in Equation 16) can make it harder to predict the next data point, which is generally undesirable for a generative model. They suggest that minimizing this noise contribution leads back to the deterministic case.
  • Future Work - Multiple Particles: The proposed "multiple particles" approach is presented as a promising avenue for future research. This extension could lead to more powerful RNNs capable of handling complex, multimodal data distributions more effectively. The paper suggests that these multiple samples could be initialized with different learned vectors, allowing them to explore different data modes.

Summary updated

Abstract

We observe that the standard log likelihood training objective for a Recurrent Neural Network (RNN) model of time series data is equivalent to a variational Bayesian training objective, given the proper choice of generative and inference models. This perspective may motivate extensions to both RNNs and variational Bayesian models. We propose one such extension, where multiple particles are used for the hidden state of an RNN, allowing a natural representation of uncertainty or multimodality.
BibTeX
@misc{sohldickstein2015technical,
  author = {Jascha Sohl-Dickstein and Diederik P. Kingma},
  title = {{Technical Note on Equivalence Between Recurrent Neural Network Time Series Models and Variational Bayesian Models}},
  year = {2015},
  eprint = {1504.08025},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1504.08025},
}
Figure