Innovations in Stroke Identification: A Machine Learning-Based Diagnostic Model Using Neuroimages

Cerebrovascular diseases such as stroke are among the most common causes of death and disability worldwide and are preventable and treatable. Early detection of strokes and their rapid intervention play an important role in reducing the burden of disease and improving clinical outcomes. In recent years, machine learning methods have attracted a lot of attention as they can be used to detect strokes. The aim of this study is to identify reliable methods, algorithms, and features that help medical professionals make informed decisions about stroke treatment and prevention. To achieve this goal, we have developed an early stroke detection system based on CT images of the brain coupled with a genetic algorithm and a bidirectional long short-term Memory (BiLSTM) to detect strokes at a very early stage. For image classification, a genetic approach based on neural networks is used to select the most relevant features for classification. The BiLSTM model is then fed with these features. Cross-validation was used to evaluate the accuracy of the diagnostic system, precision, recall, F1 score, ROC (Receiver Operating Characteristic Curve), and AUC (Area Under The Curve). All of these metrics were used to determine the system’s overall effectiveness. The proposed diagnostic system achieved an accuracy of 96.5%. We also compared the performance of the proposed model with Logistic Regression, Decision Trees, Random Forests, Naive Bayes, and Support Vector Machines. With the proposed diagnosis system, physicians can make an informed decision about stroke.


I. INTRODUCTION
A stroke occurs when the blood supply to the brain is blocked or a blood vessel in the brain bursts.It is the most common The associate editor coordinating the review of this manuscript and approving it for publication was Kumaradevan Punithakumar .cause of death worldwide, causing over 6.2 million deaths annually [1].Survivors often suffer from disabilities that severely impair their quality of life.Preventive measures and timely intervention can help to reduce the severity of stroke and its impact on the individual.Early identification of people at risk is crucial for stroke prevention [2].There are two types of stroke: ischemic stroke and hemorrhage-related stroke.About 87% of strokes are ischemic strokes, the most common type [3].When a blood vessel supplying blood to the brain is blocked or narrowed, blood flow to a specific part of the brain is reduced or interrupted.The blockage may be caused by a blood clot, cholesterol deposits, or other debris entering the brain from other parts of the body [4].Strokes caused by hemorrhages are less common, but they are more serious and often fatal if not treated properly.A cerebral hemorrhage occurs when a blood vessel in the brain bursts or leaks, causing blood to leak into the surrounding brain tissue.This leads to swelling and pressure on the brain structures.This can damage brain cells and disrupt normal brain function [5].
This study uses machine learning techniques to develop a systematic method for stroke detection.The study's main aim is to understand the causes of strokes better and create reliable detection models that help physicians make informed decisions about stroke prevention and treatment.The study will analyze electronic health records, genetic information, and lifestyle data to develop predictive models identifying individuals at risk of stroke.The research will use feature selection algorithms to extract valuable insights from the data and improve detection performance.A machine learning model will also support clinicians.
The aim of this study is to evaluate the effectiveness, clarity, adaptability, and scalability of the proposed algorithms.The proposed models were compared with established clinical risk detection approaches using numerous real-world datasets to determine their comparative performance.This study can provide valuable insights for clinical practice and tailored interventions to reduce the impact of stroke on patients and the healthcare system.The aim of this study is to use machine learning techniques to predict the frequency of strokes and ultimately solve the problem of stroke occurrence.This study uses advanced machine learning techniques to improve the accuracy and comprehensibility of stroke detection models.The results of this study have the potential to revolutionize stroke prevention by enabling precise interventions to prevent this debilitating disease in the future, thus improving treatment outcomes for patients suffering from this debilitating disease.The key contributions of this study are listed below: 1) This study presents a diagnostic system for stroke detection using an image-based dataset.
2) The proposed diagnostic system extracts useful features from the CT images via genetically optimized CNN. 3) LSTM, BiLSTM, and genetically optimized CNNs were compared for classifying strokes based on extracted features.4) The performance of the proposed diagnostic system (GA_BiLSTM) is also compared with other ML and DL methods.5) The proposed system aims to aid healthcare professionals in making informed decisions about stroke treatment and prevention by providing early detection.

