chap02.tex 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % Author: Phillip Rothenbeck
  3. % Title: Investigating the Evolution of the COVID-19 Pandemic in Germany Using Physics-Informed Neural Networks
  4. % File: chap02/chap02.tex
  5. % Part: theoretical background
  6. % Description:
  7. % summary of the content in this chapter
  8. % Version: 20.08.2024
  9. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  10. \chapter{Theoretical Background}
  11. \label{chap:background}
  12. This chapter introduces the theoretical foundations for the work presented in
  13. this thesis. In~\Cref{sec:domain} and~\Cref{sec:differentialEq}, we describe
  14. differential equations and the underlying theory. In these Sections both the
  15. explanations and the approach are based on a book on analysis by
  16. Rudin~\cite{Rudin2007} and a book about ordinary differential equations by
  17. Tenenbaum and Pollard~\cite{Tenenbaum1985}. Subsequently, we employ this
  18. knowledge to examine various pandemic models in~\Cref{sec:epidemModel}. Finally,
  19. we address the topic of neural networks with a focus on the multilayer
  20. perceptron in~\Cref{sec:mlp} and physics informed neural networks
  21. in~\Cref{sec:pinn}.
  22. % -------------------------------------------------------------------
  23. \section{Mathematical Modelling using Functions}
  24. \label{sec:domain}
  25. To model a physical problem mathematically, it is necessary to define a
  26. fundamental set of numbers or quantities upon which the subsequent calculations
  27. will be based. These sets may represent, for instance, a specific time interval
  28. or a distance. The term \emph{domain} describes these fundamental sets of
  29. numbers or quantities~\cite{Rudin2007}. A \emph{variable} is a changing entity
  30. living in a certain domain. In this thesis, we will focus on domains of real
  31. numbers in $\mathbb{R}$.\\
  32. The mapping between variables enables the modeling of a physical process and may
  33. depict semantics. We use functions in order to facilitate this mapping. Let
  34. $A, B\subset\mathbb{R}$ be to subsets of the real numbers, then we define a
  35. function as the mapping
  36. \begin{equation}
  37. f: A\rightarrow B.
  38. \end{equation}
  39. In other words, the function $f$ maps elements $x\in A$ to values
  40. $f(x)\in B$. $A$ is the \emph{domain} of $f$, while $B$ is the \emph{codomain}
  41. of $f$. Functions are capable of representing the state of a system as a value
  42. based on an input value from their domain. One illustrative example is a
  43. function that maps a time step to the distance covered since a starting point.
  44. In this case, time serves as the domain, while the distance is the codomain.
  45. % -------------------------------------------------------------------
  46. \section{Mathematical Modelling using Differential Equations}
  47. \label{sec:differentialEq}
  48. Often, the behavior of a variable or a quantity across a domain is more
  49. interesting than its current state. Functions are able to give us the latter,
  50. but do not contain information about the change of a system. The objective
  51. is to determine an effective method for calculating the change of a function
  52. across its domain. Let $f$ be a function and $[a, b]\subset \mathbb{R}$ an
  53. interval of real numbers. The expression
  54. \begin{equation}
  55. m = \frac{f(b) - f(a)}{a-b}
  56. \end{equation}
  57. gives the average rate of change. While the average rate of change is useful in
  58. many cases, the momentary rate of change is more accurate. To calculate this, \todo{look up in Rudin - cite (wordly)}
  59. we need to narrow down, the interval to an infinitesimal. For each $x\in[a, b]$
  60. we calculate
  61. \begin{equation} \label{eqn:differential}
  62. \frac{df}{dx} = \lim_{t\to x} \frac{f(t) - f(x)}{t-x},
  63. \end{equation}
  64. if it exists. As the Tenenbaum and Pollard~\cite{Tenenbaum1985} define,
  65. $\nicefrac{df}{dx}$ is the \emph{derivative}, which is ``the rate of change of a
  66. variable with respect to another''. The relation between a variable and its
  67. derivative is modeled in a \emph{differential equation}. The derivative of
  68. $\nicefrac{df}{dx}$ yields $\nicefrac{d^2f}{dx^2}$, which is the function that
  69. calculates the rate of change of the rate of change and is called the
  70. \emph{second order derivative}. Iterating this $n$ times results in
  71. $\nicefrac{d^nf}{dx^n}$, the derivative of the $n$'th order. A method for
  72. obtaining a differential equation is to derive it from the semantics of a
  73. problem. For example, in physics a differential equation can be derived from the
  74. law of the conservation of energy~\cite{Demtroeder2021}. Differential equations
  75. find application in several areas such as engineering \eg, the Kirchhoff's
  76. circuit laws~\cite{Kirchhoff1845} to describe the relation between the voltage
  77. and current in systems with resistors, inductors, and capacitors; physics with,
  78. \eg, the Schrödinger equation, which predicts the probability of finding
  79. particles like electrons in specific places or states in a quantum system;
  80. economics, \eg, Black-Scholes equation~\cite{Oksendal2000} predicting the price
  81. of financial derivatives, such as options, over time; epidemiology with the SIR
  82. Model~\cite{1927}; and beyond.\\
  83. In the context of functions, it is possible to have multiple domains, meaning
  84. that function has more than one parameter. To illustrate, consider a function
  85. operating in two-dimensional space, wherein each parameter represents one axis.
  86. Another example would be a function, that maps its inputs of a location variable
  87. and a time variable on a height. The term \emph{partial differential equations}
  88. (\emph{PDE}'s) describes differential equations of such functions, which contain
  89. partial derivatives with respect to each individual domain. In contrast, \emph{ordinary differential
  90. equations} (\emph{ODE}'s) are the single derivatives for a function having only
  91. one domain~\cite{Tenenbaum1985}. In this thesis, we restrict ourselves to ODE's.\\
  92. A \emph{system of differential equations} is the name for a set of differential
  93. equations. The derivatives in a system of differential equations each have their
  94. own codomain, which is part of the problem, while they all share the same
  95. domain.\\
  96. Tenenbaum and Pollard~\cite{Tenenbaum1985} provide many examples for ODE's,
  97. including the \emph{Motion of a Particle Along a Straight Line}. Further,
  98. Newton's second law states that ``the rate of change of the momentum of a body
  99. ($momentum = mass \cdot velocity$) is proportional to the resultant external
  100. force $F$ acted upon it''~\cite{Tenenbaum1985}. Let $m$ be the mass of the body
  101. in kilograms, $v$ its velocity in meters per second and $t$ the time in seconds.
  102. Then, Newton's second law translates mathematically to
  103. \begin{equation} \label{eq:newtonSecLaw}
  104. F = m\frac{dv}{dt}.
  105. \end{equation}
  106. It is evident that the acceleration, $a=\frac{dv}{dt}$, as the rate of change of
  107. the velocity is part of the equation. Additionally, the velocity of a body is
  108. the derivative of the distance traveled by that body. Based on these findings,
  109. we can rewrite the~\Cref{eq:newtonSecLaw} to
  110. \begin{equation}
  111. F=ma=m\frac{d^2s}{dt^2}.
  112. \end{equation}\\
  113. To conclude, note that this explanation of differential equations focuses on the
  114. aspects deemed crucial for this thesis and is not intended to be a complete
  115. explanation of the subject. To gain a better understanding of it, we recommend
  116. the books mentioned above~\cite{Rudin2007,Tenenbaum1985}. In the following
  117. section we describe the application of these principles in epidemiological
  118. models.
  119. % -------------------------------------------------------------------
  120. \section{Epidemiological Models}
  121. \label{sec:epidemModel}
  122. Pandemics, like \emph{COVID-19}, which have resulted in a significant
  123. number of fatalities. Hence, the question arises: How should we analyze a
  124. pandemic effectively? It is essential to study whether the employed
  125. countermeasures are efficacious in combating the pandemic. Given the unfavorable
  126. public response to measures such as lockdowns, it is imperative to investigate
  127. that their efficacy remains commensurate with the costs incurred to those
  128. affected. In the event that alternative and novel technologies were in use, such
  129. as the mRNA vaccines in the context of COVID-19, it is needful to test the
  130. effect and find the optimal variant. In order to shed light on the
  131. aforementioned events, we need a method to quantify the pandemic along with its
  132. course of progression.\\
  133. The real world is a highly complex system, which presents a significant
  134. challenge attempting to describe it fully in a mathematical model. Therefore,
  135. the model must reduce the complexity while retaining the essential information.
  136. Furthermore, it must address the issue of limited data availability. For
  137. instance, during COVID-19 institutions such as the Robert Koch Institute
  138. (RKI)\footnote[1]{\url{https://www.rki.de/EN/Home/homepage_node.html}} were only
  139. able to collect data on infections and mortality cases. Consequently, we require
  140. a model that employs an abstraction of the real world to illustrate the events
  141. and relations that are pivotal to understanding the problem.
  142. % -------------------------------------------------------------------
  143. \subsection{SIR Model}
  144. \label{sec:pandemicModel:sir}
  145. In 1927, Kermack and McKendrick~\cite{1927} introduced the \emph{SIR Model},
  146. which subsequently became one of the most influential epidemiological models.
  147. This model enables the modeling of infections during epidemiological events such as pandemics.
  148. The book \emph{Mathematical Models in Biology}~\cite{EdelsteinKeshet2005}
  149. reiterates the model and serves as the foundation for the following explanation
  150. of SIR models.\\
  151. The SIR model is capable of illustrating diseases, which are transferred through
  152. contact or proximity of an individual carrying the illness and a healthy
  153. individual. This is possible due to the distinction between infected individuals
  154. who are carriers of the disease and the part of the population, which is
  155. susceptible to infection. In the model, the mentioned groups are capable to
  156. change, \eg, healthy individuals becoming infected. The model assumes the
  157. size $N$ of the population remains constant throughout the duration of the
  158. pandemic. The population $N$ comprises three distinct compartments: the
  159. \emph{susceptible} group $S$, the \emph{infectious} group $I$ and the
  160. \emph{removed} group $R$ (hence SIR model). Let $\mathcal{T} = [t_0, t_f]\subseteq
  161. \mathbb{R}_{\geq0}$ be the time span of the pandemic, then,
  162. \begin{equation}
  163. S: \mathcal{T}\rightarrow\mathbb{N}, \quad I: \mathcal{T}\rightarrow\mathbb{N}, \quad R: \mathcal{T}\rightarrow\mathbb{N},
  164. \end{equation}
  165. give the values of $S$, $I$ and $R$ at a certain point of time
  166. $t\in\mathcal{T}$. For $S$, $I$, $R$ and $N$ applies:
  167. \begin{equation} \label{eq:N_char}
  168. N = S + I + R.
  169. \end{equation}
  170. The model makes another assumption by stating that recovered people are immune
  171. to the illness and infectious individuals can not infect them. The individuals
  172. in the $R$ group are either recovered or deceased, and thus unable to transmit
  173. or carry the disease.
  174. \begin{figure}[h]
  175. \centering
  176. \includegraphics[width=\textwidth]{sir_graph.pdf}
  177. \caption{A visualization of the SIR model, illustrating $N$ being split in the
  178. three groups $S$, $I$ and $R$.}
  179. \label{fig:sir_model}
  180. \end{figure}
  181. As visualized in the~\Cref{fig:sir_model} the
  182. individuals may transition between groups based on transition rates. The
  183. transmission rate $\beta$ is responsible for individuals becoming infected,
  184. while the rate of removal or recovery rate $\alpha$ (also referred to as
  185. $\delta$ or $\nu$, \eg,~\cite{EdelsteinKeshet2005,Millevoi2023}) moves
  186. individuals from $I$ to $R$.\\
  187. We can describe this problem mathematically using a system of differential
  188. equations (see ~\Cref{sec:differentialEq}). Thus, Kermack and
  189. McKendrick~\cite{1927} propose the following set of differential equations:
  190. \begin{equation}\label{eq:sir}
  191. \begin{split}
  192. \frac{dS}{dt} &= -\beta S I,\\
  193. \frac{dI}{dt} &= \beta S I - \alpha I,\\
  194. \frac{dR}{dt} &= \alpha I.
  195. \end{split}
  196. \end{equation}
  197. This set of differential equations, is based on the following assumption:
  198. ``The rate of transmission of a microparasitic disease is proportional to the
  199. rate of encounter of susceptible and infective individuals modelled by the
  200. product ($\beta S I$)'', according to Edelstein-Keshet~\cite{EdelsteinKeshet2005}.
  201. The system shows the change in size of the groups per time unit due to
  202. infections, recoveries, and deaths.\\
  203. The term $\beta SI$ describes the rate of encounters of susceptible and infected
  204. individuals. This term is dependent on the size of $S$ and $I$, thus Anderson
  205. and May~\cite{Anderson1991} propose a modified model:
  206. \begin{equation}\label{eq:modSIR}
  207. \begin{split}
  208. \frac{dS}{dt} &= -\beta \frac{SI}{N},\\
  209. \frac{dI}{dt} &= \beta \frac{SI}{N} - \alpha I,\\
  210. \frac{dR}{dt} &= \alpha I.
  211. \end{split}
  212. \end{equation}
  213. In~\Cref{eq:modSIR} $\beta SI$ gets normalized by $N$, which is more correct in
  214. a real world aspect~\cite{Anderson1991}.\\
  215. The initial phase of a pandemic is characterized by the infection of a small
  216. number of individuals, while the majority of the population remains susceptible.
  217. The infectious group has not yet infected any individuals thus
  218. neither recovery nor mortality is possible. Let $I_0\in\mathbb{N}$ be
  219. the number of infected individuals at the beginning of the disease. Then,
  220. \begin{equation}\label{eq:startCond}
  221. \begin{split}
  222. S(0) &= N - I_{0},\\
  223. I(0) &= I_{0},\\
  224. R(0) &= 0,
  225. \end{split}
  226. \end{equation}
  227. describes the initial configuration of a system in which a disease has just
  228. emerged.\\
  229. \begin{figure}[h]
  230. %\centering
  231. \setlength{\unitlength}{1cm} % Set the unit length for coordinates
  232. \begin{picture}(12, 9.5) % Specify the size of the picture environment (width, height)
  233. % reference
  234. \put(0, 1.75){
  235. \begin{subfigure}{0.35\textwidth}
  236. \centering
  237. \includegraphics[width=\textwidth]{reference_params_synth.pdf}
  238. \caption{$\alpha=0.35$, $\beta=0.5$}
  239. \label{fig:synth_norm}
  240. \end{subfigure}
  241. }
  242. % 1. row, 1.image (low beta)
  243. \put(5.25, 5){
  244. \begin{subfigure}{0.3\textwidth}
  245. \centering
  246. \includegraphics[width=\textwidth]{low_beta_synth.pdf}
  247. \caption{$\alpha=0.25$, $\beta=0.5$}
  248. \label{fig:synth_low_beta}
  249. \end{subfigure}
  250. }
  251. % 1. row, 2.image (high beta)
  252. \put(9.5, 5){
  253. \begin{subfigure}{0.3\textwidth}
  254. \centering
  255. \includegraphics[width=\textwidth]{high_beta_synth.pdf}
  256. \caption{$\alpha=0.45$, $\beta=0.5$}
  257. \label{fig:synth_high_beta}
  258. \end{subfigure}
  259. }
  260. % 2. row, 1.image (low alpha)
  261. \put(5.25, 0){
  262. \begin{subfigure}{0.3\textwidth}
  263. \centering
  264. \includegraphics[width=\textwidth]{low_alpha_synth.pdf}
  265. \caption{$\alpha=0.35$, $\beta=0.4$}
  266. \label{fig:synth_low_alpha}
  267. \end{subfigure}
  268. }
  269. % 2. row, 2.image (high alpha)
  270. \put(9.5, 0){
  271. \begin{subfigure}{0.3\textwidth}
  272. \centering
  273. \includegraphics[width=\textwidth]{high_alpha_synth.pdf}
  274. \caption{$\alpha=0.35$, $\beta=0.6$}
  275. \label{fig:synth_high_alpha}
  276. \end{subfigure}
  277. }
  278. \end{picture}
  279. \caption{Synthetic data, using~\Cref{eq:modSIR} and $N=7.9\cdot 10^6$, $I_0=10$ with different sets of parameters.
  280. We visualize the case with the reference parameters in (a). In (b) and (c) we keep $\alpha$ constant, while varying
  281. the value of $\beta$. In contrast, (d) and (e) have varying values of $\alpha$.}
  282. \label{fig:synth_sir}
  283. \end{figure}
  284. In the SIR model the temporal occurrence and the height of the peak (or peaks)
  285. of the infectious group are of paramount importance for understanding the
  286. dynamics of a pandemic. A low peak occurring at a late point in time indicates
  287. that the disease is unable to keep pace with the rate of recovery, resulting
  288. in its demise before it can exert a significant influence on the population. In
  289. contrast, an early and high peak means that the disease is rapidly transmitted
  290. through the population, with a significant proportion of individuals having been
  291. infected.~\Cref{fig:sir_model} illustrates this effect by varying the values of
  292. $\beta$ or $\alpha$ while simulating a pandemic using a model such
  293. as~\Cref{eq:modSIR}. It is evident that both the transmission rate $\beta$
  294. and the recovery rate $\alpha$ influence the height and time of the peak of $I$.
  295. When the number of infections exceeds the number of recoveries, the peak of $I$
  296. will occur early and will be high. On the other hand, if recoveries occur at a
  297. faster rate than new infections the peak will occur later and will be low. Thus,
  298. it is crucial to know both $\beta$ and $\alpha$, as these parameters
  299. characterize how the pandemic evolves.\\
  300. The SIR model makes a number of assumptions that are intended to reduce the
  301. model's overall complexity while simultaneously increasing its divergence from
  302. actual reality. One such assumption is that the size of the population, $N$,
  303. remains constant, as the daily change is negligible to the total population.
  304. This depiction is not an accurate representation of the actual relations \todo{other assumptions in a bad light?}
  305. observed in the real world, as the size of a population is subject to a number
  306. of factors that can contribute to change. The population is increased by the
  307. occurrence of births and decreased by the occurrence of deaths. Other examples
  308. are the impossibility for individuals to be susceptible again, after having
  309. recovered, or the possibility for the transition rates to change due to new
  310. variants or the implementation of new countermeasures. We address this latter
  311. option in the next~\Cref{sec:pandemicModel:rsir}.
  312. % -------------------------------------------------------------------
  313. \subsection{Reduced SIR Model and the Reproduction Number}
  314. \label{sec:pandemicModel:rsir}
  315. The~\Cref{sec:pandemicModel:sir} presents the classical SIR model. This model
  316. contains two scalar parameters $\beta$ and $\alpha$, which describe the course
  317. of a pandemic over its duration. This is beneficial when examining the overall
  318. pandemic; however, in the real world, disease behavior is dynamic, and the
  319. values of the parameters $\beta$ and $\alpha$ change throughout the course of
  320. the disease. The reason for this is due to events such as the implementation of
  321. countermeasures that reduce the contact between the infectious and susceptible
  322. individuals, the emergence of a new variant of the disease that increases its
  323. infectivity or deadliness, or the administration of a vaccination that provides
  324. previously susceptible individuals with immunity without ever being infected.
  325. To address this, based on the time-dependent transition rates introduced by Liu
  326. and Stechlinski~\cite{Liu2012}, and Setianto and Hidayat~\cite{Setianto2023},
  327. Millevoi \etal~\cite{Millevoi2023} present a model that simultaneously reduces
  328. the size of the system of differential equations and solves the problem of time
  329. scaling at hand.\\
  330. First, they alter the definition of $\beta$ and $\alpha$ to be dependent on the time interval
  331. $\mathcal{T} = [t_0, t_f]\subseteq \mathbb{R}_{\geq0}$,
  332. \begin{equation}
  333. \beta: \mathcal{T}\rightarrow\mathbb{R}_{\geq0}, \quad\alpha: \mathcal{T}\rightarrow\mathbb{R}_{\geq0}.
  334. \end{equation}
  335. Another crucial element is $D(t) = \frac{1}{\alpha(t)}$, which represents the initial time
  336. span an infected individual requires to recuperate. Subsequently, at the initial time point
  337. $t_0$, the \emph{reproduction number},
  338. \begin{equation}
  339. \RO = \beta(t_0)D(t_0) = \frac{\beta(t_0)}{\alpha(t_0)},
  340. \end{equation}
  341. represents the number of susceptible individuals, that one infectious individual
  342. infects at the onset of the pandemic. In light of the effects of $\beta$ and
  343. $\alpha$ (see~\Cref{sec:pandemicModel:sir}), $\RO < 1$ indicates that the
  344. pandemic is emerging. In this scenario $\alpha$ is relatively low due to the
  345. limited number of infections resulting from $I(t_0) << S(t_0)$.\\ Further,
  346. $\RO > 1$ leads to the disease spreading rapidly across the population, with an
  347. increase in $I$ occurring at a high rate. Nevertheless, $\RO$ does not cover
  348. the entire time span. For this reason, Millevoi \etal~\cite{Millevoi2023}
  349. introduce $\Rt$ which has the same interpretation as $\RO$, with the exception
  350. that $\Rt$ is dependent on time. The time-dependent reproduction number is
  351. defined as,
  352. \begin{equation}\label{eq:repr_num}
  353. \Rt=\frac{\beta(t)}{\alpha(t)}\cdot\frac{S(t)}{N},
  354. \end{equation}
  355. on the time interval $\mathcal{T}$. This definition includes the transition
  356. rates for information about the spread of the disease and information of the
  357. decrease of the ratio of susceptible individuals in the population. In contrast
  358. to $\beta$ and $\alpha$, $\Rt$ is not a parameter but \todo{Sai comment - earlier?}
  359. a state variable in the model and enabling the following reduction of the SIR
  360. model.\\
  361. \Cref{eq:N_char} allows for the calculation of the value of the group $R$ using
  362. $S$ and $I$, with the term $R(t)=N-S(t)-I(t)$. Thus,
  363. \begin{equation}
  364. \begin{split}
  365. \frac{dS}{dt} &= \alpha(\Rt-1)I(t),\\
  366. \frac{dI}{dt} &= -\alpha\Rt I(t),
  367. \end{split}
  368. \end{equation}
  369. is the reduction of~\Cref{eq:sir} on the time interval $\mathcal{T}$ using this
  370. characteristic and the reproduction number $\Rt$ (see ~\Cref{eq:repr_num}).
  371. Another issue that Millevoi \etal~\cite{Millevoi2023} seek to address is the
  372. extensive range of values that the SIR groups can assume. Accordingly, they
  373. initially scale the time interval $\mathcal{T}$ using its borders to calculate
  374. the scaled time $t_s = \frac{t - t_0}{t_f - t_0}\in[0, 1]$. Subsequently, they
  375. calculate the scaled groups,
  376. \begin{equation}
  377. S_s(t_s) = \frac{S(t)}{C},\quad I_s(t_s) = \frac{I(t)}{C},\quad R_s(t_s) = \frac{R(t)}{C},
  378. \end{equation}
  379. using a large constant scaling factor $C\in\mathbb{N}$. Applying this to the
  380. variable $I$, results in,
  381. \begin{equation}\label{eq:reduced_sir_ODE}
  382. \frac{dI_s}{dt_s} = \alpha(t_f - t_0)(\Rt - 1)I_s(t_s),
  383. \end{equation}
  384. which is a further reduced version of~\Cref{eq:sir}. This less complex
  385. differential equation results in a less complex solution, as it entails the
  386. elimination of a parameter ($\beta$) and the two state variables ($S$ and $R$).
  387. The reduced SIR model, is more precise in applications with a worse data
  388. situation, due to its fewer input variables.
  389. % -------------------------------------------------------------------
  390. \section{Multilayer Perceptron}
  391. \label{sec:mlp}
  392. In~\Cref{sec:differentialEq}, we demonstrate the significance of differential
  393. equations in systems, illustrating how they can be utilized to elucidate the
  394. impact of a specific parameter on the system's behavior.
  395. In~\Cref{sec:epidemModel}, we show specific applications of differential
  396. equations in an epidemiological context. The final objective is to solve these
  397. equations by finding a function that fits. Fitting measured data points to
  398. approximate such a function, is one of the multiple methods to achieve this
  399. goal. The \emph{Multilayer Perceptron} (MLP)~\cite{Rumelhart1986} is a
  400. data-driven function approximator. In the following section, we provide a brief
  401. overview of the structure and training of these \emph{neural networks}. For
  402. reference, we use the book \emph{Deep Learning} by Goodfellow
  403. \etal~\cite{Goodfellow-et-al-2016} as a foundation for our explanations.\\
  404. The objective is to develop an approximation method for any function $f^{*}$,
  405. which could be a mathematical function or a mapping of an input vector to the
  406. desired output. Let $\boldsymbol{x}$ be the input vector and $\boldsymbol{y}$
  407. the label, class, or result. Then, $\boldsymbol{y} = f^{*}(\boldsymbol{x})$,
  408. is the function to approximate. In the year 1958,
  409. Rosenblatt~\cite{Rosenblatt1958} proposed the perceptron modeling the concept of
  410. a neuron in a neuroscientific sense. The perceptron takes in the input vector
  411. $\boldsymbol{x}$ performs an operation and produces a scalar result. This model
  412. optimizes its parameters $\theta$ to be able to calculate $\boldsymbol{y} =
  413. f(\boldsymbol{x}; \theta)$ as accurately as possible. As Minsky and
  414. Papert~\cite{Minsky1972} demonstrate, the perceptron is only capable of
  415. approximating a specific class of functions. Consequently, there is a necessity
  416. for an expansion of the perceptron.\\
  417. As Goodfellow \etal~\cite{Goodfellow-et-al-2016} proceed, the solution to this issue is to decompose $f$ into
  418. a chain structure of the form,
  419. \begin{equation} \label{eq:mlp_char}
  420. f(\boldsymbol{x}) = f^{(3)}(f^{(2)}(f^{(1)}(\boldsymbol{x}))).
  421. \end{equation}
  422. This nested version of a perceptron is a multilayer perceptron. Each
  423. sub-function, designated as $f^{(i)}$, is represented in the structure of an
  424. MLP as a \emph{layer}, which contains a linear mapping and a nonlinear mapping
  425. in form of an \emph{activation function}. A multitude of
  426. \emph{Units} (also \emph{neurons}) compose each layer. A neuron performs the
  427. same vector-to-scalar calculation as the perceptron does. Subsequently, a
  428. nonlinear activation function transforms the scalar output into the activation
  429. of the unit. The layers are staggered in the neural network, with each layer
  430. being connected to its neighbors, as illustrated in~\Cref{fig:mlp_example}. The
  431. input vector $\boldsymbol{x}$ is provided to each unit of the first layer
  432. $f^{(1)}$, which then gives the results to the units of the second layer
  433. $f^{(2)}$, and so forth. The final layer is the \emph{output layer}. The
  434. intervening layers, situated between the first and the output layers are the
  435. \emph{hidden layers}. The term \emph{forward propagation} describes the
  436. process of information flowing through the network from the input layer to the
  437. output layer, resulting in a scalar loss. The alternating structure of linear
  438. and nonlinear calculation enables MLP's to approximate any function. As Hornik
  439. \etal~\cite{Hornik1989} proves, MLP's are universal approximators.\\
  440. \begin{figure}[h]
  441. \centering
  442. \includegraphics[width=\textwidth]{MLP.pdf}
  443. \caption{A illustration of an MLP with two hidden layers. Each neuron of a layer
  444. is connected to every neuron of the neighboring layers. The arrow indicates
  445. the direction of the forward propagation.}
  446. \label{fig:mlp_example}
  447. \end{figure}
  448. The term \emph{training} describes the process of optimizing the parameters
  449. $\theta$. In order to undertake training, it is necessary to have a set of
  450. \emph{training data}, which is a set of pairs (also called training points) of
  451. the input data $\boldsymbol{x}$ and its corresponding true solution
  452. $\boldsymbol{y}$ of the function $f^{*}$. For the training process we must
  453. define a \emph{loss function} $\Loss{ }$, using the model prediction
  454. $\hat{\boldsymbol{y}}$ and the true value $\boldsymbol{y}$, which will act as a
  455. metric for evaluating the extent to which the model deviates from the correct
  456. answer. One common loss function is the \emph{mean square error}
  457. (MSE) loss function. Let $N$ be the number of points in the set of training
  458. data. Then,
  459. \begin{equation} \label{eq:mse}
  460. \Loss{MSE} = \frac{1}{N}\sum_{i=1}^{N} ||\hat{\boldsymbol{y}}^{(i)}-\boldsymbol{y}^{(i)}||^2,
  461. \end{equation}
  462. calculates the squared difference between each model prediction and true value
  463. of a training and takes the mean across the whole training data. \\
  464. Ultimately, the objective is to utilize this information to optimize the parameters, in order to minimize the
  465. loss. One of the most fundamental optimization strategy is \emph{gradient
  466. descent}. In this process, the derivatives are employed to identify the location
  467. of local or global minima within a function, which lie where the gradient is
  468. zero. Given that a positive gradient
  469. signifies ascent and a negative gradient indicates descent, we must move the
  470. variable by a \emph{learning rate} (step size) in the opposite
  471. direction to that of the gradient. The calculation of the derivatives in respect
  472. to the parameters is a complex task, since our functions is a composition of
  473. many functions (one for each layer). We can address this issue taking advantage
  474. of~\Cref{eq:mlp_char} and employing the chain rule of calculus. Let
  475. $\hat{\boldsymbol{y}} = f(\boldsymbol{x}; \theta)$ be the model prediction with the
  476. decomposed version $f(\boldsymbol{x}; \theta) = f^{(3)}(w; \theta_3)$ with
  477. $w = f^{(2)}(z; \theta_2)$ and $z = f^{(1)}(\boldsymbol{x}; \theta_1)$.
  478. $\boldsymbol{x}$ is the input vector and $\theta_3, \theta_2, \theta_1\subset\theta$.
  479. Then,
  480. \begin{equation}\label{eq:backprop}
  481. \nabla_{\theta_3} \Loss{ } = \frac{d\mathcal{L}}{d\hat{\boldsymbol{y}}}\frac{d\hat{\boldsymbol{y}}}{df^{(3)}}\nabla_{\theta_3}f^{(3)},
  482. \end{equation}
  483. is the gradient of $\Loss{ }$ in respect of the parameters $\theta_3$. To obtain
  484. $\nabla_{\theta_2} \Loss{ }$, we have to derive $\nabla_{\theta_3} \Loss{ }$ in
  485. respect to $\theta_2$. The name of this method in the context of neural
  486. networks is \emph{back propagation}~\cite{Rumelhart1986}, as it propagates the
  487. error backwards through the neural network.\\
  488. In practical applications, an optimizer often accomplishes the optimization task
  489. by executing back propagation in the background. Furthermore, modifying the
  490. learning rate during training can be advantageous. For instance, making larger \todo{leave whole paragraph out? - Niklas}
  491. steps at the beginning and minor adjustments at the end. Therefore, schedulers
  492. are implementations algorithms that employ diverse learning rate alteration
  493. strategies.\\
  494. For a more in-depth discussion of practical considerations and additional
  495. details like regularization, we direct the reader to the book
  496. \emph{Deep Learning} by Goodfellow \etal~\cite{Goodfellow-et-al-2016}. The next
  497. section will demonstrate the application of neural networks in approximating
  498. solutions to differential systems.
  499. % -------------------------------------------------------------------
  500. \section{Physics Informed Neural Networks}
  501. \label{sec:pinn}
  502. In~\Cref{sec:mlp}, we describe the structure and training of MLP's, which are
  503. wildely recognized tools for approximating any kind of function. In this
  504. section, we apply this capability to create a solver for ODE's and PDE's
  505. as Legaris \etal~\cite{Lagaris1997} describe in their paper. In this approach,
  506. the model learns to approximate a function using provided data points while
  507. leveraging the available knowledge about the problem in the form of a system of
  508. differential equations. The \emph{physics-informed neural network} (PINN)
  509. learns the system of differential equations during training, as it optimizes
  510. its output to align with the equations.\\
  511. In contrast to standard MLP's, PINNs are not only data-driven. The loss term of a PINN comprises two
  512. components. The first term incorporates the equations of the aforementioned prior knowledge to pertinent the problem. As Raissi
  513. \etal~\cite{Raissi2017} propose, the residual of each differential equation in
  514. the system must be minimized in order for the model to optimize its output in accordance with the theory.
  515. We obtain the residual $r_i$, with $i\in\{1, ...,N_d\}$, by rearranging the differential equation and
  516. calculating the difference between the left-hand side and the right-hand side
  517. of the equation. $N_d$ is the number of differential equations in a system. As
  518. Raissi \etal~\cite{Raissi2017} propose the \emph{physics
  519. loss} of a PINN,
  520. \begin{equation}
  521. \mathcal{L}_{physics}(\boldsymbol{x},\hat{\boldsymbol{y}}) = \frac{1}{N_d}\sum_{i=1}^{N_d} ||r_i(\boldsymbol{x},\hat{\boldsymbol{y}})||^2,
  522. \end{equation}
  523. takes the input data and the model prediction to calculate the mean square
  524. error of the residuals. The second term, the \emph{observation loss}
  525. $\Loss{obs}$, employs the mean square error of the distances between the
  526. predicted and the true values for each training point. Additionally, the
  527. observation loss may incorporate extra terms of inital and boundary conditions. Let $N_t$
  528. denote the number of training points. Then,
  529. \begin{equation}
  530. \mathcal{L}_{PINN}(\boldsymbol{x}, \boldsymbol{y},\hat{\boldsymbol{y}}) = \frac{1}{N_d}\sum_{i=1}^{N_d} ||r_i(\boldsymbol{x},\hat{\boldsymbol{y}})||^2 + \frac{1}{N_t}\sum_{i=1}^{N_t} ||\hat{\boldsymbol{y}}^{(i)}-\boldsymbol{y}^{(i)}||^2,
  531. \end{equation}\\
  532. represents the comprehensive loss function of a physics-informed neural network. \\
  533. Given the nature of residuals, calculating the loss term of
  534. $\mathcal{L}_{physics}(\boldsymbol{x},\hat{\boldsymbol{y}})$ requires the
  535. calculation of the derivative of the output with respect to the input of
  536. the neural network. As we outline in~\Cref{sec:mlp}, during the process of
  537. back-propagation we calculate the gradients of the loss term in respect to a
  538. layer-specific set of parameters denoted by $\theta_l$, where $l$ represents
  539. the index of the respective layer. By employing
  540. the chain rule of calculus, the algorithm progresses from the output layer
  541. through each hidden layer, ultimately reaching the first layer in order to
  542. compute the respective gradients. The term,
  543. \begin{equation}
  544. \nabla_{\boldsymbol{x}} \hat{\boldsymbol{y}} = \frac{d\hat{\boldsymbol{y}}}{df^{(2)}}\frac{df^{(2)}}{df^{(1)}}\nabla_{\boldsymbol{x}}f^{(1)},
  545. \end{equation}
  546. illustrates that, in contrast to the procedure described in~\cref{eq:backprop},
  547. this procedure the \emph{automatic differenciation} goes one step further and
  548. calculates the gradient of the output with respect to the input
  549. $\boldsymbol{x}$. In order to calculate the second derivative
  550. $\frac{d\hat{\boldsymbol{y}}}{d\boldsymbol{x}}=\nabla_{\boldsymbol{x}} (\nabla_{\boldsymbol{x}} \hat{\boldsymbol{y}} ),$
  551. this procedure must be repeated.\\
  552. Above we present a method for approximating functions through the use of
  553. systems of differential equations. As previously stated, we want to find a
  554. solver for systems of differential equations. In problems, where we must solve
  555. an ODE or PDE, we have to find a set of parameters, that satisfies the system
  556. for any input $\boldsymbol{x}$. In terms of the context of PINN's this is the
  557. inverse problem, where we have a set of training data from measurements, for
  558. example, is available along with the respective differential equations but
  559. information about the parameters of the equations is lacking. To address this
  560. challenge, we set these parameters as distinct learnable parameters within the
  561. neural network. This enables the network to utilize a specific value, that
  562. actively influences the physics loss $\mathcal{L}_{physics}(\boldsymbol{x},\hat{\boldsymbol{y}})$.
  563. During the training phase the optimizer aims to minimize the physics loss,
  564. which should ultimately yield an approximation of the true value.\\
  565. \begin{figure}[h]
  566. \centering
  567. \includegraphics[width=\textwidth]{oscilator.pdf}
  568. \caption{Illustration of of the movement of an oscillating body in the
  569. underdamped case. With $m=1kg$, $\mu=4\frac{Ns}{m}$ and $k=200\frac{N}{m}$.}
  570. \label{fig:spring}
  571. \end{figure}
  572. One illustrative example of a potential application for PINN's is the
  573. \emph{damped harmonic oscillator}~\cite{Demtroeder2021}. In this problem, we
  574. displace a body, which is attached to a spring, from its resting position. The
  575. body is subject to three forces: firstly, the inertia exerted by the
  576. displacement $u$, which points in the direction the displacement $u$; secondly
  577. the restoring force of the spring, which attempts to return the body to its
  578. original position and thirdly, the friction force, which points in the opposite
  579. direction of the movement. In accordance with Newton's second law and the
  580. combined influence of these forces, the body exhibits oscillatory motion around
  581. its position of rest. The system is influenced by $m$ the mass of the body,
  582. $\mu$ the coefficient of friction and $k$ the spring constant, indicating the
  583. stiffness of the spring. The residual of the differential equation,
  584. \begin{equation}
  585. m\frac{d^2u}{dx^2}+\mu\frac{du}{dx}+ku=0,
  586. \end{equation}
  587. shows relation of these parameters in reference to the problem at hand. As
  588. Tenenbaum and Morris provide, there are three potential solutions to this
  589. issue. However only the \emph{underdamped case} results in an oscillating
  590. movement of the body, as illustrated in~\Cref{fig:spring}. In order to apply a
  591. PINN to this problem, we require a set of training data $x$. This consists of
  592. pairs of time points and corresponding displacement measurements
  593. $(t^{(i)}, u^{(i)})$, where $i\in\{1, ..., N_t\}$. In this hypothetical case,
  594. we know the mass $m=1kg$, and the spring constant $k=200\frac{N}{m}$ and the
  595. initial displacement $u^{(1)} = 1$ and $\frac{du(0)}{dt} = 0$. However, we do
  596. not know the value of the friction $\mu$. In this case the loss function,
  597. \begin{equation}
  598. \mathcal{L}_{osc}(\boldsymbol{x}, \boldsymbol{u}, \hat{\boldsymbol{u}}) = (u^{(1)}-1)+\frac{du(0)}{dt}+||m\frac{d^2u}{dx^2}+\mu\frac{du}{dx}+ku||^2 + \frac{1}{N_t}\sum_{i=1}^{N_t} ||\hat{\boldsymbol{u}}^{(i)}-\boldsymbol{u}^{(i)}||^2,
  599. \end{equation}
  600. includes the border conditions, the residual, in which $\mu$ is a learnable
  601. parameter and the observation loss.
  602. % -------------------------------------------------------------------
  603. \subsection{Disease Informed Neural Networks}
  604. \label{sec:pinn:dinn}
  605. In this section, we describe the capability of MLP's to solve systems of
  606. differential equations. In~\Cref{sec:pandemicModel:sir}, we describe the SIR
  607. model, which models the relations of susceptible, infectious and removed
  608. individuals and simulates the progress of a disease in a population with a
  609. constant size. A system of differential equations models these relations. Shaier
  610. \etal~\cite{Shaier2021} propose a method to solve the equations of the SIR model
  611. using a PINN, which they call a \emph{disease-informed neural network} (DINN).\\
  612. To solve~\Cref{eq:sir} we need to find the transmission rate $\beta$ and the
  613. recovery rate $\alpha$. As Shaier \etal~\cite{Shaier2021} point out, there are
  614. different approaches to solve this set of equations. For instance, building on
  615. the assumption, that at the beginning one infected individual infects $-n$ other
  616. people, concluding in $\frac{dS(0)}{dt} = -n$. Then,
  617. \begin{equation}
  618. \beta=-\frac{\frac{dS}{dt}}{S_0I_0}
  619. \end{equation}
  620. would calculate the initial transmission rate using the initial size of the
  621. susceptible group $S_0$ and the infectious group $I_0$. The recovery rate, then
  622. could be defined using the amount of days a person between the point of
  623. infection and the start of isolation $d$, $\alpha = \frac{1}{d}$. The analytical
  624. solutions to the SIR models often use heuristic methods and require knowledge
  625. like the sizes $S_0$ and $I_0$. A data-driven approach such as the one that
  626. Shaier \etal~\cite{Shaier2021} propose does not have these problems. Since the
  627. model learns the parameters $\beta$ and $\alpha$ while learning the training
  628. data consisting of the time points $\boldsymbol{t}$, and the corresponding
  629. measured sizes of the groups $\boldsymbol{S}, \boldsymbol{I}, \boldsymbol{R}$.
  630. Let $\hat{\boldsymbol{S}}, \hat{\boldsymbol{I}}, \hat{\boldsymbol{R}}$ be the
  631. model predictions of the groups and
  632. $r_S=\frac{d\hat{\boldsymbol{S}}}{dt}+\beta \hat{\boldsymbol{S}}\hat{\boldsymbol{I}},
  633. r_I=\frac{d\hat{\boldsymbol{I}}}{dt}-\beta \hat{\boldsymbol{S}}\hat{\boldsymbol{I}}+\alpha \hat{\boldsymbol{I}}$
  634. and $r_R=\frac{d \hat{\boldsymbol{R}}}{dt} - \alpha \hat{\boldsymbol{I}}$ the
  635. residuals of each differential equation using the model predictions. Then,
  636. \begin{equation}
  637. \begin{split}
  638. \mathcal{L}_{SIR}() = ||r_S||^2 + ||r_I||^2 + ||r_R||^2 + \frac{1}{N_t}\sum_{i=1}^{N_t} ||\hat{\boldsymbol{S}}^{(i)}-\boldsymbol{S}^{(i)}||^2 &+\\
  639. ||\hat{\boldsymbol{I}}^{(i)}-\boldsymbol{I}^{(i)}||^2 &+\\
  640. ||\hat{\boldsymbol{R}}^{(i)}-\boldsymbol{R}^{(i)}||^2 &,
  641. \end{split}
  642. \end{equation}
  643. is the loss function of a DINN, with $\alpha$ and $beta$ being learnable
  644. parameters.
  645. % -------------------------------------------------------------------