System inference for the spatio-temporal evolution of infectious diseases: Michigan in the time of COVID-19

We extend the classical SIR model of infectious disease spread to account for time dependence in the parameters, which also include diffusivities. The temporal dependence accounts for the changing characteristics of testing, quarantine and treatment protocols, while diffusivity incorporates a mobile population. This model has been applied to data on the evolution of the COVID-19 pandemic in the US state of Michigan. For system inference, we use recent advances; specifically our framework for Variational System Identification (Wang et al. in Comput Methods Appl Mech Eng 356:44–74, 2019; arXiv:2001.04816 [cs.CE]) as well as Bayesian machine learning methods.


Background
Starting from their origins in the the work of Kermack and McKendrick [1], the use of differential equation models of the course of infectious diseases has grown to become one of the more accessible instances of the reach of mathematics. The current COVID-19 Pandemic has brought them into the common parlance. Even before this, however, the baseline Susceptible-Infected-Recovered (SIR) model had been extended to include Exposed (E) and Deceased (D) compartments and applied with considerable success to influenza, ebola, malaria, cholera, tuberculosis and several other infectious diseases [2][3][4][5]. (Some of this literature also includes agent-based models, which we do not consider here.) During the COVID-19 Pandemic, the widespread availability of data in the public domain [6][7][8][9][10][11] has served to attract methods of mathematics, computation and data science to analyzing this information, inferring the disease's dynamics and making projections. The present communication is in this spirit, and brings our recent work in large scale computations of partial differential equations (PDEs), system inference and machine learning to this problem [12][13][14][15][16][17]. Of particular interest to us are two lines of enquiry: The first is that for a rapidly evolving disease such as COVID-19, with its public health, population-based, political, travel and economic manifestations, the classical SIR model of ordinary differential equations (ODEs) with constant coefficients seems inadequate. Driven by data that extends the compartments to the deceased (D), we have adopted the SIRD model. This choice is based entirely on the nature of the data available on the epidemic in the state of Michigan, where the numbers of deceased are reported on a daily basis. The classical SIR model can be extended to compartments additional to the exposed and deceased ones. These models are typically designated as SIS (Susceptible-Infected-Susceptible again, such as in the common cold); MSIR (Maternal-Susceptible-Infected-Recovered, where immunity is derived from the mother in the M compartment); SEIS (Susceptible-Exposed-Infected-Susceptible again, also typical of the common cold); MSEIR and MSEIRD, which combine more of the compartments. However, data are not available to us on the exposed and maternally immune-protected sub-populations in the state of Michigan, and the Maternal compartment is not known to be relevant to COVID-19. We have therefore worked with the SIRD model. The interested reader is directed to Ref. [18] for details of the other SIR model variants.
The first extension that we have undertaken is to allow the ODE coefficients to vary in time to reflect the evolving contours of testing, quarantine and treatment protocols. This is not necessarily novel, and has been addressed in other work [2,19], although perhaps not with the inference approach of Variational System Identification (VSI) and ODE-constrained optimization that we have adopted.
The second is the fact of a mobile population. Population mobility has been addressed through metapopulation models that characterize how diseases move between population hubs, across countries, or even intercontinentally. The most widely known are gravity models (e.g. [20]), and network and agent based models [21]. Given the prominence that quarantine protocols-adorned with the current-day euphemism of "social distancing"-have played in the COVID-19 Pandemic, it appears natural to seek an extension of the SIRD model to a spatio-temporal PDE model. As the world went into lockdown, but at different rates and degrees of rigor, and then began to emerge from it, the detection of patterns of mobility in space and time presents a compelling avenue for investigation. Such an extension also has been considered-chiefly in the setting of the mathematical analysis of reaction-diffusion systems [22][23][24]. Our contribution to this aspect of the mathematical treatment is to also allow the diffusivity of the S, I and R sub-populations to vary with time.
To these tasks we have brought the abundance of highquality, public domain, data on the evolution of the various compartment pertaining to the SIRD model in the US state of Michigan. The temporal resolution by days and spatial resolution by the 85 counties of Michigan has allowed us to apply our methods of Variational System Identification [12,13], PDE-constrained optimization and machine learning [14][15][16][17] to these data.
In Sect. 2 we review the foundational SIRD ODE model. Section 3 is on data preparation. The application of system identification and machine learning to the ODE system are, respectively, in Sects. 4 and 5. The results for inferred parameters and forward prediction are presented in Sect. 6. The extension to inferring mobility via reaction-diffusion systems is in Sect. 7. Our conclusions appear in Sect. 8.

