Novel Method to Diagnose COVID-19: HNN of CNN and Bi-LSTM Using X-ray Images

: Coronavirus Disease (COVID-19) has caused a global pandemic and many of COVID-19’s key symptoms are related to the respiratory tract. In fact, the most relevant features correlated to the diagnosis of COVID-19 were found to be breathing problems and dry cough as determined by experimental results, produced when such a dataset was run through the random forest model with feature importance function. Therefore, using chest x-ray images labeled as COVID-19 and normal from kaggle, we developed a novel hybrid deep learning model incorporating CNN (convolutional neural network) and Bi-LSTM (bidirectional long short term memory) to detect symptoms of COVID-19. Our goal was to develop a model with the highest accuracy. As a total number of datasets were not enough to train the model, we augmented the input dataset through the “ImagedataGenerator” function from the Keras. Also, this proposed model ensures high accuracy as experimental results reported its average accuracy, which was tested with various optimizers (Adam, Nadam, Rmsprop, SGD), to be 98.13%. The new model showed the highest average accuracy compared to any other preexisting models (VGG-16, Resnet50, Resent50_v2, Mobilenet, Mobilenet_v2, Xception) also tested during this research. This model could potentially be used as an alternative process to diagnose COVID-19, especially with the number of global cases increasing, along with the need for efficient, quicker testing methods.


Background
As of January 2021, with 83 million cases around the world, Coronavirus Disease (COVID-19) has caused a global pandemic. COVID-19 has caused nearly 1.8 million deaths so far [1]. The virus in COVID-19 mainly spreads when a person coughs, sneezes, or speaks [2]. Therefore, it is crucial that patients with this virus are discovered before they spread the virus to more people. This virus was first discovered in the Wuhan province of China in December of 2019 [3]. Some of the key symptoms of this virus include difficulty breathing, shortness of breath, chest pain/pressure, dry cough, fever, and tiredness [4]. Since many of these symptoms are related to the chest area, chest radiography could be helpful in identifying COVID-19 patients with respiratory symptoms [5]. The chest x-ray is an imaging test using electromagnetic waves to diagnose diseases such as lung cancer, tuberculosis, pneumonia, and fibrosis (lung tissue scarring) [6].

Objective
Our experiment was aimed to develop a novel model to detect the COVID-19 virus using chest x-ray images. By comparing the novel model's accuracy with that of other pertained models, we aimed to develop a hybrid model with the highest accuracy. Also, this model would only utilize a small dataset to produce results with high accuracy, even without the application of other pretrained models, to diagnose COVID-19 more quickly and more efficiently than before.

Related Works
Since COVID-19 is a globally relevant issue at current state, there have been many past attempts to develop programs to diagnose and detect COVID-19 through chest xray or CT images. Yan, T. et al. used chest CT scans to develop an AI system that uses MSCNN to diagnose COVID-19 by differentiating images of healthy lungs from those affected by COVID-19 or pneumonia. Their AI program could differentiate CT pictures and determine whether it shows COVID-19 or pneumonia with AUC values of 0.962 (slice level) and 0.934 (scan level) [7]. Altan, A. and Karasu, S. developed a hybrid model including 2D curvet transformation, CSSA, and EfficientNet-B0 model, yielding a relatively higher accuracy of 99.69% to diagnose COVID-19 by using chest x-ray images [8]. Hassantabar, S. et al.

Prior Research
We downloaded relevant data about COVID-19 symptoms from kaggle to determine which features are predominantly correlated to the diagnosis of COVID-19. This is found at: https://www.kaggle.com/hemanthhari/symptoms-and-covidpresence. There were, in total, 19 features such as fever, abroad travel, diabetes, fatigue, and heart disease. By training the data with the random forest model, a type of bagging ensemble program, we could order the features by their importance [12]. The top three were breathing problems, dry cough, and travel abroad. We also reviewed the accuracy of such results by running the data through several different models, which also yielded similar results. Out of those models, the ensemble model produced the results with the highest accuracy, precision, recall, fl, and AUC score. For the random forest model, such scores were 98.41%, 98.79%, 99.24%, 99.01%, and 98% respectively.
TP denotes True Positive, TN denotes True Negative, FP denotes False Positive and FN denotes False Negative.

Data Description
We used Kaggle to download the dataset used in this research. The dataset can be found online at: https://www.kaggle.com/khoongweihao/covid19-xraydataset-train-test-sets. The dataset includes chest x-rays and CT scans with COVID-19 and other bacterial pneumonias that were used to train the developed algorithm to differentiate between these diseases. A training set consists of 74 normal images and 74 for COVID-19. A test set consists of 20 normal images and 20 COVID-19 images. Since the number of input images are relatively small, a "ImagedataGenerator" function from the Keras is used to augment the dataset.