II. RELATED WORKS
Machine learning algorithms have been used to develop highly accurate stroke risk detection models.These models use historical data from electronic medical records to predict stroke risk in hypertensive patients [6].Various machine learning algorithms, such as Extreme Gradient Boosting (XGBoost), were used to achieve optimal performance in predicting stroke risk [7], [8].The use of machine learning models, including ensemble models that combine different approaches, has shown promising results in identifying individuals at high risk of stroke [9].The authors of [10] thoroughly review skull stripping techniques, including more modern deep learning-based techniques.This review divides the existing approaches to skull stripping into two categories: Deep learning or convolutional neural networks and traditional or classical approaches.Several techniques are emphasized for their potential as they can be integrated into common clinical imaging techniques.
The authors in [11] present a time-based link prediction model called TDRL that uses deep reinforcement learning techniques to learn from a real-world evolving crime dataset.The experiments show that the TDRL model trained on a temporal dataset has better prediction accuracy than other machine learning models trained on a single point in time.Although the TDRL-CNA model accurately predicted most edges in the network topology during the year of the bombing, it failed to predict disappearing edges.Feature analysis revealed that the TDRL-CNA model was least affected by learning based on the removed edges.
Criminal network analysis (CNA) is difficult due to incomplete datasets, and most machine learning techniques rely on supervised learning.The authors investigated the use of deep reinforcement learning (DRL) to build a model for predicting hidden connections in criminal networks.The results show that this approach performs better than traditional supervised machine learning techniques [12].
A study in [13] examined clinical brain data CT and predicted multiple stroke scores after 24 hours or a Modified Rankin Scale score from 0 to 1 over 90 days (''mRS90'') using a National Institutes of Health-derived CNN hybrid structure for artificial neural networks.With this structure, they achieved a detection accuracy of 74% for the mRS90.
An integrated wavelet entropy-based spider network graph was used with a probabilistic neural network to classify MRI images of the brain into normal brains, strokes, and degenerative diseases [14].The authors systematically examined diseases, infectious diseases, and brain tumors as part of their study.The first step was to use a discrete wavelet transform to process brain images in two dimensions (2D).They extracted features using spider web diagrams and classified them using a probabilistic neural network.They reported that they achieved a classification accuracy of 100%.
The authors of [15] and [16] want to improve the diagnosis and management of strokes by analyzing various factors in electronic health records.To better predict strokes, they use statistics and principal component analysis.Strokes are most commonly found in patients with advanced age, heart disease, average blood sugar levels, and high blood pressure.The paper also suggests using a perceptron neural network with these four attributes to achieve the highest accuracy and lowest error rate compared to other benchmarking algorithms.In addition, the authors address the problem of unbalanced datasets by presenting results on a balanced dataset created using sub-sampling techniques.
The deep learning framework proposed in [17] has been shown to be highly accurate in detecting different subtypes of intracranial hemorrhage (ICH) in CT images of the head.The system achieves an average accuracy of 96.21% for three types of hemorrhages -epidural, subdural, and intraparenchymal.Compared to existing work, the false positive rate is significantly reduced.In addition, the system includes a quantitative scoring algorithm that automatically measures the thickness and volume of hemorrhagic lesions.This enables clinically relevant quantification, which is important for the decision on emergency surgical treatment.
In [18], a hybrid feature selection approach uses transformed CT image features and grayscale co-occurrence matrix texture features.Features are extracted using discrete wavelet transforms, discrete cosine curves, and GLCMs.The machine learning algorithms Random Tree, Random Forest, and REPTree are used for classification, with Random Forest achieving the highest accuracy of 87.97% for the combination of discrete wavelet transforms and GLCM features.
In [19], an approach to classify CT images with intracranial hemorrhages using machine learning techniques is presented [19].A set of common features consists of the Gray-Level Co-Occurrence Matrix (GLCM), Discrete Wavelet Techniques (DWT), and Discrete Cosine Techniques (DCT).SMOTE is used to solve the oversampling problem, and sequential forward selection of features is used to obtain subsets of features.Classification accuracy is evaluated using a confusion matrix, precision, and recall.Random Forest achieved the highest accuracy of 87.22 percent in combination with the proposed feature extraction mechanism.
In [20], the authors measure the performance of a deep learning model for detecting intracranial hemorrhage on CT head scans and compare the effects of different preprocessing and model design methods.Implementing preprocessing techniques and a CNN-RNN framework significantly improved the model's performance and demonstrated its potential as a radiologist decision-support tool.
Based on the literature review conducted, we found that current research can classify strokes with less accuracy.Moreover, the proposed methods were very computationally intensive.However, we propose a diagnostic system that uses a genetic algorithm with bidirectional long short-term memory (BiLSTM) to predict strokes by analyzing brain images on a CT scan.The proposed method solves the problems of lower accuracy and higher computational complexity of the previously proposed models.