The compartmental model of infectious disease dynamics
We use the SIRD version of compartmental epidemiology models. The population, taken to remain constant at N , is divided into four disjoint compartments with time-dependent sub-populations: S(t) for susceptible, I (t) for infected, R(t) for recovered and D(t) for deceased individuals. The governing ODEs are: This is the canonical form of the model where the subpopulations are assumed to be well-mixed so that spatial variations can be ignored over the domain of interest. Here β(t) is the infection rate, μ(t) is the recovery rate, γ (t) is the rate of immunity loss, and α(t) is the death rate-all allowed to vary with time. Using the natural temporal unit of one day, we note that 1/μ(t) is also the number of days an individual remains infectious. It follows that β(t)/μ(t) is the effective reproduction number: the total number of the susceptible population that an infectious individual passes the disease to. This quantity is commonly denoted by R 0 , but we use r 0 (t) = β(t)/μ(t), to distinguish it from the recovered population, and emphasizing that it, too, varies with time.
We reiterate what we have outlined in the Background (Sect. 1). Given the rapidly varying nature of testing, reporting, treatment protocols and quarantine conditions over the course of an epidemic, it is natural to allow the coefficients in the SIRD model, Eqs. (1)(2)(3)(4) to vary with time. Such variation is evident in epidemiological data. The reader may be familiar with the time varying nature of such factors over the course of the COVID-19 Pandemic. It is a central feature of data preparation in the following section.

Data preparation
Counts of new confirmed infected cases I (t) and deaths D(t) were reported in the public domain on a daily basis by the state of Michigan for each county [26], while total recovered cases in the state R(t) were reported weekly [27]. See Fig. 1 for the counties and regions that Michigan is partitioned into. Since county specific recovery data was not reported, the distribution of recovered cases across counties was approximated to be the same as the distribution of cumulative infected cases, t 0 I (τ )dτ across counties. Estimates for the populations of Michigan's counties [28] were used to determine the susceptible population, S(t), from Eq. (5).
Some amount of data smoothing was necessary, particularly to account for the weekly instead of daily reporting of the number of recovered cases. To compare the effect of the smoothing method on the data, a moving average filter was applied using 7, 11, and 15-day windows, guided by the week-long period of oscillation in the raw data for daily new infections I (t) − I (t − 1). The 7-day window was applied one, two, and three times. As seen in Fig. 2, the method of Fig. 1 The map of Michigan delineating the counties and regions (modified from [25]) smoothing has little effect on the trends of the data. However, and as expected, there is a strong effect on the numerical time derivatives (see Fig. 3). It is clear that multiple passes of the filter are required to remove jumps in dR/dt and dI /dt. Since the additional smoothing is helpful for system inference in Sect. 4 and does not negatively affect the data, the 7-day moving average filter applied three times was used for data smoothing.
The lockdown in Michigan began on March 23, 2020. For brevity, we use C for the date when the outdoor construction industry was allowed to resume on May 1, 2020, M for the restart of some manufacturing on May 7, 2020, R for reopening of research laboratories on May 15, 2020, O for broader opening of most other activities and lifting of the stay at home order on June 1, 2020 (albeit with distancing guidelines in place), and E for the end of the data period that we considered (June 28, 2020). This notation is used for the rest of this communication.

