A Novel Approach for Analysis and Detection of Depression Using Electroencephalogram (EEG) Signals

. Depression is a widespread mental health disorder that affects millions of individuals globally. Early and accurate detection of depression is essential for timely intervention and effective treatment. The abstract outlines the key steps involved in developing a depression detection system using EEG, starting with data collection from individuals with and without depression. Preprocessing techniques are applied to clean and normalize the EEG signals, ensuring the removal of artifacts and noise. Feature extraction is a critical phase where relevant information is derived from EEG signals to characterize brain activity patterns associated with depression. After that, the extracted features are used to train machine learning models for the categorization of depression, such as support vector machines (SVMs), random forests, or deep learning architectures (CNN). This highlights the importance of addressing challenges like small and imbalanced datasets, inter-subject variability, and generalizability across diverse populations. Additionally, the model emphasizes the importance of interpretability in machine learning models for depression detection, as it aids in understanding the underlying neural correlates of depression. The abstract gives underscoring the promising prospects of EEG-based depression detection in early diagnosis, personalized treatment, and improved management of depression, ultimately contributing to enhanced mental health care and patient well-being.


Introduction
According to estimates, depression affects over 322 million people worldwide, making it the most common mental illness to cause disability, according to the World Health Organisation (WHO).Patients with depression are usually identified by symptoms including melancholy, hopelessness, and guilt; changes in eating, sleep patterns, and other habits; and a loss of interest, energy, and focus.Depression is thought to be caused by a number of reasons, including medical illnesses, unemployment, traumatic life experiences, difficulties with alcohol or drug use, and poverty.Depression has recently been made worse by the Covid-19 epidemic, and lockdowns, quarantines, and social isolation are some of the other situations that have resulted from the pandemic that are thought to be contributing factors to depression.
Developing an effective and dependable method of depression detection or even prediction would be crucial, given that depression presents an unprecedented threat to public health and can have negative effects on depressed individuals, such as suicide.Early diagnosis can also lead to timely and more effective treatment.The functioning and activity of the human brain are reflected in electroencephalogram (EEG) signals, which are inherently nonstationary, extremely complex, non-invasive, and nonlinear.Given this intricacy, it would be challenging to identify any anomaly with the unaided eye.Physiological signals are now seen to be useful instruments for the diagnosis of depression because of these characteristics.
Common symptoms of depression encompass changes in sleep patterns, appetite, and energy levels.People could feel worn out, have trouble focusing, feel unworthy, and have suicidal or self-harming ideas frequently.The severity and combination of symptoms vary among affected individuals.Major depressive disorder, bipolar disorder, persistent depressive disorder (dysthymia), and seasonal affective disorder are among the different forms of depression.Because each type is unique, specialised treatment methods can be needed.
The hallmarks of depression are a lack of interest in or enjoyment from daily activities, as well as enduring emotions of melancholy and pessimism.A person's physical health, mental state, and emotional state can all be impacted.Symptoms that are frequently experienced include change in eating and sleep patterns, exhaustion, trouble focusing, low self-esteem, and suicidal thoughts.Numerous biochemical, psychological, environmental, and hereditary elements can combine to cause depression.This severe and widespread illness can impair an individual's ability to do daily activities, including caring for oneself, engaging with others, and working.
A hierarchical structure with a number of algorithms that contain some hidden neurons is what is referred to as deep learning.These models provide computers the capacity to construct sophisticated ideas from straightforward statements.These acquired ideas are used to construct subsequent layers.Furthermore, pattern and data structure recognition in these approaches are handled by many processing levels.
Recently, this multi-layer approach has been applied in a variety of industries, including agriculture, the automobile industry, and a variety of medical applications.Adopting deep learning solutions has been more common in related occasions where the implicit nonlinear features in EEG signals can be extracted with the least amount of effort.This is because deep learning architecture has the capability of automated learning and extracting features from input raw data.Regarding the limitation of machine learning techniques in this regard, as well as due to difficulties in manual EEG signal analysis, deep learning solutions have gained popularity.Recently, there has been an upsurge in the use of deep learning to diagnose depression using EEG signals.
Deep learning applications that use EEG signals to diagnose depression have grown in popularity recently.This paper aims to perform a systematic literature review (SLR) of works focused on the use of deep learning to the identification or prediction of depression from EEG signals.Detecting depression through EEG signals is a non-invasive method with the primary goal of achieving early intervention and improved treatment outcomes.The significance lies in the potential to identify depressive states through the analysis of electrical brain activity.

Problem Statement
Our model can identify any type of depression conduct in EEG Signal recordings, which is our problem statement for Analysis and Detection of Depression in EEG Signals using CNN.There are certain drawbacks to the current models, and they are organised as follows: • It is laborious, time-consuming, and requires a great deal of knowledge to manually detect depression by analysing the EEG data.
• Conventional machine learning algorithms, such SVM, are imprecise, and all current methods relied on manual guidance.

