Privacy-Preserving EEG Stress Classification via Hybrid CNN–Transformer Learning and Selective Machine Unlearning

Authors

  • Riaz UlAmin University of Okara https://orcid.org/0000-0003-1620-9557
  • Yusra University of Okara
  • Javed Rashid Department of Mathematics, University of Okara
  • Muhammad Shoaib Saleem Department of Mathematics, University of Okara
  • Muhammad Sajjad Saleem Department of Computer Science & IT, University of Okara

Keywords:

selective machine unlearning, stress recognition, Electroencephalography (EEG), privacy-preserving learning, neural signal processing

Abstract

Electroencephalography (EEG) for stress detection is an emerging area of interest in affective computing, brain-computer interfaces (BCIs), and mental health monitoring. EEG is beneficial in both determining stress-related patterns of neural activity and measuring related neural activity. This information is useful for health monitoring, workplace safety, and adaptive human-computer interaction. However, due to biometric nature of its data, EEG is a potential source of privacy violations, in consideration of the General Data Protection Regulation (GDPR) and the Health Insurance Portability and Accountability Act (HIPAA). This paper presents a Convolutional Neural Network (CNN) and Transformer model for classifying stress states of EEG data — Negative, Neutral, and Positive — in a privacy-preserving manner. EEG data from subjects is first processed using band-pass filtering, Independent Component Analysis (ICA), normalization, and class balancing. This yields structured inputs for deep learning models. We propose a selective machine unlearning method to erase data pertaining to specific participants, without a full model retraining, by freezing a number of CNN layers and performing Transformer and classification layer updates. The results show the baseline model achieves 95.67% test accuracy, while the privacy compliant model post unlearning, achieves 96.59%. The results show that privacy-preserving mechanisms, can be used in conjunction with EEG-based stress monitoring solutions, without reducing the level of predictive accuracy of the solution.

Downloads

Published

2026-03-31