Manuscript Offprint
arXiv:2609.02232Fairness-Aware Multimodal Transformer Modeling for Real-Time Student Attention Estimation
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Christoforos Fragkiadakis
University of Amsterdam
Amsterdam, The Netherlands
christoforos.fragkiadakis@student.uva.nl
Seyed Sahand Mohammadi
Ziabari*
University of Amsterdam
Amsterdam, The Netherlands
Ali Mohammed Mansoor
Alsahtag
University of Amsterdam
Amsterdam, The Netherlands
Abstract
Automated student-attention estimation can support learning analytics, but aggregate predictive metrics can conceal demographic disparities. This study evaluates fairness-aware multimodal temporal models on DIPSER, a naturalistic classroom dataset combining facial images, wearable-sensor measurements, attention annotations, and automatically inferred demographic metadata. Three baselines are compared across 10 training seeds: a Visual GRU, a Sensor GRU, and a Residual Fusion Transformer. The multimodal model achieves the best mean test performance (MAE 0.283, RMSE 0.363) and the lowest worst-group error among the evaluated baselines, although its gain over the Visual GRU is modest. Gender-and age-targeted MAE-gap regularization reduces disparities on validation data, but these gains do not consistently transfer to held-out subjects or repeated subject-level splits. On an NVIDIA A100-SXM4-40GB GPU, the warm end-to-end pipeline averages 50.65 ms per prediction window at a one-second stride, while the temporal model itself requires 1.02 ms. The findings show that multimodal fusion can modestly improve prediction and worst-group performance, but validation-level fairness gains should not be assumed to generalize. Robust fairness assessment therefore requires subgroup-aware evaluation, repeated subject-level validation, and larger, better balanced demographic samples.
Keywords
Student Attention Estimation, Multimodal Learning, Fairness-aware Learning, Transformer Models, Educational AI, Subgroup Evaluation
signals including facial behavior, eye tracking, physiological responses, and interaction data [36], with multimodal approaches often outperforming unimodal alternatives [18].
Most existing student-engagement models, however, are optimized and reported primarily using aggregate predictive metrics. Such evaluation can conceal systematic differences in error across demographic groups. Bias arising from dataset composition and model design has been documented across age, gender, and race [25], and high-performing transformer-based models can retain substantial demographic disparities despite strong overall accuracy [13]. Fairness-aware modeling remains comparatively underexplored in student attention estimation. Thiering et al. [41], for example, reduced gender-related distributional disparities in a vision-based engagement classifier, but their approach does not address multimodal attention estimation. This is important because physiological and behavioral modalities may provide complementary predictive information [18, 47], while multimodal fusion can itself alter subgroup performance.
This study evaluates fairness-aware multimodal temporal modeling for continuous student attention estimation on the DIPSER dataset. Three baseline architectures are compared: a visual GRU, a sensor GRU, and a Residual Fusion Transformer combining visual, physiological, and motion signals. The analysis then quantifies subgroup error disparities across inferred gender and age groups and applies an in-processing demographic MAE-gap regularizer to the strongest multimodal baseline. Because fairness constraints can modify the predictive optimum and create accuracy-fairness trade-offs [26], the evaluation considers overall error, worst-group error, and best-to-worst subgroup gaps jointly rather than treating disparity reduction in isolation.
The study makes four contributions. First, it provides a controlled comparison of unimodal and multimodal temporal architectures for continuous attention estimation under identical subject-level splits and repeated random seeds. Second, it evaluates how the addition of wearable-sensor information affects both aggregate prediction error and subgroup error disparities. Third, it tests whether fairness-aware in-processing can reduce demographic error gaps without materially degrading predictive performance, including repeated subject-split analyses to assess whether validation-level fairness improvements generalize to unseen students. Finally, it benchmarks the complete inference pipeline to determine whether the proposed temporal framework can operate within the one-second prediction stride used by the dataset.
*Corresponding author.
2 Related Work
2.1 Vision-Based Frameworks
Research on automatic estimation of student attentional states has focused primarily on improving predictive performance using a variety of machine learning and deep learning techniques in different modalities and educational settings [21]. Early approaches were vision-based, relying primarily on facial cues, with initial studies demonstrating that engagement related states can be inferred from facial expressions [45]. Recent advances have built upon this foundation. For example, Qarbal et al. [30] propose a vision-based student engagement detection framework that combines head pose estimation with facial expression analysis using transfer learning, while other CNN-based approaches trained on facial features from the DAISEE [12] dataset incorporate dimensionality reduction, oversampling, and feature-driven model comparisons to improve engagement classification [33] [8]. Other vision-based frameworks focus on spatial facial representations by detecting faces and extracting CNN features for engagement classification in distance learning settings [10]. In addition, ensemble strategies that aggregate multiple CNN models through bagging have further demonstrated an increase in performance [34]. Recent approaches extend traditional pipelines by modeling temporal facial dynamics using convolutional temporal architectures [17], while others [20] preserve sequential frame dependencies for video-based engagement estimation, or employ transformer-based models to capture engagement dynamics across multiple temporal frequencies and address data scarcity through few-shot learning strategies [22] [1]. However, prior work indicates that vision-only engagement models are inherently limited, as observable facial behavior captures only a subset of students' emotional responses and offers little insight into the underlying cognitive engagement [46] [37].
2.2 Multimodal Fusion Frameworks
The inherent limitations of vision-only approaches have motivated the adoption of multimodal fusion frameworks, which aim to integrate complementary behavioral, physiological, and contextual signals through modalities such as audio, textual transcripts, wearable sensors, and interaction logs that can capture latent cognitive and affective states not directly observable from facial appearance alone. This broader motivation is also reflected in multimodal affective-computing research, where video, audio, and wearable or physiological sensing are increasingly combined to characterize affective states across real-world settings [49]. Prior work in education has focused on feature-level fusion of heterogeneous modalities to improve performance over single-modality models. In the broader field of student engagement classification, Yan et al. [47] combine visual, textual, and behavioral interaction logs, resulting in a more robust multimodal pipeline. Similarly, several works integrate visual cues with physiological signals to enhance robustness. Liu et al. [18] fuse CNN-based facial representations with wearable sensor data to perform continuous attention estimation in face-to-face classrooms using the DIPSER dataset, while Singh et al. [37] propose VisioPhysioENet, a multimodal engagement detection framework that combines facial behavioral cues with physiological signals on the DAISEE dataset. Both approaches demonstrate that physiological
information provides complementary signals that improve performance compared to vision baselines. More advanced frameworks have explored hierarchical and temporally-aware fusion strategies to address the dynamic nature of engagement. Wang et al. [44] propose a hierarchical multimodal architecture that combines video, EEG, audio, and eye-tracking signals for classroom attention classification, with ablation studies showing that combining all modalities consistently outperforms reduced modality subsets. In a similar vein, Xie et al. propose M-LATTE [46], a multimodal latent temporal modeling framework that performs a continuous student engagement assessment by integrating visual, audio and textual features and explicitly decomposing engagement dynamics into long-term trends and time-cyclic components using a variational autoencoder. Furthermore, recent work has begun to explore Vision-Language and Multimodal Large Language Models as alternative multimodal integration frameworks, leveraging prompt-based inference instead of early or late fusion strategies, demonstrating that LLM-based reasoning can achieve performance comparable to classical multimodal fusion methods [19]. Using the higher-engagement experiments of the DIPSER dataset, Marquez-Carpintero et al.[24] report improvements over CNN baselines in attention prediction using VLMs and few-shot learning strategies. However, recent studies indicate that Vision-Language Models are more effective on conventional emotion recognition tasks but exhibit reduced reliability when applied to engagement detection, as engagement requires contextual and commonsense reasoning beyond facial or visual cues alone [40]. In line with this, multimodal LLMs demonstrate high accuracy in basic emotions but struggle with academic and engagement-related affect due to limited understanding of academic emotion features and insufficient ability to capture contextual information [48]. Moreover, reasoning-based fusion approaches rely heavily on large pre-trained models, which have been shown to encode social and demographic biases [42] [43], raising concerns about fairness and reliability when such models are deployed for student attention estimation.
2.3 Fairness-Aware Learning and Evaluation
Despite rapid progress in automatic recognition of student engagement, evaluation remains largely focused on aggregate performance metrics, with fairness-aware modeling and subgroup-level analysis remaining comparatively underexplored. This limitation is not unique to educational AI: recent transformer-based fairness analyses show that strong aggregate performance can conceal substantial label- or domain-specific disparities, motivating diagnosis-oriented evaluation beyond a single global score [27]. Across the engagement recognition literature reviewed in this section, models are primarily evaluated using global metrics such as accuracy, weighted accuracy, F1-score, MAE, and RMSE, depending on whether engagement or attention is formulated as a classification or regression task. In their literature study on student engagement assessment, Mandia et al. [21] document extensive variation in modeling approaches and modalities, with all these approaches being consistently evaluated using global metrics without demographic disaggregation. However, recent work has highlighted that peak accuracy alone is an insufficient indicator of model reliability for the assessment of student engagement. By emphasizing predictive stability, minority-class performance, and robust interpretability, Almuniri et al. [2] expose key limitations of single-run, accuracy-driven engagement models, motivating the need for more reliable and fairness-aware engagement estimation frameworks. In addition, Hosseini et al. [13] indicate in their findings that improvements in predictive performance in both CNN and transformer-based systems do not necessarily correspond to improvements in fairness. In particular, models that achieve state-of-the-art accuracy exhibit substantial disparities when evaluated using fairness metrics such as Equalized Odds, Equal Opportunity, Demographic Parity, and Treatment Equality [13]. Similarly, other studies demonstrate that while multimodal integration often improves predictive performance, fairness metrics may fluctuate or even deteriorate. Depending on the composition of the modalities and their availability during inference, multimodal fusion can unintentionally amplify group-level disparities rather than mitigate them [32, 35]. As a result, explicit mitigation strategies are required to systematically identify and reduce demographic disparities. These fairness strategies in related domains can be broadly categorized into pre-processing, in-processing, and post-processing approaches.
Pre-processing approaches address bias at the data level by intervening before model training, in order to address imbalances in data distribution that could cause group disparities. Cock et al. [7] apply guided demographic oversampling based on combined sensitive attributes, demonstrating that intersectional balancing can mitigate bias more effectively than single-attribute correction in educational prediction tasks. Similarly, Aoudi and Al-Aqrabi (2025) [3] apply a reweighting strategy, adjusting instance weights according to the joint distribution of sensitive attributes and outcomes. While this technique preserved predictive performance, it had limited impact in some fairness evaluation metrics. This finding reflects a broader limitation of pre-processing methods, which, although computationally simple and applicable to any model architecture, may fail to fully eliminate subgroup disparities that emerge during model training.
In-processing techniques address bias directly by incorporating fairness constraints or regularization terms into the model's training objective. Related work in visual AI further demonstrates that transformer representations can encode demographic attributes such as age and sex, and that suppressing this attribute leakage must be evaluated jointly with predictive utility and worst-group performance [38]. Kim et al. [15] integrate a Wasserstein distance-based regularization term to minimize distributional disparities in predicted scores across sensitive groups, complemented by adversarial representation learning to reduce sensitive attribute information in the learned embeddings. In addition, Emerson et al. [9] employ bounded group loss constraints to enforce performance parity across demographic subgroups. Within the domain of student engagement, Thiering et al. [41] introduce attribute-orthogonal regularization in a multi-task convolutional architecture, reducing distributional disparities across gender groups in the DAiSEE video dataset, evaluated using the Pearson correlation coefficient between subgroup prediction distributions. These findings suggest that in-processing approaches, although methodologically more complex and requiring modifications to the training objective, can more directly control subgroup disparities during optimization, often achieving better results in fairness-accuracy trade-offs.
Post-processing techniques address bias by modifying the outputs of the model after training. These methods typically adjust decision thresholds or calibrate predictions to satisfy predefined fairness criteria. In multimodal settings, post-processing techniques including Equalized Odds adjustment, debiased text embeddings, and threshold optimization have demonstrated reductions in subgroup disparities, providing practical flexibility due to their applicability without model retraining, but frequently incurring documented trade-offs between fairness and predictive performance [6, 14].
3 Methodology
The proposed methodology is structured into four main components. The first describes the dataset and applied preprocessing steps, highlighting the multimodal structure and demographic composition relevant to fairness analysis. The second presents the design of the unimodal visual and sensor models, as well as the multimodal fusion architecture. The third describes the training procedure and evaluation metrics used for the baseline models. The fourth introduces the fairness-aware optimization framework, including the demographic disparity regularizer and the subgroup-level evaluation strategy.
3.1 Data Preprocessing
The data used in this work are drawn from DIPSER [23] (Dataset for In-Person Student Engagement Recognition in the Wild), a multimodal dataset that synchronizes camera recordings with smart-watch sensor data to capture student attention and emotional states. All recordings were conducted as part of scheduled educational activities, without experimental staging or behavioral constraints, thus preserving the natural variability of student behavior. DIPSER includes both global classroom recordings and individual-level recordings, capturing facial expressions through RGB images at a resolution of pixels and a rate of approximately 10 frames per second, providing a temporal sequence of facial cues. In addition, the dataset includes wearable sensor data, comprising heart rate, linear acceleration, gyroscope, rotation vector, and ambient light measurements, capturing physiological arousal and motion dynamics at sampling rates of up to 100 Hz. The image modality is temporally aligned with per second attention labels on a scale from 1 to 5 and emotion annotations across 9 categories, obtained through a combination of expert labeling and student self-assessments. Furthermore, demographic metadata (gender, age, and ethnicity) are provided and automatically inferred using computer vision models (MiVOLO, DeepFace [16] [39]), producing probability estimates at each time frame rather than relying on self-reported information. The dataset contains recordings from 57 subjects, organized into three groups of 16–21 students, and comprises 9 distinct educational scenarios, ranging from passive learning settings (lectures) to highly interactive activities (robotics experimentation). These sessions capture a wide range of passive and active engagement, as well as significant variation in attention, emotional states, and sensor signals. DIPSER is organized in a hierarchical structure consisting of the group, experiment, and subject levels, where the lowest level contains all modality specific data for each participant.
Each subject folder includes image sequences, attention and emotion annotations (from both expert labelers and self-assessments), sensor data from wearable devices, and metadata containing demographic attributes, facial and body landmarks, and head pose estimations, all stored in JSON format. Emotion, self-reported annotations and non-demographic metadata were excluded from the analysis. To derive demographic attributes, probability estimates for gender and ethnicity were aggregated across frames. Age was calculated as the mean value and rounded to the nearest integer, and ethnicity was assigned based on the highest mean probability across all the available frames. Using this approach, the vast majority of subjects were classified as white (Caucasian), leading to the exclusion of race as a fairness axis due to this imbalance (approximately 95% of subjects).
In addition, several preprocessing and data cleaning steps were applied prior to modeling. Invalid physiological records, such as heart rate measurements within the range of 0–30 beats per minute, were removed from the sensor streams. Subjects exhibiting a high proportion of missing sensor values within an experiment, as well as subjects without available sensor recordings, were also excluded from the final dataset. For the image modality, frames containing corrupted visual information (frames where the subject's face was not visible or outside the camera view) or lacking a corresponding sensor match were removed from the dataset prior to the modeling phase. To standardize the temporal resolution of the multimodal recordings, the first valid image frame per second was retained for each subject throughout the duration of the 5-minute experimental recordings. Sensor measurements recorded within the centered one-second interval were subsequently aggregated to produce per second sensor representations aligned with the retained visual frame. Mean values were computed for heart rate, each accelerometer and gyroscope axis, and the corresponding motion magnitudes to capture overall movement intensity. Finally, the attention label for each frame was defined as the mean score across all available expert labelers. Overall, while DIPSER provides a rich multimodal foundation for student attention estimation, its real-world setting, demographic imbalance, and the subjectivity of human annotations introduce realistic sources of bias. These characteristics make this dataset particularly suitable for investigating fairness-aware attention modeling, motivating the need for explicit bias analysis and mitigation strategies, which motivate the subgroup-aware evaluation used in this study.
Table 1: Demographic Distribution of Participants of the DIPSER Dataset
| Characteristic | Group 1 (n=20) | Group 2 (n=21) | Group 3 (n=16) |
|---|---|---|---|
| Gender (%) | |||
| Female | 65.0 | 71.4 | 68.8 |
| Male | 35.0 | 28.6 | 31.2 |
| Age (%) | |||
| 13–20 | 40.0 | 52.4 | 0.0 |
| 20–22 | 15.0 | 28.6 | 37.5 |
| 22–26 | 35.0 | 19.0 | 25.0 |
| 26–44 | 10.0 | 0.0 | 37.5 |
3.2 Baseline Model Architectures
To investigate both the predictive contribution of individual modalities and their associated demographic disparities, three baseline architectures were first developed and evaluated independently: a visual model using pretrained facial image embeddings, a sensor model using physiological and motion signals from wearable devices, and a multimodal fusion model combining both modalities. All models operated on rolling temporal windows of 10 consecutive one-second observations aligned with the temporal granularity of the DIPSER annotations [23], allowing predictions to be updated continuously. Each window was used to estimate the level of attention in its final timestep, allowing the models to leverage the information of the preceding 10 seconds for prediction. Building on these baseline architectures, a fairness-aware multimodal transformer framework was subsequently developed for the model with the lowest mean validation error to mitigate subgroup disparities during training while preserving predictive performance.
3.2.1 Visual Model. A temporal visual model was developed to independently assess the predictive capability of the visual modality using temporal sequences of facial image features. The model utilized pretrained visual embeddings extracted using the CLIP-ViT-L/14 [31] vision encoder. Prior to feature extraction, facial images were resized to 224 × 224 pixels using the standard CLIP preprocessing pipeline, including center cropping and normalization. For each image frame, the encoder produced a 768-dimensional visual embedding. For timestamps where no valid visual observation was available, a binary missing-frame indicator was concatenated to the visual embedding, resulting in a 769-dimensional feature vector, providing high-level semantic representations of facial appearance and behavioral cues. The resulting feature sequences were subsequently projected into a shared latent representation and processed through a recurrent temporal architecture based on a unidirectional GRU network, enabling the model to capture short-term temporal dependencies and behavioral dynamics across consecutive frames. For training stability, dropout and layer normalization were used throughout the architecture. The temporal representation generated by the GRU was subsequently passed through a regression head composed of fully connected layers with ReLU activations, producing a continuous attention score for each temporal sequence.
3.2.2 Sensor Model. A temporal sensor model was implemented to investigate the effectiveness of physiological and motion-based smartwatch signals in the estimation of student attention. The model utilized the wearable sensor features extracted from smartwatch recordings, including heart rate, accelerometer and gyroscope. Given the heterogeneous nature of the sensor streams, heart rate measurements and motion-related features were processed separately. Temporal sequences of motion features and heart rate values were encoded using dedicated unidirectional GRU networks to model temporal patterns within the physiological and motion signals. Invalid measurements were treated as missing observations, with binary flags used to indicate missing values during temporal processing. Consistent with the temporal visual model, dropout regularization and batch normalization were incorporated to improve generalization and reduce overfitting. The learned temporal representations from both sensor streams were subsequently fused and passed to a regression head for continuous attention estimation.
3.2.3 Multimodal Fusion Model. The multimodal fusion model extends the temporal visual architecture through a residual multimodal Transformer framework that integrates the physiological and motion information. The architecture uses the visual stream to produce the primary attention estimate and allows the sensor streams to provide a bounded residual correction. As in the temporal visual model, CLIP-ViT-L/14 embeddings were used to represent facial image frames, while the sensor inputs followed the same separation between motion related features and heart rate measurements adopted in the temporal sensor model. Missing or invalid sensor values were replaced with zero valued inputs after scaling, while respective binary flags were used to indicate whether the corresponding visual, motion, or heart rate observation was missing. Visual, motion, and heart rate streams were first projected into modality specific latent representations using linear projection layers. To improve training stability and generalization, the projection blocks incorporated layer normalization, GELU activations, and dropout regularization. Learnable positional embeddings were added to each modality stream to preserve temporal ordering, and dedicated causal Transformer encoders were applied independently to all modalities, enabling temporal modeling while preventing access to future observations during prediction. Following temporal encoding, the representation corresponding to the final timestep of each modality stream was retained as a summary representation of the preceding window. The visual summary representation was processed through a regression head to generate the primary attention prediction. Subsequently, the visual, motion, and heart rate summary representations were concatenated and passed to a residual fusion branch. The gating mechanism adaptively controlled the contribution of the residual correction, allowing the model to determine the extent to which sensor information should influence the final attention estimate. The final attention score was obtained by adding the gated residual correction to the visual prediction, enabling the model to preserve the robustness of the visual modality while incorporating complementary physiological and motion-based information when beneficial.
3.3 Model Training and Evaluation
The dataset containing 57 subjects was partitioned at the subject level to prevent data leakage, ensuring that samples from the same individual did not appear across the training, validation, and test sets. This resulted in 39 subjects for training and 9 subjects for both validation and testing. In total, the dataset comprised 285 experimental sessions and 75 189 temporal samples for training, 64 sessions and 17 208 samples for validation, and 59 sessions and 15 636 samples for testing. Each sample consisted of a rolling 10-second temporal window containing visual embeddings and/or aggregated normalized sensor features, with the target defined as the attention label corresponding to the final timestep of the sequence. The subject-level split was stratified based on age group to preserve demographic representation across the different subsets. Additionally, due to the gender imbalance present in the dataset, the split was constrained to include at least 3 male subjects and
all age groups in both the validation and test sets. Furthermore, due to the imbalanced distribution of attention scores within the dataset, where the majority of labels were concentrated in moderate attention ranges (scores within the range 2–3), inverse-frequency weighting was applied during training to improve the representation of underpopulated attention ranges. Attention labels were grouped into bins, and sample weights were computed inversely proportional to the frequency of each bin within the training set. To control the strength of the reweighting strategy, a weighting exponent was introduced, moderating the influence of inverse-frequency weighting during optimization. The weight assigned to each attention bin was defined as:
where denotes the total number of training samples, the number of attention bins, the number of samples within bin , and a hyperparameter controlling the strength of the inverse-frequency weighting. The resulting normalized weights were incorporated into the loss function during training. The models were optimized using , the Adam optimizer with a learning rate of and weight decay of , along with adaptive learning rate scheduling based on validation RMSE throughout the training process. Early stopping with a patience of 7 epochs was applied based on validation RMSE to reduce overfitting, and gradient clipping with a maximum norm of 1.0 was used during training to improve optimization stability.
Let denote the multimodal input sample (or unimodal input in the case of the visual and sensor-only architectures), the ground-truth attention score, the predicted attention score produced by the model with parameters , and the inverse-frequency weight assigned to sample according to its attention bin. The models were optimized using a weighted mean squared error objective:
Model performance was evaluated using Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE), the latter having also been used in previous works on the DIPSER dataset [18]. These metrics were computed both overall and between demographic subgroups. Furthermore, to assess training stability, each architecture was trained across 10 independent random seeds using the same subject-level split, and performance metrics were aggregated across runs.
Table 2: Subject-level demographic distribution across the train, validation, and test splits.
| Split | Female | Male | (13, 20] | (20, 22] | (22, 26] | (26, 44] |
|---|---|---|---|---|---|---|
| Train | 27 | 12 | 13 | 10 | 10 | 6 |
| Validation | 6 | 3 | 3 | 3 | 2 | 1 |
| Test | 6 | 3 | 3 | 2 | 3 | 1 |
3.4 Deployment Feasibility Benchmark
To evaluate whether the pipeline can support online use at the one-second prediction stride, the trained fairness-aware temporal model was benchmarked end-to-end on an unseen subject recording using an NVIDIA A100-SXM4-40GB GPU. Warm inference latency included input preprocessing, temporal image-sensor alignment, CLIP ViT-L/14 feature extraction, temporal-window construction, and the final attention prediction. Model and CLIP initialization were treated as cold-start overhead and excluded from the warm per-window latency. The temporal model was also timed separately to distinguish the cost of the learned predictor from the cost of visual feature extraction. Mean latency per prediction window and the corresponding prediction throughput were reported.
3.5 Fairness-Aware Optimization
For the baseline architecture with the lowest mean validation error, an additional fairness-aware regularization objective was introduced to reduce predictive disparities across demographic groups. The architecture, preprocessing pipeline, subject-level split, optimizer, and evaluation setting were kept identical to the unregularized baseline model. The only modification was the introduction of a subject-level demographic fairness regularizer during training.
Let denote the subject identity of sample , the demographic group of subject , and the set of subjects belonging to group . The baseline task objective remained the weighted mean squared error loss defined in equation 2. Instead of computing fairness directly at the sample level, the regularizer first computed the mean absolute error for each subject:
where denotes the samples belonging to subject s. The group-level error was then obtained by averaging subject-level MAEs within each demographic group:
The fairness penalty was defined as the gap between the highest and lowest group-level subject MAE:
The final training objective was therefore:
where controls the trade-off between predictive accuracy and subgroup fairness. This regularization objective penalizes unequal predictive performance between demographic subgroups, encouraging more balanced error distributions during training. To improve optimization stability, fairness regularization was introduced after a short warm-up period. During the first 2 training epochs, the model was optimized solely using the prediction MSE. The subject-level demographic MAE gap penalty was subsequently added to the objective, allowing the model to establish an initial predictive representation before balancing predictive performance and fairness. The overall pipeline of the proposed fairness-aware framework is illustrated in Figure 1.
To obtain more stable subject-level fairness estimates, training batches were constructed using subject and group balanced sampling. For gender regularization, each batch contained 2 subjects from each gender group, with 8 temporal windows sampled from every selected subject. As a result, each gender was represented by 16 temporal windows, resulting in a total batch size of 32. For age group regularization, each batch contained 1 subject from each of the 4 age groups, again with 8 temporal windows sampled per subject, resulting in the same batch size of 32. Subjects and their corresponding temporal windows were resampled for every batch. Although the available number of temporal windows was broadly similar across subjects, this sampling procedure ensured that every represented subject contributed equally to the fairness regularizer and that the penalty was calculated using all protected groups. The regularization strength was selected using the predictions of the validation set. Candidate values of were compared based on their reduction of the relevant subject-level validation MAE gap. A value was considered eligible only when the mean validation MAE increased by no more than 0.02 relative to the corresponding unregularized baseline, to ensure that fairness improvements were not achieved at the expense of substantial degradation in predictive performance. Among eligible candidates, preference was given to regularization strengths that reduced the demographic MAE gap consistently across the 10 validation seeds, followed by the magnitude of the mean gap reduction. The fairness-aware model was evaluated against the unregularized residual Transformer using overall MAE and RMSE, subgroup MAE, worst-group MAE, and the MAE gap between the best and worst performing demographic groups. Worst-group MAE was defined as the largest subgroup MAE across all demographic groups for the respective fairness axis, while MAE gap was defined as the difference between the largest and smallest subgroup MAE. These metrics quantify predictive disparities across demographic subpopulations and enable the analysis of trade-offs between overall predictive performance and subgroup fairness.
4 Results
4.1 Baseline Performance
The predictive performance of the three architectures is summarized in Table 3. The results are reported as mean and standard deviation in 10 independent training runs, using the MAE and RMSE metrics. The train mean baseline achieved an MAE of 0.312 and an RMSE of 0.393, providing a reference point for evaluating the learning-based models. The Sensor GRU achieved performance comparable to, but slightly worse than, the train mean baseline, with an MAE of 0.313 and an RMSE of 0.398. This result suggests that physiological and motion signals alone provide limited predictive information for student attention estimation in the DIPSER dataset. In contrast, the Visual GRU substantially outperformed both the train-mean baseline and the Sensor GRU, reducing the MAE to 0.287 and the RMSE to 0.366. These results suggest that facial appearance and temporal visual dynamics provide the most informative cues for the student attention prediction task. The Residual Fusion Transformer achieved the best average performance, obtaining an MAE

