chap02.tex 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  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: 02.08.2024
  9. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  10. \chapter{Theoretical Background}
  11. \label{chap:background}
  12. This chapter introduces the theoretical knowledge that forms the foundation of
  13. the work presented in this thesis. In Sections~\ref{sec:domain}
  14. and~\ref{sec:differentialEq}, we talk about differential equations and the
  15. underlying theory. In these Sections both the explanations and the approach are
  16. strongly based on the book on analysis by Rudin~\cite{Rudin2007} and the book
  17. about ordinary differential equations by Tenenbaum and
  18. Pollard~\cite{Tenenbaum1985}. Subsequently, we employ this knowledge to examine
  19. various pandemic models in Section~\ref{sec:epidemModel}.
  20. Finally, we address the topic of neural networks with a focus on the multilayer
  21. perceptron in Section~\ref{sec:mlp} and physics informed neural networks in
  22. Section~\ref{sec:pinn}.
  23. % -------------------------------------------------------------------
  24. \section{Mathematical Modelling using Functions}
  25. \label{sec:domain}
  26. To model a physical problem using mathematical tools, it is necessary to define
  27. a set of fundamental numbers or quantities upon which the subsequent calculations
  28. will be based. These sets may represent, for instance, a specific time interval
  29. or a distance. The term \emph{domain} describes these fundamental sets of
  30. numbers or quantities~\cite{Rudin2007}. A \emph{variable} is a changing entity
  31. living in a certain domain. In this thesis, we will focus on domains of real
  32. numbers in $\mathbb{R}$.\\
  33. The mapping between variables enables the modeling of the process and depicts
  34. the semantics. We use functions in order to facilitate this mapping. Let
  35. $A, B\subset\mathbb{R}$ be to subsets of the real numbers, then we define a
  36. function as the mapping
  37. \begin{equation}
  38. f: A\rightarrow B.
  39. \end{equation}
  40. In other words, the function $f$ maps elements $x\in A$ to values
  41. $f(x)\in B$. $A$ is the \emph{domain} of $f$, while $B$ is the \emph{codomain}
  42. of $f$. Functions are capable of representing the state of a system as a value
  43. based on an input value from their domain. One illustrative example is a
  44. function that maps a time point to the distance covered since a starting point.
  45. In this case, time serves as the domain, while the distance is the codomain.
  46. % -------------------------------------------------------------------
  47. \section{Basics of Differential Equations}
  48. \label{sec:differentialEq}
  49. Often, the change of a system is more interesting than its current state.
  50. Functions are able to give us the latter, but only passively give information
  51. about the change of a system. The objective is to determine an effective method
  52. for calculating the change of a function across its domain. Let $f$ be a
  53. function and $[a, b]\subset \mathbb{R}$ an interval of real numbers, the
  54. expression
  55. \begin{equation}
  56. m = \frac{f(b) - f(a)}{a-b}
  57. \end{equation}
  58. gives the average rate of change. While the average rate of change is useful in
  59. many cases, the momentary rate of change is more accurate. To calculate this,
  60. we need to narrow down, the interval to an infinitesimal. For each $x\in[a, b]$
  61. we calculate
  62. \begin{equation} \label{eqn:differential}
  63. \frac{df}{dx} = \lim_{t\to x} \frac{f(t) - f(x)}{t-x},
  64. \end{equation}
  65. if it exists. $\frac{df}{dx}$ is the \emph{derivative}, or
  66. \emph{differential equation}, it returns the momentary rate of change of $f$ for
  67. each value $x$ of $f$'s domain. Repeating this process on $\frac{df}{dx}$ yields
  68. $\frac{d^2f}{dx^2}$, which is the function that calculates the rate of change of
  69. the rate of change and is called the second order derivative. Iterating this $n$
  70. times results in $\frac{d^nf}{dx^n}$, the derivative of the $n$'th order.
  71. Another method for obtaining a differential equation is to create it from the
  72. semantics of a problem. This method is useful if no basic function exists for a
  73. system. Differential equations find application in several areas such as
  74. engineering, physics, economics, epidemiology, and beyond.\\
  75. In the context of functions, it is possible to have multiple domains, meaning
  76. that function has more than one parameter. To illustrate, consider a function
  77. operating in two-dimensional space, wherein each parameter represents one axis
  78. or one that, employs with time and locations as inputs. The term
  79. \emph{partial differential equations} (\emph{PDE}'s) describes differential
  80. equations of such functions, which require a derivative for each of their
  81. domains. In contrast, \emph{ordinary differential equations} (\emph{ODE}'s) are
  82. the single derivatives for a function having only one domain. In this thesis, we
  83. only need ODE's.\\
  84. A \emph{system of differential equations} is the name for a set of differential
  85. equations. The derivatives in a system of differential equations each have their
  86. own codomain, which is part of the problem, while they all share the same
  87. domain.\\
  88. Tenenbaum and Pollard~\cite{Tenenbaum1985} provide many examples for ODE's,
  89. including the \emph{Motion of a Particle Along a Straight Line}. Further,
  90. Newton's second law states that ``the rate of change of the momentum of a body
  91. ($momentum = mass \cdot velocity$) is proportional to the resultant external
  92. force $F$ acted upon it''~\cite{Tenenbaum1985}. Let $m$ be the mass of the body
  93. in kilograms, $v$ its velocity in meters per second and $t$ the time in seconds.
  94. Then, Newton's second law translates mathematically to
  95. \begin{equation} \label{eq:newtonSecLaw}
  96. F = m\frac{dv}{dt}.
  97. \end{equation}
  98. It is evident that the acceleration, $a=\frac{dv}{dt}$, as the rate of change of
  99. the velocity is part of the equation. Additionally, the velocity of a body is
  100. the derivative of the distance traveled by that body. Based on these findings,
  101. we can rewrite the equation~\ref{eq:newtonSecLaw} to
  102. \begin{equation}
  103. F=ma=m\frac{d^2s}{dt^2}.
  104. \end{equation}\\
  105. This explanation of differential equations focuses on the aspects deemed crucial
  106. for this thesis and is not intended to be a complete explanation of the subject.
  107. To gain a better understanding of it, we recommend the books mentioned
  108. above~\cite{Rudin2007,Tenenbaum1985}. In the following section we
  109. describe the application of these principles in epidemiological models.
  110. % -------------------------------------------------------------------
  111. \section{Epidemiological Models}
  112. \label{sec:epidemModel}
  113. Pandemics, like \emph{COVID-19}, which has resulted in a significant
  114. number of fatalities. The question arises: How should we fight a pandemic
  115. correctly? Also, it is essential to study whether the employed countermeasures
  116. efficacious in combating the pandemic. Given the unfavorable public response to
  117. measures such as lockdowns, it is imperative to investigate that their efficacy
  118. remains commensurate with the costs incurred to those affected. In the event
  119. that alternative and novel technologies were in use, such as the mRNA vaccines
  120. in the context of COVID-19, it is needful to test the effect and find the
  121. optimal variant. In order to shed light on the aforementioned events we need to
  122. develop a method to quantize the pandemic along with its course of
  123. progression.\\
  124. The real world is a highly complex system, which presents a significant
  125. challenge attempting to describe it fully in a model. Therefore, the model must
  126. reduce the complexity while retaining the essential information. Furthermore, it
  127. must address the issue of limited data availability. For instance, during
  128. COVID-19 institutions such as the Robert Koch Institute
  129. (RKI)\footnote[1]{\url{https://www.rki.de/EN/Home/homepage_node.html}} were only
  130. able to collect data on infections and mortality cases. Consequently, we require
  131. a model that employs an abstraction of the real world to illustrate the events
  132. and relations that are pivotal to understanding the problem.
  133. % -------------------------------------------------------------------
  134. \subsection{SIR Model}
  135. \label{sec:pandemicModel:sir}
  136. In 1927, Kermack and McKendrick~\cite{1927} introduced the \emph{SIR Model},
  137. which subsequently became one of the most influential epidemiological models.
  138. The book \emph{Mathematical Models in Biology}~\cite{EdelsteinKeshet2005}
  139. reiterates the model and serves as the foundation for the following explanation
  140. of SIR models.\\
  141. The SIR Model is capable of illustrating diseases, which are transferred through
  142. contact or proximity of an individual carrying the illness and a healthy
  143. individual. This is possible due to the distinction between infected beings
  144. who are carriers of the disease and the part of the population, which is
  145. susceptible to infection. In the model, the mentioned groups are capable to
  146. change, by healthy individuals becoming infected. In the real world the size of
  147. a population is subject to a number of factors that can contribute to change.
  148. The population is increased by the occurrence of births and decreased by the
  149. occurrence of deaths. There are different reasons for mortality, including the
  150. natural aging process or the development of other diseases. To omit this factor
  151. of complexity, the model assumes the size $N$ of the population remains constant
  152. throughout the duration of the epidemic. The population $N$ is comprised of
  153. three distinct groups: the \emph{susceptible} group $S$, the \emph{infectious}
  154. group $I$ and the \emph{removed} group $R$ (hence SIR Model). For $S$, $I$, $R$
  155. and $N$ applies:
  156. \begin{equation}
  157. N = S + I + R.
  158. \end{equation}
  159. The model makes another assumption by stating that recovered people are immune
  160. to the illness and infectious individual can not infect them. The individuals in
  161. the $R$ group are either recovered or deceased, and thus unable to transmit or
  162. carry the disease.
  163. \begin{figure}[h]
  164. \centering
  165. \includegraphics[scale=0.3]{sir_graph.png}
  166. \caption{SIR Model}
  167. \label{fig:sir_model}
  168. \end{figure}
  169. As visualized in the Figure~\ref{fig:sir_model} the
  170. individuals may transition between groups based on rates. The transmission rate
  171. $\beta$ is responsible for individuals becoming infected, while the rate of
  172. removal or recovery rate $\alpha$ (also referred to as $\delta$ or $\nu$ in the
  173. literature) moves individuals from $I$ to $R$.\\
  174. In order to model the problem mathematically using a system of differential
  175. equations as we describe in Section~\ref{sec:differentialEq}, it is necessary to
  176. make an assumption serving as the foundation for the model. In their book,
  177. Edelstein-Keshet makes the following assumption: ``The rate of transmission of
  178. a microparasitic disease is proportional to the rate of encounter of susceptible
  179. and infective individuals modelled by the product
  180. ($\beta S I$)''~\cite{EdelsteinKeshet2005}. Kermack and McKendrick~\cite{1927}
  181. thus propose the following set of differential equations:
  182. \begin{equation}
  183. \begin{split}
  184. \frac{dS}{dt} &= -\beta S I,\\
  185. \frac{dI}{dt} &= \beta S I - \alpha I,\\
  186. \frac{dR}{dt} &= \alpha I.
  187. \end{split}
  188. \end{equation}
  189. The system shows the change of size of the groups per time unit due to
  190. infections, recoveries, and deaths.\\
  191. The term $\beta SI$ describes the rate of encounters of susceptible and infected
  192. individuals. This term is dependent on the size of $S$ and $I$, thus Anderson
  193. and May~\cite{Anderson1991} propose a modified model:
  194. \begin{equation}\label{eq:modSIR}
  195. \begin{split}
  196. \frac{dS}{dt} &= -\beta \frac{SI}{N},\\
  197. \frac{dI}{dt} &= \beta \frac{SI}{N} - \alpha I,\\
  198. \frac{dR}{dt} &= \alpha I.
  199. \end{split}
  200. \end{equation}
  201. In which $\beta SI$ gets normalized by $N$, which is more correct in a
  202. real world aspect.\\
  203. The initial phase of a pandemic is characterized by the infection of a small
  204. number of individuals, while the majority of the population remains susceptible.
  205. The infectious group has not yet infected any individuals thus
  206. neither recovery nor mortality is possible. Let $I_0\in\mathbb{N}_{\geq0}$ be
  207. the number of infected individuals at the beginning of the disease. Then,
  208. \begin{equation}
  209. \begin{split}
  210. S(0) &= N - I_{0},\\
  211. I(0) &= I_{0},\\
  212. R(0) &= 0,
  213. \end{split}
  214. \end{equation}
  215. describes the initial configuration of a system in which a disease has just
  216. emerged.\\
  217. \begin{figure}[h]
  218. \centering
  219. \begin{subfigure}[h]{0.3\textwidth}
  220. \centering
  221. \includegraphics[width=\textwidth]{synth_alpha_beta}
  222. \caption{Basic configuration, $\alpha=0.35$, $\beta=0.2$}
  223. \label{fig:synth_norm}
  224. \end{subfigure}
  225. \hfill
  226. \begin{subfigure}[h]{0.3\textwidth}
  227. \centering
  228. \includegraphics[width=\textwidth]{synth_alpha_high_beta}
  229. \caption{High $\alpha$ configuration, $\alpha=0.45$, $\beta=0.2$}
  230. \label{fig:synth_high_beta}
  231. \end{subfigure}
  232. \hfill
  233. \begin{subfigure}[h]{0.3\textwidth}
  234. \centering
  235. \includegraphics[width=\textwidth]{synth_alpha_low_beta}
  236. \caption{Low $\alpha$ configuration, $\alpha=0.25$, $\beta=0.2$}
  237. \label{fig:synth_low_beta}
  238. \end{subfigure}
  239. \hfill
  240. \begin{subfigure}[b]{0.3\textwidth}
  241. \centering
  242. \includegraphics[width=\textwidth]{synth_high_alpha_beta}
  243. \caption{High $\beta$ configuration, $\alpha=0.35$, $\beta=0.3$}
  244. \label{fig:synth_high_alpha}
  245. \end{subfigure}
  246. \begin{subfigure}[b]{0.3\textwidth}
  247. \centering
  248. \includegraphics[width=\textwidth]{synth_low_alpha_beta}
  249. \caption{Low $\beta$ configuration, $\alpha=0.35$, $\beta=0.1$}
  250. \label{fig:synth_low_alpha}
  251. \end{subfigure}
  252. \caption{Synthetic data, using the Equations~\ref{eq:modSIR} and $N=7.9\cdot 10^6$,
  253. $I_0=10$ with different sets of parameters.}
  254. \label{fig:synth_sir}
  255. \end{figure}
  256. In the SIR model the temporal occurrence and the height of the peak (or peaks)
  257. of the infectious group are of paramount importance for understanding the
  258. dynamics of a pandemic. A low peak occurring at a late point in time indicates
  259. that the disease is unable to keep the pace with the rate of recovery, resulting
  260. in its demise before it can exert a significant influence on the population. In
  261. contrast, an early, high peak means that the disease is rapidly transmitted
  262. through the population, with a significant proportion of individuals having been
  263. infected. Figure~\ref{fig:sir_model} illustrates the impact of modifying either
  264. $\beta$ or $\alpha$ while simulating a pandemic using a model
  265. such as~\ref{eq:modSIR}. It is evident that both the transmission rate $\beta$
  266. and the recovery rate $\alpha$ influence the height and time of occurrence of
  267. the peak of $I$. When the number of infections exceeds the number of recoveries
  268. the peak of $I$ will occur early and will be high. On the other hand, if
  269. recoveries occur at a faster rate than new infections the peak will occur later
  270. and will be low. This means, that it is crucial to know both $\beta$ and
  271. $\alpha$ to be able to quantize a pandemic using the SIR model.
  272. % -------------------------------------------------------------------
  273. \subsection{reduced SIR Model}
  274. \label{sec:pandemicModel:rsir}
  275. % -------------------------------------------------------------------
  276. \section{Multilayer Perceptron}
  277. \label{sec:mlp}
  278. % -------------------------------------------------------------------
  279. \section{Physics Informed Neural Networks}
  280. \label{sec:pinn}
  281. % -------------------------------------------------------------------
  282. \subsection{Disease Informed Neural Networks}
  283. \label{sec:pinn:dinn}
  284. % -------------------------------------------------------------------