Dynamic Bayesian network

On this page 7

A dynamic Bayesian network (DBN) is a Bayesian network extended over discrete time, in which variables at one time step depend on variables at the same step and at earlier steps. Among probabilistic models in artificial intelligence, it is the standard framework for reasoning about sequences when the state of a system is only partly observed.

A DBN generalizes both the hidden Markov model and the linear dynamical system (Kalman filter model) by allowing the hidden state to be factored into many variables with their own dependency structure. This factorization makes it possible to describe complex processes compactly, such as a patient, a robot or a speech signal changing over time.

How a dynamic Bayesian network is structured

A DBN is usually specified as a two-slice temporal Bayesian network (2TBN) together with a prior network for the first time step. The 2TBN defines the conditional distributions of variables at time t given their parents at time t and time t-1, and the same template is unrolled for as many steps as needed.

Two assumptions make this compact description possible. The first-order Markov assumption states that the future is independent of the past given the present slice, and the stationarity assumption states that the transition probabilities do not change over time. Both can be relaxed, at the cost of more parameters.

ComponentRoleTypical form
Prior networkDistribution over variables at time 0Ordinary Bayesian network
Transition modelHow the state evolves between slicesConditional probability tables or Gaussians
Observation modelHow measurements depend on hidden stateEmission distributions
Intra-slice edgesDependencies within the same time stepDirected acyclic graph
Inter-slice edgesDependencies from t-1 to tDirected edges forward in time
Components of a DBN specification

The number of parameters grows with the number of parents per variable, not with the length of the sequence, because the same template is reused at every step. This parameter tying is what lets a DBN learn from a few long sequences, and it also explains why a poorly chosen slice structure affects every time step equally.

Variables in a DBN may be discrete, continuous or mixed. Discrete variables use conditional probability tables, continuous ones commonly use linear Gaussian conditionals, and hybrid models combine both, although exact inference in hybrid networks is usually restricted to special structures such as conditional linear Gaussian models.

Inference tasks in dynamic Bayesian networks

Inference in a DBN answers questions about hidden variables given a sequence of observations. The main tasks are filtering, smoothing, prediction and most likely explanation, and each corresponds to a different use of the evidence collected so far.

TaskQuestion answeredCommon algorithms
FilteringCurrent state given evidence so farForward pass, Kalman filter, particle filter
SmoothingPast state given all evidenceForward-backward algorithm, RTS smoother
PredictionFuture state given evidence so farForward pass without new evidence
Most likely explanationMost probable state sequenceViterbi algorithm
Parameter learningModel parameters from dataExpectation maximization, Bayesian methods
Standard inference tasks and their algorithms

Exact inference is possible by unrolling the network and applying the junction tree algorithm or a specialized interface algorithm that passes messages between slices. However, hidden variables in a slice tend to become coupled over time, so the exact belief state can grow exponentially with the number of state variables.

For this reason, practical systems rely on approximate inference: the Boyen-Koller algorithm keeps a factored belief state, particle filtering represents the belief with weighted samples, and variational methods fit a tractable approximating distribution.

Many familiar sequence models are special cases of the DBN with a restricted structure. Seeing them this way clarifies when the extra generality of a full DBN is worth its computational cost.

ModelHidden stateDistributions
Hidden Markov modelOne discrete variableDiscrete transitions and emissions
Kalman filter modelContinuous vectorLinear Gaussian
Factorial HMMSeveral independent discrete chainsDiscrete, coupled through observations
Switching state-space modelDiscrete mode plus continuous stateMixed, piecewise linear
General DBNAny factored set of variablesAny conditional distributions
DBN and its well-known special cases

A DBN is directed and generative, which distinguishes it from a conditional random field, an undirected model trained to predict labels from observations. Recurrent neural networks also model sequences, but they learn a deterministic hidden state and do not provide explicit, interpretable probabilistic semantics.

Applications and design choices

DBNs are chosen when domain structure is known, data are limited or noisy, and decision makers need interpretable uncertainty. Typical domains include speech recognition, robot localization, medical monitoring, fault diagnosis and gene regulatory network inference.

SituationRecommended choiceReason
Expert knowledge of causal linksHand-specified structureFewer parameters, better interpretability
Abundant sequential dataStructure learning with scores such as BICDiscovers dependencies from evidence
Many coupled hidden variablesParticle filtering or Boyen-KollerExact inference becomes intractable
Real-time trackingOnline filtering onlySmoothing requires future evidence
Irregular sampling intervalsContinuous-time Bayesian networkDiscrete slices assume fixed steps
Design decisions when building a DBN

Limitations and common pitfalls

The fixed time-slice granularity is a central limitation: processes with events at very different time scales force either many redundant slices or a loss of detail. In addition, the stationarity assumption may fail when the underlying system drifts, which calls for regime-switching variables or periodic retraining.

  • Belief-state entanglement makes exact inference infeasible for large models, even when the 2TBN looks sparse.
  • Structure learning is data-hungry and can find spurious temporal links in short sequences.
  • Learning with hidden variables through expectation maximization converges only to local optima, so initialization matters.
  • Directed edges are often read as causal, but causal interpretation requires additional assumptions beyond the fitted model.

The idea in brief

A dynamic Bayesian network is a way to reason about things that change over time. Think of a weather forecast. Today’s weather depends partly on yesterday’s. You also cannot see everything directly. You only have clues, such as a thermometer or clouds.

The network links these pieces together step by step. It updates its best guess each time a new clue arrives. It also says how confident it is in that guess.

A practical scenario

An intensive care unit uses a DBN to monitor patients for early signs of sepsis. Each one-hour slice contains hidden variables such as infection status and circulatory stability, plus observed variables such as heart rate, temperature, blood pressure and lactate level. Clinicians and data scientists define the structure together, and parameters are learned from several thousand anonymized patient records.

At each new measurement, the system runs filtering to update the probability of sepsis. When the probability exceeds a threshold of about 0.6 for two consecutive hours, the nursing team receives an alert. Because missing lab values are handled naturally as unobserved variables, the model keeps working when tests are delayed.

In a retrospective evaluation, the alerts arrive several hours earlier than the previous rule-based score, with fewer false alarms, and clinicians value that each alert shows which observations drove the change in belief.