Diagnosis and classification of Alzheimer's disease by using a convolution neural network algorithm

Alzheimer's disease (AD) is a high-risk and atrophic neurological illness that slowly and gradually destroys brain cells (i.e. neurons). As the most common type of amentia, AD affects 60–65% of all people with amentia and poses major health dangers to middle-aged and elderly people. For classification of AD in the early stage, classification systems and computer-aided diagnostic techniques have been developed. Previously, machine learning approaches were applied to develop diagnostic systems by extracting features from neural images. Currently, deep learning approaches have been used in many real-time medical imaging applications. In this study, two deep neural network techniques, AlexNet and Restnet50, were applied for the classification and recognition of AD. The data used in this study to evaluate and test the proposed model included those from brain magnetic resonance imaging (MRI) images collected from the Kaggle website. A convolutional neural network (CNN) algorithm was applied to classify AD efficiently. CNNs were pre-trained using AlexNet and Restnet50 transfer learning models. The results of this experimentation showed that the proposed method is superior to the existing systems in terms of detection accuracy. The AlexNet model achieved outstanding performance based on five evaluation metrics (accuracy, F1 score, precision, sensitivity, and specificity) for the brain MRI datasets. AlexNet displayed an accuracy of 94.53%, specificity of 98.21%, F1 score of 94.12%, and sensitivity of 100%, outperforming Restnet50. The proposed method can help improve CAD methods for AD in medical investigations.


Introduction
Alzheimer's disease (AD) is a noetic disease that affects the elderly. It is a neurodegenerative disease that destroys nerve cells in the brain, thereby impeding daily routines and thinking processes (Beheshti et al. 2017;Klöppel et al. 2008). In the early stages of the disease, short-term memory loss is observed; as the disease progresses, behavioural and cognitive functions are lost (Alzheimer's Association 2018). Degenerative disorders often appear at the age of C 60 years, but AD has been diagnosed early in individuals between the ages of 40 and 50 years. One of the goals of neuroscience is to identify biomarkers for early detection of AD and to determine its treatment response. AD is due to gradual atrophy of the cerebral cortex (VanMeter and Hubert 2013). The number of patients with AD is increasing continuously. According to Alzheimer's disease international (ADI) reports (Prince 2015), the total number of people with AD was 46.8 million in 2015 (Prince 2015), which increased to 50 million in 2018 (Patterson 2018). According to the 2018 ADI report, the number of people with AD is expected to increase to 152 million by 2050 (Patterson 2018). According to medical reports, no optimal treatment is currently available for AD, but medicines have been industrialised to inhibit or stop the evolution of the disease (Lahiri et al. 2002). Therefore, in the absence of medicines for AD, early diagnosis of the disease is essential for inhibiting its progression. Magnetic resonance imaging (MRI) is used to detect early AD by examining the internal structures and identifying soft tissues of the brain. MRI helps to recognise brain disorders such as AD. The anatomical changes of the brain can also be measured by segmenting MRI scans at different times. Tissue atrophy is an important precursor of AD. Therefore, the exact recognition and diagnosis of abnormal soft tissues and nearby healthy tissues are essential for diagnosing AD. Large amounts of data are required to obtain high diagnostic accuracy. However, manual extraction and analysis of large and complex data from MRI scans are difficult for clinicians. In addition, owing to the inconsistency between the soft tissues and surrounding tissues, manual analysis requires a long time and is more prone to errors (Despotović et al. 2015). Hence, the development of computer-aided systems is imperative for the early detection and diagnosis of AD with high accuracy and confidence. Artificial intelligence-based techniques have been used to segment, analyse and interpret MRI scans with high accuracy. Several machine learning systems have been developed to segment and classify brain tissue types into white matter, cerebrospinal fluid (CSF) and grey matter (GM). Segmentation of the lesion area and extraction of colour and textural features from MRI scans using machine learning techniques are challenging because of the severity of tissue damage, contrast irregularity, noise, and partial volume effect. Moreover, the use of a large dataset leads to lower machine learning technique performance. These difficulties can be overcome by using deep learning-based approaches for the prompt analysis of large datasets of AD, with high accuracy and reliability. Deep learning networks are also useful for analysing MRI scans of the brain, with self-learning of features to identify new features and extract the most critical representative features. Deep learning techniques have been used for analysing and interpreting medical images and supporting physicians and radiologists in making diagnostic decisions. Fulton et al. (2019) proposed a ResNet50 model that can be used for clinical dementia rating (CDR). The system achieved 98.99% accuracy in diagnosing three classes (Fulton et al. 2019). Maqsood et al. (2019) presented a system for diagnosing AD using the transfer learning method and fine-tuned AlexNet convolutional neural network (CNN) parameters. The model was evaluated using the Open Access Series of Imaging Studies dataset, and the network reached an accuracy of 92.85% for multiclass classification (Maqsood et al. 2019). Yamanakkanavar et al. (2020 presented an approach for segmenting brain MRI scans using deep learning models. The CNN architecture helps analyse internal (anatomical) brain structures and enhances AD classification (Yamanakkanavar et al. 2020). Lella et al. (2020) developed a machine learning system to extract and analyse the critical features of AD using connecting ability at the whole-brain level. Three learning techniques were applied to compare the Alzheimer's disease neuroimaging initiative (ADNI) dataset with healthy subjects and achieved good results. The results confirmed that structural communicability in the whole brain has valuable markers for diagnosing disease states (Lella et al. 2020). Song et al. (2021) developed a system for diagnosing AD and extracting features three separate times (63, 29 and 22 features). The ADNI database was evaluated using the random forest, multiple layer perception and CNN networks, obtaining accuracies of 90.2%, 89.6% and 90.5%, respectively, with the networks achieving the best results using 63 features (Song et al. 2021). Guerrero et al. (2014) applied the sparse regression method to select the region of interest (ROI) and separate the disease area from healthy regions. Features were extracted from the ROI on the basis of the variability of the lesion area. According to the results of their experiments, the accuracy obtained from the system was 71% (Guerrero et al. 2014). Plocharski et al. (2016) presented a model for extracting medical features using a medical superficial sulcal pattern that distinguishes patients with AD from healthy people. These features were classified, and the system achieved an accuracy, sensitivity and specificity of 87.9%, 90% and 86.7%, respectively (Plocharski et al. 2016). Ahmed et al. (2015) presented circular harmonic functions to mine the most important local characteristics from the posterior cingulate cortex and hippocampus regions of the brain. The system achieved an accuracy, a sensitivity and a specificity of 62.07%, 49.02% and 75.15%, respectively (Ahmed et al. 2015). Gupta et al. (2013) used a sparse auto-encoder to investigate patches from lesion areas by using convolutional layers (Gupta et al. 2013). Beheshti et al. (2016) used the Fisher criterion to extract the top features. For the classification process, the voxel-based morphometric technique was applied to match the differences between the global and local features that distinguish patients with AD from healthy subjects (Beheshti et al. 2016). The main contribution of the present study includes the following: • Used advanced artificial intelligence such as deep learning neural networks for diagnosing AD. • By comparing the two deep-learning transfer models, we approved the AlexNet transfer model as appropriate for the analysis of AD.