III. METHODOLOGY
This section will discuss the methodology, we adopted in this study and the framework we have employed for this research.The proposed framework is shown in Figure 1.The framework describes the architecture of the proposed computer-aided stroke diagnosis system.This benchmark dataset is loaded into the system and divided into two subdatasets: the training and validation datasets.To split the dataset, we use holdout cross-validation.We randomly select 70% of the images from five classes to train the model and split the remaining data.To test the performance of the proposed model, 30% of the images with the corresponding labels are used as validation sets.This study extracts robust and non-invariant features from RGB images using five advanced convolutional network architectures.These architectures include AlexNet, NASNet-Large, VGG-19, Inception V3 and ShuffleNet to extract features from training and validation images.The proposed feature extraction system takes an image as input to the CNN model and extracts a feature vector of 1000 features from the last fully connected layer of the CNN model.CNN models consist of two parts: Feature extraction and classification.For the proposed feature extraction system, an image is used as input.Genetic algorithms based on tournament selection are proposed to determine the ranking of features in terms of their optimal and non-optimal ranking.The vectors of training and validation features are analyzed to remove non-optimal attributes.

A. CNN ARCHITECTURE
CNN is a type of network design commonly used in deep learning algorithms and is mainly used in image recognition and pixel processing to analyze images [21], [22].Various CNN models and transfer learning [23], [24] approaches have been used to categorize patients with diabetic retinopathy (AlexNet, Inception V3, NASNet-Large, ShuffleNet, and VGG 19). Figure 1 shows that the models and genetic algorithms have adapted to systematically select features [25].

1) AlexNeT
The CNN model has about 650000 neurons and 60 million parameters.Many components are used in AlexNet, including fully connected layers, softmax activation, convolutional filters and ReLU transfer functions.AlexNet was introduced in 2012 by Alex Krizhevsky.By adjusting the number of filters and layers in AlexNet, different levels of efficiency can be achieved.Different effects can be achieved by connecting layers in a way that changes the input size.The connections between the layers can be set to different effect strengths.Neural networks consist of neurons that have weights and biases, which makes them convolutional neural networks.The architecture of AlexNet can be seen in Figure 2, which illustrates the architecture of AlexNet by giving an overview of the inputs, adding weighted amounts, and then activating, transmitting, and releasing the neurons.

2) INCEPTION V3
In 2014, Google developed a CNN architecture that can estimate the local sparsity of a network by assembling several available modules.Using these complex modules, the network can estimate the optimal local sparsity.In December 2015, Szegedy released an improved version of the Inception V3 algorithm.Its performance is much better than that of the benchmark.It can identify objects, recognize human actions, segment videos, track objects and identify moving objects.By using convolutional factorizations and auxiliary classifiers, Inception V3 allows the grid size to be reduced to the absolute minimum.The network filtering activation scale is extended to prevent a display bottleneck before maximum or average pooling is used.Auxiliary classifiers can improve accuracy and provide insight into the network.The architecture of Inception V3 can be illustrated in Figure 3.

3) VGG 19
A number of networks are used in the analysis of the CNN-based ImageNet dataset, including the VGGNet network, which stands for Visual Geometry Group Networks.Figure 4 illustrates the VGG 19 network, a simple but versatile network for reducing the volume of datasets.It is a popular imaging method widely used in medical research and commercial imaging applications because it has convolutional layers at the top and max-pooling stages that reduce the volume.

4) NASNet-LARGE
Artificial neural networks (ANNs) have been influenced by human biases even though they offer valuable insights, even though their architecture is flawed [26].It is evident from Figure 5 that NASNet-Large (Google's algorithm for finding the optimal combination of features in a search space) produces extraordinary results when applied to large datasets, such as ImageNet.

5) ShuffleNet
This architecture was developed specifically for mobile devices in 2017.The ShuffleNet architecture can be seen in    Convolutional methods are used within a network to speed up computations, and shuffled paths are used to reduce the size of the network, which means that the network will perform more accurately.

B. GENETIC ALGORITHM-BASED FEATURE SELECTION
The genetic algorithm is a metaheuristic method often used for feature selection in deep learning research.This method aims to emulate the selection, mutation and crossover processes of nature in order to find the most reliable and distinct traits while reducing the complexity of the trait space.In the first step, the proposed system generates a random uniform population.The following equation defines the chromosomes as gene features, each of which is assigned a real number.The following equation illustrates how chromosomes are represented [27], [28], [29].

