Optimal Feature Selection and CNN Hyperparameter Tuning Using the Grey Wolf Optimizer for Depression Detection

Authors

Keywords:

Depression detection, electroencephalography, convolutional neural network, Grey Wolf Optimizer, feature selection, hyperparameter optimization, deep learning

Abstract

Purpose: This study aimed to develop an optimized electroencephalography-based depression-detection framework by integrating the Grey Wolf Optimizer with a convolutional neural network for simultaneous feature selection and hyperparameter tuning.

Methods and Materials: An applied analytical design was used to analyze a standard EEG-derived dataset obtained from the Figshare repository, containing observations from healthy individuals and patients with major depressive disorder. Data preprocessing included the removal of zero-variance variables, moving-average imputation of missing values, Z-score standardization, and class balancing using the Synthetic Minority Over-sampling Technique. A binary Grey Wolf Optimizer was employed to select an informative subset of EEG-derived temporal, frequency-domain, and functional-connectivity features. Candidate feature subsets were evaluated using a radial basis function support vector machine with five-fold cross-validation. The selected features were converted into two-dimensional feature maps and entered into a custom CNN. GWO was additionally used to optimize the learning rate, batch size, convolutional-filter numbers, dropout rate, training epochs, and feature-selection threshold.

Findings: The GWO-based optimization process identified a refined feature subset that preserved the majority of diagnostically relevant EEG information while removing variables that contributed limited discriminatory value. The optimized CNN comprised three convolutional layers with progressively increasing filter numbers of 32, 64, and 128. The best-performing configuration included a learning rate of 0.0001, a batch size of 32, a dropout rate of 0.50, 100 training epochs, and a feature-selection threshold of 0.50. The combined optimization procedure indicated that simultaneous feature refinement and hyperparameter tuning produced a more stable and computationally coherent framework than reliance on unoptimized feature inputs and manually selected network parameters.

Conclusion: Integrating GWO-based feature selection and CNN hyperparameter optimization provides a systematic and promising approach for EEG-based depression detection by improving input quality, reducing unnecessary computational complexity, and supporting the extraction of complex neurophysiological patterns associated with major depressive disorder.

Downloads

Download data is not yet available.

References

Ahmed, A., Aziz, S., Toro, C. T., Alzubaidi, M., Irshaidat, S., Serhan, H. A., & Househ, M. (2022). Machine Learning Models to Detect Anxiety and Depression Through Social Media: A Scoping Review. Computer Methods and Programs in Biomedicine Update, 2, 100066. https://doi.org/10.1016/j.cmpbup.2022.100066

Asgharzadeh Bonab, A., & Hatemian, A. (2023). Classification of Hybrid EEG-fNIRS Signals Using Reduced Deep Features for BCI Applications. Modern Defense Sciences and Technologies, 1, 39-49.

Bahrehdar, A. (2022). A Model for Intelligent Diagnosis of Depression Disorder Severity Using Machine Learning Techniques Seventh National Conference on New Ideas in Electrical Engineering, https://civilica.com/doc/1590497

Duncan, M., Vogel, A. C., Ramiah, A., Tillman, R., Barch, D. M., Luby, J. L., & Hennefield, L. (2025). The Presence of Externalizing Diagnoses Increases the Risk of Suicidal Thoughts and Behaviors in Youth Enriched for Early-Onset Depression. Jaacap Open, 3(3), 516-526. https://doi.org/10.1016/j.jaacop.2025.01.004

Ghanbarzadeh Bonab, Y. (2022). Using Multiple Agents Based on Learning Techniques for Depression Diagnosis Seventh International Conference on Interdisciplinary Research in Electrical, Computer, Mechanical, and Mechatronics Engineering in Iran and the Islamic World, https://civilica.com/doc/1544117

Hosseini, S. A. (2023). Analysis of Brain Responses to Marketing Stimuli Using Electroencephalography (EEG) in Neuromarketing Applications. Intelligent Systems in Electrical Engineering, 1, 135-150.

Hosseinpour, M. J., & Bahrami, M. (2023). Using Metaheuristic Algorithms for Depression Detection First International Conference on Electrical Engineering, Computer Engineering, Mechanical Engineering, and Emerging Technologies Related to Artificial Intelligence, https://civilica.com/doc/1881824

Jiang, C., Li, Y., Tang, Y., & Guan, C. (2021). Enhancing EEG-Based Classification of Depression Patients Using Spatial Information. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 29, 566-575. https://doi.org/10.1109/TNSRE.2021.3059429

Kabir, M., Ahmed, T., Hasan, M. B., Laskar, M. T. R., Joarder, T. K., Mahmud, H., & Hasan, K. (2023). DEPTWEET: A Typology for Social Media Texts to Detect Depression Severities. Computers in human Behavior, 139, 107503. https://doi.org/10.1016/j.chb.2022.107503

Karimifard, E., Ahmadi, H., & Meshkinmojeh, M. (2022). A Hybrid Approach for Depression Diagnosis Using Data Mining Techniques Seventh International Conference on Research in Science and Engineering and Fourth International Congress on Civil Engineering, Architecture, and Urban Planning of Asia, https://civilica.com/doc/1640703

Khamidullina, Z., Marat, A., Muratbekova, S., Mustapayeva, N. M., Chingayeva, G., Shepetov, A., Ibatova, S. S., Terzić, M., & Aimagambetova, G. (2025). Postpartum Depression Epidemiology, Risk Factors, Diagnosis, and Management: An Appraisal of the Current Knowledge and Future Perspectives. Journal of clinical medicine, 14(7), 2418. https://doi.org/10.3390/jcm14072418

