Abstract
Online learning has become a mainstream instructional modality worldwide. However, early warning models suffer from three critical deficiencies in hard sample identification: temporal feature dependency, class imbalance, and weak feature extraction capability for boundary-ambiguous samples. This paper proposes an early warning framework, FocalGAN-SEE, which comprises a Focal Generative Adversarial Network (FocalGAN) that generates hard boundary samples to alleviate class imbalance, and an SE attention-enhanced encoder (SE Encoder) that adaptively amplifies discriminative features of hard at-risk samples through temporal channel recalibration. Unlike standard generative models, the FocalGAN incorporates a focal hard-sample loss that drives the generator to produce boundary-ambiguous samples, thereby enhancing the classifier’s robustness to hard samples. We compared the proposed architecture with attention-enhanced autoencoders, deep generative models, and oversampling-based models currently used in online learning early warning systems. The results show that the proposed FocalGAN-SEE achieves superior performance across accuracy, precision, recall, F1-score, and AUC, and can identify more hard at-risk samples in earlier course modules. Data visualization shows that the focal loss successfully guides the model to focus on the hard region with the highest overlap in the feature space, and FocalGAN-SEE can detect more hard samples at ambiguous boundaries. Finally, we adopt SHAP to interpret the prediction logic of the model, so as to assist teachers in implementing personalized teaching interventions. This paper provides a principled solution to hard at-risk sample recognition in imbalanced sequential data and offers practical value for online course management and personalized interventions.