Random Forest
A random forest is an ensemble algorithm that combines results from a number of individual learners. A decision tree model is created based on a bagging approach and works as an individual learner in the random forest [13]. Bagging refers to generating a tree by using a subset of the training set and proceeds in the following steps: each model learns the sample data from bootstrapping method; and combines the results by majority vote [14].

CNN
A convolutional neural network (CNN) mainly consists of 3 parts: the convolution layer, the pooling layer, and the fully connected layers (FC). Through the convolution layer, a filter, which is also known as a kernel, convolves the input image and makes a feature map. The output shape of the feature map is a three dimension. With the feature map, the pooling layer reduces the dimension of the data and computes a maximum or average feature value of each feature map. The main purpose of pooling is to summarize the feature map, so we could construct the model more deeply. The fully connected layers are the same as the basic neural network. This layer obtains input from the pooling layer and allows us to classify the target. If the target is binary, sigmoid is suitable for the activation function, and softmax for multi-class target [15].

LSTM
Long short term memory (LSTM) is one of recurrent neural networks (RNN). General deep neural network (DNN) fundamentally has a one-way network. This means that the input data passes through the nodes of the neural network only once. However, RNN has a different architecture. The output from the nodes in RNN becomes an input for the same nodes. RNN models have a shortcoming of exploding and vanishing gradient problems. LSTM solves these problems by including a "memory cell," which can conserve information for long periods of time. LSTM consists of an input gate, an output gate, and a "forget" gate.
First, the cell state receives an input data, and passes it through the sigmoid layer to decide whether to update the information or forget it through (5) and (6). Secondly, the tanh layer generates a ! " # , which updates the cell state (7).
Then, a new vector is made through (8). In this process, by multiplying $ # , the forget gates of LSTM decide whether to pass or forget the information through the previous stage. Then, it adds # * ! " # . Lastly, output gates determine the states based on the previous cell states through (9). Through (10), the final output can be obtained through a discriminative passage of information [16]. , # # * 5 , '! # 4 (10)

Bi-LSTM (Bidirectional-LSTM)
The RNN and LSTM can maintain past information in the hidden layers. However, as these models calculate the output in a sequential way, the outcome of the output gates is usually based on the previous cells. In order to solve this problem, bidirectional LSTM (Bi-LSTM) trains the model in both forward and reverse directions. The most prominent benefit of Bi-LSTM is that this model allows end-to-end learning, which trains the whole parameters while minimizing loss from the output [17].

Hybrid Neural Network (HNN)
Hybrid neural network (HNN) was proposed to classify COVID-19 cases. Our model consists of CNN and bidirectional LSTM (Bi-LSTM). The model has 13 layers, and in CNN layers, the features from the input image are extracted by convolution layers and by passing the pooling layer. The lambda layer reshapes the output from the pooling layer to transfer the output into Bi-LSTM. Then, the fully connected layer classifies the cases with the sigmoid function and "binary-cross entropy" function used for a loss function.

Experimental Results
In our experiment, we analyzed six other models excluding our model. These models were VGG-16, Renet-50, Mobilenet, Mobilenet_v2, Resnet50_v2, and Xception. We ran each of the models with four different optimizers: Adam, Nadam, Rmsprop, and SGD. Through this experimental process, we determined the best optimizer for each model. Selecting the best optimizer is extremely important: as shown in Figure 12, the accuracy score fluctuates greatly depending on the optimizer.

Limitations
One crucial limitation to note in this experiment is its dependence on respiratory symptoms of patients to detect COVID-19. In other words, if the patients do not show respiratory symptoms related to their chest (lungs), then our program cannot determine whether the patient has COVID-19, since the diagnosis depends solely on the chest x-ray images. Also, in regards to data augmentation, we didn't utilize models such as GAN to increase the amount of data, which could have helped increase our model's accuracy. Furthermore, the amount of dataset was limited, which could hinder the applicable scope of this proposed model.

Principal Findings
One of our principal findings is that our proposed model had the highest accuracy score of 98.13%, compared to the other models. Compared to other research, our result has higher accuracy [9,10,11]. In addition, our model used HNN, successfully combining CNN and Bi-LSTM. Another principal finding is that this method of identifying COVID-19 patients with chest x-rays quickens the diagnostic process. If the patient has respiratory symptoms, such as dry coughing and difficulty breathing, chest x-rays would be a better method of identification than the conventional RT-PCR based COVID test, since the results will be produced more quickly. At the fastest, x-ray results can come out in merely a few minutes while COVID tests can take several hours [18,19].

Conclusion
The main goal of our experiment was to develop an innovative model to identify COVID-19 patients using chest x-ray images. Although there were some crucial limitations to note, such as its dependence on respiratory symptoms of patients and limited usage of datasets and models, this program could still be applied effectively with its high average accuracy score compared to other researches and pretrained models. As the number of COVID-19 cases rapidly increases from day to day, faster diagnosis of this disease is crucial. Therefore, our model, which only requires chest x-ray images, will be a faster and efficient method of identifying COVID-19 patients.