•
The disadvantage of the existing system is the less accuracy (unable to predict accurately).

Objectives
A CNN based Analysis and Detection of Depression model was presented here to address these problems.Now-a-days humans are more prone to depression due to competitive environment in all fields and timely detection of depression can help humans in recovering faster.To predict depression accurately we are applying CNN algorithm which will filtered trained data at multiple layers to get optimized features which result into increase prediction accuracy.The findings of this study will be the list of goals below: • To improve our model's efficiency and accuracy as compared to earlier versions that were already in use.

•
Accurately foresee any depression activities that might occur in our Society.
2 Literature Survey [1], "Text-based depression detection on sparse data" IEEE ACCESS-2019.The author of this study employs the written multi-task BGRU network (Binary Gated Recurrent Unit) techniques.The key findings are Experiments show that indeed sentence-level features should be preferred over words in detection.The limitations are Sparse data can lead to challenges in building accurate models.
[2]," Social network analysis for early depression detection ".In this study,it examines the use of random forest (RF) classifier with threshold functions and independent RF classifiers to detect depression behaviours in Social Network.The study demonstrates the potential of random forest (RF) classifier with threshold functions and independent RF classifiers enhancing the accuracy and robustness of detection of depression in Social Network.The key findings are the results show how a dual model performs significantly better than the singleton model.The limitations are Person on social media can't be representative of entire population.
[3], " Cost-sensitive: Increasing Pruning Trees to Identify Depression on Twitter ".In this study, it examines the use of Cost-sensitive Boosting Pruning Trees (CBPT) to detect depression behaviourson Twitter.The features extracted from the tweet content were really important for depression prediction.Features including negative/positive words and emojis play a key role in online depression risk detection.Limitations are Not everyone in the twitter is real (alot of fake identity is present) [9].[4], "Automated identification of depression: a gru/bilstm-based model and an emotive audio-textual dataset".The methodology used is Multi-model Fusion of GRU and BILSTM.The method merely encodes audio/text information into embedding, which is one of the main conclusions.This project has certain limitations.The calibre of the emotional textual and audio training data has a significant impact on the model's efficacy [10,11].[5], " Gender Bias in Depression Detection Using Audio Features".The methodologies used are Deep Learning Techniques like CNN and RNN.The main conclusions are that the classifier learns more objectively when data is re-distributed.The limitations of this project is the choice of audio features can impact the model's sensitivity to gender.
[6], " A Text Classification Framework for Simple and Effective Early Depression Detection Over Social Media Streams".In this work, we discovered a unique supervised learning model for text classification called model SS3.In order to address ERD (Early Risk Detection) issues, SS3 was created as a general framework.Using the CLEF's eRisk2017 pilot challenge on early depression identification, this model is assessed.Even though the classifier was less computationally expensive, experimental data demonstrate that it was still able to outperform standard classifiers and these models [12,13].[7], "An application of Affective Conditioning on Hierarchical Attention Networks for Transcribed Clinical Interviews with Depression".In this study, a machine learning model for diagnosing depression using clinical interview transcriptions was presented.A Hierarchical Attention Network (RNN) was employed to categorise interviews including individuals with depression.Additionally, they added a conditioning mechanism on linguistic elements taken from affective lexica to our model's attention layer.According to their analysis, those who have been diagnosed with depression tend to use emotive language more than people who do not.The hierarchical textual structure formed by words in turns, which make up sessions, makes Hierarchical Neural Networks an ideal choice for document classification [14,15].[8], " Adolescent anxiety and depression during COVID-19: A cross-sectional investigation ".This study aimed to assess anxiety among young adolescents during COVID-19 pandemics.Coronavirus anxiety scale (CAS) was used to assess anxiety among adolescents.The study findings revealed that more than half of the adolescents 70 (56%) had no anxiety, mild anxiety was identified among 49 (39%) of the adolescents, only 2.3% of the subjects had moderate anxiety and 3.3% of the adolescents had severe anxiety.The mean score of anxiety level was 0.075 with a standard deviation of 2.80.The Chi-square test (ꭓ2 ) showed a significant association between the level of anxiety with the profession of the mother ꭓ2=4.262(p=0.039).Results indicate that more than 50% of adolescents were having no anxiety regarding the COVID-19 pandemic [16,17,].

Proposed Methodology of the System
Here in this paper we use the CNN and SVM Techniques in order to detect depression using the EEG Signals.At first the EEG Device collect the EEG Signals from the patient.model so that the model can be trained on the dataset.At last, the model will be trained and can be tested on the new data

EEG Signals
The method used to record the electrical activity of the brain is called electroencephalography, or EEG.In order to identify and quantify the voltage variations brought on by ionic current flows within brain neurons, electrodes are applied to the scalp.To study brain function and detect neurological problems, EEG signals are frequently employed in clinical settings, research, and other applications.