System identification and ODE-constrained optimization
The SIRD model, Eqs. (1-4) was time-discretized using the Backward Euler method and written as:  The system identification problem is to infer the timedependent coefficients β(t), γ (t), μ(t), α(t), which we choose to expand in a polynomial basis (other choices of bases are admissible).
The parameters to be inferred are collected into a vector θ = θ 0 , . . . , θ 15 T . Since the data are known the label vector can be constructed as: and a matrix can be assembled from the reaction terms in the time-discretized SIRD equations (6-9): The columns of m can be regarded as discretized versions of the basis operators that appear as reaction terms on the right hand-side of the SIRD model (1)(2)(3)(4). The label vectors and  (16) and the residual vector is defined: Our approach to inference combines system identification by stepwise regression [12,13] and ODE-constrained optimization using adjoints. We define a loss function that incorporates penalization on θ (leading to ridge regression below): Our stepwise regression techniques incorporate two algorithms listed next: Algorithm 1: Model selection by Stepwise regression: Step 0: Establish target vector y and matrix of bases .
Step 1: Solve for θ j by ridge regression: Calculate the loss function at this iteration, j .
Step 2: Apply the F-test introduced below. IF F-test eliminates an operator THEN Set Q = Q + 1 Set to zero the corresponding component of θ. GOTO Step 1. %Loss function remains small ( j ∼ j−1 ); solution may be overfit. ENDIF Step 3: Stop if the F-test does not allow elimination of any more basis operators.
% Beyond this, the loss function increases dramatically for any further reduction.
There are several possible criteria for eliminating basis terms. Here, we adopt a widely used statistical criterion called the F-test, also used by us previously [12,13]. The significance of the change between the model at iterations j and j − 1 is evaluated by: (20) where p j is the number of bases at iteration j and P = 16 is the total number of operator bases. The F-test is achieved through the application of Algorithm 2: Model selection thus finds θ consisting of a minimal set of non-zero components, ensuring that the coefficients β(t), . . . , α(t) admit a parsimonious representation as polynomials in t. For clarity, we collect this set of non-zero coefficients into another vector, ϑ 0 . Using dim(•) to represent the dimension of a Euclidean vector, we have dim(ϑ 0 ) ≤ dim(θ). The next step is to further refine the values of the non-zero polynomial coefficients using ODE-constrained optimization starting from the initial guess ϑ 0 , and regarding S m ( ϑ), I m ( ϑ), R m ( ϑ), I m ( ϑ) as the forward solution to the discretized SIRD model (22)(23)(24)(25) with coefficient β(t), . . . , α(t) values drawn from ϑ: Subject to the discretized SIRD model:

Algorithm 2: Application of the F-test:
Step 1: %Find the least significant basis i = 0 While i ≤ P − 1 − Q Tentatively eliminate each basis corresponding to non-zero coefficients in θ Set the corresponding coefficient to zero in θ . Evaluate the loss function followed by ridge regression on the reduced basis set.
Compute the F-value on the reduced basis set with smallest loss function. Label this coefficient θ k Step 2: IF F < α THEN formally eliminate the term corresponding to θ k in matrix , by deleting the corresponding column. ENDIF where The ODE-constrained optimization problem is solved iteratively, and requires the gradient of the ODE constraint (22)(23)(24)(25) with respect to ϑ. We adopt the classical approach requiring a single solution of the adjoint equation of the original ODE-constraint in each iteration. In this work we use the L-BFGS-B optimization algorithm from SciPy [29] and the dolfin-adjoint software library [30] to compute the gradient.

Deep and Bayesian neural networks
We also explore multilayer feedforward neural networks (NNs), which are universal function approximators [31] The deterministic model is a deep neural network (DNN) that consists of multiple fully connected layers, whose model parameters (i.e. weights and bias) can be obtained in a straightforward manner by minimizing the loss function through an optimization algorithm, such as stochastic gradient descent, via backpropagation. The probabilistic model is a Bayesian neural network (BNN), which also consists of multiple fully connected layers, but with its model parameters (i.e. weights and bias) being sampled from a posterior distribution P(θ |D) that is computed based on Bayes' theorem where D denote the i.i.d. observations (training data) and P represents the probability density function. In Eq. (27), P(D|θ ) is the likelihood, P(θ ) is the prior probability, and P(D) is the evidence, respectively. The posterior distribution of θ is computed based on variational inference (VI), which approximates the exact posterior distribution P(θ |D) with a more tractable distribution Q(θ) by minimizing the Kullback-Leibler (KL) divergence [32][33][34] Q * = arg min KL(Q(θ)||P(θ|D)).
The KL divergence is computed as (29) which requires computing the logarithm of the evidence, logP(D) in Eq. (27) [33]. Since P(D) is hard to compute, it is challenging to directly evaluate the objective function in Eq. (28). Alternately, we can optimize the evidence lower bound (ELBO) defined as which is equivalent to the KL-divergence up to an additive constant coming from the evidence. Thus, maximizing the ELBO is equivalent to minimizing the KL-divergence. The loss function for the BNN has the following form: where ω 1 and ω 2 are weighting parameters, with ω 1 = 50 and ω 2 = 1 being chosen in this work. A specific weight perturbation method, known as Flipout [35], is followed to infer Q(θ ) by minimizing Eq. (31) through mini-batch training via backpropagation with stochastic optimization algorithms. Flipout has been implemented in the TensorFlow Probability Library. The architectures of both NNs are summarized in Table 1. Both NNs were trained by using the Adam optimizer following an exponentially decaying learning rate with an initial learning rate lr 0 = 0.001, a decay rate v decay = 0.91, a decay step N decay = 100, and a final N total = 10,000 epochs.

