WorksMathematics
Dynamic bigraphical Matérn–Whittle processes: learning dependence graphs among spatial-temporal fields
Abstract
Many studies record several variables at the same sites over a sequence of periods, such as pollutant concentrations at monitoring stations or case counts of infectious diseases by district. A central question concerns the dependence between the variables and its change over time. We develop dynamic bigraphical Matérn–Whittle (DBMW) processes for such data. Each variable has a spatial field that evolves by autoregression. A graph over the variables couples the temporal innovations of the fields. Its links appear and vanish over time, and a link may change sign. A graph Laplacian on the sites gives the spatial structure, and a canonical exponential family links the fields to Gaussian, count or binomial responses. The joint distribution of the latent fields over all sites, variables and periods factorizes over the eigenmodes of the graph Laplacian, and its normalizing constant is free of the graph and of the dynamics. Given the fields, the posterior of the time-varying signed graph is therefore exact, by forward–backward recursions. The estimator has three steps: a fit without a graph, which also gives the switching rates with an interval, the exact graph posterior, and a joint refit. In simulations, DBMW recovers the graph with higher average precision than graphical lasso, time-varying graphical lasso and Poisson log-normal networks, and it predicts withheld data better than a standard spatio-temporal model that fits each variable separately, with a Matérn field and autoregressive evolution, by integrated nested Laplace approximation. In weekly air-quality data from 288 U.S. sites, it recovers the seasonal change of sign between ozone and nitrogen dioxide. In German surveillance data on seven diseases, the district-level links stay positive and stable through the COVID-19 pandemic.
Introduction
Many scientific questions concern how several quantities measured over space depend on one another, and whether this dependence changes over time. Air-quality networks record several pollutants at hundreds of sites each week [40]. Disease surveillance reports case counts of several notifiable conditions by district and period [32]. Ecological surveys count many species at the same sites each season, brain-imaging studies record signals in many regions over time, and climate data sets give several variables on a grid each month. In each case an observation carries a variable, a location and a time. The scientific interest lies mainly in the relations between the variables, after accounting for each variable’s own spatial and temporal structure. A dependence graph summarizes such relations. Its nodes are the variables, and a link joins two variables that remain dependent given all the others. A second question concerns the stability of this graph over the observation period.
Figure 1 gives an example with ozone and nitrogen dioxide () at 288 U.S. monitoring sites in 2023. The two pollutants follow opposite seasonal cycles (Figure 1a). Across sites, the correlation of their week-to-week changes is negative from November to March and positive from June to September (Figure 1b). Conditional on temperature, carbon monoxide (CO) and fine particles (), the winter association stays negative, and the summer association stays positive in June and August, at a smaller size. Atmospheric chemistry explains this pattern [35]. In winter, nitric oxide emitted with destroys ozone. In summer, sunlight drives the production of ozone from nitrogen oxides. One dependence graph for the whole year averages the two regimes into a single weak link. A model for such data therefore needs links that appear, vanish and change sign over time.
Figure 1. Ozone and at U.S. monitoring sites in 2023. (a) Weekly mean over the 288 sites of the standardized log concentrations. (b) Correlation across sites of the week-to-week changes of the two pollutants, averaged over the weeks of each month, at the 54 sites with observations of all five variables. Grey: marginal correlation. Coloured: partial correlation given temperature, CO and .
Questions of this kind call for a joint model with four properties. Each variable needs its own spatial field with its own temporal evolution. The dependence between variables needs an interpretable graph, with links free to change over time, in sign as well as in presence. The responses may be measurements, counts or binomial records. Estimation must remain feasible with hundreds of thousands of latent values. Existing approaches meet these requirements only in part. Multivariate spatial models from cross-covariance functions [16, 14] or multivariate conditional autoregressions [12, 20] make every pair of variables dependent and rarely scale beyond a few variables. Dynamic multivariate spatial models let the spatial processes evolve over time through state-space dynamics [13], and basis-function models reduce the dimension of multivariate spatio-temporal areal data [2]. Neither gives a graph over the variables. Spatio-temporal models from stochastic partial differential equations (SPDEs) [25, 3], fitted by integrated nested Laplace approximation [34], handle one or a few fields without such a graph. Graph estimation, on the other hand, mostly concerns vectors without spatial structure. Examples are the graphical lasso [11], its time-varying versions [43, 21, 18], Poisson log-normal networks for counts [6] and Bayesian dynamic graphical models [5]. Among the Bayesian models, hidden Markov models switch between network states in brain imaging [41], and change-point models detect a change of graph through the COVID-19 pandemic [10]. Time-varying graphs also appear in space, for a graph over brain locations whose structure changes over time [17], but there the graph joins sites, not variables. Graph-based multivariate spatial processes encode conditional independence between whole processes. The graph is known in graphical Gaussian processes [7] and in graph-constrained models for multivariate functional data [8]. It is learned from data by the basis graphical lasso [22] and in the bigraphical Matérn–Whittle (BMW) process [9]. In the BMW process, a graph Laplacian on the sites gives each variable a Matérn-type field, and a directed acyclic graph couples the fields. These graph-based processes are static and Gaussian. No current method combines spatial fields, temporal dynamics, a graph with switching signs and non-Gaussian responses.
This paper develops such a framework, the dynamic BMW (DBMW) process. Its central construction separates time from dependence. Each variable’s latent field evolves by autoregression in time. The innovations of the fields, the part of each field that its past leaves unexplained, form a multivariate spatial process at every period. A graph over the variables couples these innovations. Each link of the graph follows a Markov chain over three states: negative, absent and positive association. The rates at which links appear and disappear, the switching rates, are estimated from the data. A canonical exponential family links the fields to the responses. The spatial structure of the innovations follows the BMW process, and this choice makes exact computation possible. A comparison of two graphs requires the normalizing constant of the latent fields, the factor that makes their density integrate to one. Under the BMW structure this constant has a closed form that depends neither on the graph nor on the dynamics, because the variables are coupled in a directed, triangular way and the dynamics enter through a transformation with unit determinant. All spatial operators are also functions of one graph Laplacian on the sites, so the whole process splits into independent pieces, one per eigenvector of this Laplacian. Other spatial processes could be coupled in the same directed way, but without a shared eigenbasis they lose this splitting, and the computation becomes far more costly. With the BMW structure, the posterior over time-varying signed graphs is exact given the fields. Figure 2 gives a conceptual overview. In the figure, the link between variables 3 and 1 is negative in the first two periods, absent in the third and positive in the fourth. A static graph would join variable 3 to both variables at all times, with one weak coefficient each.
Figure 2. Conceptual overview of the DBMW process. Each variable has a spatial field in every period , and each field evolves by autoregression () from its previous state. The graph couples the temporal innovations of the fields. Its links switch between negative (orange), absent (dashed) and positive (blue) association. The bars show the link states and .
The paper makes three contributions. First, it gives a general framework of signed dynamic graphs over spatial fields, for any canonical exponential family. The fit without a graph, on/off switching, the static graph and the static Gaussian BMW process are special cases (§ 2). Second, it derives the structure of the process. For variables, sites and periods, the joint distribution of the latent fields factorizes over the eigenvectors of the graph Laplacian into independent -variate state-space models. The log-determinant of the -dimensional precision matrix equals times the static closed form, for any graph sequence and any dynamics. Absent links give exact conditional independences, localized in time (§ 3). Third, it develops an estimator in three steps. A fit without a graph gives the switching rates with a calibrated interval. Forward–backward recursions then give the exact posterior of the signed graph, one hidden Markov model per variable. A joint refit of fields, graph and parameters completes the estimator. The first two steps form a faster version, DBMW-X (§ 4.5, Figure 3). § 2 defines the model, and § 3 gives its structure. Section 4 develops the estimator. Section 5 reports the simulations, and Section 6 the two applications. The Supplementary Material contains the proofs, further details of the estimator, eight further simulation scenarios and further results of the applications.