C. CONVENTIONAL LSTM
A typical LSTM analyzes and records information as it propagates, similar to an RNN.An LSTM has a core composed of different gates and cell states, with different cell activities allowing it to ignore or store information depending on the activity level [30].Different neural networks act as gates and control the information that can be applied to a cell's state during the processing procedure and the way in which it is applied.The state of the cell is a memory channel that is used to transmit relevant data during the processing of the cell.A gate learns which information to store and which to ignore during the training process by the process of training.LSTM cells use input gates output gates, and forget gates to communicate information.A gate determines which information is added to the current state, which is saved from the previous state, and which is added to the next state.An example of an LSTM architecture can be found in Figure 7.The following equations describe the inputs and where the input gate is represented by ζ ι , the input vector is denoted by ϱ, the output gate is ϕ, the output is ν ι , and the forgetting function is represented by η ι .Cell state is expressed as γ ι , where γ and κ define bias and weight, respectively.

1) BIDIRECTIONAL LSTM (BiLSTM)
The use of bidirectional LSTMs as a supplement to conventional LSTMs improves classification performance.
Two LSTMs are trained with the input data.Two sets of input data were trained, one with the original input data and one with the reversed input data.This makes the network more meaningful, and the results are obtained quickly.
It is quite straightforward to understand how the BiLSTM works.Creating a duplicate recurrent layer in the network is necessary, forwarding the input data from the original layer to the duplicate layer in reverse order before returning to the original layer.In conventional RNNs, there are vanishing gradients [31] due to this concept.The BiLSTM is trained over a period of time using all available past and present data for the training period.BiLSTMs are trained with both forward and backward shifts of the input data (from left to right and from right to left).Python's Keras library implements BiLSTMs as a bidirectional layer wrapper that accepts an LSTM layer as input.A combined forward and backward output can be sent to the next layer by specifying the fusion mode, as shown in Figure 8.It is derived from the forward hidden layer − → λ τ and the backward hidden layer ← − λ τ as follows: [32]: The hidden layer is represented by l, and the matrices of the input weights (forward, backward) and the vectors of the hidden weight bias for both directions are denoted by ς.These vectors are given by κ(κ− → l and κ← − l ).

IV. RESULTS AND DISCUSSION
The data sets used in this study, and the experimental evaluations that show the value of the proposed model are presented in this part.Researchers have used a number of validation techniques for statistical evaluation and validation of machine learning models.Some of these are holdout, k-fold cross-validation, and leave-one-out (LOO) cross-validation.However, the main drawback of holdout validation on small datasets is that the training dataset may not accurately reflect the distribution of the dataset; as a result, the results of this method would be biased.Therefore, in situations where only a small amount of data is available, cross-validation is considered the most practical validation scheme [33], [34], [35].In this way, we can avoid overfitting and obtain an accurate estimate of the model's performance [36], [37], [38].
Following previous research, we used the ten-fold crossvalidation scheme as well as accuracy, precision, recall, and F1-score as evaluation metrics to evaluate the classification results of the proposed model.

A. DATASET DETAILS
The data set used in this study was obtained from Kaggle [39].
The aim of the study was to identify risk factors for stroke, including age, gender, smoking, diabetes and high blood pressure.It included 100 stroke patients aged 16 years  and older, 68% of whom were men and 32% of whom were women.Each patient had CT images of the brain classified as normal or stroke; there were 1551 normal and 950 stroke images.The normal images were also taken from the same patients before the stroke occurred.The images were in grayscale and had a size of 650 × 650 pixels.To avoid overfitting during training, the data set was randomly equalised.The result was a new data set with 950 normal and 950 stroke images, each with a resolution of 227 × 227 pixels.
Following is a definition of used evaluation metrics are given as follows:  where TP stands for the number of true positives, FP for the number of false positives, TN for the number of true negatives and FN for the number of false negatives.We also used the Windows 10 operating system, which has 32 GB of RAM and an Intel Core TM i7-8250U CPU with 2 GHz.The Python version 3.7.0software package was published via the Anaconda Spyder integrated development environment (IDE).

