image


Utilizing Machine Learning for Behavioral Analysis in Educational Environments: A Study on Student Engagement and Classroom



Zin Mar Soe


School of AI Computing & Multimedia, Lincoln University College, Malaysia


Corresponding author’s e-mail: zinmarsoe.phdscholar@lincoln.edu.my



Received: 21 Sep 2025

Revised: 24 Mar 2026

Accepted: 25 Mar 2026

DOI: doi.org/10.60072/ijeissah.2026.v4i02.007


ABSTRACT


The quality of students’ learning experiences is closely linked to their level of interest, effective teaching practices, and a safe, supportive classroom environment. While skilled teachers can simplify challenging subjects and help students achieve academic success, learning outcomes remain limited when students are disengaged or unmotivated. For school administrators and education policymakers, understanding these classroom dynamics is essential, yet continuous observation of students and teachers is difficult, time‑consuming, and often subjective. Students’ facial expressions and body language offer important clues about their attention, emotions, and engagement. However, it is not realistic for teachers to consistently monitor these subtle cues while teaching. To address this challenge, this concept paper explores the use of machine learning to support behavioral analysis in both physical and online classroom settings. The proposed approach combines YOLO version 7 (You Only Look Once) to detect behaviors such as posture, gestures, and facial presence, with the Facial Action Coding System (FACS) to identify micro‑expressions associated with emotions including happiness, confusion, anger, and boredom. Data are drawn from CCTV recordings in physical classrooms and video recordings from online learning environments. As a concept paper, the empirical results are still in development. Nevertheless, the proposed framework is expected to offer teachers and school administrators clearer, more objective insights into student behavior. These insights may help schools improve learning environments, refine instructional strategies, and better understand whether student disengagement stems from digital device use, teaching methods, or unengaging learning materials.


Keywords: Classroom Dynamics; Facial Expressions; Machine Learning; Student Behavior; Student Engagement


image

