DOI: 10.3390/s26216943 ISSN: 1424-8220

A Lightweight Hybrid-Attention Conformer for Affective State Recognition from Wearable EEG

Mustafa Eriş, Fatma Güneş Eriş, Orhan Yaman

Recognizing affective states from electroencephalography (EEG) is a core task in affective computing, with applications in mental health monitoring and public safety. Most existing approaches rely on handcrafted features or image-based transformations of EEG, while transformer models capture global context at high computational cost. This study proposes KimiFormer, an end-to-end hybrid-attention Conformer that classifies raw EEG directly. A hierarchical Spatio-Temporal Stemming (STS) module tokenizes the multichannel signal and learns inter-electrode relationships. Stacked Conformer blocks combine linear and full attention in a 3:1 ratio, reducing computational cost while preserving long-range modeling. The model was evaluated on the public EEG Violence Dataset, recorded with a 14-channel wearable headset from 14 participants viewing violent and neutral videos. Under record-wise leave-one-record-out cross-validation with nested selection of the training hyperparameters, KimiFormer achieved 95.5% accuracy (97.0% under 10-fold cross-validation). On the external DREAMER dataset, its subject-independent performance remained close to chance (balanced accuracy 52.7% for valence and 50.2% for arousal), as did that of two established raw-EEG models. Ablation showed the STS module to be essential (65% accuracy without it). With 3.2 M parameters, 1.51 GFLOPs and an inference latency of 15.64 ms per sample, KimiFormer is suited to real-time, on-device processing of low-channel wearable EEG.

More from our Archive