|
<< Click to Display Table of Contents >> Navigation: Using SMILE Wrappers > Dynamic Bayesian networks > Unrolling |
SMILE’s inference algorithm for dynamic Bayesian networks (DBNs) converts—or unrolls—a DBN over time into a temporary static network, which is then solved using standard inference algorithm. The results of this inference are automatically copied back into the node values of the original DBN. Below is how our example DBN appears after unrolling:

To reduce the size of the unrolled network, we reduced the number of time steps (slices) from the default value of 10 to 4 using Network.set_slice_count. The colors of the original nodes are preserved in the unrolled model, which is extended by creating new copies of the plate nodes. The structure of this network illustrates how temporal arcs express the conditional dependency of plate nodes at time step i on plate nodes at time step j, where i > j.
Consider the temporal arc between P1 and P2 with temporal order 2. This arc is copied twice in the unrolled network: once from P1 at time slice 0 to P2 at time slice 2, and once from P1 at time slice 1 to P2 at time slice 3. There is no copy starting from P1 at time slice 2 because its child would fall at time slice 4, which exceeds the zero-based slice range of 0 to 3 in our example. In contrast, the three temporal arcs with order 1 are copied three times each. The arc linking P1 to itself illustrates how self-dependencies propagate: it appears from P1 at time slice 0 to P1 at time slice 1, from P1 at time slice 1 to P1 at time slice 2, and from P1 at time slice 2 to P1 at time slice 3.
Arcs originating from Contemporal and Anchor nodes behave differently in the unrolled network. The Anchor node has children only in the initial time slice, reflecting its role in initializing the dynamic system. The Contemporal node, on the other hand, is linked to all time slices, so its children are replicated across each slice. Terminal node has parents only in the last slice, consistent with its function of receiving information from the end of the temporal process.
To ensure that the unrolled network remains a directed acyclic graph (DAG), the following arcs are forbidden:
•From plate nodes to normal or anchor nodes.
•From terminal nodes to any non-terminal nodes.
Unrolling is performed automatically during inference. For debugging or explanatory purposes, it is also possible to explicitly obtain an unrolled network by calling Network.unroll. The unrolled network created in this way is completely independent of the original DBN: any changes made to the original network after the unroll call do not affect the unrolled model, and modifications to the unrolled network do not propagate back to the original DBN.
Python
unroll() -> UnrollResults
get_slice_count() -> int
set_slice_count(slice_count: int) -> None
Java
UnrollResults unroll();
int getSliceCount();
void setSliceCount(int sliceCount);
C#
UnrollResults Unroll();
int SliceCount { get; set; }
R
unrollResults <- unroll()
sliceCount <- getSliceCount()
setSliceCount(sliceCount)