Preliminary Electroencephalography-Based Assessment of Anxiety Using Machine Learning: A Pilot Study
Abstract
:1. Introduction
2. Materials and Methods
2.1. Participants
2.2. Research Procedure
- EEG Signal Acquisition: The initial stage involves recording brain activity via EEG electrodes placed on the participant’s scalp. The EEG signal captures brain waves associated with motor imagery tasks, such as imagined movements of the limbs.
- Preprocessing and Filtering: Raw EEG data undergoes preprocessing to remove noise and artifacts, improving the signal quality. This step is critical for ensuring that only the relevant brain activity related to motor imagery is retained for further analysis.
- In this study, preprocessing involved the following critical steps to enhance EEG signal quality:
- A band-pass filter (0.1–40 Hz) was applied to eliminate slow drifts and high-frequency noise.
- A notch filter at 50 Hz was used to remove power line interference.
- Artifact reduction was performed using spatial Laplacian filtering, which minimized muscle and ocular artifacts by enhancing local brain activity signals.
- Feature Extraction: In this stage, important features related to brain activity are extracted from the preprocessed EEG signals. These features capture the neural signatures associated with imagined movements and are used as inputs for the classification model.
- Classification: The extracted features are then fed into a classification algorithm (LDA), which classifies the brain activity into different categories, such as “left-hand movement” or “right-hand movement”, based on the participant’s motor imagery.
- Output and Feedback: Finally, the BCI system generates a classification result that can be used to control external devices or provide feedback to the user. This feedback can guide the user in performing motor tasks or interacting with the system.
2.3. Research Scenario
3. Results
3.1. Classification Results
3.2. EEG Data Analysis Using Machine Learning
3.3. Examples of AI Applications in Medicine
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Kufel, J.; Bargieł-Łączek, K.; Kocot, S.; Koźlik, M.; Bartnikowska, W.; Janik, M.; Czogalik, Ł.; Dudek, P.; Magiera, M.; Lis, A.; et al. What Is Machine Learning, Artificial Neural Networks and Deep Learning? Examples of Practical Applications in Medicine. Diagnostics 2023, 13, 2582. [Google Scholar] [CrossRef] [PubMed]
- Michael, J.A.; Wang, M.; Kaur, M.; Fitzgerald, P.B.; Fitzgibbon, B.M.; Hoy, K.E. EEG correlates of attentional control in anxiety disorders: A systematic review of error-related negativity and correct-response negativity findings. J. Affect. Disord. 2021, 291, 140–153. [Google Scholar] [CrossRef] [PubMed]
- Aldayel, M.; Al-Nafjan, A. A comprehensive exploration of machine learning techniques for EEG-based anxiety detection. PeerJ Comput. Sci. 2024, 10, e1829. [Google Scholar] [CrossRef] [PubMed]
- Satheesh Kumar, J.; Bhuvaneswari, P. Analysis of Electroencephalography (EEG) Signals and Its Categorization—A Study. Procedia Eng. 2012, 38, 2525–2536. [Google Scholar] [CrossRef]
- Chabowska, A.; Holer, K. Niezwykłe Możliwości Ludzkiego Mózgu. Mózg Nieposkromiony: Dążenie Człowieka do Doskonałości; Wydawnictwo Naukowe PWN: Warsaw, Poland, 2019; pp. 15–25. [Google Scholar]
- Michalik, B. Analiza Porównawcza Wydajności Klasyfikatorów pod Nadzorem w Realizacji Interfejsu Mózg-Komputer Opartego o Paradygmat P300; Praca Inżynierska; Politechnika Lubelska: Lublin, Poland, 2018. [Google Scholar]
- Mróz, K. Analiza Zastosowania Interfejsów Mózg-Komputer o Wybranym Paradygmacie w Życiu Codziennym; Praca Inżynierska; Politechnika Lubelska: Lublin, Poland, 2022. [Google Scholar]
- Jukiewicz, M. Detekcja Wybranych Wzrokowych Potencjałów Wywołanych na Potrzeby Interfejsu Mózg-Komputer. Ph.D. Thesis, Politechnika Lubelska, Lublin, Poland, 2018. [Google Scholar]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep Learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef]
- Myszczynska, M.A.; Ojamies, P.N.; Lacoste, A.M.B.; Neil, D.; Saffari, A.; Mead, R.; Hautbergue, G.M.; Holbrook, J.D.; Ferraiuolo, L. Applications of machine learning to diagnosis and treatment of neurodegenerative diseases. Nat. Rev. Neurol. 2020, 16, 440–456. [Google Scholar] [CrossRef]
- Mróz, K.; Plechawska-Wójcik, M. Analysis of the application of brain-computer interfaces of a selected paradigm in everyday life. J. Comput. Sci. Inst. 2022, 23, 118–122. [Google Scholar] [CrossRef]
- Velikova, S.; Locatelli, M.; Insacco, C.; Comi, G. EEG features in generalized anxiety disorder: A machine learning perspective. Neuropsychobiology 2010, 61, 169–176. [Google Scholar] [CrossRef]
- Muhammad, F.; Al-Ahmadi, S. Human state anxiety classification framework using EEG signals in response to exposure therapy. PLoS ONE 2022, 17, e0265679. [Google Scholar] [CrossRef]
- Rajendran, V.G.; Jayalalitha, S.; Adalarasu, K. EEG based evaluation of examination stress and test anxiety among college students. IRBM 2022, 43, 349–361. [Google Scholar] [CrossRef]
- Sakib, N.; Faruk, T.; Islam, M.K. Wireless EEG based anxiety screening among young adults using machine learning model. In Proceedings of the 2023 8th International Conference on Biomedical Imaging, Signal Processing, Singapore, 20–23 October 2023; pp. 97–103. [Google Scholar]
- Górski, P. Przetwarzanie Wstępne Nisko-Kanałowych Sygnałów EEG. Ph.D. Thesis, Zachodniopomorski Uniwersytet Technologiczny w Szczecinie, Szczecin, Poland, 2023. [Google Scholar]
- Bazgir, O.; Mohammadi, Z.; Habibi, S.A.H. Emotion Recognition with Machine Learning Using EEG Signals. In Proceedings of the 2018 25th National and 3rd International Iranian Conference on Biomedical Engineering (ICBME), Tehran, Iran, 29 November 2018; pp. 1–5. [Google Scholar] [CrossRef]
- What Is a Neural Network? Available online: https://www.geeksforgeeks.org/neural-networks-a-beginners-guide/ (accessed on 20 January 2025).
- Jackson, M.M.; Mappus, R. Applications for Brain-Computer Interfaces. Brain-Comput. Interfaces 2010, 6, 89–92. [Google Scholar]
- Szubert-Czarnocka, M.M. EEG-Biofeedback jako Metoda Komplementarna w Leczeniu Zaburzeń Lękowych; Pracownia Elektroencefalografii i Biofeedbacku Mazowieckiego Specjalistycznego Centrum Zdrowia im. prof. Jana Mazurkiewicza: Pruszków, Poland, 2014; Volume 6. [Google Scholar]
- Thomson, M.; Thompson, L. Podstawy diagnozowania. Lęk i panika. Strategie metakognitywne radzenia sobie z lękiem. In Neurofeedback; Biomed Neurotechnologie: Wroclaw, Poland, 2012; pp. 372–373. [Google Scholar]
- Trudeau, D.L. The treatment of addictive disorders by brain wave biofeedback: A review and sugestions for future ressearch. Clin. Elektrencephalography 2000, 31, 13–22. [Google Scholar] [CrossRef] [PubMed]
- Tveit, J.; Aurlien, H.; Plis, S. Automated Interpretation of Clinical Electroencephalograms Using Artificial Intelligence. JAMA Neurol. 2023, 80, 805–812. [Google Scholar] [CrossRef] [PubMed]
- Jonak, K.; Marchewka, M.; Podkowiński, A.; Siejka, A.; Plechawska-Wójcik, M.; Karpiński, R.; Krukow, P. How Functional Connectivity Measures Affect the Outcomes of Global Neuronal Network Characteristics in Patients with Schizophrenia Compared to Healthy Controls. Brain Sci. 2023, 13, 138. [Google Scholar] [CrossRef]
- Gerón, A. Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 2nd ed.; O’Reilly Media: Sebastopol, CA, USA, 2019. [Google Scholar]
- Belowska-Bień, K.; Bień, B. Application of artificial intelligence and machine learning techniques in supporting the diagnosis and treatment of neurological diseases. Aktual. Neurol. 2021, 21, 163–172. [Google Scholar] [CrossRef]
- Acharya, U.R.; Oh, S.L.; Hagiwara, Y.; Tan, J.H.; Adeli, H. Deep convolutional neural network for the automated diagnosis of anxiety using EEG signals. Biocybern. Biomed. Eng. 2021, 41, 38–49. [Google Scholar] [CrossRef]
- Gera, R.; Nagaraj, S.B.; Acharya, S. Frontal-midline theta as a neural marker of anxiety: A machine learning approach. J. Affect. Disord. 2023, 326, 100–109. [Google Scholar] [CrossRef]
- Li, Y.; Zhang, W.; Wang, H. EEG-based anxiety detection using attention-based deep neural networks. IEEE Trans. Neural Syst. Rehabil. Eng. 2022, 30, 1234–1242. [Google Scholar]
- Thibodeau, R.; Jorgensen, R.S.; Kim, S. Depression, anxiety, and resting frontal EEG asymmetry: A meta-analytic review. J. Abnorm. Psychol. 2006, 115, 715–729. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. In Advances in Neural Information Processing Systems (NeurIPS); Neural Information Processing Systems Foundation, Inc. (NeurIPS): La Jolla, CA, USA, 2017. [Google Scholar]
- Suryotrisongko, H.; Samopa, F. Evaluating OpenBCI Spiderclaw V1 Headwear’s Electrodes Placements for Brain-Computer Interface (BCI) Motor Imagery Application. Procedia Comput. Sci. 2015, 72, 398–405. [Google Scholar] [CrossRef]
- A Tutorial on EEG Signal Processing Techniques for Mental State Recognition in Brain-Computer Interfaces. Available online: https://www.researchgate.net/publication/281076368_A_Tutorial_on_EEG_Signal_Processing_Techniques_for_Mental_State_Recognition_in_Brain-Computer_Interfaces/figures (accessed on 23 April 2025).
- Open Vibe. Available online: https://openvibe.inria.fr/ (accessed on 26 March 2025).
- Pfeffer, M.A.; Ling, S.S.H.; Wong, J.K.W. Exploring the frontier: Transformer-based models in EEG signal analysis for brain-computer interfaces. Comput. Biol. Med. 2024, 178, 108705. [Google Scholar] [CrossRef] [PubMed]
- Bao, G.; Yan, B.; Tong, L.; Shu, J.; Wang, L.; Yang, K.; Zeng, Y. Data Augmentation for EEG-Based Emotion Recognition Using Generative Adversarial Networks. Front. Comput. Neurosci. 2021, 15, 723843. [Google Scholar] [CrossRef] [PubMed]
- Nijboer, F.; Birbaumer, N.; Kübler, A. The influence of psychological state and motivation on brain–computer interface performance in patients with amyotrophic lateral sclerosis—A longitudinal study. Front. Neurosci. 2018, 2, 19–24. [Google Scholar] [CrossRef] [PubMed]
Survey Participant | k-Fold Cross-Validation [%] | Sigma [%] | |||||||
---|---|---|---|---|---|---|---|---|---|
Step 1 | Step 2 | Step 3 | Step 4 | Step 5 | Step 6 | Step 7 | Average | ||
1 | 63.928571 | 79.642857 | 79.642857 | 63.214286 | 82.142857 | 80.357143 | 68.214286 | 73.87755 | 7.760135 |
2 | 70 | 80.357143 | 56.428571 | 66.785714 | 79.285714 | 83.571429 | 44.285714 | 68.673469 | 13.207685 |
3 | 95 | 86.785714 | 97.5 | 99.285714 | 97.5 | 78.571429 | 86.428571 | 91.581633 | 7.1705 |
Survey Participant | k-Fold Cross-Validation [%] | Sigma [%] | |||||||
---|---|---|---|---|---|---|---|---|---|
Step 1 | Step 2 | Step 3 | Step 4 | Step 5 | Step 6 | Step 7 | Average | ||
1 | 53.714286 | 52.857143 | 39.357143 | 47.232857 | 60.589429 | 15.143523 | 55.231425 | 46.303687 | 13.135478 |
2 | 50.714286 | 37.857143 | 34.285714 | 35.357143 | 68.214286 | 17.142857 | 42.142857 | 40.816327 | 14.599506 |
3 | 44.285714 | 63.571429 | 47.5 | 52.857143 | 48.928571 | 72.5 | 52.857143 | 54.642857 | 9.226657 |
Survey Participant | Cls vs. Cls [%] | |||
---|---|---|---|---|
Input 1 | Input 2 | |||
1 | 2 | 1 | 2 | |
1 | 78.6 | 21.4 | 30.8 | 69.2 |
2 | 70.7 | 29.3 | 33.4 | 66.6 |
3 | 92 | 8 | 8.9 | 91.1 |
Survey Participant | Cls vs. Cls [%] | |||
---|---|---|---|---|
Input 1 | Input 2 | |||
1 | 2 | 1 | 2 | |
1 | 79 | 21 | 26.7 | 73.3 |
2 | 74.5 | 25.5 | 28.7 | 71.3 |
3 | 92.3 | 7.7 | 8.1 | 91.9 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Mróz, K.; Jonak, K. Preliminary Electroencephalography-Based Assessment of Anxiety Using Machine Learning: A Pilot Study. Brain Sci. 2025, 15, 571. https://doi.org/10.3390/brainsci15060571
Mróz K, Jonak K. Preliminary Electroencephalography-Based Assessment of Anxiety Using Machine Learning: A Pilot Study. Brain Sciences. 2025; 15(6):571. https://doi.org/10.3390/brainsci15060571
Chicago/Turabian StyleMróz, Katarzyna, and Kamil Jonak. 2025. "Preliminary Electroencephalography-Based Assessment of Anxiety Using Machine Learning: A Pilot Study" Brain Sciences 15, no. 6: 571. https://doi.org/10.3390/brainsci15060571
APA StyleMróz, K., & Jonak, K. (2025). Preliminary Electroencephalography-Based Assessment of Anxiety Using Machine Learning: A Pilot Study. Brain Sciences, 15(6), 571. https://doi.org/10.3390/brainsci15060571