Results
Because of the extremely nonuniform distribution of the population of Michigan, we first studied the SIRD model for the entire state consisting of the lower and upper peninsulas (Fig. 1). Following this, the SIRD models were inferred for the eight Regions (also shown in Fig. 1) individually as one direct approach to study the effect of spatial variations in the populations and sub-populations corresponding to the model's compartments. Figure 4 shows the progression of stepwise regression to infer the active time-dependent terms in Eqs. (10-13) via Algorithms 1 and 2. The stem-and-leaf plots on the left illustrate the fate of the terms θ 0 − θ 15 t 3 over eight iterations of stepwise regression. Each stem-and-leaf represents one term out of θ 0 − θ 15 t 3 and the values are scaled to 1 (active) or 0 (inactive) for each iteration. On the right is the loss, which remains low until Iteration 10 and increases dramatically in Iteration 11, if any further terms are eliminated. Following the F-test used in Algorithm 2, the large increase in loss after Iteration 10 exceeds the threshold for acceptable model error.

System identification and ODE-constrained optimization
Thus system identification converges to the inferred model in ten iterations. Figure 5 shows, on the left, the evolution of SIRD model parameters and, on the right, a comparison of the predictions of the inferred model versus the data after ODE-constrained optimization that follows the system identification step. It is important to recall that these results are representative of the population of the entire state of Michigan. The SIRD model, having only four compartments, and applied to data that are the outcome of changing characteristics of testing, quarantine and treatment protocols, does not resolve many details of the public health aspects of the epidemic. The immunological characteristics of the disease itself are accounted for only in a very aggregated sense.
In Fig. 5, the important dates when the lockdown was imposed, and its gradual lifting are indicated by vertical lines to aid an understanding of the results. We first draw attention to the conclusion that γ (t) = 0; the inference indicates that recovery from COVID-19 confers permanent immunity-an important conclusion, that remains to be confirmed by immunologists. As may be expected, the population's infection rate, β(t), declined as the initially higher rates of positive diagnoses fell with fewer infected individuals. However, it began to rise again upon the opening of construction activities (C), and continued to do so through the lifting of stay at home orders (O). The recovery rate, μ(t), showed a long initial increase as growing numbers of infected individuals recovered. Our interpretation of the initially high death rate, α(t), is that many of the early cases already had advanced progression of the disease. Its rapid decline can be attributed to the ramp up of the public health campaign, hospitalization and emergency response of the medical system. The success that the state of Michigan gained by mandating an aggressive lockdown of nearly all societal, educational, commercial and industrial activity is best reflected in the rapid decline of the effective reproduction number, r 0 (t). According to the inference presented here, r 0 (t) < 1.0 for m > 32 (April 24, 2020), after which the typical infected individual passed the disease on to less than one other person. The death rate increased over the last few days for which data were obtained, perhaps as some number of individuals who had been infected for a longer time failed to recover. This affected the recovery rate as well, which fell. The close match between the simulations with the inferred ODE SIRD model and data (Fig. 5, right plot) validate the systems inferred. Such validation  against the data holds for all the inferred results presented in this communication, although the non-uniqueness of inverse problems does not preclude the existence of multiple sets of inferred coefficients. Figures 6 and 7, respectively, illustrate the time-dependent SIRD coefficients and comparison between data and simulation using the inferred model (with the inferred ODE SIRD model) of the disease for Regions 1-8 delineated in Fig. 1. This is an important step toward a more fine-grained understanding of the geographical distribution of the disease in the state. The Southeastern part of the state is more heavily populated, especially Regions 2 and 3, which also bore the greatest burden of the disease. The city of Detroit, at the Western tip of Region 3, was the worst affected, reflecting its well-known socio-economic challenges. By contrast, Washtenaw County, about 50 km to the West, but also in Region 3, bore among the lowest burdens, per capita. At the risk of stating the obvious, we note that Regions 1-4, which account for nearly 80% of the state's population displayed very similar characteristics in the evolution of the data, as well as in SIRD coefficients and forward simulation results. We do not enter a more detailed analysis of these results here, deferring a different approach to spatial aspects of the spread of the disease to Sect. 7.