Materials
The dataset evaluated in this research work included brain MRI scans collected from the Kaggle Alzheimer's classification dataset (KACD); 1,279 MRI scans were used to test the system. The scans were divided into MildDemented (179), ModerateDemented (12), NonDemented (640), and VeryMildDemented (448). Figure 1 shows the samples of the brain MRI scans in JPG format. The resolution of the images is 208X176. 3 Methodology The diagnostic system for classifying AD is presented in Fig. 2.

Deep neural network
Neural network techniques are the fundamental basis on which deep learning can depend, which denotes the use of artificial neural networks (ANNs) with different layers.
Recently, deep learning has been reflected as one of the prevailing tools, and its widespread use due to its capability to address large volumes of data has been reported in the literature. The concentration requiring deeper hidden layers has been newly initiated to exceed the performance of traditional approaches in dissimilar research areas, particularly in pattern and image classifications (Aleid et al. 2021). The CNN can be considered one of the most common deep neural networks. As its name suggests, the convolutional layer is a layer in the CNN technique and a mathematical operation for performing feature extraction. CNN has various layers, including convolutional, non-linearity, pooling, and fully connected layers. The convolutional and fully connected layers have factors, but the pooling and non-linearity layers do not have parameters (Aldhyani et al. 2020a). The CNN layers are as follows:

Convolutional layer
The convolution for one pixel can be calculated through the convolutional layer using Eq. 1.
where net(i,j) is the yielding of the convolutional layer that forward it to the following layer, x indicates the input data composed of a set of images, w is the kernel or filter matrix, and the asterisk represents the convolution process. The element-by-element product of the input and kernel is calculated and grouped and then expressed as the analogous point in the succeeding layer. Figure 3 shows the convolutional layer.

Nonlinearity
After the mathematical operation was performed through the convolutional layer, the output of the process was forwarded to the next layer, which is the non-linearity layer. This layer can be used to correct or cut the formed output. However, this layer is used to saturate or limit the output. The non-linearity layer is permanently embedded in the convolution layer (Aldhyani et al. 2020b;Alsaade et al. 2021). In the last two decades, two activation functions, sigmoid and tanh, have been mostly applied in deep learning techniques. Figure 3 displays the two types of non-linearity activation functions. However, the rectified linear unit (ReLU) has simpler descriptions of both the functions and gradient, as shown in the following two equations:

