journal article·2026-02-02Open access

Computational Analysis of EEG Responses to Anxiogenic Stimuli Using Machine Learning Algorithms

Felix-Constantin Adochiei, Anamaria Ioniță, Ioana-Raluca Adochiei, Oana-Isabela Stirbu, Gladiola Petroiu, Florin Ciprian Argatu

Applied Sciences· Volume 16· Issue 3

Abstract

Anxiety disorders are commonly assessed using instruments such as HAM-A and GAD-7. These tools rely on patient self-report and clinician interpretation, which may introduce variability. This study proposes an EEG-based computational framework for estimating anxiety levels using portable EEG recordings from the Unicorn Hybrid Black device. These data were harmonized with the DASPS public dataset to ensure methodological consistency. After standardized preprocessing and multi-domain feature extraction, three classifiers—logistic regression, multilayer perceptron (MLP), and k-nearest neighbors (KNN)—were trained and evaluated. Logistic regression achieved 81.25% accuracy (F1 = 0.8247), while the MLP reached 87.5% accuracy (F1 = 0.859). ROC analysis (AUC = 0.98 for logistic regression and 0.92 for MLP) confirmed that both classifiers reliably separated non-anxious from moderate participants. Severe anxiety could not be classified, reflecting the extremely limited number of participants in this category. Predicted anxiety probabilities showed significant correlations with HAM-A scores (r up to 0.71, p < 0.01), supporting the external validity of the proposed approach.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: EEG and Brain-Computer Interfaces · Emotion and Mood Recognition · Anxiety, Depression, Psychometrics, Treatment, Cognitive Processes

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Measurements, Electrical Apparatus, and Static Converters (DMAECS), National University of Science and Technology POLITEHNICA Bucharest, 313 Splaiul Independentei, District 6, 060042 Bucharest, Romania

Academy of Romanian Scientists, Ilfov 3, 050044 Bucharest, Romania

Emil Palade Center of Excellence for Young Researchers, Academy of Romanian Scientists, Ilfov 3, 050044 Bucharest, Romania

Department of Integrated Aviation Systems and Mechanics, Military Technical Academy “Ferdinand I”, 39–49 George Coșbuc Blvd., District 5, 050141 Bucharest, Romania

Faculty of Medical Bioengineering, Grigore T. Popa University of Medicine and Pharmacy of Iași, 9-13 Kogalniceanu Str., 700454 Iași, Romania

Funding

National University of Science and Technology POLITEHNICA Bucharest

References (45)

