Simulation of Infectious Number of COVID-19in JAPAN by Using SIR Modelwith Neural Networks
Aika Ohno, Yoko Uwate, and Yoshifumi Nishio
Dept. of Electrical and Electronic Engineering, Tokushima University
2-1 Minami-Josanjima, Tokushima 770-8506, Japan
Email: {a-ohno, uwate, nishio}@ee.tokushima-u.ac.jp

Abstract
In this study, we propose a model to simulate infectious number of COVID-19 in Japan by using a mathematical modelthat is called SIR model. We use time variables for SIR
model, and Echo State Networks (ESN) is applied to simulate the parameters of SIR model. Then, we use the simulatedparameters, and infectious number in Japan is estimated.
1. Introduction
COVID-19 is conﬁrmed for the ﬁrst time in the city ofWuhan in December 2019. As everyone knows, COVID-19
spread all over the world, and still now on conﬁrmed cases
are increasing day by day. According to Jonhs Hopskins
University’s report, more than 96,000,000 infected cases and2,000,000 deaths had been conﬁrmed globally until January
20th 2021 [1]. Then, many cities and countries are locked
down to prevent spreading COVID-19, and some of cities areenforced lock down before pandemic or outbreak situation.
As a result, they could prevent pandemic. Therefore, it is important to predict infectious numbers, and to know how theinfectious number would go on.
Mathematical models for infectious diseases such as SIR
model and SEIR model have been used for the simulation of
infectious diseases. SIR model and SEIR model are used for
Severe Acute Respiratory Syndrome and seasonal inﬂuenza
as well [2],[3]. Neural networks are also applied for the simulation of COVID-19 [4],[5].
Echo State Networks (ESN) is one kind of neural networks,
and ESN is used for time-series data computing.
In this study, we simulate infectious number of COVID-19
in Japan by using SIR model. Then, ESN is used to train andtest the parameters of SIR model, and we aim at simulating
the infectious graph that has more realistic waves.

diseases. SIR is the initial letters of susceptible, infectious
and removed. Susceptible indicates the statement of the people who do not have antibodies of that infection. In this study,
as to COVID-19, we regard all of the people at the ﬁrst point
as susceptible. Infectious means the statement of the people
who have infectious capacity. Removed means the statementof the people who recover from that infection and also people who pass away. In SIR model, susceptible people moveto the statement of infectious with the infectious rate α, andthe infectious people move to the statement of removed withthe removed rate γ. Figure 1 shows the statement structure ofSIR model.

Figure 1: The statement structure of SIR model.
This SIR model can be expressed by the following differential equations. S(t), I(t) and R(t) mean the population ofsusceptible, the population of infectious and the populationof removed at time t, respectively. Equation (1) shows thedifferential equations of SIR model.
dS= −αS(t)I(t)
dt


dI= αS(t)I(t) − γI(t)
dt




 dR = γI(t)dt

2. SIR model
SIR model is a popular mathematical model for infectious

