  The Early diagnosis and treatment of depression is essential for effective
treatment. Depression, while being one of the most common mental illnesses, is
still poorly understood in both research and clinical practice. Among different
treatments, drug prescription is widely used, however the drug treatment is not
effective for many patients. In this work, we propose a method for major
depressive disorder (MDD) diagnosis as well as a method for predicting the drug
response in patient with MDD using EEG signals. Method: We employ transformers,
which are modified recursive neural networks with novel architecture to
evaluate the time dependency of time series effectively. We also compare the
model to the well-known deep learning schemes such as CNN, LSTM and CNN-LSTM.
Results: The transformer achieves an average recall of 99.41% and accuracy of
97.14% for classifying normal and MDD subjects. Furthermore, the transformer
also performed well in classifying responders and non-responders to the drug,
resulting in 97.01% accuracy and 97.76% Recall. Conclusion: Outperforming other
methods on a similar number of parameters, the suggested technique, as a
screening tool, seems to have the potential to assist health care professionals
in assessing MDD patients for early diagnosis and treatment. Significance:
Analyzing EEG signal analysis using transformers, which have replaced the
recursive models as a new structure to examine the time dependence of time
series, is the main novelty of this research.
