% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Author: Phillip Rothenbeck % Title: Investigating the Evolution of the COVID-19 Pandemic in Germany Using Physics-Informed Neural Networks % File: chap04/chap04.tex % Part: Experiments % Description: % summary of the content in this chapter % Version: 01.01.2012 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Experiments} \label{chap:evaluation} In ~\Cref{chap:methods}, we explain the methods based on the theoretical background, that we established in~\Cref{chap:background}. In this chapter, we present the setups and results from the experiments and simulations. First, we discuss the experiments dedicated to identify the epidemiological transition rates of $\alpha$ and $\beta$ in synthetic and real-world data. Second, we examine the reproduction number $\Rt$ in synthetic and real-world data of Germany. % ------------------------------------------------------------------- \section{Identifying the Transmission and Recovery Rates} \label{sec:sir} In this section, we aim to identify the transmission rate $\beta$ and the recovery rate $\alpha$ from either synthetic or preprocessed real-world data. The methodology that we employ to identify these epidemiological parameters is described in~\Cref{sec:pinn:sir}. Meanwhile, the methods we utilize to preprocess the real-world data are detailed in~\Cref{sec:preprocessing:rq}. In the first part, we present the setup of our experiments, then we provide the results including a discussion.\\ % ------------------------------------------------------------------- \subsection{Setup} \label{sec:sir:setup} \paragraph{Synthetic Data:}In order to validate our method, we first generate a dataset of synthetic data. We achieve this by solving~\Cref{eq:modSIR} for a given set of parameters. The parameters are set to $\alpha = \nicefrac{1}{3}$ and $\beta = \nicefrac{1}{2}$. The size of the population is $N = \expnumber{7.6}{6}$ and the initial amount of infectious individuals is $I_0 = 10$. We conduct the simulation over 150 days, resulting in a dataset of the form of~\Cref{fig:datasets_sir}.\\ \paragraph{Real-World Data:}In order to process the real-world RKI data, it is necessary to preprocess the raw data for each state from the infection dataset~\cite{GHInf} and for Germany from the death case dataset~\cite{GHDead} separately. This is achieved by utilizing a recovery queue with a recovery period of 14 days. With regard to population size of each state, we set it to the respective value counted at the end of 2019\footnote{{\url{https://datacommons.org/?hl=de} Last accessed: 2024-07-20}}. The initial number of infectious individuals is set to the number of infected people on 2020-03-09 from the dataset. The data we extract spans from 2020-03-09 to 2023-06-22, encompassing a period of 1200 days and representing the time span during which the COVID-19 disease was the most active and severe. \begin{figure}[t] \centering \includegraphics[width=\textwidth]{in_text_SIR.pdf} \caption{Synthetic and real-world training data. The synthetic data is generated with $\alpha=\nicefrac{1}{3}$ and $\beta=\nicefrac{1}{2}$ and~\Cref{eq:modSIR}. The Germany data is taken from the death case data set. Exemplatory we show illustrations of the datasets of Schleswig-Holstein, Berlin, and Thuringia. Mind that this visualization does not have standardized y-axes. For all other states with standardized y-axes see~\Cref{sec:sir_datasets}.} \label{fig:datasets_sir} \end{figure} \paragraph{Training Parameters:}The PINN that we utilize comprises of seven hidden layers with twenty neurons each, and an activation function of ReLU~\cite{Fukushima1969}. We follow the hyperparameter setting in~\cite{Shaier2021} but change the base learning rate to $\expnumber{1}{-3}$. And employ a polynomial scheduler implementation from the PyTorch library~\cite{Paszke2019} instead. We train the model for 10000 iterations to extract the parameters. For each set of parameters, we conduct five runs to demonstrate stability of the values. For measuring the accuracy, we calculate the \emph{Relative L2 Error} $e$. Let $G$ be the set of compartment training data the SIR model with $\boldsymbol{g}\in G$ and $\hat{\boldsymbol{g}}$ be the corresponding model prediction, then, \begin{equation}\label{eq:error} e_{G} = \frac{1}{|G|}\sum_{g\in G}^{}\frac{\Big\|\hat{\boldsymbol{g}} - \boldsymbol{g}\Big\|_2}{\Big\|\boldsymbol{g}\Big\|_2}, \end{equation} is the average error across all three compartments. % ------------------------------------------------------------------- \subsection{Results and Discussion} \label{sec:sir:results} In this section, we start by examining the results for the synthetic dataset, focusing on the accuracy and reproducibility. We then proceed to present and discuss the results for the German states and Germany.\\ The results of the experiment regarding the synthetic data can be seen in~\Cref{table:alpha_beta_synth}. The error and the standard variation for both parameters are negligible small. Taking the mean of the parameters across the five iterations yields more accurate results. The results demonstrate that the model is capable of approximating the correct parameters for the small, synthetic dataset in each of the five iterations. The mean of the predicted values results in values with a sufficiently small error. Thus, we argue that our selected method is well suited to analyze real-world pandemic data collected in Germany.\\ \begin{table}[t] \begin{center} \caption{Simulation results for the synthetic data. The true values and the respective mean parameter and standard deviation is given. We calculate the error $e_{\text{SIR}}$ with~\Cref{eq:error}.}. \label{table:alpha_beta_synth} \begin{tabular}{ccccccccc} \toprule \multicolumn{2}{c}{$\alpha$} & \phantom{0} & \multicolumn{2}{c}{$\beta$} \\ \cmidrule{1-2}\cmidrule{4-5} true & $\mu$ & \phantom{0} & true & $\mu$ & \phantom{0} & $e_{\text{SIR}}$ \\ \midrule 0.333 & 0.333{\tiny$\pm 0.001$} & \phantom{0} & 0.500 & 0.500{\tiny$\pm 0.002$} & \phantom{0} & 0.004 \\ \bottomrule \end{tabular} \end{center} \end{table} In~\Cref{table:state_mean_std} we present the results of the training for the real-world data. The results are presented from top to bottom, in the order of the community identification number, with the last entry being Germany. Both the mean $\mu$ and the standard deviation $\sigma$ are calculated across all five iterations of our experiment. We can observe that the error $e_{\text{SIR}}$ is the highest for \emph{Saxony} and the lowest for \emph{Lower Saxony}. Furthermore, we include the distance $\Delta\beta_{\text{Germany}} = \beta_{\text{state}} - \beta_{\text{Germany}}$ and the percentage of people that have a basic immunity through vaccination $\nu$ for each state provided by the Robert Koch Institute~\cite{FMH}.\\ \begin{table}[t] \begin{center} \caption{Mean and standard deviation, the error $e_{\text{SIR}}$ which we calculate with~\Cref{eq:error} and the distance $\Delta\beta_{\text{Germany}} = \beta_{\text{state}} - \beta_{\text{Germany}}$ across the 5 iterations, that we conducted for each German state (MWP=Mecklenburg-Western Pomerania, NRW=North Rhine-Westphalia) and Germany as the whole country. Furthermore, we include the vaccination percentage $\nu$ provided from the German Federal Ministry for Health~\cite{FMH}.} \label{table:state_mean_std} \begin{tabular}{lccccc} \toprule state name & $\alpha$ & $\beta$ & $e_{\text{SIR}}$ & $\Delta\beta_{\text{Germany}}$ & $\nu$ [\%] \\ \midrule Schleswig-Holstein & 0.076{\tiny$\pm0.001$} & 0.095{\tiny$\pm 0.001$} & 0.085 & -0.013 & 79.5 \\ Hamburg & 0.082{\tiny$\pm0.001$} & 0.104{\tiny$\pm 0.001$} & 0.095 & -0.004 & 84.5 \\ Lower Saxony & 0.075{\tiny$\pm0.002$} & 0.097{\tiny$\pm 0.002$} & 0.077 & -0.011 & 77.6 \\ Bremen & 0.058{\tiny$\pm0.002$} & 0.078{\tiny$\pm 0.002$} & 0.093 & -0.030 & 88.3 \\ NRW & 0.079{\tiny$\pm0.001$} & 0.101{\tiny$\pm 0.001$} & 0.078 & -0.007 & 79.5 \\ Hesse & 0.065{\tiny$\pm0.001$} & 0.085{\tiny$\pm 0.001$} & 0.102 & -0.023 & 75.8 \\ Rhineland-Palatinate & 0.085{\tiny$\pm0.004$} & 0.108{\tiny$\pm 0.004$} & 0.090 & 0.001 & 75.6 \\ Baden-Württemberg & 0.091{\tiny$\pm0.002$} & 0.118{\tiny$\pm 0.003$} & 0.080 & 0.010 & 74.5 \\ Bavaria & 0.085{\tiny$\pm0.004$} & 0.116{\tiny$\pm 0.005$} & 0.095 & 0.008 & 75.1 \\ Saarland & 0.075{\tiny$\pm0.002$} & 0.099{\tiny$\pm 0.003$} & 0.108 & -0.009 & 82.4 \\ Berlin & 0.087{\tiny$\pm0.001$} & 0.109{\tiny$\pm 0.001$} & 0.067 & 0.001 & 78.1 \\ Brandenburg & 0.087{\tiny$\pm0.003$} & 0.110{\tiny$\pm 0.003$} & 0.072 & 0.002 & 68.1 \\ MWP & 0.089{\tiny$\pm0.002$} & 0.114{\tiny$\pm 0.002$} & 0.054 & 0.006 & 74.7 \\ Saxony & 0.075{\tiny$\pm0.002$} & 0.099{\tiny$\pm 0.002$} & 0.111 & -0.009 & 65.1 \\ Saxony-Anhalt & 0.092{\tiny$\pm0.003$} & 0.119{\tiny$\pm 0.005$} & 0.079 & 0.011 & 74.1 \\ Thuringia & 0.091{\tiny$\pm0.002$} & 0.119{\tiny$\pm 0.003$} & 0.084 & 0.011 & 70.3 \\ \midrule Germany & 0.083{\tiny$\pm0.001$} & 0.108{\tiny$\pm 0.002$} & 0.080 & 0.000 & 76.4 \\ \bottomrule \end{tabular} \end{center} \end{table} \begin{figure}[t] \centering \includegraphics[width=\textwidth]{mean_std_alpha_beta_res.pdf} \caption{Visualization of the mean and standard deviation of the transition rates $\alpha$ and $\beta$ for each state (MWP=Mecklenburg-Western Pomerania) compared to the mean values of $\alpha$ and $\beta$ for Germany.} \label{fig:alpha_beta_mean_std} \end{figure} In~\Cref{fig:alpha_beta_mean_std}, we present a visual representation of the means and standard deviations in comparison to the national values. It is noteworthy that the states of Saxony-Anhalt and Thuringia have the highest transmission rates of all states, while Bremen and Hesse have the lowest values for $\beta$. The transmission rates of Hamburg, Baden-Württemberg, Bavaria, and all eastern states lay above the national rate of transmission. Similarly, the recovery rate yields comparable outcomes. For the recovery rate, the same states that exhibit a transmission rate exceeding the national value, have a higher recovery rate than the national standard, with the exception of Saxony. It is noteworthy that the recovery rates of all states exhibit a tendency to align with the recovery rate of $\alpha=\nicefrac{1}{14}$, which is equivalent to a recovery period of 14 days. When calculating the correlation coefficient between the predicted transmission rate and the vaccination ratio, we get a value of $-0.5134$. The strong negative correlation indicates that the transmission rate is high when the vaccination ratio is low, and vice versa. This shows that the impact of the vaccines can be witnessed in our results. \\ It is evident that there is a correlation between the values of $\alpha$ and $\beta$ for each state. States with a high transmission rate tend to have a high recovery rate, and vice versa. The correlation between $\alpha$ and $\beta$ can be explained by the implicate definition of $\alpha$ using a recovery queue with a constant recovery period of 14 days. This might result in the PINN not learning $\alpha$ as a standalone parameter but rather as a function of the transmission rate $\beta$. This phenomenon occurs because the transmission rate determines the number of individuals that get infected per day, and the recovery queue moves a proportional number of people to the removed compartment. Consequently, a number of people defined by $\beta$ move to the $R$ compartment 14 days after they were infected. Furthermore, in~\Cref{sec:pandemicModel:rsir}, we discussed the reproduction number $\Rt$, which describes the number of individuals infected by one infectious individual. This can be another reason for the observed correlation, as $\Rt$ depends on both $\alpha$ and $\beta$ (see~\Cref{eq:repr_num}), which illustrates that both parameters are influenced by changes to the reproductivity of the disease.\\ This issue can be addressed by reducing the SIR model, thereby eliminating the significance of the $R$ compartment size. In the following section, we present our experiments for the reduced SIR model with time-dependent parameters. % ------------------------------------------------------------------- \section{Identifying the Reproduction Number} \label{sec:rsir} In this section we describe the experiments we conduct to identify the time-dependent reproduction number for both synthetic and real-world data. Similar to the previous section, we first describe the setup of our experiments and afterwards present the results and a discussion. The methods we employ for the preprocessing are described in~\Cref{sec:preprocessing:rq} and for the PINN, that we use, are described in~\Cref{sec:pinn:rsir}. % ------------------------------------------------------------------- \subsection{Setup} \label{sec:rsir:setup} \paragraph{Synthetic Data:}For the purposes of validation, we create a synthetic dataset, by setting the parameter of $\alpha$ and the reproduction value each to a specific values, and solving~\Cref{eq:reduced_sir_ODE} for a given time interval. As in the synthetic data for the aforementioned experiments, we set $\alpha=\nicefrac{1}{3}$ and $\Rt$ to the values as can be seen in~\Cref{fig:Rt_dataset} as well as the population size $N=\expnumber{7.6}{6}$ and the initial amount of infected people to $I_0=10$. Furthermore, we set our simulated time span to 150 days. We use this dataset to demonstrate, that our method is working on a simple and minimal dataset.\\ \paragraph{Real-World Data:}To obtain a dataset of the infectious group, consisting of the real-world data, we processed the data of the dataset \emph{COVID-19-Todesfälle in Deutschland}~\cite{GHDead} to extract the number of infections in Germany as a whole. For the German states, we use the data of \emph{SARS-CoV-2 Infektionen in Deutschland}~\cite{GHInf}. In the preprocessing stage, we employ a constant rate for $\alpha$ to move individuals into the removed compartment. For each state we generate two datasets with a different recovery rate. First, we choose $\alpha = \nicefrac{1}{14}$, which aligns with the time of recovery~\cite{GHInf}. Second, we use $\alpha=\nicefrac{1}{5}$, as 5 days into the infection is the point at which the infectiousness is at its peak~\cite{COVInfo}. As in~\Cref{sec:sir}, we set the population size $N$ of each state and Germany to the corresponding size at the end of 2019. Furthermore, for the same reason we restrict the data points to an interval of 1200 days, beginning on 2020-03-09. 2020.\\ \begin{figure}[t] \centering \begin{subfigure}{0.3\textwidth} \centering \includegraphics[width=\textwidth]{I_synth.pdf} \end{subfigure} \quad \begin{subfigure}{0.3\textwidth} \centering \includegraphics[width=\textwidth]{I_synth_r_t.pdf} \end{subfigure} \vskip\baselineskip \begin{subfigure}{0.67\textwidth} \centering \includegraphics[width=\textwidth]{datasets_states/Germany_datasets.pdf} \end{subfigure} \caption{The upper two graphics show the curve of the size of the infectious group (left) and the corresponding true reproduction value $\Rt$ (right) for the synthetic data. The lower graphic exemplary illustrates the different curves for Germany.} \label{fig:Rt_dataset} \end{figure} \paragraph{Training Parameters:}In order to achieve the desired output, the selected neural network architecture comprises of four hidden layers, each containing 100 neurons. The activation function is the tangens hyperbolicus function. For both the federal state and Germany, the physics loss is weighted by a factor of $\expnumber{1}{-6}$, whereas the data loss belonging to Germany is also weighted with a high factor of $\expnumber{1}{4}$, relative to the total loss. We found this approach to yield the best results. The model is trained using a base learning rate of $\expnumber{1}{-3}$, with the same scheduler and optimizer as we describe in~\Cref{sec:sir:setup}. We train the model for the federal states 20000 epochs and start the physics training after 10000 epochs, while we train for Germany for 25000 and start the physics training after 15000 epochs. To ensure the reliability of the results, we conduct ten trials of each experiment. For evaluation, we use the error $e_G$ as we do in the subsequent section.\\ % ------------------------------------------------------------------- \subsection{Results and Discussion} \label{sec:rsir:results} \begin{figure}[t] \centering \begin{subfigure}{0.45\textwidth} \includegraphics[width=\textwidth]{synthetic_I_prediction.pdf} \end{subfigure} \quad \begin{subfigure}{0.45\textwidth} \includegraphics[width=\textwidth]{synthetic_R_t_statistics.pdf} \end{subfigure} \caption{Results for the reproduction rate $\Rt$ on synthetic data. The left graphic show the prediction of the model regarding the $I$ group. The right graphic presents the predicted $\Rt$ against the true value, with the standard deviation.} \label{fig:r_t_synth_res} \end{figure} \Cref{fig:r_t_synth_res} illustrates the results of our experiments conducted on the synthetic dataset, which can be seen in~\Cref{fig:Rt_dataset}. It is evident that the model is capable of learning the infection data across all data points. The error for this is, $e_I = 0.0016$, which is of a negligible magnitude. An examination of the predictions for the reproduction number $\Rt$ reveals that here as well, the model is capable of accurately delineating the value at each time point. However, during the first 30 days, the standard deviation exhibits an upward trend, while during the final 120 days, the predictions demonstrate remarkable precision.\\ In~\Cref{fig:state_results}, we present the graphs of $\Rt$ for the state with the highest value of $\beta$, namely Thuringia, and for the state with the lowest $\beta$, namely Bremen. Further visualizations of the results can be found in~\Cref{chap:appendix}. In all datasets, the graphs with $\alpha = \nicefrac{1}{5}$ are of a smaller size than those with $\alpha = \nicefrac{1}{14}$. This is due to the fact that the individuals are being moved to the removed compartment at a faster rate. Resulting, it can be observed that the value of $\Rt$ is constantly remaining closer to the threshold of $\Rt=1$, while the reproduction number for datasets with $\alpha = \nicefrac{1}{14}$ reaches values of up to 1.6. In states with higher values of $\beta$, the period during which the value of $\Rt$ is above the threshold of one 1 is longer, but the peak is lower. In states with a lower transmission rate, the period above 1 is shorter, but the peak value is higher.\\ \begin{figure}[t] \centering \begin{subfigure}{0.45\textwidth} \includegraphics[width=\textwidth]{r_t_cluster_intext.pdf} \end{subfigure} \begin{subfigure}{0.45\textwidth} \includegraphics[width=\textwidth]{I_cluster_intext.pdf} \end{subfigure} \label{fig:state_results} \caption{Visualization of the prediction of the training and the graphs of $\Rt$ for Thuringia (upper) and Bremen (lower) with both $\alpha = \nicefrac{1}{14}$ and $\alpha = \nicefrac{1}{5}$. Events~\cite{COVIDChronik} like the peak of an influential variant or the start of the vaccination of the public are marked horizontally. Further visualizations can be found in~\Cref{sec:r_t_results}.} \end{figure} \Cref{table:state_error} presents data regarding the discrepancy between the predicted and actual values from the dataset for compartment $I$. It is evident, that the error for all experiments falls within a range of values that is not negligible and will have an influence on the resulting reproduction values that are learned while fitting the data. A comparison of the results for the various values of $\alpha$ reveals that the errors associated with $\alpha = \nicefrac{1}{14}$ are consistently smaller than for $\alpha = \nicefrac{1}{5}$, with the exception of Saxony and Germany. This can be attributed to the differing sizes of infection counts, particularly in relation to the normalization factor $C$. The model is unable to learn effectively if the values of the data loss $\mathcal{L}_{\text{data}}$ are too large or too small at the beginning.\\ \begin{table}[t] \begin{center} \caption{For both $\alpha=\nicefrac{1}{14}$ and $\alpha=\nicefrac{1}{5}$ this table presents the error $e_{\text{I}}$, calculated with~\Cref{eq:error}, the average number of days with $\Rt > 1$, and the average peak values of $\Rt$ for all German states (MWP=Mecklenburg-Western Pomerania, NRW=North Rhine-Westphalia) and Germany. The average is formed across all 10 iteration.} \label{table:state_error} \begin{tabular}{lccccccc} \toprule & \multicolumn{2}{c}{$e_I$} & \phantom{0} & \multicolumn{2}{c}{days with $\Rt>1$} & \multicolumn{2}{c}{peak $\Rt$} \\ \cmidrule{2-3}\cmidrule{5-6}\cmidrule{7-8} state name & $\alpha=\frac{1}{14}$ & $\alpha=\frac{1}{5}$ & \phantom{0} & $\alpha=\frac{1}{14}$ & $\alpha=\frac{1}{5}$ & $\alpha=\frac{1}{14}$ & $\alpha=\frac{1}{5}$ \\ \midrule Schleswig-Holstein & 0.228 & 0.258 & \phantom{0} & 467.5 & 458.5 & 1.475 & 1.166 \\ Hamburg & 0.265 & 0.330 & \phantom{0} & 424.3 & 409.8 & 1.500 & 1.297 \\ Lower Saxony & 0.224 & 0.340 & \phantom{0} & 413.1 & 430.3 & 1.662 & 1.223 \\ Bremen & 0.246 & 0.380 & \phantom{0} & 468.6 & 539.1 & 1.582 & 1.179 \\ NRW & 0.185 & 0.252 & \phantom{0} & 486.3 & 602.0 & 1.573 & 1.205 \\ Hesse & 0.302 & 0.346 & \phantom{0} & 553.0 & 511.2 & 1.409 & 1.157 \\ Rhineland-Palatinate & 0.256 & 0.277 & \phantom{0} & 484.7 & 404.7 & 1.534 & 1.175 \\ Baden-Württemberg & 0.198 & 0.284 & \phantom{0} & 469.2 & 590.0 & 1.457 & 1.180 \\ Bavaria & 0.225 & 0.318 & \phantom{0} & 490.5 & 486.1 & 1.428 & 1.199 \\ Saarland & 0.284 & 0.408 & \phantom{0} & 500.2 & 564.7 & 1.515 & 1.180 \\ Berlin & 0.201 & 0.240 & \phantom{0} & 591.9 & 514.4 & 1.721 & 1.262 \\ Brandenburg & 0.237 & 0.242 & \phantom{0} & 555.9 & 596.3 & 1.447 & 1.159 \\ MWP & 0.170 & 0.257 & \phantom{0} & 537.5 & 544.3 & 1.563 & 1.135 \\ Saxony & 0.292 & 0.256 & \phantom{0} & 722.3 & 695.4 & 1.790 & 1.407 \\ Saxony-Anhalt & 0.213 & 0.268 & \phantom{0} & 572.0 & 631.9 & 1.387 & 1.165 \\ Thuringia & 0.180 & 0.222 & \phantom{0} & 732.1 & 730.6 & 1.586 & 1.249 \\ \midrule Germany & 0.284 & 0.239 & \phantom{0} & 587.7 & 430.7 & 1.561 & 1.219 \\ \bottomrule \end{tabular} \end{center} \end{table} As illustrated in~\Cref{fig:state_results}, the training data is overlaid with the corresponding prediction of the model. We can observe that the prediction, though an exact reconstruction, accurately captures the general trajectory of the pandemic. The model's prediction demonstrates an ability to capture larger peaks, exhibiting a tendency to ignore smaller changes. This suggests that the prediction of the model is capable show the rough outline of the progression of COVID-19. In the beginning, the majority of predictions below $\Rt=1$, indicating an outbreak. As we observed in the synthetic data, the model exhibits a higher standard deviation at the boundaries. In the graphs, we mark the peaks of the most severe COVID-19 variants in Germany~\cite{COVIDChronik}. While the peaks of the Alpha and Delta variants are clearly visible in the data, the model does not learn these, and thus they are not reflected in the results. The peak of the Omicron variant represents the culmination of the COVID-19 pandemic in Germany and can be identified as the most prominent peak in the dataset. Immediately preceding this peak, we observe the highest value of the reproduction number across all states. This phenomenon can be explained, by number of individuals infected by one infectious person reaching its peak. In some states the peaks of other Omicron variants after the maximum peak are visible (see Thuringia).\\ The experiments demonstrate, that our model encounters difficulties in learning the data for the states and Germany and consequently in predicting the reproduction values for each dataset. Nonetheless, the predictions illustrate the general trends of the most impactful events of the COVID-19 pandemic.\\ % -------------------------------------------------------------------