41(1)In the reservoir layer there is a lot of reservoir nodes,
In SIR model, all of the population are divided in thesethree statements which are susceptible, infectious and re- and the reservoir nodes are connected randomly. The input
moved. Then, whole population N is the addition of the three weights and reservoir weights are not updated, only the outstatements as shown in Eq. (2), and we regard N as constant. put weights are updated.
x(n) is a vector of reservoir neuron activation states at time
step n, and n is the discrete time. Tanh function is used as theN = S(t) + I(t) + R(t)(2) activation function as shown in Eq. (3). u(n) is the input data,a is the leaking rate and Win is the input weight.
Then, Eq. (1) is solved by the Runge-Kutta method. FigThe update equations are shown in Eq. (3).
ure 2 shows a typical graph of SIR model.
{x̃(n) = tanh(Win [1; u(n)] + W x(n − 1)(3)x(n) = (1 − a)x(n − 1) + ax̃(n)Root Mean Squared Percentage Error (MSE) is used forvalidation. N , Ysimulated and Y t means the number of thedata, the simulation value and the target value, respectively.
1 ∑ t(Y − Ysimulated )2
N i=1
N

M SE =Figure 2: A graph of SIR model.

(4)

Wout is the output weights, reg is the regularization coefﬁcient, and I is the identity matrix in Eq. (5). X indicates[1;u(n);x(n)].

As shown in Fig. 2, the infectious graph of SIR model has
only one peak. SIR model has the advantage that is quick(5)
simulation and the simple structure. However, SIR model
Wout = Y t X T (XX T + regI)−1
has the disadvantage that SIR model cannot express multiple
In ESN, Wout is learned and updated to minimize M SE.
waves with constant parameters. Therefore, we aim at expressing multiple peaks in infectious simulation graph by ap- In this study, ESN is used for simulating of the parameters
plying ESN which is one kind of neural networks and which α(t) and γ(t).
is introduced in the following section.
4. Data
3. Echo State Networks
ESN is one kind of reservoir computing, and it can handle
time-series data [6]. ESN has the feature of quick learning.
Therefore, the advantage of SIR model would not be lost byusing this network. ESN has reservoir layer between input
and output. Figure 3 shows the structure of ESN.

We use open data from Ministry of Health, Labour andWelfare of Japanese government [7]. From the open data
source, positive cases, recovered cases and death toll in Japanare obtained.
Then, S(t), I(t) and R(t) are calculated by the followingequations. P (t), Re (t) and D(t) means the reported positivecases, reported recovered cases and reported death toll at timet.
S(t) = N − I(t) − R(t)tt∑∑ I(t) =P (t) −R(t)
i=1
i=1
tt
∑∑R(t)
=R(t)
−D(t)
e
i=1Figure 3: The structure of Echo State Networks.

(6)

i=1

In this study, N is 126,000,000 that is the whole populationof Japan.

42

5. Proposed Method

is 0.8, the spectral radius coefﬁcient is 0.999 and the regularization coefﬁcient is 0.005. As a result, M SE of γ(t) isFirst, the parameters α(t) and γ(t) are calculated from SIR 0.0030737. Figure 5 shows the test part of the real data andmodel differential equations by using difference equations the simulation result of γ(t).
method.
S(t) − S(t + 1)α(t) =

S(t)I(t)R(t + 1) − R(t) γ(t) =I(t)(7)

Second, the parameters α(t) and γ(t) are learned andtested by ESN. It is iterated 30 times with random number
for initial weight, and average output is used.
Third, I(t) is calculated by using simulated parametersα(t) and γ(t).
 S(t + 1) = S(t) − α(t)S(t)I(t)R(t + 1) = γ(t)I(t) + R(t)I(t + 1) = N − S(t + 1) − R(t + 1)

Figure 5: The real data and the test result of γ(t).
(8)

The test result graph seems to be following with the real
data graph. The serrate waveform which is shown in the real
As to real data, we use ﬁrst 100 data for training and the graph is expressed in the test result graph.
next 100 data for testing.
Figure 6 shows the simulation result of infectious number
by using test result of α(t) and γ(t).
6. Simulation Results
The following parameters are used for ESN. The size ofreservoir is 50, the leaking rate is 0.03, the spectral radius
coefﬁcient is 0.999 and the regularization coefﬁcient is 0.5.
As a result, M SE of α(t) is 0.0023511. Figure 4 shows thetest part of the real data and the simulation result of α(t).

Figure 6: The simulation result of infectious number.

Figure 4: The real data and the test result of α(t).

The waveform is not like a smooth curb, it is serrate waveform. These features are not shown in the typical infectious
graph of SIR model. Moreover, the valley of the simulation
test graph is the same with the valley of real data. However,the number of simulation test result is not following with thereal data.

The test result graph seems not to be following with the real 7. Additional Simulation
data graph enough. Especially, after 160th days there is difference between simulation values and real values. However,As an additional simulation, we simulate the infectious
the shape of the graph seems to be following.
numbers by using real data and test result mixed.
As to the simulation of γ(t), the following parameters are
Figure 7 shows the simulation result of infectious number
used for ESN. The size of reservoir is 50, the leaking rate by using the real data of α(t) and the test result of γ(t).

43infectious number simulation. From the additional simulation result, we could show the importance of the simulationof γ(t).
For future works, we need to improve the test accuracy ofthe parameters α(t) and γ(t). Especially, we need to improveγ(t) simulation. In this study, though we used 100 data fortraining and other 100 data for testing, these data size might
be too small data size for ESN. However, to increase the data
size is not good solution. We will keep using small data size
to predict for unknown infectious diseases besides COVID19. To improve γ(t) simulation, we will try to use other neural networks such as other recurrent neural networks as well.
Figure 7: The simulation result using the real data of α(t) and theAcknowledgement

test result of γ(t).

Obviously, the simulation result is far different from thereal infectious number. Then, Figure 8 shows the simulation
result of infectious number by using the test result of α(t) andthe real data of γ(t).

This work was supported by Center for Design-Oriented AI
Education and Research Grant-in-Aid for Students.
References[1] JOHNS HOPSKINS UNIVERSITY OF MEDICINE,“COVID-19 Map”, https://coronavirus.jhu.edu/map.html,
2021-1-20.
[2] Ng, Tuen Wai, Gabriel Turinici and Antoine Danchin,“A double epidemic model for the SARS propagation”,
BMC Infectious Diseases 3.1 (2003): 19.
[3] Osthus, Dave, et al, “Forecasting seasonal inﬂuenza
with a state-space SIR model”, The annals of appliedstatistics 11.1 (2017): 202.
[4] Zeroual, Abdelhaﬁd, et al. “Deep learning methods
for forecasting COVID-19 time-Series data: A Comparative study.” Chaos, Solitons Fractals 140 (2020):
110121.

Figure 8: The simulation result using the test result of α(t) and thereal data of γ(t).

[5] Wieczorek, Michał, Jakub Siłka, and Marcin Woźniak.
“Neural network powered COVID-19 spread forecasting model.” Chaos, Solitons Fractals 140 (2020):
110203.

The simulation result graph is following better with thegraph of the real infectious number compared with Fig. 6 and7.
From these results, we can know the simulation of γ(t) is
more important and inﬂuential than the simulation of α(t).
We consider that it is because γ(t) has the larger digits of 0.1
than the digits of α(t) of 1.0 × 10−9 . Therefore, a simulationof γ(t) is more important to have more accurate simulation ofinfectious number.

[6] Lukoševičius, Mantas, “A practical guide to applying
echo state networks”, Neural networks: Tricks of thetrade. Springer, Berlin, Heidelberg, 2012.
[7] Ministry of Health, Labour and Welfare, “Open data”,
https://www.mhlw.go.jp/stf/covid-19/open-data.html,
2020-10-03.

8. Conclusion
In this study, the infectious number of COVID-19 was simulated with time variables α(t) and γ(t) by using SIR model
method and ESN to simulate the parameters α(t) and γ(t).
Then, we could express serrate waveform in the test part of44