Deep and Bayesian neural networks
To infer the coefficients β(t), γ (t), μ(t), α(t), we first compute the time derivatives of S(t), I (t), R(t), D(t) by using the automatic differentiation API from TensorFlow. The coefficients are then computed by inverting Eqs. (1-4) at each time instant. For DNNs, we obtained deterministic results for all the coefficients. With BNNs, a Monte Carlo Sampling is performed to compute the mean and the standard deviation of the coefficients.
The constraint Eq. (5) also has been imposed in the DNN and BNN representations by training networks for I , R and D and then defining the network for S by this conservation of total population. Therefore, in using Eqs. (1)(2)(3)(4) to invert the DNN/BNN representations for β(t), γ (t), μ(t), α(t) at each time instant, a linear dependence is encountered: The summed left and right hand-sides of (2-4) exactly equal the left and right hand-side of (1), respectively. A unique solution for β(t), γ (t), μ(t), α(t) is not possible due to linear dependence introduced by the population constraint. To circumvent this indeterminacy, we endow the system with additional information by requiring that γ (t) = 0. This represents the conferral of immunity on the recovered population, and importantly, is detected by our inference results using system identification and ODE-constrained minimization, as discussed in Sect. 6.
The inferred values, extended to a 30-day prediction (until July 28, 2020) for β(t), μ(t), α(t), r 0 (t) and S(t), I (t), R(t), D(t) obtained from both DNNs and BNNs for Michigan are presented in Figs. 8 and 9, while the results for the eight Regions are given in Appendices "DNN results for different regions" and "BNN results for different regions". One can observe that these time-dependent coefficients in Figs. 8a and 9a have a similar initial trend as those inferred by the system inference approach in Fig. 5. The effective repro-duction number r 0 (t) < 1 for m > 30 (April 23), in good agreement with its value obtained via system inference in Fig. 5. As polynomial approximation is used by the system inference approach, the inferred coefficients in Fig. 5 are very smooth, whereas inversion using the NN approach captures the detailed fluctuation of these coefficients, particularly, the rising infection rate after the open of the lockdown on June 1, 2020. In Fig. 9, the band around the inferred coefficients and the NN predictions shows the mean ± one standard deviation of the corresponding results. Note the high standard deviation in parameters at early times, due to the noise in the data at small numbers. The regional results in Appendices "DNN results for different regions" and "BNN results for different regions" indicate that an accelerating infection rate for all the regions after the open of the lockdown. In particular, Region 7 and 8 have a predicted r 0 (t) value that is greater than 1. In addition, we observed that the BNN inferred coefficients in the regional results have a narrower range compared to those from the DNN.
More broadly, we note the difference in trends between the inferred time-dependent coefficients with the DNNs and BNNs in Figs. 8 and 9 in comparison with those in Fig. 5. This is due to the local inversion at each data point to infer the coefficients with the DNNs and BNNs versus the global optimization of losses for system inference in Sect. 6. As was referred to above, inverse problems allow non-unique solutions. It will be instructive to compare the predictions made by the DNN and BNN representations with the data when they become available.
A result that is consistent across all inference methods: system identification with ODE-constrained optimization, DNNs and BNNs, and for the state as a whole as well as its Regions is the following: The infection rate, β(t), initially

