Dynamic Variational Inference
Dynamic Variational Inference for Sequential Latent Variable Models · Also known as: sequential variational inference, temporal variational inference, variational inference for state-space models, DVI
Dynamic variational inference extends the variational inference framework to sequential and time-series settings by positing a structured approximate posterior that respects the temporal ordering of latent states. It jointly learns a generative model of how hidden states evolve over time and a recognition network that maps observed sequences back to those latent states, optimising a sequential evidence lower bound (ELBO).
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use dynamic variational inference when you have sequential or time-series data with suspected latent structure and need scalable approximate posterior inference — for example, modelling trajectories, sensor streams, speech, or longitudinal health records. It is especially suitable when the sequence length or dataset size makes MCMC impractical, or when a learned recognition network can amortise inference across many sequences. Avoid it when the temporal structure is absent or when model interpretability is critical and the neural recognition network is a black box — a classical state-space model or particle filter may be more transparent. Also avoid when the ELBO gap (posterior approximation quality) cannot be assessed and exact inference is affordable.
Strengths & limitations
- Scales to long sequences and large datasets via stochastic gradient optimisation and amortised inference.
- Jointly learns the generative dynamics and the recognition network end-to-end.
- Provides a tractable lower bound (ELBO) as a principled training objective.
- Can incorporate rich non-linear dynamics through neural network parameterisation.
- Amortised recognition network enables fast inference on new sequences at test time.
- The ELBO is only a lower bound; the gap between the ELBO and the true marginal likelihood can be large for highly non-Gaussian or multimodal posteriors.
- Mean-field or partially structured approximate posteriors may underestimate posterior variance, especially for correlated latent states.
- Sensitive to the choice of generative and recognition network architectures; poorly chosen models can collapse or fail to capture temporal dependencies.
- Training can be unstable: KL annealing or careful initialisation is often required to prevent posterior collapse.
Frequently asked
How does dynamic variational inference differ from a Kalman filter?
The classical Kalman filter assumes linear Gaussian dynamics and provides exact inference. Dynamic variational inference relaxes both assumptions — dynamics and observations can be non-linear and non-Gaussian — and uses a learned neural recognition network to approximate the posterior, at the cost of introducing an approximation error captured by the ELBO gap.
What is posterior collapse and how can I prevent it?
Posterior collapse occurs when the recognition network outputs a posterior very close to the prior, effectively ignoring the data. Mitigation strategies include KL annealing (gradually increasing the KL weight during training), using a free-bits heuristic that keeps a minimum KL per latent dimension, and monitoring reconstruction loss separately from the KL term.
Can I use dynamic variational inference with missing observations?
Yes. The generative model can be adapted to mask missing time steps from the reconstruction loss while still propagating latent state uncertainty forward. Some recognition architectures also handle irregular or missing observations by design, for instance using attention over available time points.
When should I prefer sequential Monte Carlo over dynamic variational inference?
Sequential Monte Carlo (particle filter) provides consistent, asymptotically exact posterior approximations and is better suited when the ELBO approximation quality is unknown or insufficient. Dynamic variational inference is preferable when sequence datasets are large, speed is critical, or amortised inference across many sequences is needed.
Is a GPU required for practical use?
Not strictly, but dynamic variational inference relies on neural network training with backpropagation through sequences, which becomes very slow on CPU for non-trivial sequence lengths or dataset sizes. GPU acceleration is strongly recommended for research-scale applications.
Sources
How to cite this page
ScholarGate. (2026, June 3). Dynamic Variational Inference for Sequential Latent Variable Models. ScholarGate. https://scholargate.app/en/bayesian/dynamic-variational-inference
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Dynamic Bayesian NetworkBayesian↔ compare
- Kalman FilterBayesian↔ compare
- Particle FilterBayesian↔ compare
- Sequential Monte CarloBayesian↔ compare
- Time series Bayesian inferenceBayesian↔ compare
- Variational InferenceBayesian↔ compare