Research Article

Emotion Recognition and Prediction Classification of Online Classroom Teachers Based on Machine Learning Algorithms

Yue Cao, Qiang Tong*, Meng Wan, Junyi Ma
Hubei Normal University

* Corresponding author:

Abstract

The large-scale development of online education has given rise to an urgent demand for digital teaching interaction. As the leading role in teaching, teachers' facial expressions contain rich emotional information, which is directly related to students' learning enthusiasm, classroom participation and the effect of knowledge understanding. Aiming at the problem of insufficient capture of key features in dynamic expression classification by LSTM, this paper proposes an expression classification algorithm based on multi-head attention mechanism to optimize LSTM. The research first conducts data mining through violin graph analysis and correlation heat map analysis, and then conducts comparative experiments with various machine learning algorithms such as decision tree, SVM, and KNN. The results show that all performance indicators of the proposed Multihead-Attention-LSTM model are optimal: the accuracy rate, recall rate, precision rate and F1 value all reach 99%, and the AUC value and ExtraTrees are both 100%, which is significantly better than other models. This research effectively enhances the accuracy of dynamic expression classification, providing reliable technical support for the digital implementation of teaching emotional interaction in online education scenarios, and has significant practical significance for improving the effectiveness of online teaching.

Keywords: Online education; multi-head attention mechanism; LSTM; teaching emotion.
Published: December 31, 2025
DOI: 10.54254/2753-8818/2026.31081
Volume: TNS Vol.150
pp. 58-64
Download PDF

References

  1. Maddu, Rama Bhadra Rao, and S. Murugappan. "Online learners’ engagement detection via facial emotion recognition in online learning context using hybrid classification model." Social Network Analysis and Mining 14.1 (2024): 43.
  2. Savchenko, Andrey V., Lyudmila V. Savchenko, and Ilya Makarov. "Classifying emotions and engagement in online learning based on a single facial expression recognition neural network." IEEE Transactions on Affective Computing 13.4 (2022): 2132-2143.
  3. Pabba, Chakradhar, and Praveen Kumar. "An intelligent system for monitoring students' engagement in large classroom teaching through facial expression recognition." Expert Systems 39.1 (2022): e12839.
  4. Gupta, Swadha, Parteek Kumar, and Raj Kumar Tekchandani. "Facial emotion recognition based real-time learner engagement detection system in online learning context using deep learning models." Multimedia Tools and Applications 82.8 (2023): 11365-11394.
  5. Yu, Hui. "Online teaching quality evaluation based on emotion recognition and improved AprioriTid algorithm." Journal of Intelligent & Fuzzy Systems 40.4 (2021): 7037-7047.
  6. Cen, Ling, et al. "A real-time speech emotion recognition system and its application in online learning." Emotions, technology, design, and learning. Academic Press, 2016. 27-46.
  7. Sakhi, Abdelhak, and Salah-Eddine Mansour. "Optimizing Virtual Classrooms: Real-Time Emotion Recognition with AI and Facial Features." International Journal of Robotics & Control Systems 5.2 (2025).
  8. Salloum, Said A., et al. "Emotion recognition for enhanced learning: using AI to detect students’ emotions and adjust teaching methods." Smart Learning Environments 12.1 (2025): 21.
  9. Oche, Agada Joseph, et al. "A systematic review of key retrieval-augmented generation (rag) systems: Progress, gaps, and future directions."  arXiv preprint arXiv: 2507.18910  (2025).
  10. Ding, Yi, and Wenying Xing. "Emotion recognition and achievement prediction for foreign language learners under the background of network teaching." Frontiers in Psychology 13 (2022): 1017570.