Figure 3. Architecture of the model and of the estimator. Top: the model, from the link states through the graph and the innovations to the fields and the responses. The innovations are spatial fields built on the neighbour graph of the sites, through its Laplacian . Bottom: the three steps of the estimator. Step 1 fits the fields without a graph, in the eigenmodes of , and estimates the switching rates from posterior draws of the innovations. Step 2 computes the exact posterior of the signed graph. Step 3 refits fields, graph and strengths jointly.
Dynamic bigraphical Matérn–Whittle processes
Data and notation
The data involve a set of locations , a set of variables and a set of time points . The latent field of variable at time is , with entries . We write and . The response records variable at location and time . Entries may be missing.
The spatial building block
Following Dey et al. [9], denotes the density-normalized graph Laplacian of a nearest-neighbour graph on , scaled to unit mean diagonal. It is symmetric and positive semidefinite, with eigendecomposition , and . We call the eigenvectors the spatial eigenmodes. A small eigenvalue belongs to a smooth eigenmode, and a large one to a rough eigenmode. The coefficients of a field are its spectral coordinates. For variable , with range parameter and smoothness parameter , write
Given a directed acyclic graph on , whose links respect a fixed ordering (), and coupling coefficients , the static BMW field solves
independently over . A variable with a link is a parent of , and is a child of . In matrix form , where is block lower triangular with diagonal blocks and off-diagonal blocks , and with . Then with . The parameter governs the smoothness of variable in dimension (Dey et al. [9], Proposition 1). For each eigenmode we use the matrices
where is strictly lower triangular and .
Temporal dynamics on the innovations
The spatio-temporal process applies (1) not to the field itself but to its temporal innovation. For , with ,
Here is the temporal transition of variable , and and are the parents and coefficients of in the graph at time . With and , (3) states that
independently over . Here is the BMW operator of § 2.2 with graph and coefficients . At every time point, the innovation of the multivariate field is a static BMW field. The fields themselves carry memory through .
Assumption 1 (spectral transition). Each is a function of the spatial operator.
We use scalar persistence, , so each variable has its own autoregressive coefficient , its persistence, as in the spatio-temporal model of Cameletti et al. [3]. Spectral persistence, , is the implicit Euler step of the evolution equation , under which rough spatial components decay faster than smooth ones. With the model is the static BMW process. With it is an autoregressive Matérn-type field in the style of Cameletti et al. [3], with the SPDE mesh replaced by a graph Laplacian.
Signed switching graph
The candidate links , with , form a set . By (3), the innovation of variable moves with times that of variable . The state of link at time records a negative, absent or positive association, that is, the sign of . Each sign has its own strength,
where denotes the half-normal law and . The periods in which a link has one sign share one strength. This pooling matters, because a single time point carries little information about a coefficient.
The states of each link follow a Markov chain, independently over links. With sparsity parameter and switching rates and ,
with , and all other transitions keep the state. A change of sign therefore passes through absence. The chain separates a candidate that has never been a link from a link that has been present and is now absent. Most candidates are never links, and their entry is governed by the sparsity . The rates and describe how real links switch: the duration of a present link and the time to its return. They are estimated from the data (§ 4.3). For computation, each state is augmented by the set of signs used so far, which gives eight states per link (Supplement S2.1). § 4.2 explains the role of this memory.
Together, (4) and (5) form a dynamic spike-and-slab prior. In each period a coefficient is either exactly zero, the spike, or drawn from a slab of either sign, and the Markov chain carries the spike or slab state from one period to the next, as in dynamic variable selection ([33]). Spike-and-slab priors also select covariates and autoregressive lags jointly in time-series regression ([27]).
The construction contains three special cases. With one admissible sign per link, the model has on/off switching. With , every link keeps its first state, and the graph is static. A static link with a random sign and a half-normal strength has a coefficient, so the static case is the spike-and-slab prior ([28, 15]) of Dey et al. [9]. We call the estimator of this static case DBMW-0.
Remark 1 (Interpretation of the sign). If is a parent of at time and the two variables have no common child at , the entry of is , and the partial correlation of the innovations of and in every eigenmode has the sign of , the sign . A positive link thus means that the two innovations move together, given all other innovations at that time.
Remark 2 (Shared switching rates). One pair of rates, and one sparsity , serve all candidate links. Each link contributes only transitions, typically with one or two switches, so an un-pooled rate would sit near the boundary of its parameter space. Link-specific, covariate-dependent and time-varying rates change only the factors of the transition matrix in Proposition 1, and the forward–backward computation stays exact at the same cost (Supplement S2.1). § 5 and Supplement S4 examine the common rate with link-specific rates in the truth.
Observation model
Given the latent fields, the responses are conditionally independent with a canonical-link exponential-family distribution and linear predictor
Here is a known offset, for example log population, and is a variable-specific intercept with a vague Gaussian prior. The density of is , with a known or estimated dispersion and a convex cumulant function . Examples are the Gaussian family with and , which reproduces the BMW observation model when , the Poisson family with , and the binomial family with trials, . The family enters only through the score and the weight of each response. Because is convex, the log-likelihood is concave in the latent fields, and the posterior mode of § 4.1 is unique. The graph step, the switching rates and the parameter updates act on the latent innovations, so they are the same for every family. The likelihood omits missing responses.
Structure of the process
Stack in time–variable–location order. In this section is the lower shift matrix, and , so that . For each eigenmode and time , the vector of mode coefficients is . We write , and for the matrices (2) with replaced by , and . The proofs of this section are in Supplement S1.
Theorem 1 (Eigenmode factorization). Under Assumption 1, the processes are mutually independent, and each is a -variate linear state-space model
Theorem 2 (Log-determinant). For every transition , every sequence of graphs and every sequence of coefficients , the precision matrix of satisfies
The normalizing constant of the latent law is therefore the same closed-form function of whether the graph is empty, static or signed and switching, and whatever the dynamics. Proposition 1 relies on this property. Without it, the posterior over time-varying graphs would require one stochastic log-determinant for every configuration of the links. The result uses the initial condition . Under a stationary initial law with link-dependent covariance, the graph-free property is lost (Supplement S1).
Theorem 3 (Markov structure). Suppose that with for all . For , and for Lebesgue-almost every value of the coupling coefficients, the block of indexed by is nonzero if and only if one of the following holds:
(a) and are adjacent in , with taken to be empty, or
(b) and either or are adjacent in .
Here is the moral graph [23], which adds a link between any two parents of a common child. Condition (b), and condition (a) for a static graph, hold for every value of the coefficients.
Theorem 3 shows that the time-varying graph is a property of the process itself. In a Gaussian process, the zero blocks of the precision matrix are the conditional independences. The theorem identifies all nonzero blocks of , and they follow from the graphs alone. If and are non-adjacent in the moral graphs at times and , then and are conditionally independent given all other fields at all times. An absent link is thus an exact conditional independence of the fields, localized in time, and not only a zero coefficient in a fitted model. Supplement S1.1 works through an example. For a static graph, the conditional-independence graph of is the strong product of the moral graph with the path on vertices.
Corollary 1 (Exact Gaussian likelihood). Suppose with , observed at all locations. Then the log-likelihood is the sum over of the Kalman-filter log-likelihoods of the rotated data , with the dynamics of Theorem 1. After one eigendecomposition of , it costs operations.
Inference
Laplace approximation of the latent field
All computations below use the spectral coordinates of the fields. By Theorem 1 the prior precision of is , where applies separately for each mode. For fixed parameters and graphs, the posterior mode maximizes the strictly concave function
where is the log-likelihood and the prior precision of the intercepts. Newton’s method uses the negative Hessian
with at the observed sites and zero elsewhere. The data term is block diagonal over variable–time pairs, because each response involves exactly one pair. The resulting Gaussian approximation is . By Theorem 2, the Laplace approximation of the marginal likelihood contains the closed-form and the term . The latter depends on the graph, and the algorithm below avoids its evaluation.
Lemma 1 (Exact sampling from ). Suppose that , , are independent standard normal vectors of the appropriate dimensions, that is the design that maps to the linear predictors of the
observed responses, and that collects their weights. With
, and is an exact draw from .
The signed graph step
We write and . Given draws from , form the innovations . A Monte Carlo expectation–maximization (EM) algorithm maximizes the Monte Carlo estimate of
Row of is . By Theorem 2, (8) therefore splits over variables and times:
For child , candidate parents and a parent set , define the time- statistics
estimated by averages over the draws. The term of (9), restricted to parent set , is with , and does not depend on . A sign configuration of the links of child fixes the parent set and the mean coefficients , with entries for and for . Integration of the deviations of (4) against the term gives the emission, the contribution of configuration at time to the likelihood of the graph,
We treat as the likelihood of given the E-step, and the strengths as parameters with half-normal penalties.
Proposition 1 (Exact signed graph posterior). For a fixed variable ordering and given , the posterior over the link states factorizes over children . For each child it is the posterior of a hidden Markov model with the following components:
state space the joint augmented states of the chains (5) of the candidate parents, states,
initial law and transition matrix the Kronecker products of those of the link chains,
emissions , which depend on the joint state only through the current sign configuration .
The forward–backward algorithm computes its marginals, and so the probabilities , exactly, in operations plus for the emissions.
Because is plugged in rather than integrated out, the emissions lack the Occam factor of a marginal likelihood. This factor is the penalty that integration over the prior of a parameter, here a strength, places on a model with that parameter. We restore it approximately by the log Bayes factor , applied at the first use of each sign: the transition into a sign not used before is multiplied by . A return to a sign already used receives no penalty, because its strength is shared over periods and its penalty has already entered. The penalty multiplies paths, so the posterior remains an exact hidden Markov model. With it reproduces the static inclusion odds to first order.
Given the posterior, the strengths maximize the expected complete-data objective in the limit , subject to . For child this is a bounded least-squares problem in strengths (Supplement S2.1). Ten alternations of forward–backward recursions and strength updates give the graph posterior. Ten alternations suffice. In two simulated Poisson data sets of § 5, one with and one without sign changes, the strengths after ten alternations differ from those after forty by less than 2% of the largest strength, and the inclusion probabilities by less than 0.002 (Supplement S2.1). A sign whose strength reaches its bound at zero is removed from the state space of its link.
The inclusion probability of link at time is . A graph is selected by the Bayesian false discovery rate rule (Newton et al., [29]). For a target level , this rule selects the largest set of (link, time) pairs with the highest inclusion probabilities whose mean posterior probability of absence is at most . The expected share of false links among the selected pairs, under the posterior, is then at most . Each selected pair takes the sign of larger posterior probability. To keep the forward–backward computation small, each variable has at most five candidate parents. They are the five variables earlier in the ordering with the largest partial correlations with it, computed from the innovations of a fit without a graph, each scaled to unit variance. With the posterior over parent sets is available in closed form, with the coefficients integrated out exactly (Supplement S1).
Switching rates with an interval
The rates are estimated from a fit without a graph, so that no fitted graph can influence the evidence for change. The step has four parts (details in Supplement S2.2).
From draws of the fit without a graph, regression calibration (Carroll et al., [4]) removes the prior variance of each innovation and gives a pseudo-observation of it with a known error variance.
For each child and time , a weighted regression over the eigenmodes of the pseudo-observation of on the innovations of its candidate parents gives coefficients with
working standard errors . The candidates of this step are the parents with in a regression pooled over periods.
The working standard errors understate the variability of , by a factor specific to the child when the link is absent and by a further factor when it is present. The model
with , a two-state version of the chain (5), and a share of candidates that are links at all, is fitted by EM. Its E-step is a forward–backward recursion for each candidate, and its M-step is in closed form.
The 95% intervals for and are Wald intervals on the logit scale, from the observed information at the maximum.
The step uses on/off states with one strength per link, so a link that changes sign counts as present in both phases. In the simulations with sign changes, the estimate falls slightly below the realized rate (§ 5.3).
Parameters and computation
Under scalar persistence, the terms of (8) with are quadratic in , and the persistence update solves a linear system. For each , (9) is maximized over in closed form, and the profile is then maximized over by a bounded one-dimensional search. The log-determinant term makes different values of comparable, so the same profile selects on a grid. For the Gaussian family, is updated from paired draws of fields and intercepts. An alternation of the Laplace approximation, the draws, the graph step and these updates gives a Laplace–Monte Carlo EM algorithm (Supplement Algorithm S1).
Every Newton step and every draw requires a solve with . Preconditioned conjugate gradients carry out these solves without forming , and with a block preconditioner and deflation they take a few tens of iterations (Supplement S2.4).
The DBMW estimator
Figure 3 and Algorithm 1 combine these blocks into the DBMW estimator, in three steps. In Step 1, the Laplace–Monte Carlo EM algorithm with no graph fits one field per variable, with smoothness . Counts carry little information about smoothness, so the first fit fixes it, and later rounds choose it on a grid. At the final parameters, draws give the innovations of every variable at every time. The rate step of §4.3 uses these draws. A fit without a graph favours no link, so no fitted graph influences the evidence for change. Four rounds of link-aware updates then refine , with pooled coefficients for the rate candidates and on a grid. These rounds correct the parameters of the fit without a graph. Without a graph, the model attributes
the contribution of a variable’s parents to the variable’s own field, which inflates its amplitude and distorts its range .
In Step 2, the signed graph step of § 4.2 runs once, on the Step-1 draws and at the Step-1 rates. Its statistics use the regression-calibrated innovations of the rate step. The scale of each child is multiplied by , the calibration factor of (10). This factor widens the noise scale when the per-period coefficients vary more than their working standard errors, and it never narrows the scale. A rate rule then checks the evidence for switching. If the lower end of the interval for lies below , the static posterior of DBMW-0 replaces the signed dynamic one. DBMW-X ends here, with the conditional posterior mode of the fields given the Step-2 graph.
In Step 3, the Laplace–Monte Carlo EM algorithm fits fields, graph and parameters jointly, with the signed graph step in every iteration. It starts from the Step-2 graph and strengths and from the link-aware parameters, and it keeps the rates and the smoothness at their Step-1 values. The refit reduces the attenuation of the strengths, because each field now borrows information from its parents, and it gives better predictions of withheld data. Steps 1–3 together form DBMW.
Each step answers its own question. The graph comes from the Step-2 inclusion probabilities. Given the Step-1 parameters, they form an exact empirical Bayes posterior, close to calibrated in the simulations. A joint fit of graph and fields from the start makes them overconfident, because the prior coupling of an included link feeds back into its own evidence (Supplement S3). Strengths, fields and predictions come from Step 3. The switching rates and their intervals come from Step 1. Predictions use the posterior mean of the expected response, from 20 draws of the Laplace approximation.
Simulation study
The simulation study uses data sets with known fields, graph and link paths. It addresses three questions. The first concerns the recovery of the links, their times and their signs, against established graph estimators. The second concerns the calibration of the inclusion probabilities and the switching rates. The third concerns prediction, against a spatio-temporal model that fits each variable separately.
Design
The locations are points drawn uniformly on the unit square. The true is the density-normalized Laplacian of the 15-nearest-neighbour graph, and every fit uses the 10-nearest-neighbour graph of the coordinates instead. There are variables, with independent parameters
and scalar persistence. Chain links are present with probability 0.6, and longer-range links , , with probability 0.15, about 20 links in total. A link has coefficient
Algorithm 1 The DBMW estimator
Require: responses with missingness indicators, site coordinates, a variable ordering, the family and offsets
Build the 10-nearest-neighbour graph of the sites, the density-normalized Laplacian with unit mean diagonal and its eigenpairs .
Step 1: fields without a graph
Fit , the intercepts and, for the Gaussian family, by Laplace–Monte Carlo EM with no graph and .
Compute the posterior mode and draws of the fields from (Lemma 1), with their innovations.
Estimate and with 95% intervals, and the calibration factors , by the rate step of § 4.3.
Refine , with on a grid, and in four rounds with pooled coefficients for the rate candidates.
Take all pairs as candidates for small , and otherwise five earlier-ordered partners per variable from the partial-correlation screen.
Step 2: exact graph posterior
Compute the signed graph posterior from the calibrated statistics of the draws of line 3, with scales , by ten alternations of forward–backward recursions (Proposition 1) and strength updates, at with .
Use the static graph of DBMW-0 instead if the lower end of the interval lies below .
Compute the conditional mode of the fields given the Step-2 graph, which ends DBMW-X.
Step 3: joint refit
Refit fields, graph and parameters by Laplace–Monte Carlo EM with the signed graph step, from the Step-2 graph and the parameters of line 5, at the rates of line 4.
Report the Step-2 inclusion probabilities and signs with Bayesian false discovery selection, the switching rates with intervals, and the Step-3 strengths, fields and predictions.
with , a scaling that keeps in every mode. Every true link follows a two-state chain. It is present at with probability and changes state with probability at each later time. The fields come exactly from the model, one eigenmode at a time (Theorem 1). A random 10% of the (variable, time) maps is withheld for prediction.
The main text reports four scenarios.
S1G, S1P and S1N have and , about 2.5 switches per link, with a fixed sign for each link. S1G has Gaussian responses with noise variance . S1P has Poisson counts, , after a common factor scales the fields to unit standard deviation. S1N has binomial counts with trials, logit link and baseline probability 0.3.
S1PF has Poisson counts with sign changes, and . Each time a link enters, it draws a new random sign, so a link alternates between phases of about 20 periods of either sign or of absence, as in the air-quality data.
Supplement S4 reports eight further scenarios: Gaussian responses with sign changes, binary responses, negative binomial counts, link-specific rates, gradual switches, a static graph with Gaussian and with Poisson responses, and a shared spatio-temporal component without a graph. Ten data sets per scenario use new locations, parameters, graph, link paths and responses.
Methods compared
We fit DBMW and DBMW-X by Algorithm 1, with 15 outer iterations, draws per iteration, draws for the rates and the graph, , and . The candidate screen keeps 85 of the 190 pairs.
Four established graph estimators score all 190 pairs in every period.
GL is the graphical lasso ([11]) with threefold cross-validation, applied to the innovations of the fit without a graph of Step 1, each scaled to unit variance, with one static graph.
GL-W applies the same estimator in a moving window of five periods.
TVGL is the time-varying graphical lasso ([18]) on the same innovations, with a Laplacian penalty on changes and both penalties chosen by held-out likelihood.
PLN is the Poisson log-normal network ([6]) on the counts, with the penalty chosen by StARS ([26]), for Poisson responses.
Each estimator scores a pair by the absolute partial correlation and selects it when the precision entry is nonzero. On the standardized responses instead of the innovations, GL and TVGL recover the graph less well (Supplement S4). For prediction, the competitor SPDE-AR1 fits one Matérn SPDE field per variable with AR(1) evolution ([3]), by R-INLA ([34]
Lindgren et al. [25], with penalized-complexity priors and the default mesh of Supplement S7. All methods score the withheld entries at the posterior mean of the expected response. The loss is the mean squared error for Gaussian responses and the mean deviance otherwise.
Results
The truth is known for every pair and period, with about ten present links among the 190 pairs in each period. Table 1 gives the average precision (AP) of the scores and the false links per period of the selected graph. DBMW has the highest AP in all four scenarios, 0.63–0.71, with an area under the ROC curve of 0.89–0.92. It selects one false link per period or fewer. GL reaches an AP of 0.49–0.54 with a fixed sign, but it selects 24–26 false links per period. With sign changes (S1PF), its AP falls to 0.29, because one static graph averages the two signs of a link. The windowed version gains over GL only with sign changes. TVGL selects about 170 of the 190 pairs in every period. PLN uses all counts, including the withheld ones, and still reaches an AP of only 0.34 and 0.25. Figure 4 shows the inclusion probabilities of DBMW. Absent links have probabilities near zero, with a mean of 0.02–0.03. Present links have a median probability of 0.46–0.81, and a quarter of them stay below 0.1. The errors of DBMW are thus mostly missed links rather than false ones.
| Scenario | DBMW AP | DBMW FP | GL AP | GL FP | GL-W AP | GL-W FP | TVGL AP | TVGL FP | PLN AP | PLN FP |
| S1G | 0.67 | 1.0 | 0.54 | 25.4 | 0.43 | 20.7 | 0.33 | 171.2 | – | – |
| S1P | 0.68 | 1.0 | 0.52 | 26.2 | 0.36 | 23.4 | 0.27 | 171.9 | 0.34 | 15.2 |
| S1N | 0.63 | 0.8 | 0.49 | 24.4 | 0.38 | 27.8 | 0.27 | 172.4 | – | – |
| S1PF | 0.71 | 0.6 | 0.29 | 4.5 | 0.37 | 17.3 | 0.27 | 172.7 | 0.25 | 8.7 |
Table 1. Graph recovery, means over ten data sets: average precision (AP) of the scores over all variable pairs and periods, and false links per period (FP) of the selected graph. DBMW: inclusion probabilities, selection at probability 0.5. GL: graphical lasso on the innovations of the fit without a graph. GL-W: the same in a moving window of five periods. TVGL: time-varying graphical lasso on the same innovations. PLN: Poisson log-normal network, a model for Poisson counts, so not applicable (–) to Gaussian and binomial responses. The best AP in each row is in bold.
Figure 4. Inclusion probabilities of DBMW for absent and present (link, period) pairs, pooled over ten data sets per scenario. (a) All pairs. (b) Absent pairs only, on a finer scale. Boxes: quartiles. Whiskers: 1.5 interquartile ranges. Diamonds: means.
Table 2 reports the uncertainty measures. The expected calibration error of the inclusion probabilities is 0.03–0.04. With the Bayesian false discovery rate rule of § 4.2 at , the realized false discovery rate is 0.10–0.16. Selected pairs carry the correct sign in at least 99.9% of cases, and no link with a single sign in the truth is selected with both signs. To measure the detection of links over time, we split the true path of each link into sign phases. A sign phase is a maximal run of consecutive periods in which the link is present with the same sign. For example, a link that is positive in periods 3–10, absent in periods 11–20 and negative in periods 21–30 has two sign phases, of lengths 8 and 10. A phase counts as found when the selected graph contains the link, with the true sign, in at least one period of the phase. Table 2 gives the share of phases found, by phase length. Detection rises with the length of the phase, from 21–40% for phases of one to seven periods to 45–67% for phases of 16 periods or more. With sign changes (S1PF), short phases are found less often and long phases more often than in S1P. A phase of a link whose truth has both signs is found less often than a phase of the same length of a link with one sign, for example in 32% against 55% of the phases of 8–15 periods (Supplement S4). Both phases of a link that changes sign are found for only 9% of such links, and for 15% after the joint refit of Step 3. The power to detect a change of sign is thus limited by the evidence within each phase. A detected change of sign is reliable, because changes are almost never selected for links with one sign. The interval for covers the realized rate in all data sets. With sign changes, the estimate falls slightly below the realized rate, 0.056 against 0.061 in S1PF, as expected from the on/off rate step.
Table 2: Uncertainty, means over ten data sets. ECE: expected calibration error of the inclusion probabilities (ten bins). FDR: realized false discovery rate of the Bayesian rule at . Correct: share of selected (link, period) pairs with the true sign. False flips: share of single-sign links selected with both signs. Phases found: share of true sign phases, by length in periods, in which the selected graph contains the link with the true sign in at least one period. : estimated switching rate, with the realized rate in brackets. Coverage: share of 95% intervals that contain the realized rate. Bold: the best value in each column, unless all values are equal. For FDR the best value is the closest to the nominal 0.10, and for the closest to the realized rate in relative terms.
| Inclusion | Signs | Phases found, by length | Switching rate | ||||||
| Scenario | ECE | FDR | Correct | False flips | 1–7 | 8–15 | (true) | Coverage | |
| S1G | 0.039 | 0.15 | 1.000 | 0.000 | 0.40 | 0.57 | 0.55 | 0.093 (0.099) | 1.0 |
| S1P | 0.039 | 0.16 | 1.000 | 0.000 | 0.33 | 0.54 | 0.47 | 0.105 (0.099) | 1.0 |
| S1N | 0.042 | 0.13 | 1.000 | 0.000 | 0.29 | 0.49 | 0.45 | 0.101 (0.099) | 1.0 |
| S1PF | 0.027 | 0.10 | 0.999 | 0.000 | 0.21 | 0.43 | 0.67 | 0.056 (0.061) | 1.0 |
Table 2.
On selected true links, the DBMW strengths have the correct sign and a correlation of 0.94–0.98 with the truth. They are attenuated, with a median relative error of −11% to −23%. The DBMW-X strengths are more attenuated, by −36% to −49%, which motivates the joint refit. The scale of moves with the weakly identified ([42]), and the 95% intervals for the strengths cover the truth in only 27–49% of cases. We therefore report the sign and the point estimate of each strength.
Table 3 gives the loss on whole withheld maps. DBMW has the lowest loss in all four scenarios, 10–29% below SPDE-AR1, and beats SPDE-AR1 in 39 of the 40 data sets. DBMW-X lies between the two. The gain of the joint refit over DBMW-X is largest for Poisson counts (S1P, 12%). DBMW-X takes 6–22 minutes per data set on two cores, and DBMW 11–37 minutes.
Table 3: Prediction of whole withheld maps and run time. Loss on the withheld entries (squared error for Gaussian data, deviance otherwise) at the posterior mean of the expected response, means over ten data sets. Wins: data sets in which DBMW has a lower loss than SPDE-AR1. Minutes per data set on two cores, means over three data sets.
| Held-out loss | Minutes | |||||
| Scenario | SPDE-AR1 | DBMW-X | DBMW | Wins | DBMW-X | DBMW |
| S1G | 7.99 | 6.36 | 5.98 | 10/10 | 6 | 11 |
| S1P | 4.18 | 3.37 | 2.96 | 10/10 | 11 | 21 |
| S1N | 1.897 | 1.742 | 1.706 | 10/10 | 12 | 22 |
| S1PF | 4.30 | 3.88 | 3.77 | 9/10 | 22 | 37 |
Table 3.
Supplement S4 reports the other scenarios. DBMW keeps the highest AP with Gaussian sign changes, 0.72 against 0.43 for the best baseline. Binary responses carry little information about the graph, and DBMW and GL reach an AP of only 0.43 and 0.44. Overdispersion raises the realized false discovery rate to 0.32 at a nominal 0.10. Under a static truth, GL matches DBMW in AP but selects 42–45 false links per period, and the rate rule chooses the static graph in 50% and 20% of the data sets. In one further study, one variable nearly vanishes in the middle third of the periods, as influenza did in 2020–22. With the drop in the offset, the inclusion probabilities of its true links stay at the same level inside and outside the window, so the vanishing variable produces no spurious switch-off. Without the drop in the offset, the probabilities fall at all times (Supplement S6). A rate study over , , and gives intervals with 70–100% coverage (Supplement S5).
Applications
Two applications illustrate the two main response types. The air-quality data are continuous, and the question concerns a known seasonal change of sign in the pollutant graph. The surveillance data are counts, and the question concerns the stability of the dependence between diseases through the COVID-19 pandemic. Both analyses use DBMW with all pairs as candidates and report the Step-2 graph with Bayesian false discovery selection at . The directed graph depends on the variable order. Step 1 has no graph and does not depend on the order, so only the rate step and Step 2 are repeated for each of 120 orders. Each analysis reports undirected links, with the share of orders that select each link with each sign. Prediction uses two hold-out designs, fixed before any fit. Whole maps withholds 10% of the (variable, period) maps at all sites. Regions splits the sites into ten spatial regions by -means and withholds, for each variable, one region at all periods, with three such data sets. Supplement S8 gives further details of the data and the fits.
Air pollution across the United States
The daily summary files of the Air Quality System of the U.S. Environmental Protection Agency ([40]) give the daily values of each monitor. We kept the sites in the contiguous United States with both ozone and in at least 80% of the weeks of 2023, . For each site and week, the response is the mean of the daily values over all monitors of the site, with at least four days of data. The variables are temperature, , , and ozone, with the pollutants on the log scale. Each variable is standardized over sites and weeks, and the family is Gaussian. and ozone are observed in 98% of the site-weeks, and temperature, and CO in 79%, 61% and 34%, because many sites lack these monitors.
In the data order, Step 1 gives the switching rates
A present link lasts about 38 weeks on average. Over the 120 orders, lies between 0.016 and 0.054, and the rate rule never selects the static graph.
Figure 5a shows, for each link and week, the share of the 120 orders that select the link with a positive association, minus the share with a negative association.
Figure 5. Air quality, 2023. (a) Share of the 120 variable orders in which the Step-2 graph selects each link with a positive association, minus the share with a negative association, by week. Links selected in more than 20% of the orders in some week. (b) Share of the orders in which the static graph of DBMW-0 selects each link. The bar colour gives the sign of the static association, darker for a stronger association.
– and – have a positive association throughout the year, in all orders. – joins them from February. The three pollutants share traffic and combustion sources.
–ozone has a negative association from November to March, in up to all orders, and is absent otherwise.
–ozone has a negative association in weeks 1–4 and 46–52, in up to all orders. In weeks 29–33 it has a positive association, in up to 63% of the orders. In the data order, the associations of the two signs are and .
–ozone has a negative association in weeks 46–52, in up to 82% of the orders, and a positive association in summer, in up to 44% of them.
The negative winter links of ozone with and are the signature of titration by fresh emissions ([36]). The positive summer link of and ozone reflects photochemical production ([35]). Its weaker evidence matches the smaller summer association in Figure 1b. The analysis thus recovers the known seasonal chemistry from the data alone.
The static graph of DBMW-0 gives a different picture (Figure 5b). It selects –ozone in half of the orders, with a weak negative association of , and –ozone in none of them. One static link averages the two regimes into a weak association of one sign, as anticipated in § 1.
Table 4 reports prediction. On whole withheld maps, DBMW and DBMW-X have errors of 0.187 and 0.188, against 0.334 for SPDE-AR1. The default SPDE mesh has 235 nodes for 288 sites, so nearby monitors share a node. Over the 120 orders, the median error is 0.196 for DBMW and 0.190 for DBMW-X. DBMW improves on the fit without a graph in 84% of the orders, but on DBMW-X in only 28% of them. For these continuous data with five variables, the joint refit thus sharpens the strengths but adds little to prediction. With withheld regions, DBMW has an error of 0.715, against 0.861 for the fit without a graph and 15.7 for SPDE-AR1. The large SPDE-AR1 error comes from . Its sites have strong, persistent levels that differ between nearby monitors. The AR(1) field represents these levels with a correlation near one and a large variance, and it can extrapolate far from the observed values into a withheld region. An added time-constant spatial field for the site levels lowers the error to 9.8, still more than ten times that of DBMW.
| Data | Hold-out | SPDE-AR1 | SPDE-AR1, site | DBMW-X | DBMW |
| Air quality | whole maps | 0.334 | 0.333 | 0.188 | 0.187 |
| Air quality | whole maps, orders | – | – | 0.190 | 0.196 |
| Air quality | regions | 15.717ᵃ | 9.792ᵃ | 0.720 | 0.715 |
| Surveillance, fit A | whole maps | 7.23 | 7.57 | 7.28 | 6.33 |
| Surveillance, fit A | regions | 23.88 | 15.73 | 12.31 | 11.70 |
| Surveillance, fit B | whole maps | 10.02 | 9.96 | 9.68 | 9.60 |
| Surveillance, fit B | regions | 9.91 | 10.64 | 5.53 | 5.48 |
ᵃLarge errors for nitrogen dioxide in some of the withheld regions (Supplement S7). Over the three data sets the mean squared error ranges from 2.9 to 25.9 for SPDE-AR1 and from 2.8 to 23.6 with the site field.
Table 4. Prediction in the applications: loss on the withheld entries at the posterior mean of the expected response (squared error for air quality, deviance for surveillance). SPDE-AR1, site: SPDE-AR1 with an added time-constant spatial field for persistent site levels. Whole maps: one data set with 10% of the maps withheld. Regions: one spatial region per variable withheld at all periods, means over three data sets. Orders: median over the 120 orderings of the air-quality variables. The best value in each row is in bold.
Infectious disease surveillance in Germany
SurvStat@RKI 2.0 ([32]) reports the cases of notifiable diseases by district and week of notification. We retrieved the weekly counts of all 411 districts for 2016–2025. Seven diseases have complete national reporting over the whole period: influenza, norovirus, rotavirus, pertussis, varicella, campylobacteriosis and salmonellosis. Weekly counts are sparse, so we summed them into four-week periods. The counts total 4.4 million cases, with a mean per district and period from 2.5 for salmonellosis to 36.5 for influenza. The family is Poisson, and the fit uses 15 outer iterations.
The pandemic offers a natural experiment. Influenza and the enteric viruses follow strong winter seasons until 2020. Influenza then nearly vanished, with 1,129 notified cases in 2021 against 194,834 in 2020. Pertussis and rotavirus also fell sharply, and pandemic measures reduced most other notifiable diseases as well ([39]). The analysis asks whether the dependence between diseases at the district level changed through this shock.
Two fits differ only in their offset. Fit A uses , so the fields carry the national seasonality and trend of each disease. Fit B adds each disease’s national log rate in each period, computed from the training entries only, so the fields describe district departures from the national curve. This offset plays the role of the endemic component of surveillance models ([19, 30]). It also contains the national drop of influenza, the situation of the vanishing-variable study of § 5.3.
In the data order, fit A gives (0.079–0.170) per period, and fit B gives 0.042 (0.022–0.079). A present link lasts about nine periods in fit A and about 24 periods in fit B. The national curves thus absorb most of the switching.
In fit A, the fields carry the national seasons, and links switch more often. Two links have a negative association: campylobacteriosis with influenza and salmonellosis with varicella (Supplement S8). These diseases peak in opposite seasons. Figure 6 shows fit B. All 16 links that appear have a positive association, in every order and period, and the negative links of fit A disappear once the national curves enter the offset. Twelve links are selected in at least 64% of the order-periods. Influenza keeps its links to norovirus, pertussis and rotavirus through the pandemic, with shares of 95%, 97% and 79% in the pandemic periods against 98%, 94% and 65% in the others. Two links of campylobacteriosis are more frequent during the pandemic: with pertussis, 99% against 55%, and with varicella, 48% against 4%. District-level dependence thus remains stable once the national curves enter the offset. One caution concerns reporting. Positive links between many diseases also arise from district differences in testing and reporting, a factor outside the model. Shared changes in reporting during the pandemic may explain the stronger campylobacteriosis links.
Figure 6. Infectious disease surveillance, Germany, 2016–2025, fit B (national curve in the offset). (a) Share of the 120 variable orders in which the Step-2 graph selects each link with a positive association, minus the share with a negative association, by four-week period. The frame marks the pandemic period, May 2020 to June 2022. (b) Share of the orders in which the static graph of DBMW-0 selects each link, coloured as in Figure 5b. Abbreviations: flu influenza, noro norovirus, rota rotavirus, pert pertussis, vari varicella, campy campylobacteriosis, salm salmonellosis.
Table 4 reports prediction. DBMW has the lowest deviance of all methods in both fits and both designs. In fit A, the joint refit lowers the deviance of DBMW-X by 13% on whole maps. With withheld regions, DBMW lowers the deviance of the better SPDE-AR1 specification by 26% in fit A and by 45% in fit B. Supplement S8 compares all estimators. In fit B, the national curves already carry the timing, and the fit without a graph predicts whole maps as well as any graph. In fit A, the static graph predicts whole maps best.
Discussion
DBMW learns a dependence graph whose links appear, vanish and change sign over time, from spatial data with Gaussian, count or binomial responses, with exact posterior inclusion probabilities given the fields. This exactness rests on one modelling choice: the temporal dynamics act on each field, and the graph acts on the temporal innovations, which keeps the normalizing constant free of the graph. In both applications, the learned links have clear scientific interpretations, and the graph improves the prediction of withheld data.
The method has limitations. The switching rates come from an on/off model, which slightly underestimates them when links change sign, and one pair of rates serves all links. A link changes
sign only through absence, and short sign phases are hard to detect. Under a static truth, the rate rule chose the static graph in only 20–50% of the data sets. The directed graph depends on the variable order, a dependence that averaging over orders removes at a cost linear in their number. Effects common to all variables, such as reporting intensity, produce positive links between many pairs.
Several extensions are natural. The bigraphical structure of space could carry over to other dimensions of the data. A graph Laplacian on the periods, in place of autoregression, would treat time as a second bigraphical dimension. Site-specific link states with a BMW prior over space would let the graph vary between regions as well as over time, as graphs over brain locations do in Greenewald et al. [17]. Other spatial operators, such as those of river or road networks and of fields on the sphere, fit the same construction as long as all variables share one eigenbasis. Link-specific, covariate-dependent and time-varying switching rates change only the factors of the transition matrix (Remark 2). For overdispersed counts, a negative binomial likelihood with Pólya–Gamma augmentation ([31]) would keep the E-step Gaussian. Finally, a joint search over variable orders and graphs would remove the need to average over orders.
Code availability
The methods are implemented in the module stbmw of the bmwspatial package (https://github.com/Ddey07/bmwspatial). Scripts reproduce all numerical results.
Supplementary Material
The Supplementary Material contains the proofs, details of the estimator, the choice of estimator, further simulation scenarios, the rate study, further hold-out designs, details of the competitors and further results of the applications.
Supplementary Material
Sections, equations, lemmas, remarks, tables, figures and algorithms with the prefix S belong to this supplement. Those without the prefix refer to the main text.
Proofs
Lemma S1. Every block of and of is a function of , and , with and .
Proof. , and is a constant function of . Also . Functions of one symmetric matrix commute and multiply pointwise on its spectrum. Evaluation at gives .
Proof of Theorem 1. We write . By Lemma S1 and Assumption 1, each block of and of is diagonal, with th entry and respectively. After permuting coordinates from (variable, mode) to (mode, variable) order, and . The th block of applied to gives with . Since is block diagonal over modes with blocks , and the are independent over , the are Gaussian and independent over .
Proof of Theorem 2. The map is linear, and is block lower triangular with identity diagonal blocks, so for every . The density of is therefore , and . Hence . Each is block lower triangular, so , which does not depend on . Finally .
Remark S1 (Initial condition). Theorem 2 uses the initial condition , under which . Under the stationary initial law with and a static graph, solves the Lyapunov equation, and replacing the first block by adds the constant . With variable-specific persistence, the stationary covariance involves the coupling coefficients, and the graph-free property is lost. We therefore use the conditional initial condition throughout.
Proof of Theorem 3. Expanding gives three kinds of time block: the diagonal time blocks for and for , the time blocks at lag one, in position with their transposes, and zero blocks otherwise. Since is block diagonal over variables with blocks , the variable block of the diagonal time block is
By Dey et al. [9], Theorem 1, if and only if are non-adjacent in . If exactly one of and is identically zero, the block is nonzero, because is nonzero. If both are identically zero, the block is zero. If neither is, the block vanishes only if for every . For fixed , the left-hand side is a polynomial in the coupling coefficients . It is not identically zero, since setting the coefficients at time to zero leaves , which is nonzero for generic coefficients. The zero set of a nontrivial polynomial has Lebesgue measure zero. For a static graph, and the block vanishes exactly when does, because . The variable block of a lag-one block is . Because , it vanishes if and only if . For , . For a static graph the two cases combine into the strong product of with the path on vertices.
Proof of Corollary 1. The rotation maps white noise to white noise. By Theorem 1, the rotated data are independent over , and each mode follows a linear Gaussian state-space model. Its likelihood is given exactly by the Kalman filter.
Proof of Lemma 1. is linear in independent standard normal vectors. Its covariance has -block , cross-block and -block . Hence and .
Proof of Proposition 1. By (9), is a sum over of terms that each depend on only through the row . With the ordering fixed, every assignment of parent sets gives an acyclic graph. Given , the prior of § 2.4 is a product over links of independent augmented chains and independent deviations . It therefore factorizes over children, and given the states it factorizes over time. For child with sign configuration at time , the term is with on the support of . Completion of the square and integration against gives . The joint augmented state of the links of child is a Markov chain on states, with the Kronecker product of the link transition matrices as transition matrix. The Occam factors of § 4.2 multiply single transitions of single links, so they keep this product form. Given the chain, the emissions are independent over and depend on the joint state only through the current signs. The posterior is therefore that of a hidden Markov model, and the forward–backward algorithm computes its marginals exactly. A product of a vector on states with a Kronecker product of matrices of size costs mode products of operations, and each of the emissions costs .
With , the parent set and the coefficients do not change over time. A static link with a random sign and a half-normal strength has a coefficient, so the sum over of the terms is with and . Integration against gives the closed-form posterior
computed by enumeration of the parent sets. This is the graph step of DBMW-0.
The graph as a property of the process
In a Gaussian process the conditional independences are the zero blocks of the precision matrix. Theorem 3 lists every nonzero block of , the precision matrix of all fields at all times, and each condition depends only on the graphs . The graph sequence therefore determines the conditional-independence structure of the whole space-time field. Three kinds of dependence appear.
The fields of two variables in the same period are conditionally dependent when the variables are adjacent in the moral graph at or at . The period enters because also appears in the innovation .
The field of variable at and that of variable at are conditionally dependent when and are adjacent in the moral graph at .
The field of each variable depends on its own field in the neighbouring periods, through the persistence.
An example has and a single link , present only at . Here and are conditionally dependent for and , and so are and , and and . At all other times the fields of variables 1 and 3 are conditionally independent given all other fields. Variable 2 has no link, so its field is conditionally independent of the other two at all times. A link that switches on and off thus changes the conditional independences of the fields themselves, exactly and only around the periods of its presence. This differs from a graph estimated from fitted residuals, as by the graphical lasso on innovations, which describes the estimate rather than the process that generated the data.
Details of the estimator
The augmented link chain and the strengths
Each state of the augmented chain is a pair (current state, signs used so far). The eight states are
Table S1 lists the transitions. From a present state, the link leaves with probability and keeps its set of used signs. From an absent state, it enters with probability if no sign has been used and otherwise, and it chooses either sign with probability . An entry with a sign not used before carries the Occam factor of § 4.2. The initial law puts on and on each of and . The memory of used signs serves only the Occam factor and the separation of never-present candidates. The law of the current states is the chain (5).
| From | To, with probability | Occ. |
| and , each | yes | |
| , , and , | the second | |
| , , and , | the second | |
| and , each | no | |
| , | no |
Table S1. Transitions of the augmented link chain out of each state, other than staying. . Occ.: the transition carries the Occam factor .
For child , collect the strengths in , so that with indicator matrix . In the limit , the expected complete-data objective is
with and , where the expectations are over the posterior of the sign configurations. With the Cholesky factor , the update solves the bounded least-squares problem with the first entries nonpositive and the others nonnegative. The starting values come from multiple regressions at each period. For each link and sign, the start is the precision-weighted mean of the per-period coefficients of that sign with , and when there are none. The number of alternations is fixed at ten. In one data set each of S1P and S1PF, the largest change of a strength between ten and forty alternations is 0.0012 and 0.0022, or 0.7% and 1.8% of the largest strength, and the largest change of an inclusion probability is 0.0015 and 0.0003. After ten alternations, a sign whose strength sits at its bound is removed from the state space of its link, because a present link with zero strength would describe absence plus a random deviation.
Link-specific rates with give the Baum–Welch update , with and the expected numbers of transitions from present to absent and from present to present. Covariate-dependent rates, , give a weighted logistic regression on the expected transition counts. Rates that vary with give time-inhomogeneous chains. In each case only the factors of the Kronecker product change, and the forward–backward recursions stay exact at the same cost.
The switching-rate step
The fit without a graph, with , gives draws from . For each , and denote the mean and variance of the drawn innovations . Their prior variance under the fit without a graph is . Its removal gives a pseudo-observation of the innovation with error variance .
Modes without information from the data, with , drop out of the regression.
For each child and time , a weighted regression of on over the modes , with weights , gives a series with working standard errors . The candidates are the earlier variables with in a regression pooled over periods and modes.
The working standard error is proportional to the amplitude of the fit without a graph, which absorbs the contribution of the parents of . It also ignores the error in the parent’s innovation, which enters the regression multiplied by and so acts only while the link is present. The first distortion is specific to the child, and the second to the state of the link. With the emissions (10), a two-state chain with , and a free initial probability , and a share of candidates that are links, the log-likelihood of is
It is computed exactly by forward recursions, with integrated on a grid of 201 points. An EM algorithm maximizes it. Its E-step is the forward–backward recursion for each candidate. In its M-step, and are Baum–Welch ratios of expected transition counts [1], and are posterior means, and and are weighted means of the squared standardized coefficients in the absent and present states. The scale factors are bounded below by 0.05. The mixture keeps candidates that are never links from pulling towards zero.
The 95% intervals are Wald intervals on the logit scale, from the observed information at the maximum, computed numerically over the logits of , , and and the logarithms of and . Here rescales all jointly, and their ratios are held at the estimates.
When is not identified, Step 2 uses for re-entry. Step 2 multiplies the scale of each child by . A two-sided factor, which also narrows the scale when , multiplied the false links per period by five to eight in the simulations, where lay between 0.45 and 0.9.
Parameter updates
Under scalar persistence, the update of solves the system
For each , the amplitude has the closed form . The profile is maximized over by a bounded one-dimensional search, and over on the grid . The fit without a graph uses , because is weakly identified from counts. In the link-aware rounds of Step 1, pooled least squares over draws, times and modes give the coefficient of each rate candidate,
and the range, amplitude and persistence updates use these coefficients. For the Gaussian family, is the mean squared residual over paired draws of the fields and the intercepts, and every later fit starts from it.
Matrix-free computation
A product with costs two batched products with the matrices , at , and a product with costs two rotations per variable–time pair. Systems with are solved by preconditioned conjugate gradients, to a relative residual of and at most 2000 iterations.
The preconditioner is block diagonal over variable–time pairs. The block of is the exact data block plus the diagonal of on the modes of . The blocks of size are inverted at cost . They are rebuilt only when the median of exceeds 0.15.
The likelihood does not change when a constant is added to the field of variable at every time and subtracted from , and the prior penalizes the constant field only weakly. These directions make ill-conditioned, and without deflation conjugate gradients needed several hundred to over two thousand iterations. The directions spanned by the constant fields and the intercepts are solved exactly, through a system [37], and conjugate gradients runs on the complement.
Algorithm S1 Laplace–Monte Carlo EM for the DBMW model
Require: responses, operator with eigenpairs, candidate links , switching rates (dynamic graph), draws , outer iterations , starting graph and parameters
for do
Newton with preconditioned conjugate gradients for , warm-started
draw (Lemma 1) and form the innovations
for each child: statistics , , signed forward–backward (Proposition 1) and strengths, update of from the median-probability graph
persistence update, then range and amplitude updates, then for the Gaussian family
end for
return inclusion probabilities and signs, , , the posterior mode and draws of the fields
Remark S2. The graph posterior of Proposition 1 conditions on the E-step distribution, a variational approximation. It can therefore understate the uncertainty about the graph. A fully Bayesian alternative uses delayed-acceptance Metropolis–Hastings: proposals are screened with and accepted with the Laplace marginal likelihood, where the change in is estimated by stochastic Lanczos quadrature [38].
Choice of estimator
An alternative to DBMW runs Algorithm S1 directly from the fit without a graph, first with the static graph and then with the signed switching graph from the static fit. We call this the joint EM fit (Joint). Table S2 compares it with DBMW on the same data. Joint reaches a higher average precision than DBMW in S1G and under a static truth, and a lower or equal one in the other scenarios. Its inclusion probabilities are overconfident. At most 3% of its probabilities lie between 0.1 and 0.9, against 6–18% for DBMW, and of its probabilities above 0.9 a smaller share are true links in every scenario with a switching truth. The cause is the feedback of the prior coupling of an included link into its own evidence. DBMW avoids it by computing the graph posterior once, from a fit without a graph. Joint predicts whole maps slightly better than DBMW in S1G and M1 (Table S7). Table S3 gives the run times by step. Joint costs about as much as DBMW.
Table S2: Choice of estimator: DBMW against the joint EM fit of the switching graph (Joint) on the same data. AP and ECE as in Table 1 and Table 2. Confident: share of (link, period) pairs with inclusion probability above 0.9 that are true links. Middle: share of probabilities between 0.1 and 0.9. Minutes: timing study, means over three data sets.
| Scenario | AP | ECE | Confident | Middle | Minutes | |||||
| DBMW | Joint | DBMW | Joint | DBMW | Joint | DBMW | Joint | DBMW | Joint | |
| S1G | 0.67 | 0.75 | 0.039 | 0.035 | 0.94 | 0.90 | 0.08 | 0.03 | 11.2 | 13.6 |
| S1P | 0.68 | 0.64 | 0.039 | 0.054 | 0.93 | 0.87 | 0.10 | 0.02 | 20.9 | 17.9 |
| S1N | 0.63 | 0.60 | 0.042 | 0.057 | 0.95 | 0.84 | 0.09 | 0.02 | 21.8 | 21.0 |
| S1PF | 0.71 | 0.63 | 0.027 | 0.044 | 0.98 | 0.88 | 0.06 | 0.01 | 37.3 | 33.6 |
| S1GF | 0.72 | 0.70 | 0.020 | 0.029 | 0.97 | 0.94 | 0.06 | 0.01 | 24.9 | 21.8 |
| S1B | 0.43 | 0.24 | 0.057 | 0.087 | 0.88 | 0.81 | 0.09 | 0.00 | 18.4 | 22.3 |
| M1 | 0.53 | 0.51 | 0.042 | 0.061 | 0.80 | 0.68 | 0.18 | 0.03 | – | – |
| M2 | 0.61 | 0.61 | 0.038 | 0.049 | 0.96 | 0.84 | 0.10 | 0.02 | – | – |
| M3 | 0.63 | 0.61 | 0.050 | 0.060 | 0.91 | 0.83 | 0.08 | 0.01 | – | – |
| SCP | – | – | 0.445 | 0.446 | 0.00 | 0.00 | 0.27 | 0.02 | – | – |
| S2G | 0.86 | 0.91 | 0.078 | 0.031 | 0.99 | 1.00 | 0.08 | 0.00 | – | – |
| S2P | 0.76 | 0.84 | 0.108 | 0.058 | 0.93 | 0.96 | 0.08 | 0.00 | – | – |
Table S2.
Table S3: Run time in minutes per data set on two cores, by step, means over three data sets (one data set for the applications). Joint EM: the joint fits of the static and the switching graph, including step 1.
| Data | Step 1 | Step 2 | Step 3 | DBMW-X | DBMW | Joint EM |
| S1G | 4.8 | 1.2 | 5.1 | 6.1 | 11.2 | 13.6 |
| S1P | 9.4 | 1.9 | 9.6 | 11.3 | 20.9 | 17.9 |
| S1N | 10.1 | 2.0 | 9.6 | 12.1 | 21.8 | 21.0 |
| S1B | 7.8 | 1.8 | 8.8 | 9.6 | 18.4 | 22.3 |
| S1GF | 11.1 | 2.5 | 11.2 | 13.6 | 24.9 | 21.8 |
| S1PF | 18.5 | 3.7 | 15.1 | 22.2 | 37.3 | 33.6 |
| Air quality | 14.0 | 3.8 | 20.8 | 17.8 | 38.7 | 34.1 |
| Surveillance, fit A | 42.9 | 6.4 | 26.0 | 49.2 | 75.2 | 51.1 |
| Surveillance, fit B | 40.3 | 6.3 | 27.3 | 46.6 | 73.9 | 47.8 |
Table S3.
| Scenario | SPDE-AR1 | MCAR-AR1 | IF | Joint-0 | Joint | DBMW-X | DBMW |
| S1G | 7.99 | 8.82 | 7.38 | 6.08 | 5.83 | 6.36 | 5.98 |
| S1P | 4.18 | div. | 4.06 | 3.07 | 2.98 | 3.37 | 2.96 |
| S1N | 1.897 | – | 1.863 | 1.729 | 1.722 | 1.742 | 1.706 |
| S1PF | 4.30 | – | 4.25 | 4.18 | 4.03 | 3.88 | 3.77 |
| S1GF | 7.71 | – | 7.12 | 6.63 | 6.29 | 6.21 | 6.03 |
| S1B | 1.202 | – | 1.203 | 1.197 | 1.196 | 1.197 | 1.195 |
| M1 | 8.03 | div. | 7.09 | 6.41 | 6.33 | 6.41 | 6.44 |
| M2 | 4.17 | – | 3.90 | 3.47 | 3.39 | 3.60 | 3.37 |
| M3 | 4.39 | – | 4.39 | 3.40 | 3.35 | 3.28 | 3.13 |
| SCP | 8.13 | div. | 7.55 | 7.18 | 7.24 | 7.64 | 7.45 |
| S2G | 11.66 | – | 11.14 | 5.86 | 5.84 | 6.95 | 6.35 |
| S2P | 3.31 | – | 3.22 | 2.15 | 2.13 | 2.61 | 2.27 |
Table S7. Prediction of whole withheld maps in all scenarios, at the posterior mean of the expected response, means over ten data sets. IF: independent fields (the fit without a graph, step 1). Joint-0 and Joint: joint EM fits of the static and the switching graph. MCAR-AR1: multivariate CAR model with AR(1) dynamics, run in four scenarios. Div.: divergent predictions.
Further simulation scenarios
Table S4 lists the further scenarios. All share the design of § 5.1 unless stated otherwise. S1PFS repeats S1PF with doubled strengths. The graph baselines were run on the scenarios with a switching or static graph and fixed or changing signs. Tables S5–S9 report graph recovery, the baselines on the raw responses, prediction with all estimators and both competitors, the uncertainty measures and the detection of sign phases.
With Gaussian sign changes (S1GF), DBMW keeps the highest average precision, 0.72, and GL falls to 0.26. Table S9 splits the sign phases of § 5.3 by the type of link. At every phase length, a phase of a link whose truth has both signs is found less often than a phase of a link with one sign. Doubled strengths (S1PFS) raise detection for both types of link but keep the gap, and the joint refit of Step 3 finds both phases for 35% of the links that change sign in S1PFS. Binary responses (S1B) carry little information about the graph for every method. Overdispersion (M1) raises the realized false discovery rate to 0.32. Link-specific rates (M2) and gradual switches (M3) change the results little. Under a static truth (S2G, S2P), GL matches DBMW in average precision but selects 42–45 false links per period. The rate rule chooses the static graph in 50% and 20% of these data sets, and the joint static fit (Joint-0) then predicts better than DBMW. Under the shared component (SCP), the truth has no graph. The shared component makes the fields of all variables dependent, and every graph estimator represents this dependence by links, about 37 per period for DBMW and Joint. The multivariate CAR model diverges on whole withheld count maps (S1P, M1, SCP), for the plug-in, the posterior-mean and the median prediction alike.
| Scenario | Responses | Links over time |
| S1GF | Gaussian | , , new random sign at each entry |
| S1PFS | Poisson | as S1PF, strengths doubled |
| S1B | binary, logit link | , fixed sign |
| M1 | negative binomial | as S1P, size 2 |
| M2 | Poisson | as S1P, logit |
| M3 | Poisson | as S1P, linear ramps over four periods around each switch |
| SCP | Poisson | no graph, a shared AR(1) Matérn component, loadings |
| S2G, S2P | Gaussian, Poisson | static graph, every true link present at all times |
Table S4. Further simulation scenarios. All have locations and variables, with periods unless stated otherwise.
| Scenario | DBMW AP | DBMW FP | GL AP | GL FP | GL-W AP | GL-W FP | TVGL AP | TVGL FP | PLN AP | PLN FP | Joint AP | Joint FP |
| S1GF | 0.72 | 0.7 | 0.26 | 4.5 | 0.43 | 18.4 | 0.31 | 172.2 | – | – | 0.70 | 0.5 |
| S1B | 0.43 | 0.8 | 0.44 | 21.1 | 0.25 | 20.1 | 0.16 | 175.0 | – | – | 0.24 | 0.3 |
| M1 | 0.53 | 3.1 | – | – | – | – | – | – | – | – | 0.51 | 2.7 |
| M2 | 0.61 | 1.3 | – | – | – | – | – | – | – | – | 0.61 | 1.1 |
| M3 | 0.63 | 1.1 | – | – | – | – | – | – | – | – | 0.61 | 1.3 |
| SCP | – | 37.1 | – | – | – | – | – | – | – | – | – | 38.0 |
| S2G | 0.86 | 0.4 | 0.85 | 42.1 | 0.58 | 39.5 | 0.43 | 162.1 | – | – | 0.91 | 0.0 |
| S2P | 0.76 | 0.6 | 0.79 | 45.0 | 0.50 | 39.5 | 0.36 | 162.5 | 0.54 | 17.2 | 0.84 | 0.5 |
| S1PFS | 0.70 | 1.0 | – | – | – | – | – | – | – | – | 0.68 | 1.4 |
Table S5. Graph recovery in the other scenarios, as in Table 1, with the joint EM fit of the switching graph (Joint).
| Scenario | GL, raw | TVGL, raw |
| S1G | 0.47 (44) | 0.17 (138) |
| S1P | 0.40 (35) | 0.13 (137) |
| S1N | 0.41 (29) | 0.12 (136) |
| S1PF | 0.24 (6) | 0.11 (136) |
| S1GF | 0.29 (8) | 0.15 (138) |
| S1B | 0.30 (13) | 0.06 (136) |
| S2G | 0.70 (66) | 0.30 (130) |
| S2P | 0.66 (72) | 0.22 (129) |
Table S6. Graph recovery of the baselines applied to the standardized log counts or responses instead of the innovations: AP (FP), means over ten data sets.
| Scenario | ECE | FDR | Correct | False flips | 1–7 | 8–15 | (true) | Coverage | |
| S1GF | 0.020 | 0.11 | 0.995 | 0.000 | 0.29 | 0.51 | 0.74 | 0.045 (0.061) | 1.0 |
| S1B | 0.057 | 0.21 | 1.000 | 0.000 | 0.11 | 0.19 | 0.26 | 0.103 (0.099) | 0.9 |
| M1 | 0.042 | 0.32 | 1.000 | 0.001 | 0.34 | 0.58 | 0.63 | 0.120 (0.099) | 0.9 |
| M2 | 0.038 | 0.15 | 1.000 | 0.000 | 0.33 | 0.44 | 0.57 | 0.131 (0.165) | 1.0 |
| M3 | 0.050 | 0.16 | 1.000 | 0.000 | 0.28 | 0.51 | 0.58 | 0.062 (0.064) | 0.8 |
| SCP | 0.445 | 1.00 | – | 0.000 | – | – | – | 0.015 (–) | – |
| S2G | 0.078 | 0.06 | 1.000 | 0.000 | – | – | 0.60 | 0.019 (–) | – |
| S2P | 0.108 | 0.08 | 1.000 | 0.000 | – | – | 0.48 | 0.037 (–) | – |
| S1PFS | 0.025 | 0.16 | 0.998 | 0.001 | 0.39 | 0.62 | 0.65 | 0.050 (0.061) | 0.9 |
Table S8. Uncertainty in the other scenarios, means over ten data sets. ECE: expected calibration error of the inclusion probabilities (ten bins). FDR: realized false discovery rate of the Bayesian rule at . Correct: share of selected (link, period) pairs with the true sign. False flips: share of single-sign links selected with both signs. Phases found: share of true sign phases, by length in periods, in which the selected graph contains the link with the true sign in at least one period. : estimated switching rate, with the realized rate in brackets. Coverage: share of 95% intervals that contain the realized rate. Bold: the best value in each column, unless all values are equal. For FDR the best value is the closest to the nominal 0.10, and for the closest to the realized rate in relative terms.
| Scenario | Graph | 1–7 Both | 1–7 One | 8–15 Both | 8–15 One | ≥ 16 Both | ≥ 16 One | Both found all | Both found shorter ≥ 8 |
| S1PF | Step 2 | 0.10 | 0.32 | 0.32 | 0.55 | 0.55 | 0.75 | 0.09 | 0.17 |
| S1PF | Step 3 | 0.12 | 0.35 | 0.36 | 0.53 | 0.55 | 0.77 | 0.15 | 0.27 |
| S1GF | Step 2 | 0.16 | 0.41 | 0.44 | 0.57 | 0.61 | 0.83 | 0.15 | 0.30 |
| S1GF | Step 3 | 0.13 | 0.45 | 0.46 | 0.55 | 0.57 | 0.85 | 0.22 | 0.40 |
| S1PFS | Step 2 | 0.26 | 0.51 | 0.52 | 0.72 | 0.52 | 0.74 | 0.18 | 0.27 |
| S1PFS | Step 3 | 0.32 | 0.54 | 0.66 | 0.70 | 0.57 | 0.77 | 0.35 | 0.50 |
Table S9. Sign phases found in the scenarios with sign changes, by phase length in periods, for links whose truth has both signs (Both) and links with one sign (One), means over ten data sets. A phase is found when the selected graph contains the link with the true sign in at least one period of the phase. Both found: share of links with both signs in the truth that are selected with both signs.
Switching-rate study
Locations, variables, graph and strengths are as in § 5.1, with Poisson counts and symmetric switching at rate . Around the baseline , , , one quantity varies at a time: , and , with and ten data sets per combination. Step 1 runs exactly as for an application. Table S10 gives the results.
| Realized | Coverage | |||||
| 0.05 | 100 | 52 | 20 | 0.051 | 0.053 | 0.9 |
| 0.05 | 200 | 26 | 20 | 0.048 | 0.037 | 1.0 |
| 0.05 | 200 | 52 | 10 | 0.051 | 0.040 | 1.0 |
| 0.05 | 200 | 52 | 20 | 0.045 | 0.041 | 1.0 |
| 0.05 | 200 | 52 | 40 | 0.047 | 0.038 | 0.9 |
| 0.05 | 200 | 104 | 20 | 0.053 | 0.048 | 1.0 |
| 0.05 | 400 | 52 | 20 | 0.052 | 0.044 | 1.0 |
| 0.05 | 800 | 52 | 20 | 0.049 | 0.045 | 1.0 |
| 0.1 | 100 | 52 | 20 | 0.095 | 0.070 | 0.8 |
| 0.1 | 200 | 26 | 20 | 0.092 | 0.079 | 1.0 |
| 0.1 | 200 | 52 | 10 | 0.106 | 0.182 | 0.9 |
| 0.1 | 200 | 52 | 20 | 0.096 | 0.093 | 1.0 |
| 0.1 | 200 | 52 | 40 | 0.097 | 0.086 | 1.0 |
| 0.1 | 200 | 104 | 20 | 0.100 | 0.090 | 1.0 |
| 0.1 | 400 | 52 | 20 | 0.095 | 0.086 | 1.0 |
| 0.1 | 800 | 52 | 20 | 0.099 | 0.092 | 1.0 |
| 0.2 | 100 | 52 | 20 | 0.194 | 0.143 | 0.8 |
| 0.2 | 200 | 26 | 20 | 0.199 | 0.157 | 0.9 |
| 0.2 | 200 | 52 | 10 | 0.200 | 0.178 | 1.0 |
| 0.2 | 200 | 52 | 20 | 0.188 | 0.173 | 1.0 |
| 0.2 | 200 | 52 | 40 | 0.189 | 0.152 | 0.7 |
| 0.2 | 200 | 104 | 20 | 0.199 | 0.171 | 0.8 |
| 0.2 | 400 | 52 | 20 | 0.190 | 0.170 | 1.0 |
| 0.2 | 800 | 52 | 20 | 0.197 | 0.188 | 1.0 |
Table S10. Switching-rate study: realized rate, estimate and coverage of the 95% interval for the realized rate, ten data sets per row. Baseline , , ; one quantity varies at a time.
The estimate tends to fall below the realized rate, most at , where short phases are hard to separate from noise. Coverage is 70–100%, and lowest for the smallest and the largest at .
Hold-out designs and a vanishing variable
Besides whole maps, two hold-out designs were run in S1G, S1P and S2P. Regions splits the locations into ten spatial regions by -means and withholds, for each variable, one region at all times. Cells withholds 10% of the (location, variable, time) entries at random. Table S11 gives the losses. Under a switching truth, DBMW has the lowest loss in all three designs. Under a static truth, Joint-0 has the lowest loss.
| Scenario | Hold-out | IF | Joint-0 | DBMW-X | DBMW |
| S1G | whole maps | 7.38 | 6.08 | 6.36 | 5.98 |
| regions | 6.48 | 6.23 | 6.26 | 6.13 | |
| cells | 3.06 | 3.04 | 3.05 | 3.03 | |
| S1P | whole maps | 4.06 | 3.07 | 3.37 | 2.96 |
| regions | 3.40 | 3.26 | 3.33 | 3.25 | |
| cells | 1.731 | 1.723 | 1.729 | 1.720 | |
| S2P | whole maps | 3.22 | 2.15 | 2.61 | 2.27 |
| regions | 2.53 | 2.34 | 2.49 | 2.44 | |
| cells | 1.551 | 1.535 | 1.546 | 1.543 |
Table S11. Hold-out designs in the simulations: loss at the posterior mean, means over ten data sets. Regions: one spatial region per variable withheld at all periods. Cells: 10% of the entries at random. Joint-0: joint EM fit of the static graph.
In a further study, one variable of S1P had its rates multiplied by 0.02 in the middle third of the periods, about 91% zero counts, with no change to its true links. Table S12 gives the mean inclusion probability of its true links inside and outside this window, and the Brier score of all its links. With the drop in the offset, the Step-2 probabilities are the same inside and outside the window. A vanishing variable therefore produces no spurious switch-off. Without the drop in the offset, the field absorbs an unexplained level shift, and the probabilities fall at all times. The Step-2 graph has the lowest Brier score in both cases.
| Drop in the offset | Drop not in the offset | |||||
| Inside | Outside | Brier | Inside | Outside | Brier | |
| Step 2 | 0.39 | 0.39 | 0.168 | 0.13 | 0.16 | 0.225 |
| Step 3 | 0.37 | 0.35 | 0.205 | 0.05 | 0.13 | 0.255 |
| Joint | 0.15 | 0.21 | 0.247 | 0.00 | 0.05 | 0.259 |
Table S12. A vanishing variable in S1P: mean inclusion probability of its true links inside and outside the window of near-zero counts, and Brier score, means over ten data sets. Joint: joint EM fit of the switching graph.
Competitors
The competitor SPDE-AR1 gives each variable one Matérn SPDE field with evolution over the periods ([3]), fitted by R-INLA ([34, 25]) with the Gaussian approximation strategy and empirical Bayes estimates of the hyperparameters. The priors are penalized-complexity priors with and on the coordinates scaled to the unit square, and a penalized-complexity prior on the correlation with . The default mesh has maximal edge lengths 0.1 inside and 0.3 outside the domain, with cutoff 0.045. The responses, offsets and hold-out entries are those of our fits. The withheld entries are scored at the posterior mean of the expected response.
In the applications the default mesh has fewer nodes than locations: 235 nodes for the 288 air-quality sites and 299 for the 411 districts. Finer meshes lower the error on whole air-quality maps from 0.334 to 0.272 with 762 nodes and to 0.232 with 1899 nodes, at 26 and 231 minutes per fit. In fit A of the surveillance data, a mesh with 984 nodes lowers the deviance from 7.23 to 6.70, between DBMW (6.33) and DBMW-X (7.28), at 314 minutes per fit. All other comparisons use the default mesh.
In the three withheld-region data sets of the air-quality application, SPDE-AR1 fits the field with an correlation of 0.9998 and a field standard deviation of 8.0–8.9. The intercept is then weakly identified. In data sets 1 and 3, the predictions in the withheld region are biased by about standardized units, with squared errors of 81 and 70. In data set 2 the error is The mean squared error over all withheld entries is 18.3, 2.9 and 25.9 in the three data sets. We therefore also fit SPDE-AR1 with an added time-constant spatial field for each variable, with the same penalized-complexity priors as the AR(1) field. For NO, the AR(1) correlation then falls to 0.97–0.99 with a field standard deviation below 1. The site field takes a range of about 0.05 and a standard deviation of 4.4–22. The NO errors fall to 7.6 and 1.3 in data sets 1 and 2, but they stay at 64 in data set 3. On a mesh of 235 nodes, a Matérn field can represent levels that differ between nearby monitors only with a very short range and a large variance, and its predictions in a withheld region are then unstable. Table 4 reports both specifications. The site field lowers the error with withheld regions in the air-quality data and in fit A, raises it with withheld regions in fit B, and changes the whole-map errors by at most 5%.
The multivariate CAR model with AR(1) dynamics [24] is MVST.CARar of CARBayesST, with an unstructured covariance between the variables, a Leroux CAR on the 10-nearest-neighbour graph and AR(1) evolution, fitted by MCMC with 10,000 burn-in and 30,000 iterations. It was run in four scenarios. On whole withheld count maps it diverges (Table S7). In the surveillance application it diverges in fit A and reaches a deviance of 550 in fit B. On whole air-quality maps its error is 0.303.
Applications
Table S13 summarizes the two data sets. Table S14 reports prediction by all estimators. Figure S1 shows the signed graph of fit A of the surveillance data.
| Air quality | Infectious disease surveillance | |
| Source | EPA Air Quality System, daily summaries | SurvStat@RKI 2.0, notified cases |
| Sites | 288 monitoring sites, contiguous U.S. | 411 districts, Germany |
| Variables () | temperature, NO, CO, PM, ozone (5) | influenza, norovirus, rotavirus, pertussis, varicella, campylobacteriosis, salmonellosis (7) |
| Periods () | 52 weeks of 2023 | 130 four-week periods, 2016–2025 |
| Response, family | weekly mean, log for pollutants, standardized, Gaussian | case count, Poisson |
| Offset | none | A: log(population × weeks), B: A plus national log rate |
| Observed entries | 79, 98, 34, 61, 98% by variable | all, with 3–44% zeros by disease |
| Candidate pairs | all 10 | all 21 |
| Orders | all 120 | the data order and 119 random orders |
| Outer iterations | 20 | 15 |
Table S13. The two data sets.
| Data | Hold-out | IF | DBMW-0 | Joint-0 | Joint | DBMW-X | DBMW |
| Air quality | whole maps | 0.213 | 0.200 | 0.200 | 0.197 | 0.188 | 0.187 |
| whole maps, orders | 0.213 | 0.199 | – | – | 0.190 | 0.196 | |
| regions | 0.861 | 0.718 | 0.717 | 0.704 | 0.720 | 0.715 | |
| cells | 0.081 | 0.078 | 0.078 | 0.078 | 0.077 | 0.078 | |
| Surveillance, fit A | whole maps | 8.13 | 5.87 | 5.81 | 6.37 | 7.28 | 6.33 |
| regions | 12.06 | 15.39 | 13.10 | 11.60 | 12.31 | 11.70 | |
| cells | 3.12 | 3.11 | 3.07 | 3.07 | 3.11 | 3.07 | |
| Surveillance, fit B | whole maps | 9.57 | 9.67 | 9.60 | 9.61 | 9.68 | 9.60 |
| regions | 5.84 | 5.51 | 5.45 | 5.44 | 5.53 | 5.48 | |
| cells | 3.05 | 3.03 | 3.02 | 3.02 | 3.03 | 3.02 |
Table S14. Prediction in the applications by all estimators, at the posterior mean. IF: independent fields. DBMW-0: static graph. Joint-0 and Joint: joint EM fits of the static and the switching graph. Cells: 10% of the entries at random, means over three data sets. Other rows as in Table 4.
Figure S1. Infectious disease surveillance, fit A (population offset). (a) Share of the 120 variable orders in which the Step-2 graph selects each link with a positive association, minus the share with a negative association, by four-week period. The frame marks the pandemic period. (b) Share of the orders in which the static graph of DBMW-0 selects each link. Abbreviations as in Figure 6.
In the air-quality data, DBMW and DBMW-X predict best on whole maps. Over the 120 orders, the median error of DBMW-X is lower than that of DBMW. With withheld regions and scattered cells, the estimators with a graph differ by less than 3%. In fit A of the surveillance data, the static graph predicts whole maps best, and the joint EM fit predicts withheld regions best, with DBMW within 1%. On withheld regions, DBMW beats the static graph in all three data sets of fit A. In fit B, the fit without a graph predicts whole maps as well as any graph, because the national curves carry the timing. With withheld regions, every graph lowers the deviance by about 6% relative to the fit without a graph.
In fit A, the fields carry the national seasons, and links switch more often than in fit B, with against 0.042 per period. Two links have a negative association: campylobacteriosis with influenza, in up to 90% of the orders, and salmonellosis with varicella, in up to 56%. The enteric bacteria peak in summer, influenza in winter and varicella in spring, so the negative links reflect opposite national seasons rather than district-level dependence. In fit B both links lose their negative association.
References
- [1]L. E. Baum, T. Petrie, G. Soules, and N. Weiss. A maximization technique occurring in the statistical analysis of probabilistic functions of Markov chains. Annals of Mathematical Statistics, 41:164–171, 1970.DOI
- [2]J. R. Bradley, S. H. Holan, and C. K. Wikle. Multivariate spatio-temporal models for high-dimensional areal data with application to Longitudinal Employer-Household Dynamics. The Annals of Applied Statistics, 9(4):1761–1791, 2015.DOI
- [3]M. Cameletti, F. Lindgren, D. Simpson, and H. Rue. Spatio-temporal modeling of particulate matter concentration through the SPDE approach. AStA Advances in Statistical Analysis, 97:109–131, 2013.DOI
- [4]R. J. Carroll, D. Ruppert, L. A. Stefanski, and C. M. Crainiceanu. Measurement Error in Nonlinear Models: A Modern Perspective. Chapman and Hall/CRC, Boca Raton, 2nd edition, 2006.
- [5]C. M. Carvalho and M. West. Dynamic matrix-variate graphical models. Bayesian Analysis, 2:69–97, 2007.
- [6]J. Chiquet, M. Mariadassou, and S. Robin. Variational inference for sparse network reconstruction from count data. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 1162–1171, 2019.
- [7]D. Dey, A. Datta, and S. Banerjee. Graphical Gaussian process models for highly multivariate spatial data. Biometrika, 109:993–1014, 2022.DOI
- [8]D. Dey, S. Banerjee, M. A. Lindquist, and A. Datta. Graph-constrained analysis for multivariate functional data. Journal of Multivariate Analysis, 207:105428, 2025.DOI
- [9]D. Dey, A. Manna, and C. J. Geoga. Bigraphical Matérn–Whittle (BMW) processes for fast inference of big multivariate spatial data on general domains, 2026. arXiv:2609.01950.arxiv.org/abs/2609.01950
- [10]B. Franzolini, A. Beskos, M. De Iorio, W. Poklewski Koziełł, and K. Grzeszkiewicz. Change point detection in dynamic Gaussian graphical models: the impact of COVID-19 pandemic on the US stock market. The Annals of Applied Statistics, 18(1), 2024.arxiv.org/abs/2208.00952
- [11]J. Friedman, T. Hastie, and R. Tibshirani. Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9(3):432–441, 2008.pubmed.ncbi.nlm.nih.gov/18079126
- [12]A. E. Gelfand and P. Vounatsou. Proper multivariate conditional autoregressive models for spatial data analysis. Biostatistics, 4:11–25, 2003.pubmed.ncbi.nlm.nih.gov/12925327
- [13]A. E. Gelfand, S. Banerjee, and D. Gamerman. Spatial process modelling for univariate and multivariate dynamic spatial data. Environmetrics, 16(5):465–479, 2005.DOI
- [14]M. G. Genton and W. Kleiber. Cross-covariance functions for multivariate geostatistics. Statistical Science, 30:147–163, 2015.DOI
- [15]E. I. George and R. E. McCulloch. Variable selection via Gibbs sampling. Journal of the American Statistical Association, 88:881–889, 1993.DOI
- [16]T. Gneiting, W. Kleiber, and M. Schlather. Matérn cross-covariance functions for multivariate random fields. Journal of the American Statistical Association, 105:1167–1177, 2010.DOI
- [17]K. Greenewald, S. Park, S. Zhou, and A. Giessing. Time-dependent spatially varying graphical models, with application to brain fMRI data analysis. In Advances in Neural Information Processing Systems, volume 30, 2017.arxiv.org/abs/1711.03701
- [18]D. Hallac, Y. Park, S. Boyd, and J. Leskovec. Network inference via the time-varying graphical lasso. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 205–213, 2017.arxiv.org/abs/1703.01958
- [19]L. Held, M. Höhle, and M. Hofmann. A statistical framework for the analysis of multivariate infectious disease surveillance counts. Statistical Modelling, 5:187–199, 2005.DOI
- [20]X. Jin, B. P. Carlin, and S. Banerjee. Generalized hierarchical multivariate CAR models for areal data. Biometrics, 61:950–961, 2005.pubmed.ncbi.nlm.nih.gov/16401268
- [21]M. Kolar, L. Song, A. Ahmed, and E. P. Xing. Estimating time-varying networks. Annals of Applied Statistics, 4:94–123, 2010.
- [22]M. Krock, W. Kleiber, D. Hammerling, and S. Becker. Modeling massive highly multivariate nonstationary spatial data with the basis graphical lasso. Journal of Computational and Graphical Statistics, 32(4):1472–1487, 2023.
- [23]S. L. Lauritzen. Graphical Models. Clarendon Press, Oxford, 1996.
- [24]D. Lee, A. Rushworth, and G. Napier. Spatio-temporal areal unit modeling in R with conditional autoregressive priors using the CARBayesST package. Journal of Statistical Software, 84(9):1–39, 2018.DOI
- [25]F. Lindgren, H. Rue, and J. Lindström. An explicit link between Gaussian fields and Gaussian Markov random fields: the stochastic partial differential equation approach. Journal of the Royal Statistical Society Series B, 73:423–498, 2011.DOI
- [26]H. Liu, K. Roeder, and L. Wasserman. Stability approach to regularization selection (StARS) for high dimensional graphical models. In Advances in Neural Information Processing Systems, volume 23, pages 1432–1440, 2010.
- [27]A. Manna and S. K. Ghosh. Bayesian models for joint selection of features and auto-regressive lags: theory and applications in environmental and financial forecasting. arXiv:2508.10055, 2025.arxiv.org/abs/2508.10055
- [28]T. J. Mitchell and J. J. Beauchamp. Bayesian variable selection in linear regression. Journal of the American Statistical Association, 83:1023–1032, 1988.DOI
- [29]M. A. Newton, A. Noueiry, D. Sarkar, and P. Ahlquist. Detecting differential gene expression with a semiparametric hierarchical mixture method. Biostatistics, 5:155–176, 2004.pubmed.ncbi.nlm.nih.gov/15054023
- [30]M. Paul, L. Held, and A. M. Toschke. Multivariate modelling of infectious disease surveillance data. Statistics in Medicine, 27:6250–6267, 2008.DOI
- [31]N. G. Polson, J. G. Scott, and J. Windle. Bayesian inference for logistic models using Pólya–Gamma latent variables. Journal of the American Statistical Association, 108:1339–1349, 2013.
- [32]Robert Koch-Institut. SurvStat@RKI 2.0. https://survstat.rki.de, 2025.
- [33]V. Ročková and K. McAlinn. Dynamic variable selection with spike-and-slab process priors. Bayesian Analysis, 16(1):233–269, 2021.arxiv.org/abs/1708.00085
- [34]H. Rue, S. Martino, and N. Chopin. Approximate Bayesian inference for latent Gaussian models by using integrated nested Laplace approximations. Journal of the Royal Statistical Society Series B, 71:319–392, 2009.DOI
- [35]J. H. Seinfeld and S. N. Pandis. Atmospheric Chemistry and Physics: From Air Pollution to Climate Change. Wiley, Hoboken, NJ, 3rd edition, 2016.
- [36]S. Sillman. The relation between ozone, NOx and hydrocarbons in urban and polluted rural environments. Atmospheric Environment, 33(12):1821–1845, 1999.DOI
- [37]J. M. Tang, R. Nabben, C. Vuik, and Y. A. Erlangga. Comparison of two-level preconditioners derived from deflation, domain decomposition and multigrid methods. Journal of Scientific Computing, 39(3):340–370, 2009.
- [38]S. Ubaru, J. Chen, and Y. Saad. Fast estimation of tr(f(A)) via stochastic Lanczos quadrature. SIAM Journal on Matrix Analysis and Applications, 38:1075–1099, 2017.DOI
- [39]A. Ullrich, M. Schranz, U. Rexroth, O. Hamouda, L. Schaade, M. Diercke, and T. S. Boender. Impact of the COVID-19 pandemic and associated non-pharmaceutical interventions on other notifiable infectious diseases in Germany: an analysis of national surveillance data during week 1–2016 to week 32–2020. The Lancet Regional Health – Europe, 6:100103, 2021.DOI
- [40]U.S. Environmental Protection Agency. Air quality system: pre-generated daily summary files, 2023. https://aqs.epa.gov/aqsweb/airdata/download_files.html, 2026. Accessed 30 September 2026.
- [41]R. Warnick, M. Guindani, E. Erhardt, E. Allen, V. Calhoun, and M. Vannucci. A Bayesian approach for estimating dynamic functional network connectivity in fMRI data. Journal of the American Statistical Association, 113(521):134–151, 2018.DOI
- [42]H. Zhang. Inconsistent estimation and asymptotically equal interpolations in model-based geostatistics. Journal of the American Statistical Association, 99(465):250–261, 2004.DOI
- [43]S. Zhou, J. Lafferty, and L. Wasserman. Time varying undirected graphs. Machine Learning, 80:295–319, 2010.





