1. Introduction
The insights obtained from the recent SARS-CoV-2 pandemic remain important to inform future public health policy and to contribute to a more reasonable selection of prevention policies in future epidemics. Along these lines, evidence-based research regarding the effects of different epidemiological factors on the spread of SARS-CoV-2 has been conducted [
1,
2,
3,
4,
5,
6].
By relying on different methodological approaches, SARS-CoV-2 studies have especially explored the effects of government policies in different spatial and temporal scopes [
7,
8,
9,
10,
11,
12,
13,
14,
15].
In order to convey a comprehensive understanding of the effects of the European government policies on the spread of SARS-CoV-2, in this study, we combine four datasets with regard to 66 government measures, virus variant distributions (of 31 virus types), and the accumulated percentages of the vaccinated population (by the first five doses) as well as the infection numbers at each day (from early 2020 up to mid-2022) for each of the 30 countries included in this study.
We utilize convolutional deep neural networks (CNNs) [
16,
17], in particular probabilistic (Bayesian) convolutional deep neural networks (BCNNs) [
18,
19], together (and in comparison) with Bayesian statistical inference [
20,
21], as shown in
Figure 1.
We first train a BCNN model, which is capable of predicting the reproduction rate of the virus one month ahead any given day with high accuracy. Based on the trained BCNN model, we infer the importance and the magnitude of the effect of each relevant explanatory factor by applying explainable artificial intelligence (XAI) algorithms. Specifically, the results of two XAI methods are presented in this paper: permutation feature importance (PFI) [
22] and partial dependence plot (PDP) [
23].
Second, we perform a Bayesian statistical analysis. In the statistical approach, we study two distinct circumstances with regard to each pandemic influential factor in each European country. We look at the distribution of pandemic growth rates in the days where the selected epidemiological factor has been active. Furthermore, we look at the distribution of pandemic growth rates in the days where the selected explanatory variable has not been active in that country. We then compute the probability that the activation of the selected factor—in contrast to the non-activation of it—results in a reduction in the pandemic growth rate.
By applying the first approach, i.e., the convolutional deep model, we aim at utilizing CNNs’ high computational ability [
17] to extract the effects of the most critical explanatory variables on the spread of the recent pandemic. By incorporating probabilities in the convolutional deep model in our study, we aim at avoiding over-fitted models through delivering uncertain conclusions [
18].
By applying the second approach, i.e., the Bayesian statistical model besides the deep learning model, we try to reexamine the results obtained through the utilized deep learning model with regard to the most critical factors affecting the spread of SARS-CoV-2 within European countries.
The remainder of this paper is as follows:
Section 2 provides methodical and scientific foundations for this study with regard to governmental SARS-CoV-2 policies.
Section 3 shows how this study’s datasets are extracted, cleaned, and merged into a common data table.
Section 4 explains in detail the applied inputs (i.e., the explanatory variables) and the resulting output (the dependent variable) of the deep learning model. It also provides information about the deep learning model with respect to model construction, training, and result interpretation. How a Bayesian statistical analysis is performed is described in
Section 5. The results of the deep learning and the statistical inference models are presented in
Section 6, while
Section 7 is dedicated to the interpretation of these results. Concluding remarks and future research needs are summarized in
Section 8.
2. Methodical and Scientific Foundations for This Study
Since the onset of the SARS-CoV-2 pandemic in late 2019, several studies have analyzed important epidemiological factors with respect to the spread of the pandemic in different geographical scopes (e.g., [
8,
9,
10,
12,
13,
14,
15,
24,
25,
26,
27,
28,
29]). In this section, we review a set of selected papers based on their relevance to our research subject, especially with regard to the comprehensiveness of the articles’ incorporated explanatory factors as well as the significance of the research’s geographical scope. The key features from the selected articles are summed up in
Table 1.
The studies comprise a variety of approaches, i.e., statistical analysis [
8,
9,
10,
13,
14], compartmental methods [
12], machine learning techniques [
15,
24,
25,
26,
28], and deep learning models [
27,
29].
The included research was conducted in various regions around the globe and conclude with different results. Nader et al. [
24] see school closures as an important factor to achieve reductions in infection rates. Li et al. [
12] find that mass gathering restrictions and school closings are associated with the largest average reductions in infection rates in large-scale epidemic areas. Ge et al. [
8] find that gathering restrictions and facial coverings played a significant role in epidemic mitigation. Liu Y et al. [
13] conclude that the rate of masks used in individual prevention does not seem to be related to cumulative mortality or morbidity in European countries. Instead, the mobility index generated by personal behavior might be the more important prevention policy according to these authors. Leech et al. [
10] focus on masks mandates as a proxy for mask-wearing effectiveness and conclude that mask wearing reduces the reproduction rate of SARS-CoV-2 by 19 percent. Saleh et al. [
27], Zheng et al. [
26], Balogh et al. [
25], Huy et al. [
9], Zhou et al. [
15], and Du et al. [
29] investigate and approve the significant role of vaccination policy. The significance of the various virus variants beside government interventions has also come into consideration, e.g., in [
25]. A complete review of XAI-based epidemiological models of SARS-CoV-2 including the data, methods, and results is conveyed in [
30].
In this paper, we proceed with the application of explainable deep learning and statistical methods as in previous studies to identify the importance and magnitude of the most important factors regarding the spread of the recent pandemic. Thereby, our approach in this paper comprises a set of new features. First, by feeding the explanatory factors of the pandemic as 1-dimensional images into a convolutional deep learning model CNN, we extend the literature on using CNN deep networks to epidemiological analysis. CNNs are well-known architectures specifically used for image classification and tasks that consider the processing of spatial dimensions of data [
31]. Whereas the usage of CNN-based architecture approaches in the context of clinical studies is practiced [
32], the rich potential of performance and interpretability of CNN models is, so far, not substantially exploited in XAI-based epidemiological studies. Second, we treat the dependent variables of our study (i.e., the pandemic reproduction rate in the neural network approach and the pandemic growth rate in the statistical analysis) as uncertain (Bayesian) variables. Incorporating the uncertainty in the model training level is rarely performed in the scope of the SARS-CoV-2 epidemiologic literature. Third, we provide XAI algorithms to understand the significance of a comprehensive set of explanatory features on the spread of the virus in a wide geographical scope consisting of 30 European countries. Fourth, by performing a Bayesian statistical analysis alongside the machine learning approach, we investigate whether the role of each explanatory factor, explained via the deep learning model, can be confirmed with the statistical analysis from a dissimilar perspective.
3. Data
In this paper, we utilize four datasets provided by the European Centre for Disease Prevention and Control (ECDC), which cover 30 European countries:
Per country per day government measures of NPIs;
Per country per day virus variant distributions;
Per country per day per dose new vaccinations;
Per country per day new reported infections.
The four datasets are merged into a unique pandas table, referred to as
data_encoded. Each row of
data_encoded represents each day in the time span between 2020 and mid 2022 for a specific country. Data_encoded consists of 22,420 rows. Each country (from 30 countries) comprises its own block of approximately 750 rows (22,420/30 = 750 days) in data_encoded. The columns of
data_encoded comprise 111 columns representing the pandemic explanatory factors as well as 2 columns representing the 7 days’ average backward and 7 days’ average forward number of reported infections at any arbitrary day for each country. These are shown in
Table 2 and are explained in the following
Section 3.1,
Section 3.2,
Section 3.3,
Section 3.4 and
Section 3.5.
3.1. Government NPIs
Each of the 66 NPIs applied by governments has a specific column in
data_encoded, with a value of 1 if the NPI is active on a day in a country and a value of 0 otherwise. A detailed explanation of these NPIs is presented in [
33].
3.2. Vaccination Data
The vaccination data in data_encoded show the accumulated percentage of each of the first five vaccine doses received by the population of each corresponding country in each day. In addition, the pre-vaccination days (where the value for the first dose is equal to 0) and the post-vaccination days (where the value for the first dose is larger than 0) are distinguished for each country’s data in a specific column named vaccination_modus.
3.3. Virus Variants
Each virus variant is presented within a day and in a country by means of the percentage it is sequenced in the corresponding country and day. The sum of percentage values of all sequenced virus variants in a country within each day is equal to 1. There exists a virus variant named ‘Other’ in the list of virus variants, which represents a collection of other, not-labeled virus variants in the data. In addition, the dominant virus variant in each country and each day (as the virus variant with the highest sequenced percentage) owns its own specific column named dominant_virus within data_encoded.
3.4. Country Name and Month Name
The countries’ names (30 categories) and months’ names (12 categories) are considered as categorical variables and hence are hot encoded to distinct sets of 5 digits and 4 digits’ binary formats, respectively. Each digit has its specific column in the data_encoded table.
3.5. Smoothed Infection Numbers
7 days’ average backward and 7 days’ average forward number of the reported infections at any arbitrary day for each country are integrated into
data_encoded in two separated corresponding columns. The week-based smoothed numbers are used to compute the dependent variables of our study, i.e., reproduction rates (in
Section 4) and growth rates (in
Section 5).
5. Bayesian Statistical Approach
In this section, we perform a statistical inference analysis for each explanatory factor within each of the 30 European countries. Thereby, we use the information regarding the 7 days’ average backward and 7 days’ average forward number of the reported infections at any arbitrary day for each country from data_encoded.
If the average number of observed SARS-CoV-2 positive cases 7 days before any day
i is equal to
(see the corresponding cell to the row “day
i” and column “backward n-days smoothed infection numbers” in
Figure 2) and the average number of observed SARS-CoV-2 positive cases 7 days after the day
i is equal to
,
n = 7 (see the corresponding cell to the row “day
i” and column “forward n-days smoothed infection numbers” in
Figure 2), then, the
daily based variable
is defined according to Equation (9):
represents a kind of symmetric predictive criteria to indicate the change in the spread of the virus between the 7 days’ average backward and 7 days’ average forward values for any arbitrary day i. Hence, is the daily relative growth rate of the pandemic. For each influencing input factor, the distribution of pandemic growth rates in the days where the selected explanatory factor has been active is compared with the distribution of the pandemic growth rates in the days where the selected explanatory variable has not been active.
5.1. Bayesian Statistical Model
To obtain the posterior probabilities with regard to the presence and non-presence of a selected explanatory factor in each country, we took each country’s data separately and analyzed each explanatory factor within the selected country’s data by means of a hierarchical Bayesian model [
20,
21]. A hierarchical Bayesian model considers a hyper parameter at the top level of its analysis, as well as specific parameters in its lower level. The top hierarchical level takes the overall distribution of growth rates in a certain country into account regardless of the condition whether the certain explanatory factor has been active or not. The lower level takes the situation-specific developments into account, i.e., whether the selected epidemiological factor is implemented or not. The model used in this paper is illustrated in
Figure 4.
The top level of the model in
Figure 4 depicts the hyper mu parameter, which is a normal distribution function consisting of a mean and a standard deviation for a distinct country from the studied countries. The mean and standard deviation are derived by us through considering all observed
data within a selected country. The left-hand side of the model (consisting of variables with
positive sign at the end) devotes itself to the effect of
activation of a certain explanatory factor on the epidemic growth rates. The right-hand side of the model (consisting of variables with
negative sign at the end) devotes itself to the effect of
non-activation of the selected explanatory factor on the epidemic growth rates. The lower level of the model uses the Student’s t-distribution to infer posterior predictive
values. The reason of choosing a Student’s t-distribution is its fitness to the shape of the
in the studied countries. Thereby, we used the fitter package (
https://github.com/cokelaer/fitter, accessed on 18 June 2024) in python to explore aggregate and individual data across the studied countries. The histogram of the overall
s numbers with the example of Germany during the pandemic is demonstrated in
Figure 5.
The hyper parameter
nu is the
degree of freedom part of the subsequent Student’s t-distribution, which usually ranges from 0 to 30 and becomes shared between the left-hand side and the right-hand side of the model. The presence of the
sd_Country parameters specified in both the right-hand side and left-hand side of the model figure provides a weekly informative prior which permits the lower level of the model to sample its parameters (either corresponding to the activation of a factor on the left-hand side or corresponding to the non-activation of the selected explanatory factor in the right-hand side) without bias. While a basically normal distribution provides a reasonable prior for the mean parameter, the exponential distributions provide reasonable priors for the standard deviation, i.e., for the distribution of the abovementioned
sd_Country terms [
21].
Obtaining posterior distributions with regard to the presence and non-presence of a selected factor is often analytically intractable. The sampling procedure of the posterior distributions are accomplished via using a No-U-turn sampler (NUTS) implemented in the probabilistic programming package for python PyMC3. The results of the posterior sampling draws get stored in a PyMC3 data object called trace. The values of a trace not only represent the obtained posterior values but also can reveal the reliability of the parameter space exploration via the employed sampling algorithm. The model trace convergence is evaluated by means of the Gelman-Rubin R_hat statistic [
39]. R_hat values deviating from one indicate that trace values move wildly or get stuck and that sampling failed to cover the parameter space effectively. Hence, in practice, we are looking for R_hat values close to one. The resulting trace plots regarding the predicted distributions of
s in the case of implementing gym and sport center closures (predGermany+) versus non-implementation of the gym and sport center closures (predGermany-) in Germany are shown in
Figure 6.
5.2. Computing the Term Efficiency by Comparing Distribution Samples
In this subsection, we assume we have obtained the posterior distributions of the pandemic growth rates in the days where a selected explanatory variable has been active, as well as the posterior distributions of the pandemic growth rates in the days where the selected explanatory variable has not been active.
We define the
efficiency of a factor to figure out the probability that, in an arbitrary chosen day, the presence (activation, “+”) of a factor grants less value to the growth rate of the virus in comparison to the absence (non-activation, “−”) of that factor. We do the comparison stochastically by sampling 1000 random draws from both positive-signed and negative-signed distributions. Moreover, 1000 random draws from the positive-signed posterior distribution will generate a list
L of growth rates
named
, which is of length 1000. Likewise, 1000 random draws from the negative-signed posterior distribution will generate a list of growth rates
named
, which is of length 1000. The efficiency ratio (Equation (10)) results from the iterative comparison of each positional element
l (from 0 to 1000-1) of the above-mentioned two generated lists, setting the comparison term
equal to 1 if it is true and 0 if false, and calculating the averaged compared values:
To offset the stochastic nature of computing via random drawn growth rates, we repeat computing 1000 times and look at the distribution.
5.3. Exemplary Computation of the Efficiency Term
Figure 7 and
Figure 8 illuminate the inference procedure from the observed empirical data up to computing the efficiency terms by means of the example of “closure of gyms and sport centers” in the four most populated European countries (France, Germany, Italy, and Spain).
Each blue line at the left-hand side of
Figure 7 displays the empirically observed growth rate of the pandemic in the days when the selected factor (closure of gyms and sport centers) has been active in each selected country. Each orange line on the left-hand side of
Figure 7 displays the growth rate of the pandemic in the days when the selected factor has not been active in each selected country. The posterior predictive probabilities in the middle and the right-hand side of
Figure 7 are driven by sampling posteriors using NUTS.
The obtained posterior probability distributions of activation versus non-activation of the selected explanatory factor in
Figure 7 are compared in line with the logic explained in
Section 5.2 and expressed in Equation (10). The histogram of the obtained 1000 computed efficiencies
is presented in
Figure 8.
7. Interpretation of Deep Learning and Statistical Findings
The analysis of the importance of explanatory factors (
Table 4) indicates that the factor
country is at the top level of epidemiological factors in the predictions of the model. The high importance of the factor
country is caused by the construction of the DNN model, since this factor is not averaged over different countries, which would make no sense for this factor. Each country is a unique key for the data solely corresponding to that country. It remained in its place during the training of the model. However, seeing the factor
month—which is taken into account during the training procedure of the BCNN model—at the top of all other explanatory features is remarkable.
Consequently, we conclude that the months and seasons have been much more influential on the dynamics of the SARS-CoV-2 pandemic in comparison with the governments NPIs and vaccination policies as well as the emergence of virus mutants. The evidence from the counterfactual PDP exploration of seasonal effects (
Figure 11) is twofold:
First, the overall reproduction rates in the white area are significantly higher than those within the light-red area.
Second, in most of the countries, there is a peak in the virus spread around
month 7 (July). The existing literature explores the role of seasonal trends. Merow and Urban [
40] develop statistical models that predict the maximum potential of COVID-19 worldwide and throughout the year. The authors predict that COVID-19 will decrease temporarily during summer, rebound by autumn, and peak next winter. In a more recent study, Wiemken et al. [
41] use time-series decomposition to extract the annual seasonal component of COVID-19 cases, hospitalization, and mortality rates from March 2020 through December 2022 for the United States and Europe. The authors identify seasonal spikes in COVID-19 from approximately November through April for all outcomes and in all countries. These results are indeed, to a large extent, in line with the predictions of our deep learning model. In addition, the results of the statistical inference analysis (
Figure 12 and
Table 5) regarding the seasonality effects support that large probable growth rates of the virus are visible in the Autumn season (September, October, and November) and the smallest pandemic growth is predicted to be in the Spring season (March, April, and May). The statistical inferences show that the gained efficiencies in Winter (December, January, and February) are higher than the efficiencies of Summer (June, July, and August). Note that as the statistical inference analysis uses the data of each country separately, the months are summarized into the seasons so as to increase the number of prior observations per season in each country. Returning to the spike in July in the DNN model (
Figure 11), the frequently observed peak in summer in most of the countries (e.g., Hungary in July, Liechtenstein in July–August, Belgium in July, Bulgaria in July, Estonia in July–August, Netherlands in July, Lithuania in July, etc.) can be hypothesized to be a result of the surge in the infection cases through less-restricted public mobility during summer vacation.
The deep neural network model as well as the statistical inferences both provide evidence that the three well-known variants of the virus (i.e.,
B.1.1.7—Coronavirus Alpha variant,
B.1.617.2—Coronavirus Delta variant, and
BA.2—Coronavirus Omicron variant) have seemingly played a significant role in driving the dynamics of the pandemic, i.e., higher influence on the virus spread than the governments’ NPIs and vaccination programs. The PDP analysis of the DNN model (
Figure 10) also evidences that, in the light of the assumption regarding the counterfactual scenario of the pandemic getting stuck by the mere presence of
B.1.1.7 (
Coronavirus Alpha variant), a considerable reproduction rate reduction of up to around 90 percent could have been achieved. The rows of
Figure 10 regarding the
B.1.617.2 (
Coronavirus Delta variant) and
BA.2 (
Coronavirus Omicron variant) variants reveal to what extent the counterfactual predominance of the Omicron variant could have been beneficial in terms of amelioration of the virus spread and how the hypothetical extension of the delta variant could be harmful. Note that a row named ‘Other’ exists, which indicates the potential harmful effect of other not-labeled virus variants in the dataset; if such virus variants could prevail, the pandemic scene might have gone beyond the destructive role of the delta variant. The same inferences regarding the role of the major virus variants can be obtained through the statistical inference analysis (see
Figure 12 and
Table 5).
While the outcomes disclose the role of the explanatory factors within each country separately, the overall results indicate that, generally, the government policies might have played a subordinated role compared to the seasonality and virus variants.
Figure 10 and
Figure 12 illustrate that, in the majority of countries, the efficiency term (
Section 5.2) of the post vaccination period is relatively higher than the pre-vaccination period. The factor
vaccine_0_1 in
Figure 10, which expresses the counterfactual scenario of the whole population being vaccinated with the first and the second dose within all phases of the pandemic, reveal the
relatively high effectiveness of the vaccination policy to constrain the spread of the virus.
Beyond the month and season factors of the NPIs, closing the primary schools, general and regional lockdowns, and non-essential shop closures were significant in reducing the pandemic reproduction, both in the DNN model and the statistical inference model.
While in the literature the effects of government mask mandates are to some extent inconsistent [
10], the
partially inconsistent representation of the mask mandates in
closed spaces in
Figure 10 and
Figure 12, and
Table 5 need to be further researched. The explanatory factor
MasksMandatoryAllSpaces encompassing the protective mask usage in all public spaces on a mandatory basis (enforced by law) is predicted through the DNN model to have positive influence to combat the pandemic. However, it is peculiar that the factor MasksMandatoryClosedSpaces representing protective mask use in closed public spaces/transport on mandatory basis (enforced by law) is contributing to increase infection rates in most of the countries.
This requires further research on the role of mask mandates to control the pandemic. Kai et al. [
42] put forward some hypothesis that enforcing masks works if and only when the entire or at least a substantial mass of the society becomes committed to it. And it becomes significantly inefficient if mask wearing is prescribed or obeyed partially [
42] or if the observed levels of mask wearing in closed spaces are critical [
10]. Barceló and Sheen [
43] raise the question of the effectiveness of mask mandates in regions where commitment to face masks lacks a cultural background [
43]. Despite the conjectures, examining the predicted non-efficiency of mask mandates in
closed spaces, despite the high efficiency of the
all spaces mask mandates, as shown in
Figure 10 and
Figure 12, and
Table 5, might not be explained completely based on the above hypothesis nor within our analysis. It requires further research.
8. Conclusions
In this paper, we applied a deep Bayesian convolutional neural network and a Bayesian inference statistical model to analyze the SARS-CoV-2 government policies across thirty European countries. The data explored include 66 government measures, virus variant distributions of 31 virus types and the vaccinated population percentages by the first five doses as well as the reported daily new infections in each country. The results of the deep learning Bayesian model and the statistical Bayesian inference agree with each other to a large extent.
While the outcomes disclose the role of government interventions within each country separately, the overall results indicate that, generally, a number of government policies played a subordinated role compared to the seasonality and virus variants. The seasonality effects shaped the overall dynamics of the pandemic as a factor on top of the influence sphere of other pandemic explanatory factors. Large growth rates for infections are achieved around the Autumn season (especially in October and November) and the smallest probabilities with regard to pandemic growth is in the Spring season (especially in April and May). This does not contradict the positive impact of some important NPIs and vaccination policies. The role of the first two vaccination doses as well as the NPIs closing the primary schools, general and regional lockdowns, and non-essential shop closures substantially contributed to the reduction in the spreading of the virus. This is evidenced both from the Bayesian deep learning model as well as from the Bayesian statistical inference analysis.
The study described in this paper naturally has limitations. It does not incorporate the degree of government’s policies’ appliance or the degree of people’s compliance with the governments’ interventions. Some intervention policies—such as the total number of tests carried out in each population, the data collected via contact tracing measures, or the role of media and communication policies—were not integrated in our dataset. The role of temperature is represented only indirectly by means of seasons and months.
There are several ways to enhance the approach applied in our paper. First, where the factor time is just implicitly modeled in the deep learning model applied (through averaging the effect of each explanatory variable over a month), utilizing a two-dimensional input data matrix to explicitly model the connected time steps in one dimension along with the explanatory factors as a second dimension, is a matter of follow-up research. This further investigation step will explicitly include the concrete time steps in the analysis and enables the research to not only convey the significance and magnitude of effects of each pandemic explanatory factor in the spread of pandemic, but also the required time lags, which could have been necessary to unfold the effect of each explanatory factor. Second, we could have decomposed the country factor in our study to a range of its constituent components including health and well-being infrastructure, socio-cultural characteristics, and development and economical sub-features as well as geo-spatial attributes corresponding to each country to infer more country-specific conclusions with regard to the causes of spreading patterns of the virus. Third, while the application of filters in the convolutional neural network applied in our study counts for possible interactions between the explanatory factors considered in our model, the interpretation of explanatory factors’ combination effects has not been addressed in our study. Likewise, possible correlation analyzed via separated statistical inference with regard to each country cannot indicate, necessarily, causation. Finally, while we used the PFI and PDP concepts, which are applicable to a broad range of machine learning methods to interpret the results of the BCNN model, the potential performance of model-specific interpretation methods (specifically applicable to CNNs) is not utilized in our research. Hence, the XAI implemented in our research can be extended to other methods in the future research steps.