Two dimensional SIRD model with diffusion
Classical epidemiological models hold in the well-mixed limit, which is reflected in the compartments and subpopulations, S, I , R, D being being total numbers over some geographical region. Spatial effects have been introduced by simply resolving smaller regions and treating them individually, as demonstrated here with our inference of SIRD coefficients over the regions of Michigan's lower peninsula (Figs. 6, 7). However, while affording a spatially finergrained treatment, this approach cannot, of course, address the mobility of the population. This is an important consideration, especially in light of the imposition and lifting of quarantines. In the COVID-19 Pandemic, the effects of social distancing, and the possibility of surges with their lifting revolve on the question of the time (and spatially) varying mobility of the population. At the finest resolution, this must be approached via agent-based models refined to resolve individuals. However, an intriguing question to explore is whether simple reaction-diffusion models can detect the evidence of mobility in these data. With our approach to model inference, we have access to methods of identifying mechanisms from data in which their action, while weak, may hold the key to important insights to the system. In this section, we embark down such a path, while noting that reaction-diffusion models of epidemiology have been considered previously from the perspective of analysis of the corresponding PDEs [22][23][24]. We now extend the SIRD model to PDEs in two spatial dimensions using the same compartments. However, the population variables are now replaced with spatio-temporally varying densities, S(x, t), I (x, t), R(x, t), D(x, t) defined as numbers per unit area.
Where D S , D I , D R are diffusivities of the corresponding compartments, and represent the mobility of the population via random walks. We define (•) = (•)/ dA where is the domain of the lower peninsula of Michigan, to which we restrict our PDE SIRD studies. Furthermore the population constraint holds:

Inference on the PDE form of the SIRD model
We adopt the weak form, and specifically, the finite element framework for inference on the above system of PDEs. For a generic, finite-dimensional field u h , the problem is stated as follows: where n b is the dimensionality of the function spaces S h and V h , and N a represents the basis functions. To obtain the Galerkin weak forms, we multiply each strong form by the corresponding weighting function, use Backward Euler method for time-discretization, integrate by parts and apply boundary conditions appropriately, leading to: Where, boundary terms disappear because we assume that the populations do not cross the state boundary, or into the upper peninsula. The system identification problem is to infer the time-dependent coefficients D S (t), D I (t), D R (t), and we also choose to expand them in a polynomial basis along with the time-dependent coefficients β(t), γ (t), μ(t), α(t) shown in Eq. (10)(11)(12)(13). We expect that the effect of mobility on the evolution of population densities is small over the course of the COVID-19 Pandemic. However, our interest is in inferring the presence of this effect in the data following the relaxation of lockdown orders. In order to identify the diffusivities despite the expected dominance of the reaction terms in the data obeying Eqs. (42), we adopt two stage Variational System Identification [13]. We define Stage 1 by choosing w h i = 1, i = 1, . . . , 4, yielding: The diffusion operators vanish since, for a constant weighting function, ∇w = 0. In order to avoid a proliferation of superscripts and subscripts, we simply denote the data interpolated over the finite element mesh at time m by (•) d m , dispensing with the superscipt (•) h for the finite-dimensional fields The label vector and matrix of bases can be constructed as: Once the reaction terms are identified, we return to the original weak forms Eqs. (39-42). Accounting for the arbitrariness of w h in V h , the finite-dimensionality leads to a system of residual equations for each degree of freedom (DOF):