Pooling layer
Pooling is used in CNN for two reasons. First, the output feature map of pooling has a fixed size, which is required for the classification. For example, applying max pooling to each of 256 filters will result in a 256-dimensional output, regardless of the size of the filters. Second, the essential task in pooling layers is down-sampling to decrease the data dimensionality and thereby save data training time for further layers in the network. In image handling systems, the pooling layer can be investigated and used for resolution reduction. Pooling does not include the number of filters.

Fully connected layer
After the pooling layer, the next layer is the fully connected layer, which is used to connect and arrange all neurons in a traditional neural network. Consequently, each neuron in a fully connected layer is exactly linked to each neuron in both the preceding and subsequent layers. This layer is the most common parameter used with the CNN technique.
With the help of this layer, the data training time for the CNN can be shortened. The major shortcoming of a fully connected layer is that it requires various considerations that entail a more complex computation of training samples. Consequently, we excluded the number of neurons and connections. Thus, the excluded neurons and connections can be performed by using the dropout layer. For instance, LeNet and AlexNet are intended as deep and extensive networks, although observance of the complexity of time can be fixed. Figure 4 displays a fully connected neural network.

Softmax layer
The last layer in the presented model is the softmax layer, which is used to compute the probability distribution of Ndimensional vectors for the input images. The primary function of using softmax at the output layer in this model is for multiclass classification in deep learning-based models. Accurate calculation of the output probability can help in deciding the appropriate and corrected target class for the input image. The softmax function, which is usually and primarily used in the output layer, is the standardised exponent of the output values. The softmax layer is differentiable and denotes some probability of the output. Furthermore, the exponential element increases the probability of the maximum values. Equation 4 expresses the softmax function as follows: where O i is the softmax output number i, z i is the output i before the softmax and M represents the overall amount of output neurons. Figure 5 shows the location of the softmax layer in the network.
In the present study, two transfer-CNN models, AlexNet and Restnet50, are proposed for the classification and detection of AD.

ResNet50 model
ResNet50 is a deep learning classification and residual CNN model consisting of 177 layers. The primary issues with deep networks, however, include complexity in training, significant training fault and vanishing gradients, which cause learning to be minimal at the earliest layers during the backpropagation phase. By utilising a deep residual learning module via improved uniqueness transformations, the deep ResNet configuration overcomes the problem of vanishing gradient Senan et al. 2020). The residual module employs a direct connection between input and output, and each loaded layer generates a residual mapping instead of directly fitting a chosen original mapping. The ReLU was used, and the fully connected layer received 9216 features. The softmax layer produces four classes. Figure 6 shows the ResNet50 architectural model. CNNs have several layers for detecting various features of input images through each layer learning. At different resolutions, filters are applied to each trained image, and the outcome of each convolved image is utilised in the next layer as input. We used the CNNs for disease detection based on the extracted features from the input disease. Our aim in using the CNNs for skin disease detection was to improve the recognition results and compare with the ANN algorithms. Then, through experimentation, we presented the optimal architecture based on the results. Selecting the frame length determines only the input dimension of our method. The second challenge was to find an optimal architecture for CNNs. Therefore, first, we defined the input and output structures of the network. The ResNet50 parameters are presented in Table 1.

AlexNet model
AlexNet is a CNN model consisting of 34 layers. AlexNet won in the ImageNet classification competition in 2012, with a top-5 error rate of 15.3%. Figure 7 illustrates the architecture of the AlexNet used to classify 1,279 images divided into four diseases from the lower digestive system. The architecture of AlexNet consists of 34 layers. Table 2 shows the parameters of AlexNet Model.

Experiment environment setup
For developing a diagnostic system for AD, the appropriate approaches to obtain superior accuracy should be identified. The experiments were conducted using different environment hardware and software. Table 3 presents the environment setting of the system used.
The results of the experimentation in this study were obtained from testing and evaluating the proposed system. Different measurement metrics such as precision, specificity, sensitivity, accuracy, and F1 score were used to measure the effective performance of the diagnostic model for AD. The comprehensive explanations of the experimental results obtained with the proposed system are as follows.

Performance measurement metrics
Performance measurement was used to examine the proposed diagnostic system for AD. The metrics used for evaluating the performance of the proposed system for AD assessment and diagnosis are accuracy, sensitivity, specificity, precision, recall, and F1 score. The equations for these metrics are as follows: Recall where TP represents true positive; FP, false positive; TN, true-negative images; and FN, a false negative imaging rate.

