Model framework and methodology
Tosin Salau & Shahryar Minhas
2026-03-29
Source:vignettes/methodology.Rmd
methodology.RmdThe dbn package implements a family of Dynamic
Bilinear Network (DBN) models for temporal relational data.
These models estimate how past network interactions shape future
interactions, recovering time-varying influence structures that reveal
which actors drive network dynamics and how those dynamics evolve.
The methodological framework is introduced in:
Salau, T. & Minhas, S. (under review). When Shocks Cascade: Time-Varying Propagation in Armed Conflict Networks.
The core idea
Many networks evolve over time: trade partners shift, alliances form and dissolve, conflict patterns reorganize. The central question is not just what does the network look like now, but how does the past network predict the future network, and how does that predictive mapping itself change over time?
All models in the dbn package share a common bilinear
autoregressive structure:
The latent interaction state is an matrix of de-noised relational intensities at time . The sender dynamics matrix captures how actors’ past behavior as senders influences future sending patterns, while the receiver dynamics matrix captures how past targeting patterns influence future targets. The baseline mean absorbs persistent dyad-specific tendencies (stable rivalries, enduring alliances, reporting differences), and is matrix-normal innovation noise.
The bilinear form means that each dyad’s future state depends on the entire past network, weighted by the sender and receiver influence matrices. This is what allows the model to capture propagation: a shock to one part of the network can ripple through the system via the estimated and operators.
Model variants
The package provides five model types that differ in how the influence matrices and behave over time. The right choice depends on the research question, the expected dynamics, and the network size.
Static model (model = "static")
The static model estimates fixed influence matrices and that are constant across all time periods. The latent network still evolves over time, but the rules governing that evolution do not change. This variant is appropriate when you have relatively few time points or believe the influence structure is stable, when you have cross-sectional data, or when you want a baseline model to compare against time-varying alternatives.
The static model reveals who the influential senders and receivers are on average, which dyads have persistently strong or weak interactions after accounting for the baseline, and whether the bilinear lag structure explains variation beyond a simple mean model. Its key outputs include the posterior mean of , , and , scalar variance parameters (, , ), and convergence diagnostics. See the static vignette for a worked example with simulation recovery.
Dynamic model (model = "dynamic")
The dynamic model allows and to evolve over time via random walks (or optionally AR(1) processes). Each element of and can change from one period to the next, governed by innovation variances and that control how rapidly the influence structure reorganizes.
This variant is appropriate when the influence structure is expected to change over time and you want to identify when structural changes occur, not just that they occur. It supports time-indexed diagnostics (who is influential at each time point), impulse response functions for propagation analysis, multi-step-ahead forecasting, and dyad-level trajectories with posterior uncertainty. For very large networks (50+ actors), the low-rank variant offers better scalability.
The model produces influence snapshots (the combined weight matrix at each time point), coupling trajectories (how tightly each actor’s behavior is predicted by the lagged network state), and propagation profiles via IRFs. Optional AR(1) persistence parameters and measure mean reversion in the influence structure. See the dynamic vignette for simulation recovery and the impulse response vignette for IRF analysis.
Piecewise model (model = "piecewise")
The piecewise model estimates block-constant influence matrices and for user-specified regimes . Within each regime, the influence structure is fixed; across regimes, it can differ arbitrarily. This model sits between the static and dynamic extremes.
It is appropriate when you know (or hypothesize) when structural
breaks occurred and want interpretable regime-specific influence
summaries. Typical applications involve comparing pre- and post-event
periods around a known event such as a financial crisis, policy change,
or conflict onset. The model also has memory advantages over the dynamic
variant, since it estimates
matrices instead of
.
The compare_blocks() function quantifies regime differences
with posterior uncertainty, providing direct evidence for whether the
influence structure genuinely changed. See the piecewise vignette for a worked example
including an applied analysis of UNGA voting around the 2008 financial
crisis.
Low-rank model (model = "lowrank")
The low-rank variant factorizes the sender dynamics matrix as , reducing the parameter count from to . This makes it scalable to larger networks (50+ actors). The columns of define latent groups of actors that share similar influence patterns, and captures how strongly each factor drives the dynamics at time . The receiver dynamics remain fully estimated. See the low-rank vignette for examples with simulation recovery.
HMM model (model = "hmm")
The HMM variant replaces smooth evolution with discrete regime-switching: the network alternates between a small number of regimes (–5), each with its own influence matrices, governed by a Markov transition matrix . The model estimates the regime labels alongside the dynamics, allowing data-driven discovery of structural breaks. See the HMM vignette for examples with regime recovery.
Choosing a model
For most applications, the choice is between the static, dynamic, and piecewise models:
| Consideration | Static | Dynamic | Piecewise |
|---|---|---|---|
| Influence structure changes over time | ✓ | ✓ | |
| Few time points or cross-sectional | ✓ | ||
| Breaks are discrete and known | ✓ | ||
| Influence evolves smoothly | ✓ | ||
| Want time-indexed diagnostics | ✓ | ||
| Want interpretable regime summaries | ✓ | ||
| Memory constraints (large networks) | ✓ | ||
| Want impulse response analysis | ✓ | ||
| Want forecasting | ✓ |
The static model is nested within the dynamic model (setting recovers it exactly), so the posterior of itself serves as an informal diagnostic: if it concentrates near zero, the data favor a static structure. Similarly, piecewise with is equivalent to static.
The low-rank and HMM variants extend the framework for specific use cases (large networks and regime-switching, respectively).
Outcome families
All model variants support three outcome types. The
ordinal family (family = "ordinal") uses a
rank likelihood that preserves the ordering of categorical data without
requiring specific cutpoints. This is the most common choice for
count-based relational data where the cardinal scale may not be
meaningful. The Gaussian family
(family = "gaussian") is appropriate for genuinely
continuous outcomes and estimates an observation variance
that separates measurement noise from the latent process. The
binary family (family = "binary") handles
0/1 outcomes via a probit link with data augmentation.
Bipartite and symmetric networks
When senders and receivers are distinct populations (such as
countries sending aid to organizations), pass a rectangular array where
n_row
n_col. The package automatically detects this and estimates
as n_row
n_row (sender dynamics) and
as n_col
n_col (receiver dynamics). Self-loops are retained since
senders and receivers are distinct.
For undirected networks where the sender-receiver distinction is not
meaningful, set symmetric = TRUE. This constrains
,
halving the parameter count.
Impulse response analysis
A distinctive feature of the bilinear framework is the ability to compute impulse response functions (IRFs) that trace how a shock to the network propagates through the estimated dynamics. Given a perturbation matrix applied at time , the model propagates the shock forward through the sequence of estimated operators and tracks a network-level statistic (density, degree, reciprocity, transitivity) over subsequent horizons.
This answers questions like: if a specific bilateral relationship escalates, how does overall network density respond over the next several periods? Which actors’ escalations generate the broadest downstream consequences?
The paper introduces two key diagnostics built on this framework. Coupling trajectories measure how tightly each actor’s current behavior is predicted by the prior network state, measured by the row norms of the influence matrices. Actors with high coupling are structurally embedded in the lag dynamics; those with low coupling behave more idiosyncratically. Propagation profiles measure how broadly a standardized bilateral perturbation involving a given actor transmits through the wider system. High-coupling actors are not necessarily high-leverage actors: an actor can be predictable from the lag structure without generating large downstream spillovers.
Inference
All models use fully Bayesian MCMC inference with conjugate Gibbs
sampling. The dynamic model exploits the bilinear structure to decompose
the high-dimensional state-space problem into efficient row-wise
Forward-Filtering Backward-Sampling (FFBS) passes. Instead of filtering
in the full
-dimensional
vectorized space, each row of
and
is updated via an independent
-dimensional
FFBS pass, reducing per-sweep cost from
to
.
The C++ backend supports optional multi-threaded computation via OpenMP
(set with set_dbn_threads()), and automatic time-thinning
and optional latent state compression manage memory for large problems.
The estimate_memory() function checks RAM requirements
before fitting, and check_convergence() provides built-in
effective sample size and Geweke diagnostics.
Citation
If you use this package in your research, please cite:
Salau, T. & Minhas, S. (under review). When Shocks Cascade: Time-Varying Propagation in Armed Conflict Networks.
The package source code and documentation are available at https://github.com/netify-dev/dbn.