Liu, J., Li, C., Qiu, Y., Yu, Y., Zeng, L., Wu, M., Han, Y., & Yang, F. (2025). Efficacy of internet-delivered universal and tailored transdiagnostic interventions for anxiety and depression: A systematic review and meta-analysis of randomized controlled trials. Psychiatry research, 344, 116324. https://doi.org/10.1016/j.psychres.2024.116324

Loh, H. W., Ooi, C. P., Aydemir, E., Tuncer, T., Dogan, S., & Acharya, U. R. (2021). Decision Support System for Major Depression Detection Using Spectrogram and Convolution Neural Network with EEG Signals. Expert Systems, e12773. https://doi.org/10.1111/exsy.12773

Lotfi, F. (2022). Decomposition of EEG Signals Using Empirical Mode Decomposition for Epilepsy Diagnosis with a Multilayer Perceptron Neural Network Seventh International Conference on Nanoscience and Nanotechnology Development, https://civilica.com/doc/1477742

Mazzei, M. (2021). An Unsupervised Machine Learning Approach for Medical Image Analysis. In Advances in Information and Communication: Proceedings of the 2021 Future of Information and Communication Conference (FICC), Volume 2 (pp. 813-830). Springer International Publishing. https://doi.org/10.1007/978-3-030-73103-8_58

Nafea, A. A., Alameri, S. A., Majeed, R. R., Khalaf, M. A., & Al-Ani, M. M. (2024). A Short Review on Supervised Machine Learning and Deep Learning Techniques in Computer Vision. Babylonian Journal of Machine Learning, 2024, 48-55. https://doi.org/10.58496/BJML/2024/004

Rafiei, A., Zahedifar, R., Sitaula, C., & Marzbanrad, F. (2022). Automated Detection of Major Depressive Disorder with EEG Signals: A Time Series Classification Using Deep Learning. IEEE Access, 10, 73804-73817. https://doi.org/10.1109/ACCESS.2022.3190502

Reavley, N., Jorm, A. F., Carbone, S., Tsiamis, E., & Morgan, A. J. (2025). Testing the Diagnostic Expansion Hypothesis With a Population-Based Survey of Attitudes to Depression in Australia. BMJ Public Health, 3(2), e003040. https://doi.org/10.1136/bmjph-2025-003040

Runnova, A., Zhuravlev, M., Ukolov, R., Blokhina, I., Dubrovski, A., Lezhnev, N., Sitnikova, E., Saranceva, E., Kiselev, A., Karavaev, A., & Selskii, A. (2021). Modified Wavelet Analysis of ECoG Pattern as a Promising Tool for Detection of Blood-Brain Barrier Leakage. Scientific reports, 11(1), 1-8. https://doi.org/10.1038/s41598-021-97427-9

Saeedi, A., Saeedi, M., Maghsoudi, A., & Shalbaf, A. (2021). Major Depressive Disorder Diagnosis Based on Effective Connectivity in EEG Signals: A Convolutional Neural Network and Long Short-Term Memory Approach. Cognitive Neurodynamics, 15(2), 239-252. https://doi.org/10.1007/s11571-020-09619-0

Saeidi, M., Karwowski, W., Farahani, F. V., Fiok, K., Taiar, R., Hancock, P. A., & Al-Juaid, A. (2021). Neural Decoding of EEG Signals with Machine Learning: A Systematic Review. Brain Sciences, 11(11), 1525. https://doi.org/10.3390/brainsci11111525

Seal, A., Bajpai, R., Agnihotri, J., Yazidi, A., Herrera-Viedma, E., & Krejcar, O. (2021). DeprNet: A Deep Convolution Neural Network Framework for Detecting Depression Using EEG. Ieee Transactions on Instrumentation and Measurement, 70, 1-13. https://doi.org/10.1109/TIM.2021.3053999

Sharma, G., Parashar, A., & Joshi, A. M. (2021). DepHNN: A Novel Hybrid Neural Network for Electroencephalogram (EEG)-Based Screening of Depression. Biomedical Signal Processing and Control, 66, 102393. https://doi.org/10.1016/j.bspc.2020.102393

Wong, S. M., Arski, O. N., Workewych, A. M., Donner, E., Ochi, A., Otsubo, H., & Ibrahim, G. M. (2021). Detection of High-Frequency Oscillations in Electroencephalography: A Scoping Review and an Adaptable Open-Source Framework. Seizure, 84, 23-33. https://doi.org/10.1016/j.seizure.2020.11.009

Yaqoob, A., Musheer Aziz, R., & Verma, N. K. (2023). Applications and Techniques of Machine Learning in Cancer Classification: A Systematic Review. Human-Centric Intelligent Systems, 3(4), 588-615. https://doi.org/10.1007/s44230-023-00041-3

Downloads

Publication Timeline

Published
Submitted
Revised
Accepted

Issue

Section

Articles

How to Cite

Ahmadi, A. ., Ahanian, I., Amiri, N. ., Jafarnia Dabanloo, N., & Kashaninia, A. . (2026). Optimal Feature Selection and CNN Hyperparameter Tuning Using the Grey Wolf Optimizer for Depression Detection. Iranian Journal of Neurodevelopmental Disorders, 1-16. https://maherpub.com/index.php/jndd/article/view/935