Source Code for Optimized Parallel Inception: A Fast COVID-19 Screening Software

COVID-19 and swine-origin influenza A (H1N1) are both pandemics that sparked significant concern worldwide. These two viruses have the same symptoms and occur at a collision timeline. Optimized Parallel Inception (OPI) presents a new strategy to screen the COVID-19 from H1N1 with use of only symptoms. In this paper, the process of preprocessing, screening, and specifying feature importance by OPI and particle swarm optimization is presented. Experimental results indicate 98.88 accuracy for screening COVID-19, H1N1, and Neither COVID-19 Nor H1N1.


Introduction
In the last days of 2019, the novel coronavirus with code name COVID-19 emerged in Wuhan, China. COVID-19 spread through the world rapidly and caused 6,297,362 by 20th of May 2022 [1]. Various variants of COVID-19 caused major issues in the autumn and winter. The influenza virus is notable for its periodic occurrence, and yearly economic impact [2]. The annual seasonal influenza epidemic infects 3-5 million people with serious conditions worldwide [3]. Number of infections for both diseases rose between October and April. Due to the body immune system reaction, common symptoms of H1N1 include high fever, coryza, and myalgia. In severe cases, viral pneumonia, The code (and data) in this article has been certified as Reproducible by Code Ocean: (https://codeocean.com/). More information on the Reproducibility Badge Initiative is available at https://www.elsevier.com/physical-sciences-and-engineering/computer-science/journals. * Corresponding author.
superimposed bacterial pneumonia, and hemorrhagic bronchitis have been reported [4]. The most common COVID-19's symptoms are cough, weakness, myalgia, fever, headache, impaired sense of smell, impaired sense of taste, sore throat, runny nose, and nasal congestion [5]. The common symptoms of both COVID-19 and H1N1 are similar, which makes their screening task challenging [6]. Gathering', 'Visited Public Exposed Places', and 'Family Working in Public Exposed Places'. In this paper, we propose a novel deep learning model with the name of Optimized Parallel Inception (OPI) [7] with combination of Particle Swarm Optimization (PSO) [8] to choose best sets of features and discriminate between COVID-19 and H1N1 patients from Neither COVID-19 Nor H1N1. Proposed model helps healthcare system to detect patient with 98.88% accuracy in total with screening accuracy of 99.2% and 99.6% for COVID-19 and H1N1, respectively only using 18 features. Proposed structure is well tuned against null values and can use 10 features and report 97% accuracy still.

Description of OPI with PSO
OPI is composed of a 3 heads Convolutional Neural Network (CNN) [9] that uses a combination of symptoms information to screen COVID-19 and H1N1 patients from Neither COVID-19 Nor H1N1. Proposed structure uses 1-dimension convolutional layer and uses three different paths to extract distinguishable features. Each head predicts a class individually and based on achieved accuracy by each head soft or hard voting is used at the end. Proposed structure is shown in Fig. 1.

Inception layer
Proposed structure composed of conventional 1-dimension convolutional layer at the beginning. Then a set of inception layers is used throughout the OPI with different kernel sizes. These inception layers are responsible to extract the relationship between co-occurring and comorbidities symptoms. Earliest inception layers composed of convolutional layers with 7 and 9 kernel sizes. The upper layers of OPI are composed of convolutional layers with 3 and 5 kernel sizes. The opposite hierarchy is occurring for filter sizes.

Decision layer
The last layer of the OPI is the decision layer. The aim of this layer is to choose the best strategy for predicting classes of instances. The first strategy uses the difference between accuracy of the main and two auxiliary paths in the training phase. If the difference is >= 0.1%, then output of the path with the maximum accuracy will determine the model's decision in the testing phase. If the difference is < 0.1 in the training phase, then soft voting of all paths determines the OPI's decision in the testing phase.

PSO
PSO is used with a combination of OPI to choose the smallest subsets of features to achieve an acceptable level of accuracy for screening. PSO uses the OPI with a random subset of features and try predict the class of instances. Then PSO increases the search area and evaluate the OPI with various combination of features. PSO choses best sets of features based on screening accuracy and loss.

Framework
Whole process of using OPI with PSO for using optimal subsets of features and screen the COVID-19 and H1N1 patient from Neither COVID-19 Nor H1N1 is implemented in a forward path. First model is trained on 10 batches of training and validation sets then based on difference between accuracy of each path one of the strategies is used for predicting unlabeled instances. Proposed structure is trained with ADAM, batch size of 32 for training and evaluation and learning rate equals to 0.0001. To train the model properly exponential scheduling is put in place to reduce learning rate by 0.1 with 30 epochs intervals without any change to the learning process. Whole framework is trained on 10 loops with an initial population of 20 individuals. The framework repeats these loops with maximum 10 iteration for each individuals' particles (Proposed set of features) to find best sets of features. Finally based on best result and sets of features weight of the OPI is going to be updated and saved for real time testing phase.

Empirical result
OPI has been evaluated with use of combined COVID-19, H1N1 datasets. NVIDIA CUDA version 10.1 and higher are the requisites for optimized and fast solutions. We recommend users to set the hyperparameters into default settings. The information about required libraries, visualization format, example scripts is provided in the meta data environment of the code ocean.

Detailed result
To investigate the achieved result in detail we report precision, sensitivity, Specificity, and Area under Receiver Operating Characteristic (AUROC) in Table 1. Based on Table 1, result of achieved specificity in class ''Neither COVID-19 Nor H1N1'' and class ''COVID-19'' shows that the detection rate for true negative case in ''COVID-19'' class is higher than the class of ''Neither COVID-19 Nor H1N1''. Although, based on achieved sensitivity, the detection rate for true positive case in ''Neither COVID-19 Nor H1N1'' is much higher than the class of ''COVID-19''. Also, detection of H1N1 in patients with proposed OPI is more accurate than COVID-19. The comparison between proposed model and similar researches is shown in Table 2.
The empirical results of framework demonstrate following features: • Higher performance: The proposed OPI detects the COVID-19 and H1N1 patients with accurate precision and high sensitivity.
In case of COVID-19 detection the OPI outperforms ML and Deep Learning (DL) algorithms such as Gradient-Boosting [10], RF [11], Logistic Regression (LR) [12], Supported Vector Machine (SVM) [13], and Bayesian network [14]. • Intelligent feature selection: The OPI is compatible with newly seen data and can be used to fill null values or only use subsets of available symptoms for screening COVID-19 and H1N1 patient from Neither COVID-19 Nor H1N1.

Impact and future applications
OPI is an algorithm that actively works with respiratory viruses' symptoms and screens the COVID-19 from H1N1 patients. Compared to similar research that developed only for COVID19 detection in patients, OPI can detect COVID-19 and H1N1 patients but discriminate between COVID-19 and H1N1 patients. OPI performance in case of true positive and true negative detection rate outperforms other ML and DL algorithms. The proposed models help the healthcare providers in pandemics by rapid screening and decreasing human interactions. OPI screening ability helps healthcare providers to tune the model to discriminate between various strains of COVID-19 too.
The future of OPI is made up of different possibilities. Developing an online application to gather more dataset and tune the OPI based on the new dataset. OPI can be the first response application to screen precisely the new variants of COVID-19. Another potential field for OPI can be seen changing the structure of OPI itself. Making the OPI shallow and decreasing the number of layers to decrease cost for training the modified OPI and increase the convergence to optimal solution.
Capability of OPI helps to disseminate other disease too. Thus, extending the screening possibilities to more than COVID-19, H1N1, and Neither COVID-19 Nor H1N1 is another path for OPI. Tuning OPI to screen H5N1, seasonal flu, B-Victoria influenza, COVID-19,  and Ebola from each other extends the possible applications for OPI. Due to the capability of OPI to discriminate between disease with similar symptoms, application of OPI will be extended to detect various variants of the same viral diseases.