{'fraction_non_alphanumeric': 0.028857946757088235, 'fraction_numerical': 0.021643460067816176, 'mean_word_length': 4.625811688311688, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Deep Multi-Branch CNN Architecture for Early Alzheimer's Detection from Brain MRIs

Alzheimer's disease (AD) is a neuro-degenerative disease that can cause dementia and result severe reduction in brain function inhibiting simple tasks especially if no preventative care is taken. Over 1 in 9 Americans suffer from AD induced dementia and unpaid care for people with AD related dementia is valued at $271.6 billion. In this paper, we first review other approaches that could be used for early detection of AD. We then give an overview of our dataset that was from the Alzheimer's Disease Neuroimaging Initiative (ADNI) and propose a deep Convolutional Neural Network (CNN) architecture consisting of 7,866,819 parameters. This model has three different length convolutional branches each comprised of different kernel sizes that can predict whether a patient is non-demented, mild-demented, or moderately-demented with a 99.05% three class accuracy.


Introduction
Alzheimer's disease (AD) is a common disease which effects 1 in 9 (10.7%) Americans over 65. 6.5 million Americans aged 65 or over have been diagnosed with AD dementia. An estimated 16 billion unpaid man-hours of care were given to people with dimensia from AD in 2021 which has an estimated value of $271.6 billion [1]. Approximately 12% to 18% of people over 60 are living with mild cognitive impairment (MCI) [2]. MCI causes subtle changes in memory and thinking. Although often associated with the normal aging process, MCI is not apart of typical aging. Moreover, 10%-15% of individuals with MCI develop full dementia each year [3].

Previous Research
There have been a wide variety of approaches for early detection of AD ranging from studying speech patterns and inflections, neuropsychometric tests, olfactory tests, eye testing, gait testing, and using neural networks on MRIs, electroencephalograms (EEG), and magnetoencephalographs (MEG) [5]. * Data used in preparation of this article were obtained from the Alzheimer's Disease Neuroimaging Initiative (ADNI) database (adni.loni.usc.edu). As such, the investigators within the ADNI contributed to the design and implementation of ADNI and/or provided data but did not participate in analysis or writing of this report. A complete listing of ADNI investigators can be found at: http://adni.loni.usc.edu/wp-content/uploads/how_to_apply/ADNI_Acknowledgement_List.pdf arXiv:2210.12331v1 [eess.IV] 22 Oct 2022 One of the best performing models that didn't rely on MRIs was a neural network trained to analyze speech patterns. One of their models reported a 97.18% accuracy [6]. However, there are two main issues with this approach. First and foremost is that it is clear from looking at the audiowaves that the subjects who have AD are well past the MCI/Mild Demented stage making it non-viable for an early detection stage.
The second is that the study only had 50 non-demented subjects and 20 demented subjects. Each non-demented subject had 12 hours of audio and each demented subject had 8 hours of audio. These clips were divided into 600 different clips of 60 second audio. The paper does not state whether they divided the training and validation sets by patient or not. If so, there is a chance that the neural network is learning how to classify whether the subject has AD by remembering the voice of the patient rather than it extracting useful features.
Another approach was to test for a panel of 18 different protiens from blood samples. This approach was able to achieve an 89% accuracy [7]. Of the methods described above, this is probably the most promising since it is much easier and less costly to run blood tests.
Promising work has been done with EEGs. A novel neural network, I-Fast, was able to predict whether subjects had Alzheimer's with 92% accuracy [8]. EEGs are considerably cheaper than MRIs. However, of the approaches enumerated above, none of them were able to exceed our 99% accuracy achieved from using neural networks.

Description of Alzheimer's MRI Datasets
Our dataset consists of 6338 magnetic resonance imaging (MRI) images that were imaged from the Alzheimer's Disease Neuroimaging Initiative (ADNI) [4] and were curated and preprocessed on Kaggle [21]. Our preprocessed dataset came formatted in 100x100 pixel images. Our dataset consists of 3202 images of non-demented patients, 2242 images of very mild demented patients, and 892 images of mildly demented patients as we opted to not use the 64 moderate demented images due to the low sample size.
We divided our training and test set into 5701 training images (2881 non-demented, 2017 very mild demented, and 802 mild demented) and 637 test images (321 non-demented, 225 very mild demented, and 90 mild demented). We used stratified random sub-sampling to ensure that the training and test sets had the same ratio of non-demented, very mild demented, and mild demented images. Fig. 1 shows 9 images from the ADNI dataset.

Background
Significant gains have been made in image recognition and object detection through the use of deep learning. These advances have been applied to medical imaging such as diabetic retinapathy [9]. For the purposes of this paper, familiarity of the subsequent concepts is necessary.

The Neuron as a binary classifier
A neuron in a neural network is a mathematical model loosely based on how a neuron works in the brain [10]. A neuron in a brain works by receiving electric signals to it's dendridic tree. There is a positive or negative synaptic weight which determines whether the signal will be sent to the axon. If the sell fires, the signal is then sent through the cell's axon to other dendritic trees.
An artificial neuron works in a similar manner. A neuron takes a series of inputs and performs an inner product with the weight vector. This value is then put through a sigmoid activation function. This activation function then produces an output between zero and one which represents the percent confidence that the neuron has that the input belongs to a certain category [11].
We define the sigmoid activation function to be, We can train an optimal weight vector, θ, by minimizing the cost function Where our cost function, Cost(θ T x, y) is defined as,

Feed Forward Neural Networks and the Multi Layer Perceptron
Neural networks can extract useful features by representing the data. These intermediate features can then be used for classification, regression, or decoding by subsequent layers [12]. A feed forward neural network is the most simple deep learning architecture. A feed forward neural network is when a layer of neurons forms a fully connected bipartite graph with the next layer. A typical neural network will have an input layer, and output layer, and a certain amount of hidden layers. There are severe limitations of feed forward neural networks when applied to images. First and foremost, a regular feed forward neural network is not invariant under translation. Thus, other approaches are required for better results.

Convolutional Neural Networks
We define the convolution operation, * , between two discrete functions f [m, n] and g[m, n] to be: Convolution is a useful operation in signal processing. Convolution can apply filters to images that can result in different effects, such as sharpening or smoothing [13]. In a neural network, our convolutional layers have a few parameters: the number of filters, the kernel size which determines the size of each filter, and a stride size which determines how many pixels to "skip" before applying the filter to the next block of pixels.
Assuming a stride size of 1, for a given N × M image, we apply an i × j filter. We divide our image into (N − i + 1) × (M − j + 1) subimages and perform an inner product between the filter and the subimage. The result of the convolution is a filtered image with (N − i) × (M − j) pixels.
A convolutional network learns optimal filters by training filter parameters by minimizing our loss [14]. These trained filters can learn useful filters that can help subsequent layers classify our data. This is applicable to many sorts of problems such as facial recognition [15].

Pooling
Pooling is a method of reducing the dimension for the outputs of convolutional layers. This has two main advantages. First, it helps prevent convolutional networks from overfitting. Secondly, if applied properly, it can decrease the computational expense of a CNN. For this reason, pooling is often used in neural networks for mobile systems. [16].
There are two main kinds of pooling, max-pooling and average-pooling. Max-pooling will take the largest value in a kernel [17]. Average pooling instead takes the average of all of the outputs within a kernel [18]. Average-pooling will produce a smoother output than max-pooling will.

Methods
We found that a multiple branch with varied kernel's preformed best on this dataset, although this performance was only marginally better than their singe branch counterparts which had an accuracy of about 98.7%. Our neural network was written using the Keras [19] libraries that are built into TensorFlow [20].
The hardware configuration of our system is one NVIDIA GeForce RTX 2080S with 8GB of VRAM. The system has one Intel Xeon processors Intel Xeon W-10855M with a total of 24/12 logical/physical cores and 64 GB of main memory.
Our neural network takes about 100 epochs to train which lasts for approximately 3-4 hours to train on the ADNI Dataset.
Our neural network was trained with the Adam operating using a learning rate of 0.001.

Layers
In this subsection, we provide an overview of the layers used in our neural network architecture and the parameters that they take.

Input
Our neural network accepted a 100x100x3 input tensor. In this case, 100x100 is the dimension of the image comprised of pixels, and each pixel has 3 color values ranging from 0 to 255. We normalized our data by dividing these color values by 255 to get a float value.

Convolutional Block
Here, we define a block of 3 layers that we use throughout our architecture. The first layer is a 2-D convolutional layer.
In this case, we specify a number of filters for the convolutional layer to produce and a kernal size. We then follow up with an average pooling layer. Finally, we finish our block with a regularization layer.

Dropout Layer
Dropout is a technique used in deep learning to prevent overfitting. This is done by randomly selecting a specified percentage of neurons to not train on during each epoch.

Dense Layer
A dense layer is simply a fully connected layer of neurons as specified in our background.

Model Architecture
Our network consists of three branches. Our first branch used convolutional layers with a 3x3 kernel size and an average pooling size of 2x2. The branch consisted of 5 convolution blocks that produced 32, 64, 128, 256, and 512 filters. We then flattened this output and applied a dropout of 50%.
Our second branch used convolutional layers with a 5x5 kernel size and an average pooling size of 3x3. The branch consisted of 3 convolutional blocks that produced 128, 256, and 512 filters. We then flattened this output and applied a dropout rate of 50%.
Our third branch used convolutional layers with a 7x7 kernel size and an average pooling size of 5x5. This branch consisted of 2 convolutional blocks that produced 128 and 256 filters. Like the previous two branches, we flattened the output and applied a dropout rate of 50%.
The outputs of the three branches were concatenated. This layer was then pushed through a feed forward neural network that had 256 outputs. A dropout rate of 50% was once again applied and then we added a feed foward layer with 128 outputs. After once again applying a dropout rate of 50%, we added our final layer consisting of 3 output layers trained on the softmax function with each neuron corresponding to non demented, very mild demented, or mild demented.

Experimental Results and Discussion
Our neural network achieved an accuracy of 99.05%. 2 Of our 637 test images, only 6 were misclassified with all of these images being between the Non-Demented and Very Mild Demented classes. We found that our neural network did not overfit and witnessed that validation accuracy would cease to improve after about 100 epochs. Thus, after finding   our model that best fit our validation data, we trained on both the training and validation sets and then ran the test set through our neural network.
Despite our exceptionally high accuracy, there are many things that we could do to make this more applicable to a clinical setting. The first would be to create a new method to preproccess our Alzheimer's data rather than using the possibly outdated data uploaded to Kaggle. During our preprocessing, we separated the layers of the MRI into images and trained on each individual image. Further insight could be derived by comparing how our classifier performed on different layers of the same MRI or alternatively comparing different MRIs on the same patient taken at different periods.
Although designing a classifier that trained on the entire MRI instead of each layer might yield a lower accuracy because of the lower sample size, it might prove to be more useful in the clinical setting. Alternatively, one could train a neural expert system by inputting each layer from the MRI into a branch of a neural network and then concatenating the outputs of those branches and training it on a subsequent neural network. Finally, implementing a Fully Convolutional Network to highlight areas of the brain that are indicators could potentially have some use.
It would also be useful to augment our data from The Open Access Series of Imaging Studies (OASIS) [22]. Attempting to prepossess our data in a way that is as agnostic to the MRI machine as possible could potentially provide much more use in the medical community.