It is the first time in recent human history where the spread of a novel virus is not allowed to be random but strict control measures like: locking down countries, closing borders, masks and social distancing, closing schools, and quarantining are undertaken at such a massive global scale. New measures require a new mathematical model which transcends the traditional SEIR model used in epidemiology to study the spread of viral diseases: a model which will allow us to predict and prepare for pandemics well in advance by enabling us to evaluate the combination of restrictions with the highest impact.
When a virus diffuses unrestricted through a population, it spreads randomly. Therefore, the number of infections grows exponentially with time, obeying a nearly Gaussian distribution curve, the hallmark of randomness. The distribution of random infections in each region before control measures are introduced, map human social behavior (contact rate) as well as population density and demographics. The epidemiological model which has been used to describe the spreading of viruses through a population with N people is the class of SEIR models. The driving force of infections in the SEIR type models is a coupling between the susceptibles and infected groups where their coupling strength β is directly proportional to the now famous contagion parameter R 0 .
In this work we propose a stochastic mathematical model for the infection spread which, in addition to the driving force of infections β term of the SEIR model, explicitly adds the impact of each of the three measures (lockdown, social distancing plus masks, and school and border closing) imposed worldwide in disrupting exposure and breaking the transmission of the pandemic have on the diffusion of infection through population. Since time is of essence during a pandemic, we implement our new model and solve its equations using an AI approach to predict what will happen for the rest of the year in any region. The machine is trained in all the Covid − 19 data available from Johns Hopkins University for any region, county, state, or country before and after restrictions were imposed.
Data from the early phase of the pandemic when the spread of infection was unrestricted is very useful in training the machine to learn, and include in its estimate for the restrictions parameters introduced in our model, the population distribution and demographics as well as the characteristic social behavior (contact rates) of each region. This advanced approach allows us to estimate and predict in a matter of seconds how the infections may spread for the rest of the year in any region as a function of the time and type of control measures being introduced and their population characteristics.
Furthermore, we offer an estimate of the number of infection cases undetected for each confirmed positive test in a region, a parameter we call γ( r, t). Through this parameter we can convert the confirmed daily infection curves for any region into a knowledge of the 'reservoir', that is, the total number of the infected population in that region at any time whether they are tested or not. The machine also learns to account for the time delay between infection and its reported tested confirmation. However, since the machine is trained on historic public data, the findings reported here are limited by the accuracy of the reported data: the time lapse between the true first case of infection in a region and the first confirmed positive test, as well as the noise in the reported data, i.e. the amount of uncertainty in the public data for confirmed positives.
Let us first review the basics and terminology of the SEIR model before replacing it with a new model which adds new terms to include the restrictions measures. The letters in SEIR stand for 'number of people susceptible S to the virus, number of people exposed E to it, the number of infected people I, and the number of people removed or recovered R', within that population of size N . In its simplest form it is mathematically described by [1, 4] :
The parameters (ν, β), the removal rate and effective contact rate parameters respectively, are in general time dependent. Without loosing generality, the exposed e = E/N and infected i = I/N percentages of the population in the above equations are grouped together into i for simplicity. An explicit equation for E mathematically obeys the same first order differential equation sourced by the susceptible population on the right hand side.
Combining the above and recalling that e is included in i, gives:
Not surprisingly, as can be seen from the opposite signs in the time derivative terms of s and (i + r) in Eqn.2 what is a driving force for infections, F seir = βsi, is a damping force with the same strength for the susceptible population. We will make use of Eqn.2 in our model below.
Traditionally, Eqns. 1 are combined in a different way, in the manner of Eqn. 3 below:
because of the explicit dependence on the crucial parameter R 0 , the viral reproduction number, defined as
where the terms on the right hand side are respectively':
c = rate of contact between i and s,
and,
It is clear from Eqn.4 and Eqn. 3 that R o describes how infectious a virus is since it gives the average number of people who will get the disease from one infected person. As such its value is crucial in estimating how fast the infection can spread uncontrolled. It should also be noted that in the early stages when the virus spreads unrestricted, this parameter depends on the population density and social behaviour of the region. We report R 0 dependence on a region's characteristics for three such examples in Section 4. For the case of COVID-19 epidemiological studies indicate that when the virus is spreading unrestricted at t = 0, R 0 (t = 0) can range from 2.4 [1] to 5.7 [5] . Additionally, R 0 is an effective parameter since it changes over time. Integrating Eqn.3 highlights the well known fact that damping the spread of infections translates into bringing R 0 to stable values of one or less. Mathematically, β(t) =νR 0 (t) contains the same information as R 0 on how the spread of the disease changes over time becauseν is on average i an unchanging characteristic of the virus. Therefore, any changes introduced by restrictions on the effective reproduction number R 0 of a region over time translate into changes in β(t).
The SEIR model has been further compartmentalized in a SE j ...I j ...R by breaking down the number of exposed "E i " and infected "I j " cases in sub-classes of the different stages of exposure, infection and quarantine, as studied in [6, 1, 2, 4] ). Understanding these compartments is important for epidemiological contact tracing and surveillance and for clinical purposes when studying the probability of infection of a region. However, we won't need the details of the compartmentalized SEIR models in what follows, as their net effect is absorbed in the β driving force term already embedded in the new model below, and implicitly contained in the data on which the machine is trained and which it uses to optimize the best fit for β(t) in real time.
The paper is organized as follows: In Section 2 we introduce the new mathematical model and describe the long term behavior of the model. In Section 3 we describe the method for obtaining the solutions using machine learning. In Section 4 we present the results of our AI implemented model and illustrate them for the case of three US states by showing the predicted curves of infection growth as a function of a representative combination of control measures given by their three parameters. We also estimate and show the number of true infections, the reservoir, for each confirmed infection, a number which for example in the US varies from 4 to 11 depending on the state. We are making the mathematical model and the code publicly available here [3]. This will allow users to instantly derive how the predicted growth of infections changes in their region any time a measure or a combination of them may be introduced and of i Perhaps different strains of the virus may have different removal rates or their mutation may changeν. the time chosen to impose those measures in the future. We summarize our findings and their usefulness for public health in Section 5.
We hope that the interdisciplinary approach and the tools offered here, that is, a combination of a realistic mathematical model with the speed of AI implemented predictions in the code provided will be useful in epidemiology, economics and public health considerations.
To account for the order introduced by the new global measures in slowing the random virus spreading anywhere in space and time, we enhance the SEIR type models by adding new force terms to Eqns. 1 which capture the damping forces of infections imposed by lockdowns, masks and social distancing, and schools and border closings. The remaining random source of infection spread, not contained in the above, is given by a white noise and captured by a diffusion parameter. These terms are in addition to the βsi term of Eqn. 2, the driving force of infections which describes the contagion spread through random contact rate between the infected and susceptible populations in the SEIR model. As described below, the addition of the new forces to Eqn. 2 leads to a new stochastic model which is in a completely different mathematical class from the SEIR models. Let's promote the nonsusceptibles, i.e. the part of the population exposed to the virus at any level of infection, into an 'infection field':ĩ( x, t) = i( x, t) + e( x, t) + r( x, t) ii spreading on (2 + 1) − D (two spatial dimensions x and one temporal dimension t).
In this model we make the following assumptions: a) no vaccine will become massively available until next year; b) the recovered, infected and exposed (the EIR part in SEIR) will gain some immunity, therefore will not be susceptible to being sick again this year or until the vaccine is available. The latter is expected on general grounds on how our immunity system protects us from viruses, but it is not verified to be true for the novel COVID-19 virus. (Indeed, recent medical findings [8] seem to indicate COVID-19 may be unique in the sense that those who recovered from it may not have a long lasting immunity to reinfection.)
The infection fieldĩ( x, t) is a restricted self-avoiding random walker on a two dimensional space and in time. The restricted feature on the random walk of the infection seeping through the population of some region of space x with density ρ( x, t) at some time t is due to the control measures taken in restricting the virus spreading. The self-avoiding feature is related to the assumption of immunity, namely a person who has already been infected once will not be infected again during the time interval from now to until a vaccine is available. Typically, this class of models is expected to lead to critical phenomena of polynomial growth of infections at large times which display a universal scale-free behavior described by what in critical phenomena are known as critical exponents ν, µ iii . In two spatial dimensions ν provides the fractal critical dimension of the fractal space available to the restricted random walkerĩ( x, t) for that region. According to Flory's theory [9, 10, 11] for critical exponents, analytically the fractal dimension ν in two dimensions is expected to be about 2ν ∼ 3/2 instead of 2. That is, without vaccines at large timesĩ( x, t) asymptotically is expected to approach a stable fractal distribution of self similar 'hot' and 'cold' infection clusters on a space of dimension less than 2. Despite a vast literature on the subject, analytical results in a closed form for this class of critical phenomena for a restricted self avoiding (SAW) random walker in two spatial dimensions do not exist even for the simpler case of time independent parameters. Our model therefore has an additional ii We changed notation for spatial coordinates from r to x here to avoid any confusion of the SEIR variable r for the recovered population with the spatial coordinate r. However both r and x have the same meaning, region's location on a two dimensional surface and are used interchangeably.
iii The critical exponent ν here should not be confused with the removal rate parameterν in Eqns. 1 of the SEIR model layer of complexity to the mathematical results cited here for a two dimensional restricted SAW random walker: the restrictions on our random walkerĩ( x, t) are time dependent. Therefore we will use machine learning for solving these equations to predict the late time growth of infection spreading as a function of restriction measures.
Consider the infection variableĩ to be our system. We promoted it into a field i( x, t) random walking through a 'host' environment field s( x, t) living on a two dimensional region over time.
In what follows, we will also make use of the parameter γ mentioned in Section 1, defined in Eqn.8 as the ratio between the confirmed infections i( x, t) and the actual reservoir of the non-susceptible populationĩ( x, t).
Clearly, γ( x, t) is a space and time dependent parameter since it quantifies the true number of infections in a population located at x per each confirmed case there by testing, at any time t.
The Force of Lockdown: Let us now model the effect of the lockdown measure on reducing the infection spread with a quadratic confining potential V i (ĩ). A single well potential for a field, in our case the active infections, describes the effect of lockdown in a region located at r because such a potential drives the active confirmed infection field i( r, t) to eventually rolls down to zero. iv The strength of the confinement potential camptures the impact of the lockdown in damping active infections and is given by its space and time dependent coupling constant α = α[(t f − t i ), t, r], which varies with region r and depends on t i , t f , the initial and final date (duration) of the lockdown of the region, respectively. Since our system isĩ( r, t) then, using the rescaling between confirmed infection i andĩ of Eqn. 8, we can rewrite the lockdown potential in restricting the random walker in terms ofĩ by absorbing γ( r, t) into the strength α( r, t) of the lockdown potential V i .
With these considerations the lockdown potential becomes
where the rescaled lockdown strength is:α = α γ 2 . The damping force of the lockdown on infections is simply the derivative of its potential F i = − dV i dĩ . From now we will suppress showing the symbols t i , t f in α for ease of notation.
The Force of Social Distancing and Masks:
The purpose of masks and social distancing is to eliminate the possibility of exposure to the virus, in other words to minimize the chance that susceptibles are physically close to the path of droplets from others, or to block their flux with a mask altogether. We here assume that the part of the population which follows guidelines for eliminating exposure to the virus is equally likely to engage both methods to block exposure, masks and social distancing, therefore the impact of the social distancing potential in slowing down infection spread discussed here includs the effect of masks as well. While we don't include any of the biological or clinical parameters such as the role of viral load in infecting susceptibles, the risk from potential airborne properties, or a variation in the size and trajectory of droplets, we gauge the net effect of social distancing in eliminating exposure to droplets by i( r, t) as a damping force on infections growth by relying on a simple physics based approximation: the trajectory of a flux of droplets ejected by i (through breathing, coughing and sneezing) follows a typical classical projectile motion described by iv A quartic or any type of concave single well confining potential function would work equally well as the quadratic type of Eqn.9, so we don't loose any information by choosing the simplest such potential.
Newtonian gravity. While estimating the projectile distance a droplet may travel before hitting the ground as a function of its weight, size and ejection speed is not hard, such details are not important on the solution and stochastic evolution of our system. Therefore in what follows, we ignore droplet size effects. We average over the size and initial speed of droplets and consider them collectively as a flux of particles moving together under the gravitational force, along the same projectile trajectory.
Normally, the 'contagion interaction' between a j th susceptible person s j and droplets flux from a k th infected person i k would take the form V si = −δΣ
, whereδ is the strength parameter of the potential, r jk is the distance between them, and the sum is over all (j, k). For the purely gravitational forces on the droplets motion ζ = 2. For a more detailed analysis which may account for changes in the projectile motion due to other forces on the droplets such a drifting force from wind and other weather elements, or an air buoyancy force on the droplets inducing floating, we could allow ζ to be an additional parameter ζ = 2 the value of each would be determined by simulations. Since the susceptible part of the population is much larger than the infected part so far in all the reported data for any region, we replace the sum over j of s j with an averaged value s( r, t) = (1 −ĩ), up to a proportionality constant which depends on the population distribution and social behavior absorbed inδ for each region, through machine learning. As before, the re-scaling factor γ between i andĩ of Eqn.8 is included inδ. As mentioned the machine is trained to learn and include the information about the population density distribution ρ( r, t) and social interactions from earlier times data when the spread was random of each region within radius r at time t into the coupling constants α,δ of each potential. This allows us to further approximate the typical average distance r ≈< r jk > between infected and susceptible people from different households on a two dimensional surface with an ensemble averaged distance r ≈ĩ −1/2 for that region's population density.Any numerical factors that arise from this approximation are roughlyĩ ( − 1/2) and are also absorbed byδ. Therefore, we denote the rescaled strength parameter of this potential by δ. Under the above simplifications, the potential V D capturing the effect of social distancing and masks restriction designed to avoid contact between droplets from the infected and susceptibles of V s,i interactions takes the following form
where
To reduce the number of parameters the machine needs to estimate and best fit to data, we now take ζ = 2. The damping force on infections from the masks and social distancing potential,
Similarly the coupling strength β for the driving force of infection spread depends on space and time.
Collecting all the restriction forces acting on the infection fieldĩ leads to
The prime denotes d dĩ . The first term in Eqn.12 is the familiar SEIR driving force of infections, which in our model presented here corresponds to a potential function, V SEIR = −β si 2 2 .β is the space and time dependent coefficient of β which is rescaled by γ and by population demographics and social behavior; the second term is the damping force with finite duration due to the lockdown; the third term is the damping force on infections from the percent of population which follow rules on masks and social distancing.
The Noise Term from the Environment and Diffusion:
The last term f (t) in Eqn.12 is an important one which deserves some explanation. This term is a source of noise from the background s( r, t) acting on the systemĩ, a random local force driving infection spreading details of which are not known. The only information known about the noise term f (t) is its averaged values, such that on average < f (t) >= 0 and < f (t)f (t ) >= Dδ(t − t ), where D is the diffusion parameter. The noise from the environment f (t) onto our system gauges the fact that for as long as there are hosts s(r, t) on which the virus can feed, then some random diffusion of the infection seeping through a population may still persist and escape restrictions or detection despite efforts carried out to control it. This term quantifies what percentage of the population, may not or can not follow the control measures or any accidental exposure to the virus despite best efforts.
With the noise term f (t) included, Eqn. 12 becomes a stochastic differential equation known as the Langevin equation [12] Givenĩ = e + i + r and its relation to i through the scaling factor γ, from Eqn. 12 we could also rewrite the Langevin equation 12 as an equation for the rate of decrease of the 'hosts' environment, the susceptible population
Eqn.13 relates how decreasing the "driving" force of infection through these measures slows down the "damping" rate of the susceptibles background. v
Let's collect all the potential terms, except the random force f (t), acting onĩ(r, t), that contribute to driving and damping infections in Eqn.12 under a V total such that
Control measures are switched on and off at certain times t i , t f and can be imposed more than once. We account for their duration and time dependence by introducing a memory function in these potentials, a time window function θ(t − t i ). An adiabatic (gradual) change of the restriction over time can be captured by a smooth hyperbolic tangent T anh(t i , t) function, a sudden change by a Gaussian window function, and a change with a fixed start time but indefinite in the future is captured by a step function Θ(t − t i ). By allowing the starting and ending time of these measures to be variable we can predict how the daily infection curves would change accordingly as a function of the time and duration of a control measure being imposed again the future. For example, a measure starting at t i but thereafter lasting indefinitely vi , would be described by a step function for their time window function.
We allow the diffusion parameter D = D(t) to vary with time in each region, rather than be a constant. Moreover, a detailed analysis of the impact of border closings by region would require we introduce a function g( r) which multiplies the noise term
The stochastic differential Langevin equation, with all the time dependent parameters described above is the equation the machine learns to solve in predicting the infection curves as a function of time for each region. Coefficientsβ, D(t) the diffusion parameter for random noise, α the lockdown confining potential, and δ the masks and social distancing parameter, are figured out by best fitting the solution with data provided daily by Johns Hopkins University. These learned parameters are then used to predict future daily infection curves for each region as a function of the restriction measures that may be introduced or relaxed in a region in the next twelve months. We illustrate the predicted daily infection curves given a particular choice of v The relation ds dt = − dĩ dt between the susceptible background s and the infection random walkerĩ for the stationary case eventually leads to the distribution of 'hot' and 'cold' clusters of infection in the fractal structure should the system reach equilibrium at large times.
vi By indefinitely we mean time scales from now to until we are immune to the virus future measures (α, δ,β, γ) as function of time for three US states below, and plan to post the predicted curves for any region in [7] . As a first step in using AI to implement this model, to gain in speed at the expense of complexity, we set the white noise term in the Langevin equation f (t) to zero when solving Eqn.12. All the results shown in the next section and made available in [7] are based on the simplified Eqn.12. Without diffusion, the Langevin equation becomes a deterministic equation of 'motion' which takes far less time to solve numerically. We will report the results for the case f (t) = 0 in a sequel paper [13] .
In the absence of the diffusion term at this stage, we account for the impact of closed borders by imposing absorbing boundary conditions, meaning no incoming or outgoing flux of people in a population at r = R country = the border of states and countries. With the noise term taken to be zero in step one, to account for the part of diffusion of infection through a population that school openings may have contributed the machine absorbs its effect in the time dependence of the V total parametersβ,α, δ. It should be noted that setting diffusion to zero converts the Langevin equation in a deterministic equation. As will be seen in the plots below, ignoring diffusion predicts the infection curves to drop to zero when the total force of infections V total = 0 in Eqn.14 and therefore ignores the probability that the danger of infection spread may persist even when restriction measures remain intact.
Epidemiological studies and data have already shown the impact masks and distancing have on damping infection transmission. School kids below 18 years old make up 23% of the population. To get an intuitive idea on how the machine in the absence of the diffusion term estimates the school effect and absorbs it as an increase in infection spread on the predicted curves, assuming that younger kids cannot effectively follow the guidelines or facilities are such that it is harder to social distance, then any increaseβ can be attributed to school openings. Currently we do not have a sufficient amount of data to isolate this effect in increasing the daily infection curves. However, given that all the other measures where adult population is concerned remain the same, then any increase in our predicted daily infection would be due to school openings. We plan to train the machine when more data on school openings is available and to use our model to quantify and report the increase in β from school openings when all other restrictions are in place.
A more accurate description of the system's evolutionĩ( r, t) is given by the complete stochastic mathematical model of a controlled pandemic of Eqn.12 which includes the diffusion of infection through a random white noise term f (t) for our restricted SAW random walker.
For completeness let us provide the mathematical details of the model for the stochastic case when diffusion is included. We will show its AI implemented predictions in a future publication [13] . We expect that with diffusion included the relative weights of the other parameters in V total as a function of time reported here may change. In contrast to the deterministic type Eqn. 12 of D = 0 solved in this work, in the case of a diffusive system the solution is given by a probability distribution function (PDF) of infectionsĩ( r, t) is given by Eqn.16, due to it stochastic nature. Let us denote the probability that our systemĩ( r, t) which started at some initial position r 0 , t 0 is found at location r at some later time t by P [ĩ( r, t);ĩ( r 0 , t 0 )] = P ( r, t) for short, regardless of how it got there. The equation for the PDF derived from the above Langevin Eqn.12 in (2 + 1)D is known as the Fokker Planck equation.
The Fokker Planck equations for the probability distribution function P ( r, t) of our self avoiding walkerĩ moving on a two dimensional space and restricted by the control measure contained in V total of Eqn.14 at any moment in time is given by (see [12] )
where again,
and V total is given by Eqn.14 which enters the Langevin Eqn.12. The combination of the potential and diffusion terms on the right hand side of Eqn.16, J, denotes the probability current of infection given by
It should be noted that the probability of infection remains non zero when D(t) = 0 even when the total force of infection Eqn.14 in the Langevin equation is driven to zero from the impact of restrictions.
If equilibrium is achieved at large times, then ∇ĩJ = 0 (see [9, 12, 19] ). It is only in this situation when the gradient of the infection current ∇J = 0 that the risk of infection spreading goes.
The initial conditions for Eqn. 16 are defined at t = 0 when the first positive test is confirmed are denoted byĩ(t = 0) = i 0 , s(t = 0) = s 0 . By training the machine on previous data the machine estimates the time derivative of the initial data (ĩ 0 , dĩ(t=0 dt , s 0 ) despite limited testing. Since the growth is exponential early on than the time derivative ofĩ at initial time t = 0 has a simple relation toĩ given by the slope of that curve.
Note that for D(t) = 0 if [β −α − δ] ≤ 0 in the Langevin equation, Eqn.12, than the control measures introduce in V total of Eqn.14 effectively shut down the spread of infections (see plots in section 4). However this is not strictly the case in a stochastic model where diffusion introduces a nonzero probability that some amount of re−infection can enter a region through travel or may still be present and diffuse through a population. The reason for this behavior is the fact that the random diffusion captures the unknown and unreported elements in the population which somehow escaped the healthcare net, who should have been quarantined but weren't, such as some people who may be asymptomatic and careless in following the measures V total introduces, or those who cannot afford to go to the doctor or miss work, as well as any accidental exposure to infection through touching an infected surface or airborne particles. Since diffusion captures all the random elements that cannot be anticipated in V total , the stochastic model gives a more realistic description of the spread of infection, than the deterministic model.
No analytical solution exists for this class of stochastic models of a restricted self avoiding random walker in two spatial dimensions. Due to their complexity these models are also notoriously hard to solve numerically within a short time. Therefore, during an unfolding pandemic when time is of essence, AI implemented results of Eqn.16 which we will show in the sequel paper [13] offer a powerful way for obtaining numerical solutions for the PDF of infection and for the diffusion parameter D(t) within a reasonable time, at any point (r, t) in spacetime.
It is well known that, for the case when the potential parametersβ,α, δ are constants, these stochastic models lead to critical phenomena [9, 10] at t− > ∞. In this case, for ∇J = 0 the infection spreadĩ(r, t) would follow a fractal structure of self similar 'hot'and 'cold' clusters of infections of dimension less than two. In the limit of large times t → ∞, the solutions to Eqn. 16 have a universal scaling behavior and for large populations, N → ∞, they approach a scale free network. In two dimensions, critical exponents are known numerically but not rigorously derived analytically. Furthermore, in equilibrium ∇J = 0 the diffusion parameter D of infection and the dissipation of infection µ are related by a form of the fluctuation dissipation theorem (the Einstein-Schomlowsky relation) as D µ ≈ constant.
A way to understand the above relation between diffusion and dissipation of infection is to recall the relation between the rate of change of the infected fieldĩ (our system) and the susceptible parts of the population (the 'background') dĩ dt = − ds dt of Eqns. (2, 13, 12) . The scaling behavior at large times for the 'mean square distance' (MSD) for these systems in two dimensions in terms of the critical exponents expected to go as
Note that for a diffusive stochastic system, the infection growth at late times is polynomial with time rather than exponential growth like the in the SEIR model. In this section we reported the known characteristic features and scaling behavior in literature [14] for these stochastic models as t → ∞ when the system reaches equilibrium ∇J = 0. However we should caution that the results for the large time evolution of the system and the values of critical exponents studied in literature, do not have time dependent parameters in V total as we have here. The time dependence of the coupling constants, in addition to diffusion, adds an extra layer of complexity to the stochastic system. Furthermore, non-stationary solutions ∇J = 0 for P [ĩ(r, t)] for a SAW model with time dependent parameters are extremely hard and can only be solved numerically by powerful machines. This is a highly complex system which will require considerably more time and computing power. We are currently preparing to train the machine for the full stochastic model with the time dependent coefficients presented here. We will report the solutions of Eqn. 16 for the probability distribution function of infections and estimate the diffusion parameter D(t) as a function of time in a future publication [13] .
The model inrateofinfection has several parameters which are unknown:β,α, δ, for ease of notation from here we will takeβ,α, δ to be β, α, δ and drop the tilde, but we emphasize that future references of β, α, δdo absorb and reflect the region and time dependent version of the parameters. To use the model for forecasting and scenario analysis requires us to identify these parameters. To identify these parameters, we fit the model to observed daily confirmed infections obtained from John's Hopkins University, [15] . The parameters may vary from one region to another, hence we train the machine and best fit the parameters of the model independently to each region's data. To fit the model to data, we make two practical modifications: (i) Infections data is reported daily, so we convert the differential equations to finite difference equations. (ii) Data only reports confirmed (usually symptomatic) infections. An infection is only confirmed after a time-lag k-days, and further, only a fraction γ of the infections are confirmed. The parameter k corresponds approximately to the incubation time of the virus and we set it to 8 [16] . The parameter γ is important in linking the observed infections to the resevoir of all infections. To expedite the fitting process, in this paper we only consider the diffusionless D(t) = 0 simplified version of the model presented in the above section. Taking D = 0 removes the f (t) term inrateofinfection. We also set ζ = 2 and take r ≈ i −1/2 (see the discussion in section 2). Let us first discuss the finite difference model with a lag.
Finite Difference Model: It is convenient to introduce a new state variable q(t) to denote the number of newly created infections at time t in region r. q(t) approximately corresponds to the rate dĩ/dt of Eqn. rateofinfection in region r. Recall thatĩ(t) is the cumulative total number of individuals up to time t in who have been infected by the disease (including those who have recovered), and e(t) is the number of exposed and currently infectious individuals at time t. At time t, let s(t) be the number of susceptible individuals. We introduce two additional variables r s (t) and x(t), which have no exact counterpart in the standard SEIR model. r s (t) is the cumulative number of individuals up to time t who contracted the disease at some earlier time and have now silently recovered. Silently means without detection, usually because there were no symptoms. x(t) is the cumulative number of confirmed infections up to time t. The contribution to x(t) at time t comes from the fraction of new infections at time t − k which get confirmed at time t (the remaining fraction silently recover). Although we did not explicitly show the r dependence in the variables defined above it should be understood that they are functions of space as well as time. The coupled finite difference equations are:
Equationeq:diff1 contains the infectious force and damping potentials fromrateofinfection which control the rate at which new infections are produced, q(t). Equationeq:diff2 merely says that the susceptible population decreases by the new infections. Equationeq:diff3 says that the infectious individuals increase by the new infections minus the infectious individuals who recovered silently or who became symptomatic and got discovered (and quarantined). Due to the lag k the loss of infectious individuals is exactly q(t − k). Equationseq:diff4 andeq:diff5 say that a fraction γ of the infectious get symptomatic and discovered and the other (1 − γ)-fraction silently recover without serious symptoms. Recall thatĩ(t) = e(t)+x(t)+r s (t). It is only x(t) which is observed. The parameters (β, α, δ, γ) are unknown. From data provided by John's Hopkins University Given these initial conditions, the trajectory of x(t) is determined given (β, α, δ, γ) and Equations eq:diff1-eq:diff5. Hence we identify (β * , α * , δ * , γ * ) as the parameters which minimize the mean squared error between the observed trajectoryx and the model's trajectory x(β, α, δ, γ). That is,
Lockdown, Social Distancing and Masks: Again, to address the practical situation with COVID-19, we have to address the effects of lockdown, social distancing and masks. Indeed, this is one of the advantages of our model, that it gives us simple switches for turning on and off various social distancing measures. We assume that lockdown begins at some time τ and lasts till τ + L. In general fitting of the data, the lockdown period L is about 90 days for all USA regions. Naturally, this parameter L is tuned to each specific region and it is calculated by the machine learning algorithm from JHU data [15] . The start of the lockdown, τ , is determined by a robust changepoint (A sample or time instant at which some statistical property of a signal changes abruptly) analysis in the time-series (for example see [18] ).
Parameters representing the strength of each measure on any region vary with time and duration. Being trained on past data, the machine learns the time and strength of these measures α, δ and the remaining degree of randomness β and the time when they were introduced suddenly in the past. Therefore, we include that time dependence in β, α, δ ineq:diff1 by breaking down their time dependence in three time intervals, namely: the 'random spread time',i.e. the time before the lockdown t < τ when all restrictions are zero and the virus is spreading randomly, i.e. when β = β max ; the 'lockdown duration', i.e. the time interval during the first full lockdown α = α max being in effect τ < t < τ + L in a region. L should be understood to be a function of space and time L( r, t since the lockdown time and duration varies by region, and the machine can learn to read this parameter from data. Social distancing and masks restriction δ = δ max are also in full effect during this time and can extend beyond. As a result, β drops from its maximum value by a factor λ p m β where the reduction parameter λ p m in this interval is estimated from past data from the machine; and, future time interval which can extend for two years, i.e. t > τ + L when some of the restrictions are relaxed or not followed rigorously. For example, although lockdown officially ended in May, the machine estimates that its impact parameter α on infection spread was still at half its strength until August because many people were encouraged and continued to work remotely, schools were closed during summer, and travel and hospitality industries were at a minimum, therefore many people stayed home. The future increase or decrease in β is captured by the parameter λ m and it depends on future decisions taken on restrictions in any region. The strength of social distancing follows similar patterns in past data and it is learned by the machine. The change, for example decrease, in the strength of lockdown and social distancing restrictions that can be imposed in the future on any region is captured by the region and time dependent parameters λ L (t), λ sd (t) respectively. The time dependence on these parameters allows us the freedom to predict what happens to the daily infection curves if restrictions are introduced at certain times in the future. All past data parameters are best fitted by the machine. With these definitions, we have
Equationeq:lock1 captures the effects of control measures of α and δ in reducing β after lockdown and in the future. Although β does not return to its maximum initial value in the future, it increases by a percentage defined by the factor λ m when restrictions ease. Equationseq:lock2 and eq:lock3 capture changes over time in the impact of lockdown and social distancing potentials on damping infection spread.
The step functions in Equationseq:lock1-eq:lock3 can be smoothened to better approximate reality, since control measures are not instantly adopted throughout the whole population (except perhaps a government mandated lockdown or curfew). A transition from say a function a(t) to another function b(t) at time t 0 can be compactly written as a single function a(t) + Θ(t − t 0 )(b(t) − a(t)), where Θ(·) is the Heaviside threshold function. One can smoothen this by replacing Θ(t − t 0 ) with any smooth approximation, such as Θ(t − t 0 ) ≈ (1 + tanh(c(t − t 0 )))/2 for c > 0 (smaller c is smoother) and the machine can be set to determine the value of c.
In summary, the lockdown start-time τ is determined by the first changepoint in a robust changepoint analysis of the time series of confirmed infections. For example, in the US the lockdown duration is about L = 90 days, but the machine learns this duration from data for any region. We fit the parameters β( r, t), α( r, t), δ, γ( r, t), λ i ( r, t) (where i stands for m, L, sd By changing future strength of restrictions given α(t), δ(t) and β, allows us to predicts and investigate future scenarios in which the different social distancing measures are relaxed at certain times. We will demonstrate some of these scenarios next in the Results section.
In addition to the new mathematical model we present in this paper, we have made the code publicly available in [3], including the machine learning algorithm. Data file is available daily from [15] . The machine is trained in every region of the world, therefore our model implemented by the deposited code can be used for predicting daily infection curves for any region in the world. We plan to post infection curves for every region in the world on our website [7] , for the two future control measure scenarios described below. Here, we discuss in detail the results for three states:North Carolina, New York and Florida.
These results are obtained by fitting the model to the region's reported data in [15] , shown by the red dots in the figures below, to obtain the coupling parameters β(t), α(t), δ(t), γ, λ m . We show predicted curves in these three states by considering these two hypothetical future scenarios:
(a) Scenario A. The official lockdown of last Spring ends. However population remains in a semi lockdown state with a decrease of 50% in the impact of this restriction in slowing down infection spread, that is α → α/2. Social distancing is extended for a short time interval (approximately from the end of lockdown until August 2020) after official lockdown ends, before this restriction too decreases to about 50% . The exact time intervals when these measures are reduced can be seen in the plots below. The reduction in these restrictions occurs around the anticipated start of K-12 schooling in each state, assuming that social distancing measures will consequently decrease and β, λ m will increase due to the difficulty enforcing these measures in schools. (b) Scenario B. The same as above but social distances is maintained for a longer extension of time (extension past August 2020 into January 2021) before being reduced to 50% impact. In this scenario the reduction in social distancing and therefore increase in β starts happening in January 2021. This is done under the assumption that states can maintain restrictions such as social distancing and masks without a strict lockdown through January, for example by moving K-12 schools to a remote learning model for the Fall Semester. This assumption does not include the possibility of universities operating in person classes, if we were to assume that college students would follow guidelines like the rest of the adult population. We are not proposing that these scenarios be adopted by policy makers, we are simply using these two examples to illustrate the predictive power of our mathematical model and its machine learning implementation.
One could instead analyze any combination of future restrictions such as additional lockdowns, partial mask compliance, etc.
Note that a different choice and/or duration of future restrictions in a region will obviously produce very different daily infection curves. The danger of infection spread can be postponed but will continue to loom over the susceptible population until a vaccine is developed. Hence, it is up to health-economists to evaluate the human and economic loss of different scenarios to come up with the optimal redistribution of the infection counts to tradeoff healthcare-system overload against prolonged economic slump. Our Ai implemented predictive model can help in this effort by efficiently determining months in advance the infection spread dynamics as a function of future decisions on the schedule and strength of control measures.
We illustrate these predictions next.
The infection plots for the three states are in Figure 1 (North Carolina), Figure 2 (New York) and Figure 3 (Florida). We show the two scenarios, Scenario A and Scenario B. In each figure, we first show the past confirmed daily infections (red circles) from JHU data [15] and the infection curves predicted by our new mathematical model (solid black line). Uncertainties in the infection curves are represented by gray uncertainty bands. To determine the uncertainty in the model predictions the algorithm was set to search for all models which have a fit-error within 5% of the optimal. The gray uncertainty bands represent the set of possible outcomes from this set of models, and then the model (solid black line) is the average of these models. The largest source of uncertainty in our predictions is most likely due to noise in the publicly reported data. Because the machine learns from past data, any noise or uncertainty in that data is reflected as uncertainty in the future, and the farther the model projects into the future the larger the region of uncertainty. We then show the time dependent learned coupling parameters α(t), δ(t), β(t) (normalized to their maximum value), and γ(t), see Equationseq:lock1,eq:lock2,eq:lock3 and gamma. Recall the definition of γ as the reservoir parameter which in the variable definitions from Finite Difference model is computed as γ(t) = x(t)/(e(t) + x(t) + r s (t)) from Equations eq:diff3-eq:diff5. In our illustration below, we choose not to initiate a future full lockdown as such a drastic measure seems unlikely. Instead, we focused on extending social distancing and mask mandates which are more practical control measures. Our results show these are even more effective in reducing infection curves than the lockdown. We highlight several points from the figures.
i Each region and state has very different population densities and social interactions, hence the machine learning produces very different coupling parameters for each state. In contrast to SEIR model, this finding emphasizes the importance of space and time dependent restriction parameters contained in our model and the usefulness of machine learning in finding out this regional dependence. On our website [7] , we will show result to the county level. ii The strength of the implemented control measures is determined by the level of social compliance. Since we do not know how compliant the population of a region is, it is necessary for the machine learning to automatically infer this from the observed past data during the phase when the virus spreading is completely random. This knowledge can be useful for other medical and viral diseases that rely on regional characteristics. The results vary considerably from county to county, once again underlining the value of heteregeonity. iii Despite limited testing, we have here developed the tools to estimate the true number of non susceptible population, the 'reservoir', as a function of time in the past and for any predicted future scenario through parameter γ( r, t) shown for the three states below.
(a) Scenario A.
(b) Scenario B. [15, 17] . This results in relaxation of the lockdown measures on May 8, with social distancing and λ m being relaxed around 80 days later, resulting in the spike of infections seen around October. (Right) Scenario B extends social distancing and λ m an additional 120 days, accounting for a scenario in which K-12 schools move to a remote learning model (as is the case in NC) in the fall 2020, and so the spike in infections is delayed until March 2021 should measures be relaxed next Spring. Prolonging restrictions reduces β and daily infection curves. The multiplying parameter for the reservoir γ is also shown below.In both scenarios R 0 = 3.07, α max = 0.01, δ max = 1.05e − 08, γ today = 0.063, which corresponds to roughly 1 in 15 infections being confirmed.
(a) Scenario A.
(b) Scenario B. This not only pushes the second peak of back but reduces the peak height while increasing peak width, further spreading out infections. In FL R 0 = 3.56, α max = 0.22, δ max = 0.003, γ today = 0.06, which, similar to NC corresponds to approximately 1 in 15 infections being confirmed. For both of these scenarios we note the gray uncertainty bands are present but cannot be seen in the plots due to a relatively small value in the uncertainty.
The area under the curve in all the plots shown gives the total confirmed number of infected, which through the parameter γ of each region can be converted into a total number of non suscpetibles of each region.
The impact of the Covid − 19 pandemic on countries around the world and on the daily life of citizens is unprecedented. The traditional class of models used by epidemiologists to study viral infections spreading randomly through a population has been the SEIR model we briefly reviewed in Section 1. The latter cannot account for the impact of global restriction measures on the pandemic, quantify the reservoir, or the space time dependence of these restrictions on the pandemic. We here offer a new and predictive mathematical model for the pandemic dynamics which combined with machine learning includes the space and time dependence in the pandemic dynamics.
In contrast to previous viral diseases, the type and extent of global measures taken to contain the spread of Covid − 19 to prevent a health crisis are new. In this new situation, part of the challenge is finding a predictive model for the evolution of the pandemic which describes the mix of order given by global restrictions, to the disorder of a random spreading of virus, and quantifies the impact of these control measures (their duration and the time they are introduced) in constraining the spread over extended periods of time.
In this work we presented an interdisciplinary approach to predicting the dynamics of future infections. Firstly in Section 2 we develop a mathematical model which using physics based considerations to capture the effect of individual restrictions on the infection spread as a function of space and time. In our model the infection spread is a restricted self avoiding random walker through a population. Our model belongs in a different mathematical class from SEIR type models. It is stochastic and its probability distribution function P ( r, t) on any region at any time is found by solving a Fokker Planck type equation (Eqn. 16) . The strength of the lockdown and of social distancing and masks on the infection curves in our model are given by the time dependent parameters α( r, t), δ( r, t) respectively. These restrictions introduce order in the random walk. The amount of disorder in the random walk which may persist through a population (for example a random mixing of susceptible and infectious groups through school openings) is still described by the SEIR type term with strength β(t), however note that in contrast to the SEIR models, β is a function of space and time and captures population demographics and social behavior. The diffusion of the infection through a population not captured in the above terms, (infections which somehow escape detection or the set of restrictions and quarantine) is given by a diffusion parameter D(t) sourced by a noise term f (t). This model can be applied to potential future pandemics, although of course we hope there wont be any.
Secondly, given the complexity of the model, we take full advantage of the benefits of AI in Section 3 in implementing our model in order to estimate future infection curves for any region within a short time. Viruses need hosts to feed and multiply, therefore their unrestricted spreading phase depends on population demographics and human social behavior, in addition to the virus characteristic reproductive rate R o . We take advantage of this feature in training the machine. The machine learns the population density and social behavior networks for any region, state and country from the pre lockdown data (March 2020) when the virus spread unconstrained. The machine then applies these learned characteristics when estimating future infections curves from our model and estimates the ratio of true infections for each confirmed infection γ( r, t). In this work we implemented a simplified version of our stochastic model by taking diffusion to zero and solving the Langevin equation of Eqn. 12. We deposited the code in Github [3] and will post examples of the predicted infection curves for each region located at r as a function of a particular choice of restrictions α(t), δ(t), β(t), γ(t) in our website [7] .
For the case of time independent parameters, restricted SAW models in two dimensions can lead to critical phenomena of self similar hot and cold clusters of infections at large times. In reality, control measure parameters in our model are time dependent as restrictions change with time and country. Therefore, it is not clear whether the evolution of this pandemic mathematically would be in the same universality class, have the same fractal properties and polynomial growth at late times, as its well studied stationary SAW model. We plan to show our AI implemented infection curves for complete mathematical model presented here including diffusion in a sequel paper. Among other elements, diffusion is an important indicator of the possibility of re infection when travel is freely opened. In the present work we included the effect of border closing by imposing absorbing boundary conditions on our equations, meaning by taking the flux of population crossing boundaries in and out of a region to be zero.
How to interpret our results: Our new AI implemented model predicts future infection curves for any region as a function of the time and the restriction measures taken in that region. It explicitly quantifies the impact of each control measure on future infection curves over extended periods of time. It also quantifies the 'reservoir', through the parameter γ which tells us the number of undetected infections for each confirmed one in every region. Different scenarios, such as the choice of one restriction over another or a combination of them as well as the time they are imposed in the future, result in different predicted infection curves for the rest of the year. An added benefit is the speed of the machine in deriving these predictions. We illustrate the comparison of different outcomes for the same region in Section 4 by showing the predicted infection curves for a few regions under two different scenarios, one with schools closed and partial future lockdown and and social distancing rules, and one with schools open and no second lockdown but extended social distancing. The model can be applied to any pandemic or disease where the spreading of a disease is restrained by control measures. We hope that an advanced knowledge of the predicted infection curves as a function of regional restrictions given by our model will be useful in public health and economic considerations on the duration and combination of future restrictions which is optimal to the needs of their region.