Show source-provided references
1. A Review and Meta-Analysis of the Genetic Epidemiology of Anxiety Disorders10.1176/appi.ajp.158.10.1568 ↗
2. Wang, Y., Chai, F., Zhang, H., Liu, X., Xie, P., Zheng, L., Yang, L., Li, L., and Fang, D. (2016). Cortical functional activity in patients with generalized anxiety disorder. BMC Psychiatry, 16.10.1186/s12888-016-0917-3 ↗
3. Al-Ezzi, A., Kamel, N., Faye, I., and Gunaseli, E. (2020). Review of EEG, ERP, and Brain Connectivity Estimators as Predictive Biomarkers of Social Anxiety Disorder. Front. Psychol., 11.10.3389/fpsyg.2020.00730 ↗
4. Quantitative electroencephalographic biomarker of pharmacological treatment response in patients with anxiety disorder: A retrospective study10.1038/s41598-023-30994-1 ↗
5. A Study on Multi-Class Anxiety Detection Using Wearable EEG Headband10.1007/s12652-021-03249-y ↗
6. Muhammad, F., and Al-Ahmadi, S. (2022). Human State Anxiety Classification Framework Using EEG Signals in Response to Exposure Therapy. PLoS ONE, 17.10.1371/journal.pone.0265679 ↗
7. Validation of the g.tec Unicorn Hybrid Black wireless EEG system10.1111/psyp.14320 ↗
8. Baghdadi, A., Aribi, Y., Fourati, R., Halouani, N., Siarry, P., and Alimi, A.M. (2019). DASPS: A Database for Anxious States Based on a Psychological Stimulation. arXiv.
9. A validation of Emotiv EPOC Flex saline for EEG and ERP research10.7717/peerj.9713 ↗
10. 10/20, 10/10, and 10/5 systems revisited: Their validity as relative head-surface-based positioning systems10.1016/j.neuroimage.2006.09.024 ↗
11. Emotions recognition using EEG signals: A survey10.1109/TAFFC.2017.2714671 ↗
12. Tripathi, S., Acharya, S., Sharma, R., and Mittal, S. (2017, January 4–9). Using deep and convolutional neural networks for accurate emotion classification on DEAP dataset. Proceedings of the AAAI, San Francisco, CA, USA.10.1609/aaai.v31i2.19105 ↗
13. Feature extraction and selection for emotion recognition from EEG10.1109/TAFFC.2014.2339834 ↗
14. World Medical Association (2013). World Medical Association Declaration of Helsinki: Ethical Principles for Medical Research Involving Human Subjects. JAMA, 310, 2191–2194.10.1001/jama.2013.281053 ↗
15. EEGLAB: An open source toolbox for analysis of single-trial EEG dynamics including independent component analysis10.1016/j.jneumeth.2003.10.009 ↗
16. MNE software for processing MEG and EEG data10.1016/j.neuroimage.2013.10.027 ↗
17. ICLabel: An automated electroencephalographic independent component classifier for artifact removal and data standardization10.1016/j.neuroimage.2019.05.026 ↗
18. Gramfort, A., Luessi, M., Larson, E., Engemann, D.A., Strohmeier, D., Brodbeck, C., Goj, R., Jas, M., Brooks, T., and Parkkonen, L. (2013). MEG and EEG data analysis with MNE-Python. Front. Neurosci., 7.10.3389/fnins.2013.00267 ↗
19. The five percent electrode system for high-resolution EEG and ERP measurements10.1016/S1388-2457(00)00527-7 ↗
20. EEGLAB, SIFT, NFT, BCILAB, and ERICA: New tools for advanced EEG processing10.1155/2011/130714 ↗
21. The use of fast Fourier transform for the estimation of power spectra: A method based on time averaging over short, modified periodograms10.1109/TAU.1967.1161901 ↗
22. Quantification of EEG irregularity by use of the entropy of the power spectrum10.1016/0013-4694(91)90138-T ↗
23. EEG analysis based on time domain properties10.1016/0013-4694(70)90143-4 ↗
24. EEG signal classification using wavelet feature extraction and a mixture of expert models10.1016/j.eswa.2006.02.005 ↗
25. Time–frequency analysis of EEG signals for emotion classification using DWT
26. Liu, Y., Sourina, Z., and Nguyen, M.K. (2010, January 20–22). Real-time EEG-based emotion recognition and visualization. Proceedings of the 2010 International Conference on Cyberworlds, Singapore.10.1109/CW.2010.37 ↗
27. The assessment of anxiety states by rating10.1111/j.2044-8341.1959.tb00467.x ↗
28. Resting-state connectivity biomarkers define neurophysiological subtypes of depression10.1038/nm.4246 ↗
29. SMOTE: Synthetic Minority Over-sampling Technique10.1613/jair.953 ↗
30. Lemaître, G., Nogueira, F., and Aridas, C.K. (2017). Imbalanced-learn: A Python Toolbox to Tackle the Curse of Imbalanced Datasets in Machine Learning. arXiv.
31. Hastie, T., Tibshirani, R., and Friedman, J. (2009). The Elements of Statistical Learning, Springer.10.1007/978-0-387-84858-7 ↗
32. K-Nearest Neighbour Classifiers—A Tutorial
33. Using deep neural networks for accurate emotion classification on the DEAP dataset
34. Deep learning for electroencephalogram (EEG) classification tasks: A review10.1088/1741-2552/ab0ab5 ↗
35. An introduction to ROC analysis10.1016/j.patrec.2005.10.010 ↗
36. Varma, M., and Simon, R. (2006). Bias in error estimation when using cross-validation for model selection. BMC Bioinform., 7.10.1186/1471-2105-7-91 ↗
37. Learning from Imbalanced Data10.1109/TKDE.2008.239 ↗
38. Kohavi, R. (1995, January 20–25). A study of cross-validation and bootstrap for accuracy estimation and model selection. Proceedings of the 1995 International Joint Conference on AI, Montreal, QC, Canada.
39. Statistical comparisons of classifiers over multiple data sets
40. Regression Models of Pearson Correlation Coefficient10.1080/24754269.2023.2164970 ↗
41. Using brain structural neuroimaging measures to predict psychosis onset for individuals at clinical high-risk10.1038/s41380-024-02426-7 ↗
42. Blagus, R., and Lusa, L. (2013). SMOTE for high-dimensional class-imbalanced data. BMC Bioinform., 14.10.1186/1471-2105-14-106 ↗
43. Motivation, emotion, and their inhibitory control mirrored in brain oscillations10.1016/j.neubiorev.2006.10.004 ↗
44. Resting state EEG delta-beta coherence in relation to anxiety, behavioral inhibition, and selective attentional processing of threatening stimuli10.1016/j.ijpsycho.2011.01.011 ↗
45. Interpreting EEG alpha activity10.1016/j.neubiorev.2013.05.007 ↗