A dynamic Bayesian network (DBN) is a probabilistic graphical model that describes how a collection of random variables evolves over time. It extends a Bayesian network by representing variables at successive time steps and specifying dependencies both within and between those steps. A compact temporal template can therefore define a probability distribution over sequences of arbitrary length. DBNs provide a common framework for modeling partially observed systems, combining observations from multiple sources, and reasoning about uncertain temporal processes.
Representation and mathematical definition
A Bayesian network represents a joint probability distribution using a directed acyclic graph. Each node corresponds to a variable, and each node has a local conditional distribution given its parents. The graph encodes conditional independence assumptions that permit the joint distribution to factor into these local distributions.
A DBN applies this construction to time-indexed variables. Let
denote the variables at time . A time slice contains the variables associated with one time step. Edges may connect variables within a slice or connect earlier variables to later ones.
In the common first-order formulation, the complete slice satisfies the Markov property:
The model consists of an initial distribution and a transition model . For a sequence ending at ,
The transition distribution itself factorizes according to the graph:
where contains parents in the preceding slice and, where allowed, parents in the current slice. Within-slice edges must be acyclic. The initial distribution has its own compatible factorization.
Variables may be discrete, continuous, or a mixture of both. Their local distributions may be conditional probability tables, Gaussian models, or other parameterized conditional distributions.
Two-slice templates and unrolling
A two-slice temporal Bayesian network specifies the dependencies needed to connect two consecutive slices. Repeating this template produces an unrolled network over a particular time interval.
The repeated structure distinguishes a DBN from an arbitrary Bayesian network containing time-indexed variables: it provides a compact rule for generating a family of temporal networks. The term “dynamic” refers primarily to the evolving modeled system, not to a requirement that the graph structure itself change with time.
Although feedback is common in dynamic systems, the unrolled graph remains acyclic. For example, may influence , and may influence , without producing a directed cycle in the unrolled network.
Temporal assumptions
Markov order and state construction
A first-order assumption concerns the full state representation, not necessarily each observed variable separately. An observed sequence can retain long-range dependence even when the underlying latent state is first-order Markov.
Higher-order models allow dependencies on several previous slices. A finite-order process can be expressed as first-order by enlarging the state to include the required history. This transformation may, however, substantially increase computational cost.
Choosing the state variables is therefore central to model design. A state should retain information needed to predict the future while avoiding unnecessary complexity.
Time homogeneity versus stationarity
Many DBNs reuse both the graph structure and conditional-distribution parameters at every time step. Such models are time-homogeneous.
Time homogeneity is not the same as being a stationary process. Even with an unchanged transition rule, the distribution of may change over time because of its initial distribution. Strict stationarity requires all finite-dimensional distributions to remain unchanged under time shifts. For a time-homogeneous Markov model, initialization in an invariant distribution yields a stationary process.
DBNs can also use time-dependent parameters, changing structures, external inputs, or regime variables. These extensions relax the repeated-template assumption.
Discrete time
A standard DBN represents a sequence of discrete time steps. The interval between steps must be appropriate to the application: a dependency that appears instantaneous at one sampling resolution may span several steps at another.
Continuous-time Bayesian networks are related models but use a different formulation, typically based on conditional transition intensities. They are not simply ordinary DBNs with arbitrarily small time steps.
Relationship to other models
Markov chains and hidden Markov models
A Markov chain is a simple special case with one state variable per slice.
A hidden Markov model (HMM) introduces a hidden state and an observation , with factorization
A DBN generalizes this representation by allowing multiple interacting state variables and more elaborate observation structures.
A finite discrete DBN can be represented as an HMM by combining all hidden variables in a slice into one compound state. The distinction is representational and computational: the DBN preserves internal factorization, whereas the compound HMM state may have an enormous number of possible values.
State-space models and Kalman filtering
A linear Gaussian state-space model can be written as
with a Gaussian initial state and appropriately independent Gaussian noise terms. This model has a DBN representation. Under the linear Gaussian assumptions, the Kalman filter computes exact filtering distributions using finite-dimensional mean and covariance updates.
Thus, discrete HMMs and linear Gaussian state-space models are tractable members of a broader DBN family. General nonlinear, non-Gaussian, or mixed discrete–continuous DBNs need not admit such simple exact calculations.
Autoregressive and controlled models
An autoregressive model can also be represented as a DBN, with each value depending on previous values. Unlike a hidden-state model, a basic autoregression need not introduce latent variables.
Actions or control inputs can be included as additional variables conditioning state transitions. A DBN can represent the transition and observation components of a partially observable Markov decision process, but the DBN alone does not specify rewards or an optimal decision policy.
Inference
Inference computes distributions over unknown variables conditional on available evidence. In temporal models, the main tasks differ according to the relationship between the time of the target and the time of the observations.
- Filtering: estimating the current state from observations available so far, .
- Prediction: estimating a future state or observation, such as .
- Smoothing: estimating an earlier state using later evidence, , where .
- Most probable trajectory: finding a joint state sequence that maximizes its posterior probability.
The most probable trajectory is not generally obtained by choosing the most probable state independently at each time.
For the standard hidden-state observation structure, filtering alternates between prediction,
and an update based on Bayes’ theorem,
For discrete states, the integral becomes a sum. More general DBNs may require larger intermediate factors because their observation and transition structures need not have this simple form.
Exact inference
Exact methods include variable elimination and junction-tree message passing on the unrolled network or an appropriate temporal interface. HMM forward–backward recursions and Kalman filtering exploit special structures that make exact inference efficient.
Complexity depends strongly on treewidth and on the variables that must be retained to connect past and future. Sparse local dependencies do not guarantee cheap exact inference: marginalizing variables can create dense dependencies among the remaining variables.
For a fixed finite discrete template, exact sequential inference can often be organized with a cost per step that does not grow with the elapsed sequence length. That cost may nevertheless be exponential in the size of the relevant temporal interface.
Approximate inference
When exact calculations are impractical, common approaches include:
- Particle filtering, which approximates filtering distributions using weighted samples.
- Variational inference, which approximates a complicated posterior with a more tractable family.
- Markov chain Monte Carlo, often used for posterior sampling over trajectories or parameters.
- Gaussian approximations and approximate message-passing methods.
These methods have different failure modes. Particle filters can suffer from weight degeneracy in high-dimensional systems; restricted variational families can miss important dependencies; sampling methods may mix slowly.
Learning from data
Learning may involve estimating numerical parameters, discovering graph structure, or both.
Parameter estimation
When all relevant variables are observed and the graph is fixed, the factorization often decomposes parameter estimation into local problems. Discrete conditional tables can be estimated from transition counts, while suitable continuous models can use regression-based estimates.
With latent variables or incomplete observations, the expectation–maximization algorithm is a common approach. Its expectation step computes posterior expected sufficient statistics; its maximization step updates parameters to improve the expected complete-data log likelihood. The required inference can itself be computationally demanding.
Bayesian inference instead places prior distributions on parameters and computes or approximates their posterior distribution. This represents parameter uncertainty rather than relying exclusively on point estimates.
Structure learning
Structure learning searches for within-slice and between-slice dependencies, often using penalized likelihood scores or Bayesian model scores. Temporal ordering constrains the search by ruling out arrows from future variables to past variables, but it does not uniquely determine a graph.
Data requirements can increase rapidly with the number of parents and variable cardinalities. Constraints on parent sets, sparsity assumptions, and parameter sharing can reduce the search space and the number of parameters.
Evaluation on time-series data must respect the prediction task. Randomly mixing observations from different times can leak information from future periods into model development; temporally separated evaluation is often needed to assess forecasting performance.
Illustrative example
Consider a machine with a hidden operating condition , a temperature measurement , and a vibration measurement . A simple DBN might specify
Its graph asserts that temperature and vibration are conditionally independent given the current operating condition. They need not be independent marginally: both may change when the machine deteriorates.
As measurements arrive, filtering updates the distribution over operating conditions. Prediction estimates future condition probabilities. Smoothing uses later measurements to revise estimates of when a deterioration began.
If temperature also depends directly on its previous value, an edge can represent thermal persistence. If temperature and vibration still share unexplained dependence after conditioning on , the model may require an additional dependency or latent variable.
Applications, limitations, and causal interpretation
DBNs are used in equipment monitoring, tracking, speech and activity recognition, environmental modeling, and other settings involving uncertain sequential observations. Their distinctive contribution is a structured representation of several interacting processes rather than a single undifferentiated state.
Important limitations include:
- State-space growth: combining many variables can produce a curse of dimensionality, even when each variable has few possible values.
- Approximation error: a good generative model may still produce poor estimates if its inference approximation is inadequate.
- Misspecified temporal structure: incorrect lag lengths, sampling intervals, or conditional-independence assumptions can impair predictions.
- Identifiability: different latent structures or parameter settings may imply the same observable distribution.
- Changing dynamics: parameter sharing across time can fail when operating regimes or observation mechanisms change.
- Observation processes: missingness is not automatically harmless. When observations are missing in a state-dependent way, the observation mechanism may need explicit modeling.
A directed edge in a DBN expresses a probabilistic dependency in the chosen factorization; it is not automatically a causal relationship. Temporal precedence helps constrain possible explanations but does not eliminate confounding, hidden common causes, or effects of temporal aggregation. Using a DBN for causal inference requires additional causal assumptions and an interpretation of how interventions alter the model.