Data Preprocessing
Preparing raw picture data for additional analysis or for use in machine learning algorithms is referred to as data preparation in this context.It is an essential stage in computer vision and image processing activities because it helps improve the quality and relevancy of the data, making it simpler for machine learning models to learn patterns and features from images.So, the redundant frames and the noisy frames are removed from the dataset by using the Data Preprocessing.

Extraction
The process of choosing or converting data into a set of features that accurately captures the information required for a certain analysis or modelling activity is known as feature extraction.It seeks to preserve the pertinent information in the data while reducing its dimensionality.In signal processing, machine learning, and other data analysis applications, feature extraction is essential.

CNN Techinque
Among the deep neural network classes created specifically for processing visual data, convolutional neural networks (CNNs) are often used in computer vision applications.When CNNs receive input data, like photos, they automatically use convolutional layers to learn hierarchical features.Non-linear activation functions like ReLU add complexity and pooling processes downsample data after these layers.High-level reasoning and regularisation are accomplished, respectively, via fully linked layers and dropout.By applying pre-trained models to certain and modifying them with limited data, CNNs take use of transfer learning.

Implementation
To implement this project, we have followed these steps: • Uploading EEG-Signals Dataset: Using this module we will upload dataset to application and then extract normal and depressed records from dataset.• Preprocess Dataset and Feature Extraction: We will replace any missing values in the dataset using this module.After that, we will extract features from the dataset and divide it into train and test datasets, with the application using 80% of the dataset for training and 20% for testing.• Run Existing SVM Algorithm: This module is used to train the SVM algorithm on an 80% training dataset, after which we will assess its accuracy and precision on a 20% dataset.• Run Proposed CNN Algorithm: We will train the suggested CNN algorithm using this module on 80% of the training dataset, and then we will assess its accuracy and precision on 20% of the dataset.• Predict Depression from Test Signals: This module allows us to upload test datasets, and CNN will determine whether the test results are DEPRESSED or NORMAL.Next, a comparison graph between SVM and CNN will be plotted.

Results and Description
The performance of the suggested technique (i.e, CNN) is assessed as well as compared to that of the standard techniques(i.eSVM).The model is used and deployed in the Google Colab platform.

Data Distribution
The pattern or arrangement of data values inside a dataset is referred to as data distribution.
It explains the range or spread of those values as well as the frequency with which they occur.Understanding the data distribution is essential for many data analysis tasks, such as statistical analysis, data visualisation, and machine learning, since it provides insights into the features and attributes of the data.4 shows us the signal is of depressed person whereas Figure 5 is of a normal person.As we can see in the above plot we have compared the Existing Methodology(SVM) and the Proposed Methodology(CNN) using the following metrics like Accuracy,F1 Score, Precision, Recall.And from the above plot we can conclude that the Proposed CNN performs significantly better than the Existing SVM methodology.And every metrics value of the CNN is far larger than the SVM.

Accuracy Percentages
It is estimated that 92% of the time the system accurately identified the depressed behaviour in the testing records using CNN model.CNN Model performs a lot better than the existing system whose accuracy is 67% in detecting the depressed behaviour from the records.

Conclusion
In this study, we present preliminary results for an auto-mated EEG classification system developed to classify EEGs.It comprises of three main modules: preprocessing, waveformlevel classification (CNN), and EEG-level classification (SVM).In this project we are using deep learning CNN algorithm to predict depression from EEG signals dataset.Nowa-days humans are more prone to depression due to competitive environment in all fields and timely detection of depression can help humans in recovering faster.To predict depression accurately we are applying CNN algorithm which will filtered trained data at multiple layers to get optimized features which result into increase prediction accuracy.In our future work, we intend to incorporate artifact rejection in order to reduce the false detections.We also aim to modify the pre-processing module to adapt to different montages and EEG recording equipment.We have obtained the accuracies 67.58 and 92.096 for the SVM and CNN models respectively.Thereby concluding that the proposed system has performed better than the existing system.

Fig. 4 .
Fig. 4. Output detected for the respective signal as Normal.As you can see, the outputs are generated for the signals as Normal and Depressed.These input testing signals are sent into a trained model (i.e,CNN) for the prediction.Figure 4 shows us the signal is of depressed person whereas Figure 5 is of a normal person.

,
01101 (2024) MATEC Web of Conferences https://doi.org/10.1051/matecconf/202439201101392 ICMED 2024 Then the EEG Signals are sent for Data Preprocessing and Feature Extraction.Signals are divided into testing and training datasets based on the test size.Features are sent into the

Table 1 .
This is a dataset of EEG brainwave data that has been processed with the method of statistical feature extraction This dataset is the output of the extraction of features.The data was collected from people for 60 seconds per state -relaxed, concentrating, neutral.• We used a Muse EEG headband which recorded the TP9, AF7, AF8 and TP10 EEG placements via dry electrodes.• The method of statistical extraction resampled the data since waves must be mathematically described in a temporal fashion.Total Number of Records and their Categories.