arXiv:2610.33832cs.LGOct 2026

Manuscript Offprint

arXiv:2610.33832

EEGBiFormer: Real-Time EEG Attention Classification via Hybrid CNN-Transformer with EEG-Informed Auditory Protocol Validation

Isabella Guan

Isabella Guan

Lake Washington High School

Kirkland, WA, USA

isabellaguan2009@gmail.com

Abstract—Sustained attention is critical for academic performance, yet existing auditory support tools are static and not grounded in real-time neural evidence. This paper presents EEGBiFormer, a hybrid CNN–Transformer model for real-time binary classification of attention states, focus versus non-focus, from 16-channel EEG signals. A custom analog front-end acquisition board was designed and built to collect a task-based EEG dataset. Before model training, spectral and connectivity analysis, using Power Spectral Density and Phase Locking Value, confirmed distinct neural signatures between attention states, providing physiological grounding for the classification approach. EEGBiFormer achieved 91.3 percent window-level validation accuracy with an F1 score of 94.5 percent, and 88.2 percent recording-level accuracy across 17 independent sessions. End-to-end system latency was measured below 100 ms, supporting real-time responsiveness. The trained model was further used to objectively rank auditory stimuli by focus-state confidence, yielding EEG-informed audio protocols. In a paired within-subject behavioral study with 37 participants, these protocols produced a statistically significant 20 percent improvement in composite attention scores over silent controls, with a medium-to-large effect size. This work demonstrates a complete pipeline from custom EEG hardware through neural signal analysis, deep learning classification, and evidence-based auditory protocol design.

Index Terms—EEG, attention classification, CNN-Transformer, binaural beats, real-time classification, biomedical engineering

I. INTRODUCTION

Sustained attention is essential for effective learning, yet many adolescents experience significant difficulties sustaining attention during academic tasks, particularly those with Attention-Deficit/Hyperactivity Disorder (ADHD). Auditory strategies such as background music, white noise, and binaural beats (BB) are widely used informally to support focus, with therapeutic benefits for attention and cognitive performance reported particularly in clinical and autism-spectrum populations [1]–[5]. In the general adolescent population, however, such strategies are typically selected by subjective preference rather than objective neural evidence.

Electroencephalography (EEG) provides a non-invasive window into cortical dynamics at millisecond resolution [6], [7]. Prior research has identified reliable neural correlations of attentional engagement: elevated theta activity (4–8 Hz) and

Figure

Fig. 1. EEGBiFormer real-time pipeline.

reduced alpha power (8–13 Hz, “alpha blocking”) are consistently observed during focused cognitive states, while inter-regional phase synchrony, quantified via Phase Locking Value (PLV), reflects the large-scale functional network coordination that underlies sustained attention [8]–[11].

Despite this neuroscientific foundation, existing attention-support audio tools remain disconnected from physiological data. They neither adapt to the user's real-time neural state nor use objective EEG measures to guide audio selection. This gap motivates the present work.

The work consists of three main contributions: (1) a custom 16-channel EEG acquisition system and task-based dataset; (2) EEGBiFormer, a lightweight hybrid Convolutional Neural Network (CNN)-Transformer achieving 91.3% accuracy for binary attention classification; and (3) an EEG-informed audio selection methodology validated in a 37-participant behavioral study (p < 0.001).