Figure 1: Fairness-aware multimodal attention-estimation pipeline.
of 0.283 and an RMSE of 0.363. However, the improvement over the Visual GRU is small and falls within the variability observed across training runs. This indicates that, although the multimodal architecture can effectively integrate sensor information, the additional physiological and motion signals provide limited complementary information beyond what is already captured by the visual modality. Consequently, visual representations appear to provide the main source of information in the attention prediction task, while sensor modalities contribute only modestly to the final performance.
Table 3: Overall test performance across 10 independent training seeds. Values are reported as mean ± standard deviation.
| Model | MAE | RMSE |
|---|---|---|
| Train mean baseline | 0.312 | 0.393 |
| Sensor GRU | 0.313 ± 0.002 | 0.398 ± 0.003 |
| Visual GRU | 0.287 ± 0.007 | 0.366 ± 0.008 |
| Residual Fusion Transformer | 0.283 ± 0.009 | 0.363 ± 0.009 |
Similarly, Table 4 presents the demographic fairness performance of the models. The Residual Fusion Transformer achieved the lowest worst-group MAE for both age (0.328) and gender (0.289), providing the most favorable balance between overall performance and worst-group error among the evaluated baselines. In addition, it exhibited
the lowest gender gap (0.015), suggesting that integrating visual and sensor information through residual multimodal fusion can reduce gender disparities compared to unimodal baselines. The Sensor GRU achieved the smallest age gap (0.096), outperforming both the Visual GRU and the Residual Fusion Transformer on this fairness metric. However, this result should be interpreted together with its substantially lower predictive performance, as reported in Table 3. The relatively small age disparity may therefore partly reflect the model's overall limited predictive performance rather than an inherent improvement in fairness. In contrast, Visual GRU achieved strong overall predictive performance, but exhibited the largest age gap (0.147), suggesting that visual representations alone may be more sensitive to age related differences. This finding should also be interpreted in the context of the characteristics of DIPSER. The dataset contains 4 age groups with relatively few subjects per group, increasing the variance of subgroup-level error estimates and making both fairness evaluation and optimization more sensitive to the specific composition of the training and validation sets.
Table 4: Mean demographic subgroup performance across 10 independent training seeds. Lower values indicate better subgroup performance and smaller disparities.
| Model | Age Worst | Age Gap | Gender Worst | Gender Gap |
|---|---|---|---|---|
| Sensor GRU | 0.364 | 0.096 | 0.357 | 0.068 |
| Visual GRU | 0.341 | 0.147 | 0.295 | 0.022 |
| Residual Fusion Transformer | 0.328 | 0.126 | 0.289 | 0.015 |
4.2 Fairness-Aware Multimodal Transformer
Based on the results of the baseline experiments, the Residual Fusion Transformer was selected for the fairness-aware framework. The fairness regularization approach described in Section 3.5 was incorporated into the model's training objective, enabling the optimization process to explicitly account for demographic disparities. The following experiments evaluate the impact of this regularization on predictive performance and fairness across demographic groups. Separate models were trained for the gender and age fairness objectives, with each configuration evaluated using 10 independent training seeds. For the gender group, a regularization strength of was selected using validation performance. During validation, this configuration reduced the gender MAE gap from 0.02 to 0.005, while also slightly improving worst-group MAE, with a very small trade-off in overall predictive performance. However, these improvements did not generalize to the held-out test subjects. On the test set, both the gender MAE gap and the worst-group MAE increased compared to the unregularized model. The selected configuration reduced the gap in only 4 of 10 training runs, suggesting that these fairness improvements were not robust across random initializations and may have been sensitive to the specific composition of the training and validation data.
A similar pattern is observed for the age model, which used a regularization strength of . During validation, the age-regularized model reduced the age MAE gap from 0.105 to 0.093 and improved worst-group performance from 0.352 to 0.345, while incurring only a minor increase in overall MAE. However, these improvements did not generalize to unseen data. In the test set, the
Table 5: Validation and test performance of the unregularized and gender MAE-gap regularized Residual Fusion Transformer across 10 independent training seeds. Values are reported as mean ± standard deviation.
| Split | Model | MAE | Gender Worst | Gender Gap |
|---|---|---|---|---|
| Validation | Unregularized | |||
| Gender-regularized () | ||||
| Test | Unregularized | |||
| Gender-regularized () |
regularized model exhibited worse overall predictive performance and increased demographic disparities compared to the unregularized model. Furthermore, an additional repeated subject-level split experiment was conducted to assess the robustness of the observed fairness effects across different train-validation-test splits. The dataset was partitioned multiple times at the subject level, producing different sets of training, validation, and test subjects for each run. Each split preserved the demographic structure through stratified sampling and representation constraints for the gender and age groups. The same subject partitions were then shared across the baseline and the fairness model, ensuring paired comparisons within each split. The results were consistent with the main experiments and further supported that the validation improvements achieved by fairness regularization did not correspond to consistent generalization to unseen subjects (Appendix B).
Table 6: Validation and test performance of the unregularized and age MAE-gap regularized Residual Fusion Transformer across 10 training seeds. Values are reported as mean ± standard deviation.
| Split | Model | MAE | Age Worst | Age Gap |
|---|---|---|---|---|
| Validation | Unregularized | |||
| Age-regularized () | ||||
| Test | Unregularized | |||
| Age-regularized () |
4.3 Real-Time Feasibility
Following the protocol in Section 3.4, the warm end-to-end pipeline achieved a mean latency of 50.65 ms per prediction window at a one-second stride on an NVIDIA A100-SXM4-40GB GPU, corresponding to a throughput of 19.7 predictions per second. The temporal fairness model contained 402,531 trainable parameters and required 1.02 ms on average for prediction, indicating that CLIP-based visual feature extraction dominated the computational cost. These measurements show that the pipeline satisfies the one-second update requirement on the evaluated hardware. They should not, however, be interpreted as evidence of equivalent latency on lower-power or commodity deployment platforms.
5 Discussion
5.1 Analysis of Multimodal Attention Estimation
The experimental results indicate that facial image representations constitute the primary source of information for student attention
estimation in DIPSER [23]. While multimodal fusion achieved the best predictive performance, the improvement over the visual GRU model was modest, with the sensor modality providing limited additional predictive information beyond the visual representation. These findings motivated the adoption of a residual fusion architecture, in which the visual stream produces the primary attention estimation, while the sensor streams contribute a bounded residual correction. In contrast, alternative fusion strategies that assigned a stronger role to the sensor modality, such as early and late fusion, did not outperform the visual GRU baseline.
In the experimental setup, the first valid image frame of each second was retained together with its corresponding sensor representation. Sensor measurements within a centered one-second interval were aggregated by computing the mean of each sensor axis and the mean magnitudes of the accelerometer and gyroscope signals. Consequently, each 10-second sequence consisted of 10 visual frames and 10 aggregated sensor vectors. Since this design involved aggregating high-frequency wearable signals into one-second intervals, potentially removing informative short-term temporal information and thus significantly limiting the contribution of the sensor modality, an additional experiment was conducted to evaluate whether retaining all available visual frames and sensor representations would provide a measurable predictive advantage. This resulted in approximately 75 observed timesteps per 10-second sequence. Since each sensor representation summarized a centered one-second interval, sensor vectors associated with neighboring frames were highly redundant and exhibited considerable temporal overlap. This higher-frequency experiment yielded only minor improvements in the predictive evaluation metrics, while in some seeds there was no improvement (Appendix C). Overall, the results provided no strong evidence that densely sampled visual frames and sensor representations offer a reliable predictive advantage over the 1 FPS setting. Instead, the findings suggest that the lower sampling frequency retains most of the information relevant for attention estimation while reducing computational cost. In addition, another important design choice was the formulation of the prediction task. Although the attention annotations are ordinal, the labels are also inherently subjective, and the boundaries between adjacent levels may not be sharply defined. For this reason, both ordinal classification and hybrid approaches were explored during preliminary experiments. Nevertheless, these alternatives did not yield improvements in the evaluation metrics and often produced less stable results across training runs.
5.2 Demographic Disparities and Fairness Generalization
The observed fairness patterns varied considerably between the two demographic attributes and should be interpreted in the context of the dataset composition and evaluation. More specifically, gender MAE gaps were relatively small for the Visual GRU and Residual Fusion Transformer, whereas the corresponding age gaps were substantially larger. Across both models, participants in one of the middle age groups exhibited the highest test error, while the single participant in the oldest age group had the lowest error. The observed disparity therefore does not indicate that performance deteriorated consistently with age. Instead, it reflects heterogeneous performance across the age groups represented in the test set. Part of the difference between age and gender gaps may result from the way these metrics were constructed. Age was evaluated in four groups, compared to two groups for gender. Since the disparity metric is defined as the difference between the best and worst performing groups, increasing the number of groups naturally increases the probability of observing an extreme subgroup error.
The central finding of the fairness-aware experiments is that validation improvements in subgroup fairness did not consistently generalize to unseen subjects. During validation, the age regularizer reduced its targeted disparity across most seeds, while the gender regularizer produced more consistent improvements. However, these improvements did not transfer reliably to the test set. Although individual seeds occasionally achieved smaller test-set disparities, the targeted gaps and overall prediction errors increased on average compared to the corresponding baseline models. A possible explanation is the limited number of independent subjects available for subgroup evaluation. In particular, the test set contained only 3 male participants and a single participant in the oldest age group. Consequently, subgroup and worst-group metrics can be strongly influenced by individual participant behavior, making fairness estimates highly sensitive to the performance of a small number of subjects. The comparison between modalities provides additional context for these fairness patterns. Compared to the Visual GRU, the Residual Fusion Transformer achieved a smaller age gap, a lower worst-group error, and slightly better overall predictive performance. These results suggest that sensor information may provide complementary signals that benefit some age groups when combined with visual features, although this interpretation remains limited by the small number of subjects in several age subgroups. The Sensor GRU achieved the smallest age gap, but this came alongside the weakest overall and worst-group performance. This observation highlights that disparity metrics should be interpreted jointly with predictive performance, since lower disparities do not necessarily correspond to better outcomes for all demographic groups. Future work should evaluate fairness-aware methods using larger and more demographically balanced datasets to better assess the robustness and generalizability of fairness improvements.
6 Conclusion
This study evaluated whether fairness-aware multimodal temporal models can reduce demographic error disparities in student attention estimation without substantial loss of predictive performance. Across the baseline architectures, visual information provided the strongest individual modality signal. The Residual Fusion Transformer achieved the best mean test performance (MAE 0.283±0.009, RMSE 0.363 ± 0.009), although its improvement over the Visual GRU was modest, indicating that the wearable-sensor streams contributed only limited complementary predictive information under the evaluated preprocessing and sampling scheme.
Subgroup evaluation revealed demographic variation that aggregate metrics alone would not expose. The Residual Fusion Transformer produced the lowest worst-group errors and the smallest gender gap among the baseline models, whereas the Sensor GRU produced the smallest age gap but substantially weaker overall performance. These results reinforce that disparity metrics should be interpreted jointly with predictive accuracy and worst-group performance rather than optimized in isolation.
Fairness regularization reduced the targeted MAE gaps on the validation set but did not consistently improve fairness for held-out subjects. The same pattern persisted across repeated subject-level splits: validation-level disparity reductions were more frequent than test-set improvements. The evidence therefore does not support a claim that the evaluated regularizer reliably generalizes demographic fairness gains to unseen students. This limitation is especially important given the small number of independent participants in several subgroups and the use of automatically inferred rather than self-reported demographic attributes.
The end-to-end pipeline also met the one-second prediction stride on an NVIDIA A100-SXM4-40GB GPU, with a mean warm latency of 50.65 ms per window; this supports real-time feasibility on the evaluated hardware but does not establish efficiency on resource-constrained devices. Overall, the results show that multimodal fusion can modestly improve attention estimation and worst-group performance, but stable fairness improvements require stronger evidence than a single validation split or a reduction in one disparity metric. Future work should prioritize larger and more demographically balanced datasets, self-reported demographic metadata where appropriate, intersectional evaluation, and alternative mitigation strategies such as reweighing [3], adversarial debiasing, and intersectional balancing [7].
References
[1] Wejdan Alarefah, Salma Kammoun Jarraya, and Nihal Abuzinadah. 2025. Transformer-Based Student Engagement Recognition Using Few-Shot Learning. Computers 14, 3 (March 2025). doi:10.3390/computers14030109
[2] Ismail Said Almuniri, Fitham Alhussain, Norshakirah Aziz, Sallam O. F. Khairy, AlWaleed Sulaiman AlAbri, Zaid Fawaz Jarallah, Saidu Yahaya, and Shamsuddeen Adamu. 2026. Beyond peak accuracy: a stability-centric framework for reliable multimodal student engagement assessment. Scientific Reports 16, 1 (Jan. 2026), 5. doi:10.1038/s41598-025-31215-7
[3] Samer Aoudi and Hussain Al-Aqrabi. 2025. Fairness-Aware AI in Education: Detecting and Reducing Bias in Student Assessment Systems. In 2025 10th International Conference on Information Technology Trends (ITT). 94–99. doi:10.1109/ITT69610.2025.11352922
[4] Nina May Braakman, Seyed Sahand Mohammadi Ziabari, Ali Mohammed Mansoor Alsahag, and Yousuf Nasser Al Husaini. 2026. Intrinsic Interpretability at Parity: Attention-Based RL-MIL for Student Outcome Prediction. Natural Language Processing Journal 14 (2026), 100204. doi:10.1016/j.nlp.2026.100204
[5] Okan Bulut, Maggie Beiting-Parrish, Jodi M. Casabianca, Sharon C. Slater, Hong Jiao, Dan Song, Christopher M. Ormerod, Deborah Ghemisola Fabiyi, Rodica Ivan, Cole Walsh, Oscar Rios, Joshua Wilson, Seyma N. Yildirim-Erbasli, Tarid Wongvorachan, Joyce Xinle Liu, Bin Tan, and Polina Morilova. 2024. The Rise of Artificial Intelligence in Educational Measurement: Opportunities and Ethical Challenges. Chinese/English Journal of Educational Measurement and Evaluation 5, 3 (Dec. 2024). doi:10.59863/MJQL7785 arXiv:2406.18900 [cs].
[6] John Chen, Ian Berlot-Attwell, Safwan Hossain, Xindi Wang, and Frank Rudzicz. 2021. Exploring Text Specific and Blackbox Fairness Algorithms in Multimodal Clinical NLP. doi:10.48550/arXiv:2011.09625 arXiv:2011.09625 [cs].
[7] Jade Mai Cock, Muhammad Bilal, Richard Davis, Mirko Marras, and Tanja Kaser. 2023. Protected Attributes Tell Us Who, Behavior Tells Us How: A Comparison of Demographic and Behavioral Oversampling for Fair Student Success Modeling. In LAK23: 13th International Learning Analytics and Knowledge Conference (LAK2023). Association for Computing Machinery, New York, NY, USA, 488–498. doi:10.1145/3576050.3576149
[8] Riju Das and Soumyabrata Dev. 2025. Optimizing student engagement detection using facial and behavioral features. Neural Computing and Applications 37, 23 (Aug. 2025), 19063–19085. doi:10.1007/s00521-025-11317-z
[9] Andrew Emerson, Arti Ramesh, Patrick Houghton, Vinay Basheerabad, Navaneeth Jawahar, and Chee Wee Leong. 2024. Multimodal, Multi-Class Bias Mitigation for Predicting Speaker Confidence. Technical Report. International Educational Data Mining Society. https://eric.ed.gov/?id=ED675542 ERIC Number: ED675542.
[10] Fernando Rodrigues Trindade Ferreira, Loana Martins do Couto, Guilherme de Melo Baptista Domingues, and Camila Martins Saportetti. 2025. Development of a framework using deep learning for the identification and classification of engagement levels in distance learning students. Social Network Analysis and Mining 15, 1 (April 2025), 37. doi:10.1007/s13278-025-01408-z
[11] Jennifer A. Fredricks, Phyllis C. Blumenfeld, and Alison H. Paris. 2004. School Engagement: Potential of the Concept, State of the Evidence. Review of Educational Research 74, 1 (2004), 59–109. https://www.jstor.org/stable/3516061
[12] Abhay Gupta, Arjun D'Cunha, Kamal Awasthi, and Vineeth Balasubramanian. 2022. DAISEE: Towards User Engagement Recognition in the Wild. doi:10.48550/arXiv.1609.01885 arXiv:1609.01885 [cs].
[13] Mohammad Mehdi Hosseini, Ali Pourramezan Fard, and Mohammad H. Mahoor. 2025. Faces of Fairness: Examining Bias in Facial Expression Recognition Datasets and Models. doi:10.48550/arXiv.2502.11049 arXiv:2502.11049 [cs].
[14] Zifan Jiang, Salman Seyed, Emily Griner, Ahmed Abbasi, Ali Bahrami Rad, Hyeokhyeon Kwon, Robert O. Cotes, and Gari D. Clifford. 2024. Evaluating and mitigating unfairness in multimodal remote mental health assessments. PLOS Digital Health 3, 7 (July 2024), e0000413. doi:10.1371/journal.pdig.0000413
[15] Changwoo Kim, Jinho Choi, Jongyeon Yoon, Daehun Yoo, and Joo Lee. 2023. Fairness-Aware Multimodal Learning in Automatic Video Interview Assessment. IEEE Access 11 (2023), 122677–122693. doi:10.1109/ACCESS.2023.3325891
[16] Maksim Kurasheviche and Irina Tolstykh. 2023. MiVOLO: Multi-input Transformer for age and Gender Estimation. https://arxiv.org/abs/2307.046162
[17] Xi Li, Weiwei Zhu, Qian Li, Changhui Hou, and Yaozong Zhang. 2024. Re-Distributing Facial Features for Engagement Prediction with ModernTCN. Computers, Materials & Continua 81, 1 (2024), 369–391. doi:10.32604/cmc.2024.054982
[18] Jiaqi Liu, Kwok Tai Chui, Lap-Kei Lee, Kwan Keung Ng, Naraphorn Paoprasert, and Mingbo Zhao. 2025. Individual Student Attention Detection in Face-to-Face Classrooms Using Multimodal Facial and Wearable Data. In 2025 International Symposium on Educational Technology (ISET). 38–43. doi:10.1109/ISET65607.2025.00017 ISSN: 2766-2144.
[19] Cheng Charles Ma, Kevin Hyekang Joo, Alexandria K. Vail, Sunreeta Bhattacharya, Álvaro Fernández García, Kailana Baker-Matsuoka, Sheryl Mathew, Lori L. Holt, and Fernando De la Torre. 2025. Multimodal Fusion with LLMs for Engagement Prediction in Natural Conversation. In Companion Proceedings of the 27th International Conference on Multimodal Interaction. 244–259. doi:10.1145/3747327.3764904 arXiv:2409.09135 [cs].
[20] Somayeh Malekshahi, Javad M. Kheyrideost, and Omid Fatemi. 2024. A General Model for Detecting Learner Engagement: Implementation and Evaluation. doi:10.48550/arXiv:2405.04251 arXiv:2405.04251 [cs].
[21] Sandeep Mandia, Rajendra Mitharwal, and Kuldeep Singh. 2024. Automatic student engagement measurement using machine learning techniques: A literature study of data and methods. Multimedia Tools and Applications 83, 16 (May 2024), 49641–49672. doi:10.1007/s11042-023-17534-9
[22] Sandeep Mandia, Kuldeep Singh, Rajendra Mitharwal, Faisal Mushtaq, and Dimpal Janu. 2025. Transformer-Driven Modeling of Variable Frequency Features for Classifying Student Engagement in Online Learning. doi:10.48550/arXiv.2502.10813 arXiv:2502.10813 [cs].
[23] Luis Marquez-Carpintero, Sergio Suescun-Ferrandiz, Carolina Lorenzo Álvarez, Jorge Fernandez-Herrero, Diego Viejo, Rosabel Roig-Vila, and Miguel Cazorla. 2025. DIPSER: A Dataset for In-Person Student Engagement Recognition in the Wild. doi:10.48550/arXiv.2502.20209 arXiv:2502.20209 [cs].
[24] Luis Marquez-Carpintero, Diego Viejo, and Miguel Cazorla. 2025. Enhancing Engineering and STEM Education With Vision and Multimodal Large Language Models to Predict Student Attention. IEEE Access 13 (2025), 114681–114695. doi:10.1109/ACCESS.2025.3584025
[25] Ninareh Mehrabi, Fred Morstatter, Nripsuta Saxena, Kristina Lerman, and Aram Galstyan. 2021. A Survey on Bias and Fairness in Machine Learning. ACM Comput. Surv. 54, 6 (July 2021), 115:1–115:35. doi:10.1145/3457607
[26] Aditya Krishna Menon and Robert C. Williamson. 2018. The cost of fairness in binary classification. In Proceedings of the 1st Conference on Fairness, Accountability and Transparency. PMLR, 107–118. https://proceedings.mlr.press/v81/menon18a.html
[27] Battemuulen Naranab, Seyed Sahand Mohammadi Ziabari, Yousuf Nasser Al Husaini, and Ali Mohammed Mansoor Alshahag. 2025. Fairness Metric Design Exploration in Multi-Domain Moral Sentiment Classification using Transformer-Based Models. arXiv:2510.11222 [cs]. doi:10.48550/arXiv.2510.11222
[28] Andrew M. Olney, Evan F. Risko, Sidney K. D'Mello, and Arthur C. Graesser. 2015. Attention in Educational Contexts: The Role of the Learning Task in Guiding Attention. Technical Report. https://eric.ed.gov/?id=ED617714 Publication Title: Grantee Submission ERIC Number: ED617714.
[29] Michael I. Posner and Mary K. Rothbart. 2014. Attention to learning of school subjects. Trends in Neuroscience and Education 3, 1 (March 2014), 14–17. doi:10.
1016/j.tine.2014.02.003
[30] Ikram Qarbal, Nawal Sael, and Sara Ouahabi. 2025. Student Engagement Detection Based on Head Pose Estimation and Facial Expressions Using Transfer Learning. In Innovations in Smart Cities Applications Volume 8, Mohamed Ben Ahmed, Boudhir Anouar Abdelhakim, Ismail Rakip Karas, and Kautour Ben Ahmed (Eds.). Springer Nature Switzerland, Cham, 246–255. doi:10.1007/978-3-031-88653-9_25
[31] Alec Radford, Jong Wook Kim, Chris Hallacy, A. Ramesh, Gabriel Goh, S. Agarwal, G. Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and I. Sutskever. 2021. Learning Transferable Visual Models From Natural Language Supervision. ArXiv (Feb. 2021). https://www.semanticscholar.org/paper/Learning-Transferable-Visual-Models-From-Natural-Radford-Kim/f68707f02a8c59c2e32f4073ef00dd1dcf8fc4
[32] Kishore Sampath, Pratheesh, Ayaazuddin Mohammad, and Resmi Ramachandranpillai. 2025. The Multimodal Paradox: How Added and Missing Modalities Shape Bias and Performance in Multimodal AI. doi:10.48550/arXiv.2505.03020 arXiv:2505.03020 [cs].
[33] Mayanda Mega Santoni, T. Basaruddin, and Kasiyah Junus. 2023. Convolutional Neural Network Model based Students' Engagement Detection in Imbalanced DAISEE Dataset. International Journal of Advanced Computer Science and Applications (IJACSA) 14, 3 (March 2023). doi:10.14569/IJACSA.2023.0140371
[34] Mayanda Mega Santoni, T. Basaruddin, Kasiyah Junus, and Oenardi Lawanto. 2024. Automatic Detection of Students' Engagement During Online Learning: A Bagging Ensemble Deep Learning Approach. IEEE Access 12 (2024), 96063–96073. doi:10.1109/ACCESS.2024.3425820
[35] Matheus Schmitz, Rehan Ahmed, and Jimi Cao. 2022. Bias and Fairness on Multimodal Emotion Detection Algorithms. doi:10.13140/RG.2.2.14341.01769 arXiv:2205.08383 [cs].
[36] Kshiti Sharma and Michail Giannakos. 2020. Multimodal data capabilities for learning: What can multimodal data tell us about learning? British Journal of Educational Technology 51, 5 (2020), 1450–1484. doi:10.1111/bjet.12993_eprint: https://bera.journals.onlinelibrary.wiley.com/doi/pdf/10.1111/bjet.12993.
[37] Alakhsimar Singh, Nischay Verma, Kanav Goyal, Amritpal Singh, Puneet Kumar, and Xiaobai Li. 2024. VisioPhysioNet: Multimodal Engagement Detection using Visual and Physiological Signals. arXiv preprint arXiv:2409.16126 (2024). doi:10.48550/arXiv:2409.16126
[38] Jobeal Solomon, Ali Mohammed Mansoor Alshahag, and Seyed Sahand Mohammadi Ziabari. 2026. Hybrid Vision Transformer-GAN Attribute Neutralizer for Mitigating Bias in Chest X-Ray Diagnosis. arXiv:2601.15490 [cs.CV] doi:10.48550/arXiv:2601.15490
[39] Yaniv Taigman, Ming Yang, Marc'Aurelio Ranzato, and Lior Wolf. 2014. DeepFace: Closing the Gap to Human-Level Performance in Face Verification. In 2014 IEEE Conference on Computer Vision and Pattern Recognition. 1701–1708. doi:10.1109/CVPR.2014.220. ISSN: 1063-6919.
[40] Jayant Teotia, Xulang Zhang, Rui Mao, and Erik Cambria. 2024. Evaluating Vision Language Models in Detecting Learning Engagement. In 2024 IEEE International Conference on Data Mining Workshops (ICDMW). 496–502. doi:10.1109/ICDMW65004.2024.00069 ISSN: 2375-9259.
[41] James Thiering, Tarun Sethupat Radha Krishna, Dylan Zelkin, and Ashis Kumer Biswas. 2025. Automatic Assessment of Students' Classroom Engagement with Bias Mitigated Multi-task Model. doi:10.48550/arXiv.2510.022057 arXiv:2510.022057 [cs].
[42] Yixin Wan, George Pu, Jiao Sun, Aparna Garimella, Kai-Wei Chang, and Nanyun Peng. 2023. "Kelly is a Warm Person, Joseph is a Role Model". Gender Biases in LLM-Generated Reference Letters. In Findings of the Association for Computational Linguistics: EMNLP 2023, Houda Bouamor, Juan Pino, and Kalika Bali (Eds.). Association for Computational Linguistics, Singapore, 3730–3748. doi:10.18653/v1/2023.findings-emlp.243
[43] Peiyi Wang, Lei Li, Liang Chen, Zefan Cai, Dawei Zhu, Binghuai Lin, Yunbo Cao, Lingpeng Kong, Qi Liu, Tianyu Liu, and Zhifang Sui. 2024. Large Language Models are not Fair Evaluators. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Lun-Wei Ku, Andre Martins, and Vivek Srikumar (Eds.). Association for Computational Linguistics, Bangkok, Thailand, 9440–9450. doi:10.18653/v1/2024.acl-long.511
[44] Wanjun Wang, Yan Yan, Ruxia Ding, Yuan Li, Hui Zhang, and Lei Du. 2025. Classroom Attention Detection Model through Multimodal Data Fusion. In 2025 5th International Conference on Digital Society and Intelligent Systems (DSInS). 310–314. doi:10.1109/DSInS68311.2025.11329999
[45] Jacob Whitehill, Zewelani Serpell, Yi-Ching Lin, Aysha Foster, and Javier R. Movellan. 2014. The Faces of Engagement: Automatic Recognition of Student Engagement from Facial Expressions. IEEE Transactions on Affective Computing 5, 1 (Jan. 2014), 86–98. doi:10.1109/TAFFC.2014.2331613
[46] Congeong Xie, Di Wang, Quan Wang, Xiao Liang, Ruyi Liu, and Qiguang Miao. 2026. Multimodal Latent Temporal Modeling for Continuous Engagement Assessment in Online Education. IEEE Transactions on Learning Technologies (2026), 1–14. doi:10.1109/TLT.2026.3656606
[47] Lijuan Yan, Xiaotao Wu, and Yi Wang. 2025. Student engagement assessment using multimodal deep learning. PLOS ONE 20, 6 (June 2025), e0325377. doi:10.
1371/journal.pone.0325377
[48] Shuzhen Yu, Alexey Androsov, and Hanbing Yan. 2025. Exploring the prospects of multimodal large language models for Automated Emotion Recognition in education: Insights from Gemini. Computers & Education 232 (July 2025), 105307. doi:10.1016/j.compedu.2025.105307
[49] Ali Ziaee and Seyed Sahand Mohammadi Ziabari. 2026. Sentiment Analysis of Sports Fans' Behaviour: A Multimodal Review of Digital and In-Venue Fan Affect. Journal of Sports Analytics 12 (2026). doi:10.1177/22150218261455495
A Training and Validation Error Curves
Figure 2 presents the training and validation MAE and RMSE curves for a representative Residual Fusion Transformer run. Seed 100 was selected because its best validation RMSE was closest to the median result across the 10 independent runs. The increasing separation between the training and validation curves after epoch 9 supports the use of validation-based early stopping.