Data preparation on the 2D map of Michigan
We first construct a two-dimensional mesh that fully resolves the counties as shown in Fig. 10. Recall that only the lower peninsula, consisting of Regions 1-7 was included in the PDE inference problem. The data are available as cumulative sub-population numbers I d m , R d m , D d m at the county level (Michigan's lower peninsula has 68 counties). We use a uni-  within the county, and applied Gaussian filtering to smooth the discontinuities between counties. Note that the discrete Gaussian filter can not be applied in a straightforward manner to unstructured meshes. Here we start with continuous Gaussian filtering over the infinite domain: where u could be any of the four sub-population densities, 2σ 2 is the two dimensional Gaussian distribution function. The parameter σ is the standard deviation of the Gaussian distribution which is related to the kernel size in the discrete Gaussian filter. Since GdA < 1 we scale up the filtered displacement at each node: The spatio-temporal evolution of these fields was used in PDE inference via two-stage Variational System Identification as described in Sect. 7.1 followed by optimization constrained by the PDEs in (39-42) using adjoints. Stemand-leaf plots and the losses for Stage 1 of Variational System Identification appear in Fig. 11. Recall that in this stage only the reaction terms β(t), γ (t), μ(t), α(t) are identified. These inference results for active coefficients should be compared with the ODE SIRD model in Fig. 5. This is followed by Stage 2 of Variational System Identification with stem-andleaf plots and losses appearing in Fig. 12. Note that the diffusivities of the susceptible and recovered populations, D S = 0 and D R = 0. However, the infected population has a time-varying diffusivity D I that declines. Figure 13 shows the inference (two stage Variational System Identification followed by PDE-constrained optimization) for the coefficients β(t), μ(t), α(t), the effective reproduction number, r 0 (t) as well as the diffusivity D I (t) in the PDE SIRD model. On comparing with Fig. 5 some differences are revealed in the time dependence of β(t), μ(t), r 0 (t), α(t). This is to be expected in adopting the PDE SIRD model over the ODE form. The inference of time-dependent diffusion in the mobility of the infected sub-population, D I , naturally affects the other quantities. While the preliminary nature of these results warrants caution, it is worth noting the inference of decreasing mobility of the infected subpopulation in D I . Figure 14 compares data and the forward simulation with inferred quantities for the distribution of the infected and recovered sub-populations on days corresponding to the initial lockdown, the maximum spread of the infected sub-population (May 2), and at the end of our data collection. Notably, the restriction of the high density of the infected population, I to Southeastern Michigan reflects the success, to date, of the state's public health response. While the correspondence is reasonable, the statewide subpopulations S(t), I (t), R(t), D(t) obtained by integrating the corresponding densities over the lower peninsula, show a poorer match in Fig. 15. While the trends are reproduced, there are notable errors over time. A major improvement is possible in the PDE SIRD model by allowing the coefficients β, γ , μ, α, D S , . . . , D R to also vary over space. This would allow better representation of the system, in keeping with the inferred difference in β(t), μ(t), r 0 (t), α(t) over the eight Regions in Fig. 6, which led to the excellent agreement between data and the forward ODE SIRD simulations in Fig. 7. From a purely data representation standpoint, the greater number of parameters will allow lower errors. The code used for the inference, machine learning and forward simulations is available in the mechanoChem and mechanoChemML libraries at https://github.com/mechano Chem/.

Conclusion
We have brought machine learning inference techniques to bear upon the data on progression of COVID-19 across the state of Michigan by applying three distinct approaches: (a) Our methods of system identification to delineate the operational mechanisms, followed by (b) adjoint-based modelconstrained optimization for refinement of the parameters, and (c) deep and Bayesian neural networks. Our interest in this study has been two-fold. The first has been to seek to infer the time-dependence of the coefficients in the classical ODE SIRD model, motivated by the evolving characteristics of testing, quarantine and treatment protocols over the 97-day course of the pandemic as reflected in the data. As discussed in Sect. 6, our inference methods reveal the course of rates of infection, recovery and death over the state and its eight regions, assuming uniform mixing in each case. Notably, our methods suggest that recovery confers immunity, but we hasten to add that this is a very preliminary conclusion. More detailed and fine-grained studies need to be undertaken to verify it, and of course, immunology will have the final say here. Also of note are our conclusions that while the infection rate has increased after an initial decline, as the state relaxed restrictions, the lower numbers of infectious individuals has meant a lower overall extent of transmission. This is also seen in the effective reproduction rate, which, while below one, has trended dangerously closer to that threshold of exponential growth. The uncertainty in our inference, given the data, is reflected in the results of the Bayesian neural networks in the same section. Of some interest here are the predictions made by BNNs for 30 days beyond the end of the data we have considered; that is until July 28, 2020.
The second facet of our interest is to try and infer spatial dependence by extending the SIRD models to PDEs by incorporating the population's mobility via diffusion. This is a different, and potentially intriguing, approach that complements the resolution of the problem down to the smaller Regions of the state as we did with the ODE SIRD model. On this front, we note that the inference needs to be extended to our methods of two-stage Variational System Identification followed by PDE-constrained optimization. Here, it is of note that the susceptible and recovered populations were found to have vanishing diffusivities (mobilities), while the infected population had a diffusivity that declined over the 97-day extent of the data that we used. This first extension to sys-tem inference of the PDE SIRD model returned reasonable comparisons with data on distributions of the sub-population densities, although the total numbers integrated over the state were not as well reproduced. As suggested by the notable differences in the ODE SIRD model coefficients for the eight regions of the state, the PDE SIRD model with spatially varying coefficients may be a better representation. This will allow us to make connections with the well-known metapopulation variants [20,21] of the network-based SIR model that account for the mobility of individuals or groups, and thereby represent spatially and group-wise varying diffusivity. Building on these initial results, we see many possibilities for analysis and prediction of the future course and geographical spread of the COVID-19 Pandemic using the PDE SIRD model.