This is an open access article under the CC BY NC ND license (https://creativecommons.org/licenses/by-nc- nd/4.0/?ref=chooser-v1); © 2026. Published by Asia Pacific Higher Learning Sdn Bhd., Malaysia


Background


With the advancing technology, expert systems and deep learning have become tools that are widely used in various fields and expertise. In industries such as manufacturing factories, farming, and medical, expert systems are used to further enhance the working environment by providing help where needed. This help can range from assembling cars, monitoring moisture in the soil to diagnosing patients before they meet up with the doctor. In the education sector, various methods of teaching and learning are being used around the world using technology aids. Analyzing student behavior in the classroom is not popular enough in our country. Furthermore, upon analyzing student behavior, the learning environment of the entire classroom as well as the teaching environment can be analyzed and monitored to deliver the best lectures that draw the attention of the student as well as bring out the skills of a teacher.


Identifying a student’s interest and the ability to capture it for the whole lecture period is a skill that every teacher must possess. In situations where the students are losing focus, it could be one of two things: they have no interest in the subject, or they have no interest in the teacher. Having no interest in the subject is a case where the teacher and the student should discuss and decide if students would like to continue taking their class or not. Having no interest in the teacher is a case where either the teacher needs to improve their teaching skills or teaching style or knowledge or the school and the teacher should collaborate to create a better environment where both the teacher and the students can learn efficiently without many distractions. All these behaviors will be caught by the CCTV camera installed in each classroom and can be used to analyze the student as well as the teacher, greatly enhancing the final product of the lectures. Furthermore, if disputes arise between students in the classroom, we can monitor student anger and aggression and build safe and secure classrooms.


This paper aims to create an excellent teaching and learning environment in school. Parallelly, to improve the good performance of the teachers and students and to get the competency in education. The objective of this study is to apply machine learning models to analyze student behavior in both physical and online classroom settings, to categorize different types of student behavior that affect the teaching environment, to assess the effectiveness of teaching strategies in responding to student behavior, and to build a safe and secure classroom environment.


Literature Review


Research on teacher professional development (PD) in language education consistently indicates that effective support for professional learning is sustained, content-driven, practice-oriented, and tailored to specific school contexts, rather than being offered through brief, transmission-focused workshops (Avalos, 2011; Darling-Hammond, 2017). Recent studies show that one of the biggest problems with making instruction better over time is that the design of professional development doesn't fit with the way teachers actually work, especially in places with few resources. Evidence from rural and resource- constrained settings indicates that while short-term professional development programs can enhance teachers' awareness of communicative strategies such as Communicative Language Teaching (CLT), they frequently do not mitigate institutional challenges, including large class sizes, limited resources, and administrative pressures (Dewan, Murshed, & Lin, 2019).


This study will focus on international schools in Yangon city and will study the behavior of a maximum of 25 students in a classroom. This study will be mainly aimed at international schools in Yangon city, and the behavior of a maximum of 25 students in a classroom will be studied through CCTV recordings of about 25 minutes. Permission will be sought from the students and their parents before conducting the research.


Machine learning in education

Machine learning is a sub of AI where datasets are input, and a wanted output is received. Machine Learning uses a data-driven approach, it is typically trained on historical data and then used to make predictions on new data. ML can find patterns and insights in large datasets that might be difficult for humans to discover.

image

Figure 1: Subsets of AI


Machine Learning has three types of learning:

Supervised learning: It is when a model is given datasets labeled, and the required output is made from the datasets. It then works its way through the data sets to give back the results it was requested.

Unsupervised learning: It is when a model is given datasets which are not labeled. The model analyses characteristics and identifies hidden patterns without knowing what the right answer is.


image


Figure 2: Supervised Learning Model

image

Figure 3: Unsupervised Learning Model

Reinforcement learning: It is a model that learns through trials and errors by interacting with its environment. It also includes rewards and penalties based on its actions and the model learns to outweigh the rewards.


image


Fig 4: Reinforcement Learning Model


Behavioral Analysis in the Classroom

Understanding student behavior has long been a key area of research in education. Traditionally, behavioral analysis has been conducted through observational studies and surveys. However, recent advances in technology have enabled real-time data collection through learning management systems (LMS), clickstream data, and other digital tools. The intersection of these methods with ML opens new possibilities for identifying and addressing issues such as disengagement, lack of participation, and declining performance.


Research into student behavior in educational settings has evolved over the past few decades, with a focus on classroom management and teaching strategies. Studies such as those by Laslett & Smith, (2002) emphasize the need for effective classroom control to enhance learning, while more recent research by Stroebe, (2020) has delved into how student behavior directly affects teaching performance. There is also significant literature exploring positive behavior interventions and support (Chen & Guan, 2022) to manage disruptive behaviors, which suggest that tailored interventions lead to a more conducive learning environment. However, there is a gap in research addressing how teachers can modify their teaching environment based on ongoing behavioral analyses, which this study seeks to explore.


Methods


This study will employ a mixed-method approach, combining quantitative data analysis with machine learning techniques.


Data Collection

Data collection in physical classrooms will be done through attendance and participation, performance metrics, and sensor data. Data collection in online classrooms will be done through engagement metrics. Attendance & Participation: Track students' physical presence, response times, participation in discussions, body language from the video recordings and interaction with peers and instructors. Performance Metrics: Gather scores from quizzes, tests, and assignments, as well as other performance indicators like improvement over time.


Sensor Data: If available, incorporate IoT data such as sensors for movement (e.g., tracking students’ physical engagement, postures). Engagement Metrics: Track log-in times, time spent on online platforms, participation in discussions, interaction with resources (e.g., videos, PDFs), and activity levels in online forums or virtual classrooms. Relevant features will be extracted from the video recording data and other resources, including:

Engagement indicators: participation, attendance, completion of assignments. Performance metrics: grades, quiz scores.

Behavioral signals: time spent on tasks, response times, frequency of interactions.


Behavior Recognition Models

YOLO (You only look once) and Facial Action Coding System (FACS) will be used as the primary models. YOLO will be used to capture the faces of the students and FACS will be used to analyze intricate details of the expressions. YOLO is a fast object detection model that can detect multiple objects in a single frame (Wang, et al., 2023) of an image or video. In the context of student learning behavior recognition, YOLO can be used to detect behaviors based on body posture, gestures, and facial expressions in real-time video feeds.


Face Detection and Attention Tracking: YOLO can be used to detect student faces and track where their gaze is directed, helping to determine if they are paying attention to the teacher or looking elsewhere. Gesture Recognition: YOLO can detect specific hand gestures or body movements, such as raising hands to ask questions, writing, or using devices, which may indicate engagement or distraction. Body Posture Analysis: By recognizing body positions (e.g., sitting upright, slouching, or turning away), YOLO can identify whether students are attentive, bored, or disengaged (Tran, et al., 2023).


By putting in a real-time video feed from a classroom or virtual learning environment, YOLO detects objects of interest such as the students’ faces, hands, and body posture within the video frames. It uses the algorithm that classifies student behavior based on the detected features. These can be labeled with focused, distracted, or engaged. Due to its instant feedback, teachers can adjust the teaching methods while still in class.


Facial Action Coding System: Another model that will be used is Emotion Recognition Models (Facial Action Coding System, FACS). These models analyze micro-expressions on the face to detect emotions such as happiness, anger, confusion, or boredom. Theyion recognition can help teachers gauge the emotional responses of students (Trabelsi, et al., 2023) to lessons, identifying when they are engaged, confused, or frustrated. The advantage of using FACS is its design of mapping out muscle movements on the face, creating a more detailed categorization by combining different action units.


Recent work has shown the possibility of combining YOLO-based face detection along with Facial Action Coding System (FACS) analysis. Zhou (2023) proposed a real-time system where YOLO detects faces and performs expression recognition based on Action Units, utilizing Ekman & Friesen (1978)’s FACS framework.


image

Figure 5: Process of Student Learning Behavior Recognition


Theoretical Framework Overview

Machine learning will allow the student’s facial expressions to be recorded, analyzed, and categorized based on the combination of different action units. However, to determine a student’s interest level, the cluster of data will need to be compared against existing theory. The students’ facial actions will be compared to check satisfaction, motivation, and social participation. The study will be grounded in three complementary educational theories: Self-Determination Theory (SDT; Ryan & Deci, 2000), Engagement Theory (Kearsley & Shneiderman, 1998), and Social Cognitive Theory (Bandura, 1986).


Recent research has increasingly supported machine learning to operate and rationalize theoretical constructions based on educational psychology. Chan, et al., (2022) conducted a systematic review of 42 studies connecting Self-Determination Theory to learning analytics, identifying common operationalizations where the learners’ autonomy was concluded from navigation choice patterns, competence derived from performance trajectories, and relatedness from social interaction features. Similarly, analyzed 35 studies applying the Social Cognitive Theory with Machine Learning, identifying how self-efficacy, observation learning and reciprocal determinism are defined. In terms of engagement detection, multimodal approaches combining facial expression, posture, and physiological data have been a promising method. The reviewed Machine Learning methods for engagement detection and linked them to Engagement Theory’s Relate-Create-Donate framework, noting that facial expression features categorized by action unit combinations are the most direct behavioral indicators of engagement. Grafsgaard, et al., (2013) also demonstrated that certain action units combined could differentiate emotions and facial expressions more effectively. For example, AU4 (brow lower), AU7 (lid tightener), and AU12 (lip corner puller) combinations result in confusion which could be misunderstood as engagement in tutoring contexts.


Results and Discussion


Facial expression intensity is predicted to fluctuate throughout the learning sessions, with higher variations during problem-solving tasks and lower variability during study content sharing. This pattern would be in place with Engagement Theory’s prediction that active learning tasks which fuels the creativity of the students produce more dynamic engagement behaviors compared to passive reception (Kearsley & Shneiderman, 1998). It is also hypothesized that collaborative learning conditions such as group work during learning sessions will show higher frequencies of AU6+AU12, indicating genuine smiles, whereas individual conditions such as working alone are expected to show longer durations of facial stillness, indicating focused attention, or a fixed, unfocused gaze, indicating lack of engagement and zoning out.


Based on the predicted results, certain changes can take place to enhance the learning experience of the students. In classes where most students prefer collaborative learning and feel unmotivated during individual learning, group projects can be integrated more into the learning process in place of lecture- style content delivery or individual reading. For students with attention deficit, active learning such as using flash cards or quizzes can be cooperated into the learning style to stimulate the students. However, these methods will need additional counseling between students, parents, teachers, and academic administrators to determine whether the issue lies in the student’s lack of motivation and attention due to personal behavior, the teacher’s incorrect method in approaching the students, or the student’s perspective on the subject matter. This would require additional questionnaires to get an in-depth idea of the problems. Teachers and academic administrators should also be careful during the counseling to not offend the student with words that might indicate the student as inferior.


As learners, students are bound to be unmotivated and unattentively. By keeping a student’s behavior as the fixed variable, the teacher can utilize different techniques in class to draw the student in. Therefore, teachers will also undergo additional training or workshops to help them equip with methods or resources when transitioning from one teaching style to another, creating flexibility and adaptability in personalized teaching styles and approaches when meeting different students. To assess the classroom atmosphere, regular surveys can take place after every semester to evaluate and keep the balance between students’ behavior and teachers’ performance.


Conclusion


This concept paper proposed a study applying machine learning—YOLO for behavior detection and the Facial Action Coding System (FACS) for micro-expression analysis—to analyze student behavior in physical and online classrooms. Based on Self-Determination Theory, Engagement Theory, and Social Cognitive Theory, the study aims to provide real-time, objective behavioral data to enhance teaching practices and classroom management.


Anticipated findings suggest that facial expression patterns will vary across different learning tasks, with collaborative activities showing higher positive effect and individual tasks showing long durations of facial stillness or lack of engagement. These patterns of behaviors will provide insights into student motivation, engagement, and social learning processes. These findings will allow schools to identify whether the lack of engagement and motivation derives from teaching methods, subject matter, or external distractions. Teachers may receive specific training to adapt to their teaching styles, while regular surveys from students can help evaluate the teachers’ performance and counseling sessions can complement the behavioral data to ensure respectful interpretations and effective interventions.


Declarations


Ethics Approval and Consent to Participate: All participants provided informed consent before data collection. Their participation was entirely voluntary, and their responses were kept strictly confidential throughout the study.


Conflicts of Interest: Not Applicable.


Acknowledgement: Heartfelt gratitude is extended to all participants for their meaningful contributions to this research.


References


Bandura, A. (1986). Social foundations of thought and action: A social cognitive theory. Prentice-Hall. Englewood Cliffs, NJ, 1986(23-28), 2. https://shorturl.at/u42Ru


Lo, K. W., Ngai, G., Chan, S. C., & Kwan, K. P. (2022). How students’ motivation and learning experience affect their service-learnin g outcomes: A structural equation modeling analysis. Frontiers in psychology, 13, 825902. https://doi.org/10.3389/fpsyg.2022.825902


Chen, H., & Guan, J. (2022). Teacher–Student Behavior Recognition in Classroom Teaching Based on Improved YOLO-v4 and Internet of Things Technology. Electronics, 11(23), 3998. https://doi.org/10.3390/electronics11233998


Dewan, M. A. A., Murshed, M., & Lin, F. (2019). Engagement detection in online learning: A review. Smart Learning Environments, *6*(1), 1–20. https://doi.org/10.1186/s40561-018-0080-z


Ekman, P., & Friesen, W. V. (1978). Facial action coding system. Environmental Psychology & Nonverbal Behavior. https://doi.org/10.1037/t27734-000


Grafsgaard, J. F., Wiggins, J. B., Boyer, K. E., Wiebe, E. N., & Lester, J. C. (2013). Automatically recognizing facial indicators of frustration: a learning-centric analysis. In 2013 humaine association conference on affective computing and intelligent interaction (pp. 159-165). International Educational Data Mining Society. https://doi.org/10.1109/ACII.2013.33


Kearsley, G., & Shneiderman, B. (1998). Engagement theory: A framework for technology-based teaching and learning. Educational Technology, 38(5), 20–23. https://www.jstor.org/stable/44428478


Ryan, R. M., & Deci, E. L. (2000). Self-determination theory and the facilitation of intrinsic motivation, social development, and well-being. American Psychologist, 55(1), 68–78. https://psycnet.apa.org/buy/2000-13324-007


Laslett, R., & Smith, C. (2002). Effective classroom management: A teacher's guide. Routledge. file:///C:/Users/LEPL/Downloads/10.4324_9780203130087_previewpdf%20(1).pdf


Stroebe, W. (2020). Student evaluations of teaching encourage poor teaching and contributes to grade inflation: A theoretical and empirical analysis. Basic and Applied Social Psychology, 42(4), 276– 294. https://doi.org/10.1080/01973533.2020.1756817


Trabelsi, Z., Alnajjar, F., Parambil, M. M. A., Gochoo, M., & Ali, L. (2023). Real-Time Attention Monitoring System for Classroom: A Deep Learning Approach for Student’s Behavior Recognition. Big Data and Cognitive Computing, 7(1), 48. https://doi.org/10.3390/bdcc7010048


Tran, N., Nguyen, H., Luong, H., Nguyen, M., Luong, K., & Tran, H. (2023). Recognition of student behavior through actions in the classroom. IAENG International Journal of Computer Science, 50(3), 1031-1041. https://www.iaeng.org/IJCS/issues_v50/issue_3/IJCS_50_3_26.pdf


Wang, Z., Yao, J., Zeng, C., Wu, W., Xu, H., & Yang, Y. (2023). Learning behavior recognition in smart classroom with multiple students based on YOLOv5. https://doi.org/10.48550/arXiv.2303.10916


Zhou, J. Y. (2023). YOLO-Based Real Time Face Detection and Expression Recognition (Outstanding Academic Papers by Students, OAPS). http://oaps.umac.mo/handle/10692.1/296