Experimentation results of the proposed deep learning-based model
This subsection presents the experimental results of ResNet50 and AlexNet as proposed models for the classification of AD. The cross-validation method was applied to test the ResNet50 system; we used a cross-validation model with a fivefold output. The AlexNet model distributed the data into 20% as the testing set and 80% as the training set. The main reason for using two validation methods was to determine the best method for developing a diagnostic system. The input size was 244 9 244 9 3 matrix. The softmax function was used to classify AD into four classes. The ResNet50 model has 177 hidden layers and a mini-batch size of 1, whereas the learning rate and bias learning rate parameters were defined by the value of 20; the epoch value was 10. By contrast, the CNN AlexNet model relies on significant CNN parameters such as hidden layers, filter size and the various filters used in the convolutional layer. The AlexNet model had 25 layers, and 10 epochs were used. Table 4 displays the performance of an AD detection system using the ResNet50 and AlexNet models. The number of AD feature maps equals the number of filters employed.
As a result, the AlexNet model attained higher accuracy and thus plays an important role in the proposed model. Figure 8 illustrates the confusion matrices of the AlexNet and ResNet50 models. The AlexNet model showed 94.53% accuracy, 100% sensitivity, 98.21% specificity, 88.89% precision, and an F1 score of 94.12%. Figure 9 shows the classification accuracy and loss values obtained using the AlexNet model. A comparative classification of the results between the ResNet50 and AlexNet models is presented. The ResNet50 model outperformed the AlexNet model. Figure 10 shows the curves for the area under the curve (AUC) and receiver-operating characteristic (ROC) metrics of the AlexNet model for the used datasets. The graphical exemplification demonstrates the effective classification; the false positivity rate was low. The blue line indicates the detection rate, which was high. This means that the results of the AlexNet model provided a satisfactory multiclass ROC curve and achieved a statistically substantial AUC value of 99.1%.

Discussion and comparison
AD is a progressive dementia, which causes loss of connection between nerve cells in the elderly. Owing to AD, the brain shrinks, the hippocampal size decreases, and the brain ventricles become enlarged. As AD progresses, it debases the memory, thinking ability and expressions in response to problems in day-to-day activities. Understanding AD, mild cognitive impairment (MCI) and cognitive normal (CN) manifestation is one of the most challenging tasks faced by neurologists over the past few years. Physicians use different clinical methodologies to classify AD. Clinically, CSF concentration is an indicator of AD. The norepinephrine level increases in the CSF as the disease progresses. The CSF sample is collected using a ventricular puncture, wherein the physician makes a hole in the skull and collects CSF directly from one of the brain ventricles. It is a laborious procedure and may confer a risk of bleeding in the brain.
The artificial intelligence framework has attained superior success in many real-life head care systems. Developing an alternative model to the AD diagnostic system is the main objective of many researchers. In this study, we developed a health-care system that can help detect AD in its early stage by using advanced deep learning approaches. The comparison of the AD diagnostic system with the existing system is summarised in Table 5. Figure 11 shows the comparison results in terms of accuracy metrics. The proposed model achieved superior accuracy by using the deep learning model.
Overall, the proposed system achieved the optimum accuracy for improving the diagnostic system for AD compared with those described in previous studies. We believe that the system can play a role in developing a health-care system for elderly patients with AD. The system is recommended to support physicians in their treatment decision-making.

Conclusion
AD is an incurable brain disorder that affects a high proportion of the population worldwide. To solidify the patient quality of life and establish effective care and targeted medicine, early detection of AD is crucial. Deep learning approaches capture the diagnostic severity of AD targeted on MRI scans. This paper offers a deep learning-based model for predicting the multiclass classification of the phases of AD. Two deductions can be made from using an innovative AI-based model for the diagnosis of AD as follows: real benchmark datasets were evaluated in the AD    Fig. 11 Comparison of the proposed system and existing approaches diagnostic system, and two deep learning transfer models, namely ResNet50 and AlexNet, are proposed as algorithms.
The comparative classification results between ResNet50 and AlexNet models were also presented. Overall, the AlexNet system accomplished promising results, provided high accuracy, and was more satisfactory. Our deep learning model was trained, validated and tested using MRI data from a database. We performed binary classifications, such as AD-MCI, AD-CN and MCI-CN, and multiclass classifications, such as AD-MCI and CN. We further compared the classifier performance with the physician's decision and achieved good results. No other framework was performed to compare the system with the physician's decision. Our system is recommended not as a replacement but as a support for physicians in their treatment decision-making for patients with AD.