Explainable EEG-Based Framework for Student Attention Classification with LLM Instructional Recommendations - Samaher Dawood; Wafaa Alsaggaf; Miada Almasre (Journal of Applied Data Sciences, 2026)
Student attention is a central factor in learning effectiveness, yet most existing electroencephalography-based attention monitoring systems focus exclusively on classification accuracy without addressing interpretability or practical instructional utility. This paper presents a unified framework that integrates attention classification, explainable artificial intelligence, and large language model-driven instructional recommendations to bridge the gap between physiological monitoring and actionable teaching decisions. The framework derives binary attention labels from electroencephalography spectral features using the Theta-Beta Ratio combined with age-adjusted Monastra thresholds, applied here as population-level heuristic guidelines rather than individual diagnostic criteria. Five machine learning classifiers were trained and evaluated under stratified five-fold cross-validation on a publicly available dataset of 983 samples with precomputed electroencephalography spectral power features across five frequency bands. Gradient Boosting achieved the strongest performance, reaching 98.3% accuracy, 97.8% balanced accuracy, and a macro F1-score of 97.6%, with particularly reliable detection of the low-attention class. These figures represent an upper bound, given the shared spectral origin of the labeling mechanism and model inputs, and the absence of subject-level identifiers in the dataset. To ensure transparency, Shapley Additive Explanations analysis was applied at both global and local levels, identifying Beta and Theta band activity as the dominant predictors of attention state. A large language model component then maps each classified attention state to a concrete, knowledge-grounded instructional strategy drawn from peer-reviewed educational literature, providing teachers with an actionable pedagogical recommendation rather than a classification label alone. The proposed framework advances the field by combining classification accuracy, model interpretability, and practical instructional guidance within a single deployable system, providing a foundation for intelligent, transparent, and educationally responsive attention monitoring in real classroom settings.