Early Alzheimer’s Disease Detection Using Deep Learning

The early detection of Alzheimer's disease, a neurodegenerative ailment that affects both cognitive and social functioning, can be accomplished using deep learning technology. Deep learning is more accurate and efficient than human diagnosis in detecting functional connectivity and changes in the brain networks of people with MCI. Early detection of Mild Cognitive Impairment (MCI) can reduce the disease's development. However, achieving high accuracy levels is difficult due to the dearth of reliable biomarkers. The dataset was picked up from the Kaggle database. It contains magnetic resonance images of the brain, each image being unique and in different stages of the disease for classification purpose for our project, as it was most suitable for our project’s needs. We developed a deep learning model using learning AZ net, Dense net, Resnet, Efficient Net and Inception Net with a maximum accuracy of 99.96% for classifying Alzheimer's disease stages and early detection using transfer learning and other approaches.


Introduction
Alzheimer's disease is the most common cause of dementia, accounting for 60-80% of all cases (AD).AD starts with mild cognitive impairment (MCI) and gradually worsens in this neurodegenerative form of dementia [1].It damages brain cells, resulting in memory loss, decreased reasoning ability, and difficulty performing simple tasks.As a result, A progressive, challenging neurological disorder that affects the brain, Alzheimer's disease [2].AD is more likely to develop in people with MCI than in healthy individuals.People do not notice the effects of Alzheimer's disease until years of brain changes have occurred, as the illness starts at least 20 years before symptoms start to show [3].The number of persons with dementia globally is about 50 million [4], according to Alzheimer's Disease International (ADI).One person will experience dementia every three seconds if this rate rises to 152 million by 2050 [5,6].
Dementia is thought to cost $1 trillion annually, and by 2030, [7] that amount is predicted to have more than doubled.The percentage of those who have Alzheimer's disease changes with age.According to estimates, 5.8 million Americans (U.S.) 65 and older will have AD by 2020.That figure is anticipated to rise to 13.8 million by 2050.
The lack of a viable treatment for the illness is the principal obstacle for those researching Alzheimer's.Modern Alzheimer's disease therapies, however, can slow or stop the onset of symptoms.As a result, it's critical to identify Alzheimer's disease in its early stages.To reduce the high treatment costs associated with AD patients, an automated system (CAD) is used to identify AD accurately [8] and early, which are predicted to rise drastically in the coming years [9].Conventional machine learning algorithms for early AD detection typically employ two types of features: Voxel-based features and features based on ROI.
They rely on fundamental assumptions about anatomical or functional brain aberrations in particular, such as volume of the grey matter, hippocampus, and regional cortical thickness [10,11].Traditional approaches rely on manually extracting features, which looks to be subjective and time-consuming and is heavily dependent on technical competence and iterative application.Convolutional Neural Networks (CNN's), in particular, is a powerful tool for solving these problems.Deep Learning.CNNs can increase effectiveness even further, have proved to be highly effective in Alzheimer's disease diagnosis [12], and do not require manual processing because they extract characteristics automatically.In this research, we want to create a revolutionary deep learning model with the highest level of accuracy for performing state-of-the-art discovery of Alzheimer's disease early.The different stages of Alzheimer's disease are categorised using the patient's magnetic resonance images.The model will be a helpful tool for doctors to manage their time and make rapid and accurate patient diagnoses.

Literature Review
As we were researching for and looking through relevant articles, papers and information related to our project, we referred the research paper, "Neuroimaging data is used for diagnostic classification and prognostic prediction in deep learning in Alzheimer's disease" written by Professors from Indiana University School of Medicine, Andrew J. Saykin, Kwangsik Nho, and Taeho Jo.It is based Using deep learning techniques, neuroimaging data, and stacked autoencoders (SAE) for feature selection, a systematic evaluation of articles produced classification accuracy for predicting the evolution of moderate cognitive impairment (MCI), a precursor to AD, was up to 98.8%, and for predicting AD, it was up to 83.7%.For the categorization of AD and the prediction of the transition of MCI, deep learning systems Accuracy scores of up to 96.0% have been achieved with techniques like Convolutional Neural Network (CNN) or Recurrent Neural Network (RNN), which use neuroimaging data without preprocessing for feature selection.
It was shown that the combination of multimodal neuroimaging and fluid biomarkers produced the greatest classification performance.As a result, we have opted to employ this information for our research even Although a combination of deep learning and machine learning techniques was employed in this particular study, which is more complicated and less effective.
Then we went through a research paper from IEEE called, "Deep learning models for the identification of Alzheimer's disease.A brief overview was given of existing research related to deep learning applications in Alzheimer's disease.Overall, in reviewing the papers, we found that the papers published in this area focus on two main research areas, biomarkers and neuroimaging, but there is increasing interest in image analysis.Although the work is considered thorough and extensive, it contributes little to the detection of AD, as the majority of patients selected are already known to have AD.This study examined some of the major related AD datasets as well as diagnostic techniques and detection methods.
As we have decided to use a dataset consisting of magnetic resonance images, the research paper "Generalizable deep learning model for structural MRIbased early Alzheimer's disease detection" proved to be incredibly useful to base our project upon.In this particular paper, the deep-learning model attained an areaunder-the-curve (AUC) of 85.12 and an AUC of 62.45 for the harder task of diagnosing MCI, differentiating between participants with MCI or mild Alzheimer's disease.The volume-thickness model, which requires the extraction of volumes and thicknesses first, moves significantly slower than this method.The model may also be used to forecast how the disease would progress: People with moderate cognitive impairment who the model incorrectly identified as having mild AD eventually acquired dementia more quickly.An examination of the suggested model's characteristics learnt reveals that it uses a variety of locations linked to Alzheimer's disease.These results suggest that imaging biomarkers that reliably predict Alzheimer's disease may be recognized by deep neural networks and used for early disease detection.
Although this paper touched on several important points, the accuracy acquired is significantly lesser and we have decided to utilize the useful information from this paper and improve upon them.Finally, this particular research paper, "An intelligent system for neuroimagingbased early Alzheimer's disease identification", aligned with our objectives well and served as a map to approach our project in an efficient way.They tested ResNet18 and DenseNet201 in this paper to complete the multiclass AD classification problem.The image's discriminative area was identified using a gradient class activation map for the suggested model's prediction.An intelligent system for neuroimaging-based early Alzheimer's disease identification, accuracy, precision, and recognition were employed.The recommended model could perform multiclass classification Experimental examination shows 98.86% accuracy, 98.94% precision, and 98.89% recall.The findings demonstrate that neurodegenerative brain illnesses like AD may be classified and predicted using cutting-edge Deep Learning and this information has been essential in directing our work.The following block diagram shown in Fig1 is the system architecture of this project.

Methodology
The proposed framework consists of the following steps:

Data acquisition:
The dataset was picked up from the Kaggle database.It contains magnetic resonance images of the brain, each image being unique and in different stages of the disease for classification purpose for our project, as it was most suitable for our project's needs.This dataset contains total of 6400 records.It has image data classified into 4 classes namely: • Very Mild Demented, • Non-Demented, • Moderate Demented, • Mild Demented.Which very well suited our objective of early detection of the disease but also the stage of the disease.Tuning was performed on the labels of the data set.It's taken into account that a convolutional model performs best when it has been well trained on the training data and validated on appropriate validation data.Later, the dataset was divided into two parts, namely training and testing data.The data was split in a ratio of 4:1, i.e., the training data contained 80% of the images in each label, and the test data contained 20% of the images in each label.The splitting criterion is a common practice used by many researchers in Deep Learning.

Preprocessing:
The next step after preparing the data set is preprocessing the data.Preprocessing is an important step because the calibrated data obtained after preprocessing is fed into our convolution model depending on the domain and model.Different preprocessing methods were applied and fed into the models.In this case, after dividing our data into training and test sets, each image in each set must undergo a transformation.The first transformation we performed was resizing the images in (224,224) dimensions.Of the different dimensions we tested, our model performed better when the dimensions were (224,224).We tried to feed binary images into our model, but the accuracy dropped, so we had to use RGB images in each dimension (224,224).After calibrating the images in each set, our next step was to divide each set into batches.In our model, we combined 32 images into one set.The reason for dividing a set into stacks is that we want to train our model in a time-efficient manner, so that the stacks also keep the model from underfitting.This way, the model requires less memory and the time to train the network was also reduced.The reason for including 32 images per stack is a common practice used by deep learning experts.

Building the model:
The given objective is based on identification and classification of an image.For this case study CNNs are well known and utilized to build solutions for similar case studies.Our proposed model is a combination of different blocks of convolution layers where each block had convolution 2D layers and the configuration of these layers varied from block to block.Additionally, to build a reliable and well-established network we took advantage of transfer learning where we experimented with many of the state of the art architecture's like Resnet50, ImageNet, DenseNet and various versions of EfficientNet, All the results are discussed in further sections.These consecutive blocks of convolutional layers helped us in identifying key points of an magnetic resonance image that can be used in classifying the data into a particular label and to summaries the features learned by the convolutional layer we utilized a Global Average Pooling layer that helped out in averaging the feature points and finally to predict the outcome we flattened the features and fed them into an fully connected neural networks where certain non-linear function which have been disclosed clearly in the further sections and the model was trained on this architecture and we were finally able to achieve an accuracy of 99.86%.

Training the dataset with the model and classification of medical images:
In this step, the images are trained on the model for 20 epochs.A batch size of 32 images is trained per epoch.Four levels of AD spectrum (I) Non Demented, (II) Very Mild Demented, (III) Mild Demented, and (IV) Moderate Demented are classified multiple times.This classification of medical images is performed, and accuracy is calculated.

Evaluation Step:
The CNN architectures are evaluated against performance metrics.

Proposed classification methods and techniques:
• Introduction of the model (AzNet): The basic properties of CNN formed the basis for our model.Convolutional neural networks have become a state-of-the-art solution for many deep learning and computer vision applications.The underlying properties of Higher-level representations of an image's content can be derived using a convolutional neural network (CNN).It begins by "learning" how to extract these traits from the image's raw pixel data before identifying which element they stand in for.
Traditional machine learning techniques consist of three main stages: feature extraction, feature reduction, and classification.The typical CNN then combines all of these stages.Feature extraction is no longer necessary when using CNN.In order to increase the weights of the early layers, repeated learning is utilized as a feature extractor.CNN performs better than other classifiers in comparison.This system is composed of three layers: the fully connected layer, which undertakes classification and reduces the two-dimensional matrices into a singledimensional vector; the convolution, which extracts features; the pooling layer, which reduces dimensions; and the convolutional layer, which extracts features.
The EfficientNet B5 architecture is used as the base model in our AzNet architecture, and its performance and efficiency can be customized.The architecture provides an effective composite scaling method that increases the model size to achieve maximum accuracy.Scaling is done in three dimensions: depth, width, and resolution, where depth is the quantity of network layers, width is the quantity of layer neurons, and resolution is the height and breadth of the picture.

• Convolutional layers:
Convolutional layers, present in multiple locations, form the backbone of the model architecture.The layer parameters emphasize the use of adaptive kernels.Despite having a low spatial dimensionality, these kernels are frequently sparse throughout the depth of the input.Each filter is convolved over the spatial dimensions of the input when the data enters a convolutional layer to create a 2D activation map.The overall output volume of the convolutional layer is made up of the activation maps that are unique to each kernel and are layered along the depth dimension.
The convolutional layer represents an adaptive filter that extracts information from an input picture.A 3D image's measures are H, W, and C, where H stands for height, W for width, and C for the number of channels.Using a 3D filter and the measurements shown below: FH, FW, and FC are abbreviations for FH, width, and the number of filter channels, respectively.Because AH stands for activation height and AW stands for activation width, the output activation map should be AH AW in size as shown in Fig2.Equations 1 and 2 may be used to calculate the values of AH and AW.AH=H-FH+2PS +1 (1) AW=W-FW +2PS +1 (2) P stands for the padding and S for the stride; there can be n filters, so the size of the activation map should be AH × Aw × n.
(3) Pooling layers that exist internally at different points in the model architecture help reduce the time complexity of the model.When applied to the feature maps of the hidden layers in the CNN, the pooling layer helps in reducing the spatial dimensions of the feature maps.The global average pooling in the model architecture achieved by convolutional layers reduces the feature maps of a hidden layer in the CNN, which reduces the parameters, which helps us to achieve the desired results in shorter computation time.
• Flattening: When feature maps are pooled, flattening transforms all of the resulting two-dimensional arrays into one-dimensional arrays that may be fed into the following layer.To construct a single, lengthy feature vector, the convolutional layer output is smoothed.The completely linked layer, the last stage of our AzNet design, receives this vector.
• Fully connected layer: Each input is coupled to every neuron in the layer below it in the fully connected layer (FC), which functions with a flattened input.Any CNN design uses nonlinearity in addition to FC layers for class assessment.

• Dropout:
The dropout layer randomly eliminates some units along with their connections in the network, limiting overfitting.In the AzNet architecture, a dropout layer is situated after two fully connected layers each consisting of 1024 and 512 units, followed by the output layer, 40% of the neurons present in the model are removed, thus avoiding overfitting while lowering the model's temporal complexity by lowering the number of parameters.

Training Parameters:
• Loss function: Since our problem requires performing multiclass classification of the data, The loss function in the architecture that we choose is the categorical cross entropy.The typical loss function for multiclass classification uses categorical cross entropy, where each class is assigned an integer value between 0 and n-1 (n is the number of classes).It computes the typical discrepancy between the actual and predicted probabilities for all classes.The loss function is calculated using the equation 5 given below.• EfficientNet-b5 Architecture: To make the AzNet model ideal for our suggested medical picture classification challenge, we have adjusted it and added a few layers.This model utilizes 31 million parameters.The total architecture is shown in Fig3.The hidden layers' activation function is the rectified linear layer (ReLU).To manage the four phases of Alzheimer's disease, a final FC layer with a SoftMax activation function is eventually added, and the total model is shown in Fig4.

Evaluation Metrics:
Precision: The level of variance seen in the findings of several measurements of the same component is referred to as "precision" in this context.the degree to which outcomes are in agreement with one another.To comment on precision, multiple measurements or factors are required.We calculate precision using the equation 6 given below.( 6) Accuracy: The amount of agreement between absolute measurement and the actual measurement is known as accuracy.Demonstrates how closely the results match the benchmark value.We calculate accuracy by equation 7 below. (

Results and discussion:
The model was trained with a total of 5121 images for 20 epochs and tested with a test set of 1279 images.An accuracy of "99.86%" was achieved during training as shown in Fig5, with the model stopping training after 9 epochs due to no performance improvement, which was achieved using "early_stoppping_callbacks", and the classification report is shown in table1.The confusion matrix shown in fig6 have darker region on highest accuracy and also the performance graph shown in Fig7 shows the highest accuracy.Out of all the models we have tried with, our custom model based on EfficientNetB5 gave the highest accuracy.Here is the comparison table shown in table2 between all the deep learning.

Table 2. Accuracy Table
Although from the below result, InceptionNet and the final model have very near accuracies, the final model parameters are more compared to all the previous models but with the help of callbacks, the model performed well in less time as shown in Figure 8.

Conclusion and Future works
This study proposes a new model for the early detection of Alzheimer's disease as well as the classification of medical images based on the stage of illness.The proposed framework is built on the deep learning CNN architecture EfficientNetB5.
Multiple classifications are made for four AD phases.this categorisation using several techniques.Initially, by using transfer learning with previously trained models.Second, by adjusting and altering their architectures to better suit our application.It enables clinicians and patients to remotely monitor AD and uses the AD spectrum to evaluate the patient's stage of Alzheimer's.The results show that the proposed design is a modified version of the EfficientNetB5 CNN architecture that reduces computational complexity, memory requirements, overfitting, and gives reasonable latency.Furthermore, it has a 99.86% accuracy rate.
Future plans call for the use of additional Utilizing pretrained models, stages and performance verification, as well as the expansion of the dataset using advanced data augmentation techniques, we can effectively classify Alzheimer's disease into many classes.It's meant to make advantage of the DCGAN method.Prior to staging AD, MRI segmentation will also be used to highlight Alzheimer's characteristics.Additionally, by utilising transfer learning, it is intended to expand the usage of the unique model we created for the early diagnosis of several additional diseases in the healthcare industry.Additionally, we intend to create an easy-to-use interface that will allow clinicians to remotely assess AD, ascertain the disease's stage, and advise patients on appropriate measures based on the stage.We also plan to use other data features to perform the classification and extend it beyond using MRI images.

Figure 1 .
Figure 1.Block diagram shows the system architecture of this project.

Figure 2 .
Figure 2. Convolutional layers All photos in the training and test sets are downsized to 224x224x3 before the model is trained.Then, each batch of 32 images is put aside for the Adam Optimizer's training with an initial learning rate of 0.001.Based on the model's performance in the validation dataset, the ReduceLR callback has a tendency to alter the learning rate throughout the course of the epochs.The model was also started with a second callback that would halt training if the model's performance remained unchanged.One of the techniques we use is the principle of categorization of medical picture using transfer learning.•Transfer Learning:In a deep learning strategy known as transfer learning, a neural network model is originally trained on a task that is similar to the job at hand.The main aspect of transfer learning is that it makes use of pre-trained weights generated by training countless thousands of photographs from the ImageNet collection.(ii) It reduces the amount of time required to train a learning model.(iii) Its ability to reduce generalization errors.As a result, we use the pre-trained model efficientnetb5 for MRI multi-class classification.•Callbacks:A callback is a function that is called repeatedly during a process (the training of a neural network) and which generally serves to validate or correct certain behaviors.Callbacks alter the learning rate and other such parameters automatically to improve accuracy if it doesn't improve over two epochs during the training.If the model will not improve its accuracy any further during training, early stopping occurs, and the final weights are replaced with the weights of the epoch that had the highest accuracy.

)Recall:
The recall is calculated by dividing the fraction of Positive samples that were correctly recognized as Positive by the total number of Positive samples shown in equation 8. Recall measures the model's ability to detect positive samples.The recall increases as more positive samples are detected.(8)

Figure 8 .
Figure 8. Different Model's performance on the dataset

Table 1 .
Classification Report EAI Endorsed Transactions on Pervasive Health and Technology 2023 | Volume 9