Figure 2: Training and validation MAE and RMSE curves for the Residual Fusion Transformer using seed 100. The dashed line indicates the epoch selected based on the lowest validation RMSE.
B Repeated Subject-Split Robustness Analysis
Table 7: Repeated subject-split fairness robustness analysis. Values are paired changes relative to the unregularized Residual Fusion Transformer across 10 repeated subject-level splits. Positive values indicate improvement over the baseline.
| Fairness target | Metric | Mean change vs. baseline | Positive splits |
|---|---|---|---|
| Age | Validation overall MAE gain | -0.003 | 3/10 |
| Age | Validation age gap reduction | 0.029 | 9/10 |
| Age | Test overall MAE gain | 0.006 | 6/10 |
| Age | Test age gap reduction | -0.007 | 2/10 |
| Gender | Validation overall MAE gain | -0.004 | 3/10 |
| Gender | Validation gender gap reduction | 0.010 | 6/10 |
| Gender | Test overall MAE gain | 0.003 | 6/10 |
| Gender | Test gender gap reduction | -0.012 | 3/10 |
C Frame Sampling Rate Sensitivity Analysis
Table 8: Comparison of 1 frame per second and 10 frames per second using the Residual Transformer across 5 matched seeds. Values are reported as means across the matched seeds.
| Data | 1 FPS | 10 FPS |
|---|---|---|
| Validation MAE | 0.289 | 0.291 |
| Validation RMSE | 0.385 | 0.386 |
| Test MAE | 0.283 | 0.282 |
| Test RMSE | 0.363 | 0.361 |
D Architecture and Training Hyperparameters
Table 9: Architecture hyperparameters of the baseline and multimodal models. The fairness-aware models use the same Residual Fusion Transformer architecture as the unregularized multimodal model; only the training objective is modified by the demographic MAE-gap regularizer.
| Component | Visual GRU | Sensor GRU | Residual Fusion Transformer |
|---|---|---|---|
| Input representation | CLIP ViT-L/14 embedding: 768 dimensions + visual missing flag | Motion stream: motion features + missing flag; heart-rate stream: heart rate + missing flag | Visual stream: 768-dimensional CLIP embedding + visual missing flag; separate motion and heart-rate streams with missingness flags |
| Projection layers | Linear 769 → 512, LayerNorm, ReLU, dropout 0.2 | No projection before GRU streams | Visual projection 769 → 128; motion projection → 32; heart-rate projection → 16; LayerNorm and GELU used in all streams |
| Temporal encoder | One-layer GRU | Separate one-layer GRUs for motion and heart rate | Separate causal Transformer encoders for visual, motion, and heart-rate streams |
| Hidden dimensions | GRU hidden size 128 | Motion GRU hidden size 64; heart-rate GRU hidden size 16 | Visual dimension 128; motion dimension 32; heart-rate dimension 16 |
| Transformer layers | - | - | Visual: 2 layers; motion: 1 layer; heart rate: 1 layer |
| Attention heads | - | - | Visual: 4 heads; motion: 4 heads; heart rate: 2 heads |
| Feed-forward dimensions | - | - | Visual: 256; motion: 64; heart rate: 32 |
| Prediction head | Linear 128 → 64 → 1 | Linear 80 → 64 → 32 → 1 | Visual prediction head 128 → 64 → 1; residual correction head 176 → 64 → 1 |
| Residual gating | - | - | Gate network 176 → 32 → 1 with sigmoid activation; maximum sensor correction 0.5 |
| Dropout | Projection dropout 0.2; regressor dropout 0.3 | Regressor dropout 0.3 | Visual projection dropout 0.2; Transformer/regressor dropout 0.3; sensor-fusion dropout 0.25 |
Table 10: Training hyperparameters used across the temporal models.
| Hyperparameter | Value |
|---|---|
| Sequence length | 10 seconds |
| Optimizer | Adam |
| Loss | Weighted MSE |
| Attention-bin weighting factor | |
| Learning rate, visual GRU | |
| Learning rate, sensor GRU | |
| Learning rate, fusion and fairness models | |
| Weight decay | |
| Batch size, visual GRU | 32 |
| Batch size, sensor GRU | 128 |
| Batch size, fusion and fairness models | 32 |
| Early stopping patience | 7 epochs |
| Learning-rate scheduler | ReduceLROnPlateau |
| Scheduler factor | 0.3 |
| Scheduler patience | 3 epochs |
| Gradient clipping | Maximum norm 1.0 |
| Training seeds | 10 independent seeds |
The 10 random seeds used for all baseline and fairness-aware experiments were 42, 100, 2000, 2025, 2026, 2027, 2048, 4096, 7000, 8192.