Abstract:
Monitoring student engagement during a lecture objectively is diffcult. Instructors depend on visual cues that are easy to miss, self-report questionnaires that interrupt the session, and post-hoc performance data that arrives too late to act on. This thesis addresses that gap with an EEG-based engagement monitoring system built for virtual reality learning environments and evaluated under real cross-subject deployment conditions. EEG data were collected from 16 participants using an OpenBCI Cyton board (8 channels, 250 Hz) while they watched academic lectures through a Meta Quest 2 headset. Each participant completed six sessions across six undergraduate subjects at three diffculty levels, giving four cognitive conditions per session. Recordings were preprocessed with a 50 Hz notch flter, a 1–40 Hz band-pass flter, artifact rejection, and 2- second Hamming windows with 50% overlap. Pipeline A assigned four-class cognitive load labels, producing 80,640 windows. Pipeline B computed 24-dimensional Welch PSD feature vectors and assigned binary engaged/disengaged labels via the Pope Engagement Index. Three novel deep learning architectures were evaluated under a fve-fold stratifed subject-independent cross-validation protocol. EEG-HybridFormer, combining a multi-scale convolutional front-end with a Transformer encoder and DINO selfsupervised training, achieved the highest mean accuracy of 85.64%. EEG-Deformer++ reached 78.45% and EEG-DINO++ established a 50.66% unsupervised baseline. An ablation study confrmed that subject-independent evaluation reduces accuracy by 12– 15 percentage points relative to a random split. A group disengagement detection module flags timestamps where six or more participants are disengaged for six or more consecutive seconds. Hard sessions consistently produced more disengagement zones, peaking at 13 of 16 students in the most diffcult Digital Logic Design session. A real-time inference pipeline using BrainFlow, a FastAPI WebSocket server, and a React dashboard demonstrates live deployment. The results show that subject-independent EEG engagement classifcation is feasible from a low-channel consumer-grade device, and that content diffculty reliably predicts grouplevel disengagement in a VR lecture setting