C. EXPERIMENTAL RESULTS AND DISCUSSION
This section summarizes the results and identifies the baseline models that are compared with the proposed model.We compare the performance of the proposed model with different Machine Learning (ML) classifiers and Deep Learning (DL) methods to evaluate its performance.In this research, all algorithms were used with their default values.Tables 1 and 2 show the results of all ML and DL classifiers used in the study.Table 1 shows that the Support Vector Machine outperforms all ML-based classifiers in terms of diagnosis with 91.45% accuracy on the dataset.In contrast, the worst classifier for the diagnosis dataset is Naive Bayes, with an accuracy of 66.21%.Among the DL-based classifiers, DNN performs well with an accuracy of 95.78% for the diagnosis dataset, compared to ANN with an accuracy of 92.50% and RNN with an accuracy of 93.66%, as shown in Table 2.
To solve the problem of uneven distribution of data and small sample size, we evaluated the experiments of the proposed model where the features extracted from the NN-based genetic algorithm are fed into the LSTM and BiLSTM for stroke detection.
We performed two further experiments using a neural network-based genetic algorithm to extract features from the brain images.In the first experiment, the LSTM was used to classify stroke patients.The best features are selected based on a threshold set after ranking the features.The best-extracted features from the neural network-based genetic algorithm were fed into the LSTM.To evaluate the performance of the GA_LSTM model, we used a cross-validation scheme (K=5) based on the Receiver Operating Characteristic Curve (ROC) [35], [44], [45], [46].Figure 9 shows the area under the curve (AUC) of 95% achieved by the GA_LSTM model.
In the next experiments, we used the BiLSTM model with the main features of the neural network-based genetic algorithm; therefore, we named the proposed model GA_BiLSTM.From Figure 10, it's evident that GA_BiLSTM achieved the highest AUC on the ROC curve.In addition, we also evaluated the accuracy performance of the newly developed model(GA_BiLSTM), which is shown in Figure 11.Furthermore, we have also evaluated the performance of the GA_BiLSTM model along with the GA_LSTM based on accuracy, precision, recall, and F1-score, as given in Table 3. From Table 3, it can be seen that the proposed GA_BiLSTM model shows better performance in comparison to GA_LSTM model as well as other DL models 2 and other ML models from Table 1.

D. PREVIOUSLY PROPOSED METHODS FOR STROKE PREDICTION
In this section, we discuss the performance of a newly proposed method for stroke detection and compare it with various machine learning-based methods that researchers have proposed in the recent past.We compared the classification accuracy of the proposed method with other methods that used the same Kaggle dataset of brain CT images for stroke prediction.The comparison of accuracy between the proposed method (GA_BiLSTM) and other methods can be found in Table 4.It is worth mentioning that the newly proposed method has shown a significant improvement in accuracy compared to the studies of researchers (10) who have used machine learning and deep learning techniques for stroke prediction.

V. CONCLUSION
This study proposes a method for stroke detection using machine learning techniques.An image-based dataset is used to validate the performance of the newly developed model.The proposed model is based on a genetic algorithm and BiLSTM.A genetic algorithm based on a neural network is applied to recognize the key features of CT brain images.These features are input into the LSTM and BiLSTM models for stroke prediction.The performance of different K-folds was evaluated to determine which is the most effective classification.We also tested different machine-learning algorithms for stroke prediction.The results of the experiment show that the proposed machine-learning model is more efficient than other models.To improve stroke detection in the future, we aim to use more complex models that can predict strokes automatically.This study used deep learning models on a modest dataset, with large datasets generally performing better.Therefore, to improve the performance of the model, we need to collect more samples in the future to achieve better results.In addition, data quality plays an important role in the performance of deep learning models.So, we need to develop new methods that will help improve the data quality in the future.It is also necessary to build trust among healthcare professionals through explainable AI techniques to explain the model's decision-making processes.In the future, we will develop these explainable AI methods to help healthcare professionals make more informed decisions based on these AI results.

FIGURE 1 .
FIGURE 1. Framework of the proposed model.

Figure 6 ,
Figure 6, which is illustrated below.Megvii Inc. research group members worked on the ShuffleNet architecture in Convolutional methods are used within a network to speed up computations, and shuffled paths are used to reduce the size of the network, which means that the network will perform more accurately.
outputs at time ι and time ι-1.

TABLE 1 .
Performance of ML classifiers.

TABLE 2 .
Performance of DL classifiers.

TABLE 3 .
Performance of proposed work.

TABLE 4 .
Performance comparison between the proposed method and the methods presented in literature.