<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>From Reaction to Anticipation: Predicting Future Affect</title></titleStmt>
			<publicationStmt>
				<publisher>International Educational Data Mining Society</publisher>
				<date>07/12/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10546433</idno>
					<idno type="doi">10.5281/zenodo.12729885</idno>
					
					<author>Andres Felipe Zambrano</author><author>Ryan S Baker</author><author>Sami Baral</author><author>Neil T Heffernan</author><author>Andrew Lan</author><author>Paaßen Benjamin</author><author>Demmans Epp Carrie</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[The educational data mining community has extensively investigated affect detection in learning platforms, finding associations between affective states and a wide range of learning outcomes. Based on these insights, several studies have used affect detectors to create interventions tailored to respond to when students are bored, confused, or frustrated. However, these detector-based interventions have depended on detecting affect when it occurs and therefore inherently respond to affective states after they have begun. This might not always be soon enough to avoid a negative experience for the student. In this paper, we aim to predict students&#39; affective states in advance. Within our approach, we attempt to determine the maximum prediction window where detector performance remains sufficiently high, documenting the decay in performance when this prediction horizon is increased. Our results indicate that it is possible to predict confusion, frustration, and boredom in advance with performance over chance for prediction horizons of 120, 40, and 50 seconds, respectively. These findings open the door to designing more timely interventions.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">INTRODUCTION</head><p>Since its beginnings, the educational data mining community has been studying the affective states that emerge during learning experiences mediated by digital platforms, attempting to identify, measure, analyze, and appropriately respond to them <ref type="bibr">[16]</ref>. Previous research has demonstrated that affective states within digital learning platforms, such as intelligent tutoring systems and educational video games, are correlated with a variety of other important constructs, including self-efficacy <ref type="bibr">[20]</ref>, analytical reasoning <ref type="bibr">[12]</ref>, learning outcomes <ref type="bibr">[4,</ref><ref type="bibr">19,</ref><ref type="bibr">24,</ref><ref type="bibr">29]</ref>, and college enrollment <ref type="bibr">[32]</ref>. Historically, engaged concentration (flow) correlates positively with learning outcomes, while confusion and frustration have shown mixed and complex associations with these outcomes. In contrast, boredom has consistently shown a negative impact on learning (see review in <ref type="bibr">[16]</ref>).</p><p>These insights have led to the use of affect detection in the design of customized interventions aimed at enhancing student engagement and minimizing the experience of affective states like confusion, frustration, and boredom <ref type="bibr">[9,</ref><ref type="bibr">10,</ref><ref type="bibr">17,</ref><ref type="bibr">23]</ref>. The core premise of all these research works is that recognizing and addressing students' affective states enhances their interaction with learning environments, making these interactions more engaging and effective <ref type="bibr">[16]</ref>. However, existing research primarily targets the identification of affective states at the point when students are already experiencing it, potentially too late to prevent negative impacts.</p><p>The challenge of timely intervention is further complicated by the current reliance on methods to establish the ground truth for training these models which do not identify the exact moment when these affective states start (e.g. <ref type="bibr">[2,</ref><ref type="bibr">15]</ref>). Therefore, current detectors are dependent on training labels that might only identify an affective state after it has been occurring for some time, causing even more delayed detection and intervention. Additionally, both detection and intervention do not occur instantaneously, delaying the entire process even more.</p><p>Knowing these limitations of current affect detectors, we propose to reframe this task as a prediction of future affect. Early prediction of frustration or boredom enhances the probability of sustaining or quickly restoring a positive affective state rather than trying to reverse negative affect once it has already emerged. Based on this motivation, in this paper, we use machine learning techniques to predict affective states in advance within the ASSISTments learning platform. Specifically, we explore various time horizons for forecasting engaged concentration, confusion, frustration, and boredom, determining the maximum prediction window where performance remains sufficiently high. Additionally, we compare the prediction windows with the half-life of these affective states observed in previous research to assess the feasibility of interventions that can make proactive interventions rather than react.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">RELATED WORK 2.1 Affect Detection and Learning Outcomes</head><p>There has been considerable work to use machine learning models to detect affective states <ref type="bibr">[1,</ref><ref type="bibr">5,</ref><ref type="bibr">15,</ref><ref type="bibr">31]</ref> and explore how these affective states are associated with different learning and educational outcomes <ref type="bibr">[18,</ref><ref type="bibr">24,</ref><ref type="bibr">32]</ref>. These findings, as in research conducted with other methods (see review in <ref type="bibr">[16]</ref>), have found relationships between affect and learning, with many replicating across learning environments. For example, Pardos et al. <ref type="bibr">[24]</ref> used affect detectors within the ASSISTments platform to investigate the association between detected affect and state test scores. Their results indicated that both engaged concentration and frustration were positively correlated with learning outcomes, whereas confusion and boredom had a negative association with this outcome. Using data from the same platform, San Pedro et al. <ref type="bibr">[32]</ref> used affect detectors to predict future college enrollment. They found that engaged concentration positively predicts college attendance, while those students for whom the detectors identified higher levels of boredom or confusion were also less likely to enroll in college. Within another platform, Reasoning Mind, Kostyuk and colleagues <ref type="bibr">[18]</ref> found that detected boredom and confusion were negatively associated with learning, whereas engaged concentration was positively associated with learning. However, these results are complicated somewhat by results such as <ref type="bibr">[19]</ref>, which found that the duration of confusion or frustration (detected in Cognitive Tutor Algebra) also matters for learning outcomes.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Detector-Based Interventions</head><p>Given that it is possible to detect affect, and affect is associated with learning, there has been considerable research focusing on using detectors to drive interventions that influence student affect. For instance, Padron-Rivera et al. <ref type="bibr">[23]</ref> implemented a system to offer hints upon detecting students' confusion or frustration, arguing that such interventions could facilitate a return to engaged concentration while preventing boredom (in line with the affective state dynamics model in <ref type="bibr">[11]</ref>). Additionally, they integrated congratulatory messages after correct answers to sustain student engagement. However, their work was not able to impact student affect. <ref type="bibr">[10]</ref> conducted a study comparing an affectsensitive version of an intelligent tutoring system with a non-affective version. The affect-sensitive version was designed to recognize and respond to students' affective states, specifically boredom, confusion, and frustration, through pre-programmed emotional responses. Their system was successful at improving learning outcomes, but more for students with lower domain knowledge. In a third study along these lines, DeFalco et al. <ref type="bibr">[9]</ref> detected student frustration, giving learners three different types of motivational messages designed around control-value theory, social identity, and self-efficacy. They found that giving frustrated students motivational messages focused on self-efficacy led to higher learning outcomes compared to a control group who did not receive messages. However, the intervention's success did not replicate in a subsequent learning environment designed to be less frustrating, suggesting that the impact of these messages may vary depending on the affective context of the learning environment.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D'Mello and Graesser</head><p>Overall, automated interventions based on affect detection have shown promise but have not fully demonstrated that potential. One possible reason is that these systems may be intervening too late. If a student is already experiencing a negative emotion, it could be less likely for them to return to a more positive affect. Once a student is already frustrated or bored, that negative affect may be difficult to disrupt. By contrast, if an intervention is applied in an earlier stage when students are at risk of becoming frustrated or bored but have not yet done so (or who are just beginning to experience shifts), the chances of maintaining or returning quickly to positive affect are higher. Consequently, the primary objective of this research is to determine how much sooner affective states can be accurately predicted, so that interventions can be proactive about negative emotion rather than reactive to it.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3">Advanced Forecasting of Affect</head><p>To the best of our awareness, there has not yet been research on the advanced forecasting of affect in education, but efforts along these lines have been conducted in other domains. For example, both neural networks and random forest have been successfully used to forecast a speaker's future affect a few seconds later, from their current and past speech and image data <ref type="bibr">[21,</ref><ref type="bibr">33]</ref>. In addition, researchers have successfully predicted future stress levels from current and recent multimodal data <ref type="bibr">[34,</ref><ref type="bibr">35]</ref>. Though these efforts have involved very different data than digital learning platforms, they increase confidence that this challenge is feasible.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">METHODS 3.1 Dataset</head><p>ASSISTments is a learning platform designed to enable teachers to assign content, offer automated feedback and support for student responses, and generate comprehensive reports on student performance. For this study, 9 middle-school mathematics teachers who frequently used ASSISTments <ref type="bibr">[14]</ref> were recruited between 2021 and 2023, to assign problems using the platform and collect affective data from their students. A total of 312 middle-school students from the 9 teachers participated in the study, where they solved mathematics problems using the ASSISTments platform and reported their affective states. To support the replicability of our results and further experiments, the full data set and code used in this research can be found at <ref type="url">https://osf.io/spg6v/</ref>.</p><p>To facilitate the collection of affective data, a self-reporting infrastructure was integrated into the ASSISTments platform, as shown in Figure <ref type="figure">1</ref>. This infrastructure was designed to be minimally disruptive, ensuring that the primary focus of students remained on their mathematics learning. Upon the completion of a problem within their assigned mathematics assignment, students were prompted to report their affective state. The self-reports were designed based on past self-report approaches for affect <ref type="bibr">[27]</ref> and iteratively designed with members of the target population. For this study, we focused on engaged concentration, confusion, boredom, and frustration, which are the most commonly studied affective states in online learning environments (see reviews in <ref type="bibr">[2,</ref><ref type="bibr">16]</ref>). The order of each affective state was randomized in the survey each time it was presented to the students. Students were randomly asked to report their affective states, either once or twice, for each assignment they completed. This decision was governed by a probabilistic algorithm, where there was a 10% chance of picking two problems from an assignment for affective reporting and a 90% chance of picking only one problem. The students were instructed to report their affective states immediately after completing the selected problem(s), thereby ensuring the timeliness and relevance of the affective data. We limited how often students were asked about their affective states to avoid fatigue, minimize potential disruptions to their learning experience, and avoid inadvertently inducing disinterest and boredom.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Figure 1. Self-Report survey within an assignment in the AS-SISTments platform, asking students to report their affective state when working on an assignment.</head><p>This dataset collected using the ASSISTments infrastructure includes information about students' correct and incorrect answers, hint requests, and self-reported affective states. On average, each student solved 1.81 assignments (SD = 1.21), submitted 14.2 responses (SD = 10.5), requested hints 2.84 times (SD = 2.2), and self-reported their affective state 1.75 times (SD = 1.25).</p><p>The distribution of these reported affective states is detailed in Table 1. The most common affective state reported was None (29.0%), followed by engaged concentration (27.8%). Frustration was the least reported state, noted by only 8.3% of the reports. These proportions are similar to those observed in previous studies when students categorized their own affective states. For instance, Baker et al. <ref type="bibr">[3]</ref> reported that students most frequently identified as feeling Neutral (29%) and Engaged Concentrated (20%) when they assessed their own affective states every 20 seconds while watching recordings of themselves using AutoTutor (a computerized tutor that mimics human tutors and converses with students in natural language, as described by <ref type="bibr">[13]</ref>). In that study, students categorized Frustration, Confusion, and Boredom at rates of 11%, 18%, and 16%, respectively, which aligns to the distribution observed in our study.</p><p>Table 1. Distributions of affective states. Affective State # Samples % Eng. Concentration 151 27.8 Confusion 90 16.5 Frustration 46 8.3 Boredom 99 18.2 None 158 29.0 Total 544 100</p><p>Past studies where affect was identified by trained experts had a very different distribution of affective states than the student selfreports we observed. Generally, Engaged Concentration is the predominant affective state noted by trained human observers, exceeding 60% in multiple studies across various learning platforms, including ASSISTments <ref type="bibr">[1,</ref><ref type="bibr">3,</ref><ref type="bibr">22,</ref><ref type="bibr">24]</ref>. This difference in proportions between researcher-categorized affect and student selfreports has been found even within the exact same sample of students. For instance, <ref type="bibr">[38]</ref> reported that substantially fewer positive emotions (concentration, focus, delight, and happiness) were observed by trained experts compared to self-reports collected simultaneously. Though experts disagree with self-report, it is unclear which method is more accurate, given the limitations of each approach (systematic error and bias for observers; demand, selfpresentation, and lack of meta-awareness for self-report; see discussions in <ref type="bibr">[26,</ref><ref type="bibr">27]</ref>).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">Prediction in Advance</head><p>The dataset was segmented into 5-second clips. This approach was adopted instead of the more commonly used 20-second segmentation to increase the granularity of the analysis. For each clip, we crafted 58 features, capturing diverse aspects of student interaction with the educational software. These aspects include the correctness of responses, the frequency of answers, hints requested, the time elapsed since the last action, and others. These features were tailored to reflect both general and skill-specific student interactions. Although the core clip is defined as 5 seconds, when predicting the label (typically from before the clip, since we are predicting in advance), the set of features also included data aggregated over the prior 20 seconds, 1 minute, and 3 minutes, and during the prior 3, 5, and 8 actions within the current study session. These features are inspired by similar features employed in previous studies that trained affect detectors using ASSISTments data <ref type="bibr">[24,</ref><ref type="bibr">36]</ref>. When aggregating data on the last 3, 5, or 8 actions, we do not consider actions of previous learning sessions that ended more than one hour earlier, because these older actions are fairly unlikely to influence the student's current affective state. Additionally, if the student has not performed any actions recently, it becomes impossible to calculate certain features, or they default to values of 0. Therefore, we filtered out periods of inactivity exceeding one hour.</p><p>In a model capable of predicting an affective state N minute in advance, the features must correspond to actions that occurred more than N minutes prior to the affective self-report of the students. For this reason, all affective states reported during the first N minutes after the first action of a studying session cannot be used for training and testing the models. This constraint, while necessary, does distort the sample somewhat, for students who solve a few or only one question in each studying session because those affective states will not be matched with a set of previous actions before the corresponding prediction horizon, reducing the number of samples available for developing the machine learning models.  In Table <ref type="table">2</ref>, we present the distribution of samples that have sufficient prior data for a 3-minute temporal horizon to be possible.</p><p>From the initial pool of 544 samples, only 265 (48.7%) met the criteria for the selected horizon. The distribution of affect in this reduced data set closely resembles the original dataset. Although more data is available for prediction horizons shorter than 3 minutes, we used this selected set of 265 samples for training and validating all models across all the temporal horizons considered in this study (from 0 to 180 seconds in 10-second increments). This methodological choice allows us to attribute any observed changes in model performance specifically to the extension of the prediction horizon rather than to the influence of sample size variation or differences in affect at different times within the session.</p><p>Considering the dataset's relatively small size, we employ Logistic Regression (LR) and decision tree-based methods like Random Forests (RF) and Extreme Gradient Boosting (XGB) with the default parameter settings <ref type="bibr">[8,</ref><ref type="bibr">25]</ref>. For each affective state, separate binary classifiers were trained, as in <ref type="bibr">[1,</ref><ref type="bibr">24]</ref>. To validate these models, we applied a 4-fold stratified student-level cross-validation, selecting 4 folds to keep test sets large despite the small sample size. To enhance the robustness of our estimation, we repeated this process with 10 unique random seeds, thereby generating 40 unique combinations of training and testing sets. We assessed model performance using the Area under the Receiver Operating Characteristic Curve (AUC ROC), providing a comprehensive evaluation across various thresholds. This is particularly useful for evaluating the model's applicability in diverse interventions with varying cost-benefit trade-offs. The mean and standard deviation of the AUC were calculated across these 40 validation sets. Additionally, we examined the confusion matrix to identify and understand each detector's misclassification patterns. We evaluated the mean decrease impurity (MDI; <ref type="bibr">[7]</ref>) feature importance of each model to understand how the most important features varied across different prediction horizons. This feature importance metric was chosen due to its straightforward computation, which relies on the division of decision trees, while reducing the risk of hiding important features that do not have a uniform association (either positive or negative) with the outcome and that are dependent on interactions with other features <ref type="bibr">[7]</ref>.</p><p>Table 2. Affect distributions for samples with enough data for training prediction models with a time horizon of at least 3 minutes. Affective State # Samples % Eng. Concentration 74 27.9 Confusion 42 15.8 Frustration 32 12.1 Boredom 39 14.7 None 78 29.4 Total 265 100</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">RESULTS</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Affect Detection</head><p>Table <ref type="table">3</ref> presents the baseline performance of affect detectors, operating with a zero-second time horizon (i.e. the actual clip time), using Random Forest (RF), XGBoost (XGB), and Logistic Regression (LR) models. The results indicate that frustration is the best predicted affective state using the decision tree-based models (RF and XGB), with the XGB model achieving the highest performance (AUC=0.727). Confusion and boredom are also effectively detected by the ML models, showing an AUC of 0.671 for confusion and 0.638 for boredom using RF and XGB, respectively. In contrast, the models could not accurately detect engaged concentration in this data set, showing an AUC of 0.503 (chance level).</p><p>Table <ref type="table">4</ref> presents the confusion matrix for the detectors. Columns represent the real affective states reported by the students, while rows indicate the number of instances where the corresponding detector identifies each affective state. We set the classification threshold at 0.3, as the detectors' outputs tended to be below the conventional 0.5 threshold. Table <ref type="table">4</ref> also includes, in parentheses, the percentage of each actual affective state that was identified by the detectors as the ground truth affect in that column (whether correctly or incorrectly). For example, the confusion matrix reveals that the Engaged Concentration detector incorrectly identifies 49.5% of actual Boredom instances and 45.9% of None instances as Concentration, both higher percentages than its correct identification of actual Engaged Concentration instances (36.7%). This suggests that the Engaged Concentration detector's performance is compromised by misidentifying Boredom and None instances. One possible interpretation is that the None category may include some cases which would have been categorized as Engaged Concentration by experts, and that students do not fully understand the distinction between these affective states (and therefore are actually incorrectly categorizing their own affect). Similarly, the Boredom detector also misclassifies 10.5% of None instances and 8.2% of Engaged Concentration instances as Boredom.</p><p>Table 3. Detection of current affective state. 4-fold student-level cross-validation AUC of affect detectors employing different ML techniques. Best performing models for each affective state are shown in bold. Standard deviation of performance metrics across the 4 folds are shown in parenthesis. Affective State RF XGB LR Eng. Con 0.503 (0.070) 0.483 (0.068) 0.439 (0.072) Conf 0.671 (0.065) 0.668 (0.079) 0.597 (0.074) Fru 0.688 (0.095) 0.727 (0.087) 0.556 (0.115) Bor 0.627 (0.085) 0.638 (0.082) 0.570 (0.075) Table 4. Confusion Matrix of Detections. Columns correspond to self-reported affect and rows correspond to detector outputs. In parentheses, the percentage of each actual affective state that was identified by the detectors as the ground truth affect in that column (whether correctly or incorrectly). Detector Eng. Con Conf Fru Bor None Eng. Con 27.2 (36.7) 11.1 (26.4) 10.2 (31.9) 19.3 (49.5) 35.8 (45.9) Conf 7.2 (9.7) 10.1 (24.4) 8.4 (26.3) 2.5 (6.4) 6.1 (7.1) Fru 3.1 (4.2) 4.2 (10.0) 6.6 (20.6) 0.4 (1.0) 3.4 (4.4) Bor 6.1 (8.2) 2.5 (6.0) 1.7 (5.3) 8.4 (21.5) 8.2 (10.5)</p><p>The confusion and frustration detectors successfully identified Engaged Concentration, Boredom, and None as neither frustration nor confusion. None of these three affective states is misidentified by the confusion or frustration detectors at a rate higher than 10%. However, the confusion detector identifies 24.4% of confusion and 26.3% of frustration instances as confusion. Similarly, but at a lesser level, the frustration detector identifies 20.6% of the frustration instances and 10% of confusion instances as frustration. These results suggest that some students might be having trouble distinguishing between these two affective states or that both share similar patterns that make them be identified together. Indeed, some recent work has argued that these two affective states should be lumped together during detection <ref type="bibr">[28]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Affect Prediction in Advance</head><p>Figures 3 through 5 present the performance of predictive models for each affective state with different time horizons ranging between 0 to 3 minutes with 10-second increments. In each figure, a range representing +1 and -1 standard deviations, as well as the chance level performance, are included. For this analysis, we exclude Engaged Concentration because, as shown in Table <ref type="table">3</ref>, the detection and prediction models for Engaged Concentration do not surpass chance-level performance.</p><p>The confusion detectors trained using RF perform above 0.6 AUC for temporal horizons within the 1-minute range, as shown in Figure <ref type="figure">3</ref>. For all horizons less than 2 minutes, performance was consistently more than one standard deviation above chance. In the case of frustration detectors (trained using XGB), performance remained at least one standard deviation above chance for prediction horizons up to 40 seconds in advance, as shown in Figure <ref type="figure">4</ref>. In all these cases, the models achieved an AUC of over 0.6. The predictive models for Boredom (trained using XGB; see Figure <ref type="figure">5</ref>) show comparable outcomes. In this case, for prediction horizons up to 50 seconds, all models had an AUC above 0.6, with performance at least one standard deviation better than chance.   </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">Most Important Features</head><p>We evaluated the most important features for each affect prediction considering the horizons of 0 (current affect), 60, and 120 seconds. As shown in Table <ref type="table">5</ref>, the time spent in the assignment appeared as an important feature across all prediction horizons for confusion. Errors in the current problem type (i.e. multiple-choice question) and time since the last error were important for the predictions of 0 and 60 seconds but not for 120 seconds. Time since the last correct answer and time spent in the last attempt appeared as important features for 60 and 120 seconds but not for detecting the current affect. In the case of frustration detection, the number of errors in the last 8 attempts appeared as an important feature across all time horizons. However, in contrast with the results observed for the confusion prediction, the detector of current frustration does not share any other feature with the 60-second and 120-second prediction models. Finally, the boredom detection and prediction models shared 3 of the top 5 most important features (time since requesting the last hint, number of errors in multiple-choice questions, and attempts during the last minute).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">DISCUSSION AND CONCLUSIONS</head><p>According to our results, confusion, frustration, and boredom can be predicted in advance with performance over chance for time horizons of 120, 40, and 50 seconds, respectively. For each affective state, and particularly for confusion and boredom, the most important features for both prediction (60 and 120 second horizons) and detection (0 second horizon) models were similar. This result suggests that both models might be capturing a similar signal, just varying the timing of the prediction, indicating that the labels are likely autocorrelated. This finding reinforces the argument that these affective states can be anticipated. However, one limitation to our interpretation is that we are uncertain when each affective state instance actually began, a difficult thing to be certain of with any ground truth method. Thus, it is important to be careful in the interpretation of these results. Nevertheless, it is unlikely that all of our predictive success is due to capturing earlier onset of the later affective state. Botelho et al. <ref type="bibr">[6]</ref> found that for the ASSISTments platform, confusion can persist for 40 seconds to 1 minute, frustration for 2 minutes, and boredom for even 5 minutes. Comparing this with our prediction windows, we see that our 120-second prediction window for confusion exceeds its half-life. This suggests that we are likely to be predicting at least some confusion before it actually occurs. In contrast, our prediction windows for frustration and boredom are shorter than their potential durations. For this since Last Hint Time since Last Hint Time since Last Hint Errors in Multiple Choice Questions Errors in Multiple Choice Questions Errors in Multiple Choice Questions Attempts in Last Minute Attempts in Last Minute Attempts in Last Minute Attempts in Multiple Choice Questions Errors in Last 8 Attempts Errors in Last 8 Attempts Errors in Current Problem Type Time since Last Error Attempts in Same Problem Type reason, students might be already experiencing those affective states, in some cases, when the prediction models determine that students would report them in the next minute. Although this alternate interpretation of the model functionality does not correspond to the original goal of intervening before students feel frustration or boredom, even in this case this approach remains useful because it allows earlier detection than what previous detectors can do.</p><p>The potential autocorrelation of these signals suggests that future work could compare the predictive improvements of ML-based detectors against models that solely use autocorrelation based on the labels' time series. If autocorrelation models alone (using the collected labels exclusively) provide substantial predictive accuracy, it could indicate that labels of previous instances should be included in the feature set of ML-based models. In this case, we excluded the labels from the feature set because we want to be able to use detectors without continuously asking students about their affective states. However, the predicted labels in previous instances could also be considered when making later predictions, as is seen in some neural network topologies, such as the Long-Short Term Memory networks that have shown promising performance for affect detection <ref type="bibr">[5]</ref>.</p><p>One limitation of our study that prevented us from exploring neural networks was the limited sample size available for training the machine learning models. The reduced number of self-report requests for each student, to reduce issues from repeating the same question excessively, resulted in a smaller sample size than what previous detector research based on self-reports has typically gathered <ref type="bibr">[37,</ref><ref type="bibr">38]</ref>. Using a larger dataset collected among a larger number of learners or increasing the granularity of the data acquisition would likely lead to better model performance. This ground truth with higher granularity or larger number of samples would enable a more precise tuning of the hyperparameters in the ML models and use other machine learning techniques like artificial neural networks <ref type="bibr">[5]</ref>, potentially enhancing the performance of the models. Additionally, future work can also explore data augmentation techniques as an alternative to obtaining more training samples.</p><p>One surprise in our findings is the relatively low frequency of engaged concentration and the unusually poor performance of engaged concentration detection compared to previous engaged concentration detection in ASSISTments (and other systems as well) <ref type="bibr">[3,</ref><ref type="bibr">24,</ref><ref type="bibr">31]</ref>. One possible interpretation is that offering None as a response option in students' self-reports might be skewing the performance of our models, particularly engaged concentration. Engaged concentration is commonly the dominant affective state in various learning environments <ref type="bibr">[3,</ref><ref type="bibr">22,</ref><ref type="bibr">24,</ref><ref type="bibr">38]</ref>, as the only affective state with a non-negative valence studied in most environments <ref type="bibr">[2,</ref><ref type="bibr">30]</ref>. Typically, engaged concentration is low activation <ref type="bibr">[3]</ref>, so it is possible that some students are not even realizing that they are engaged. Alternatively, it may be that past studies based on expert judgment confused engaged concentration with the neutral affective state or an absence of affect. Earlier research also indicates that positive emotions, especially engaged concentration, are reported less frequently when individuals assess their own affective state <ref type="bibr">[3,</ref><ref type="bibr">38]</ref>. The reduced effectiveness of engaged concentration detection in this study, along with its tendency to identify instances of boredom and None more than actual engaged concentration, suggests that self-reporting might be less reliable for identifying engaged concentration compared to expert labeling methods.</p><p>Despite these limitations, models that can predict (or early detect) confusion, frustration, and boredom can be useful, as they can lead to intervention before a student's negative affect (particularly boredom) lead to problematic behaviors such as gaming the system, which are detrimental to their learning outcomes <ref type="bibr">[3]</ref>. This is particularly important in systems with high latency as such delays further postpone interventions, amplifying the risk of negative outcomes stemming from late responses. For instance, early detection of frustration or boredom enables the learning platform to suggest breaks or deliver motivational messages to the students. This early detection can also facilitate other interventions, such as switching to a different learning activity in the next problem or even increasing the difficulty of the subsequent activities if the system detects that boredom will appear soon, but there is a low risk of future confusion or frustration. This approach would help prevent students from becoming disinterested in their studies, a typical outcome of boredom, or unresolved confusion or frustration, which lead to poorer learning. As such, detecting affect early or in advance may help us to develop learning systems that better support learners' motivation and learning.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="8.">APPENDIX I: LIST OF FEATURES</head><p>The complete list of features employed in this study is:</p><p>&#8226; Number of skills practiced by the student.</p><p>&#8226; Time taken in the last response.</p><p>&#8226; Average time taken in the last 3 responses.</p><p>&#8226; Average time taken in the last 5 responses.</p><p>&#8226; Average time taken in the last 8 responses.</p><p>&#8226; Time taken in the current assignment.</p><p>&#8226; Days since the student started the current assignment.</p><p>&#8226; Total attempts.</p><p>&#8226; Percentage of wrong answers in the last 3 responses.</p><p>&#8226; Percentage of wrong answers in the last 5 responses.</p><p>&#8226; Percentage of wrong answers in the last 8 responses.</p><p>&#8226; Hints requested in the current assignment.</p><p>&#8226; Hints requested in the last 3 responses.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#8226;</head><p>Hints requested in the last 5 responses.</p><p>&#8226; Hints requested in the last 8 responses.</p><p>&#8226; Total errors.</p><p>&#8226; Total hints requested.</p><p>&#8226; Attempts in the last 20 seconds.</p><p>&#8226; Attempts in the last minute.</p><p>&#8226; Attempts in the last 3 minutes.</p><p>&#8226; Errors in the last 20 seconds.</p><p>&#8226; Errors in the last minute.</p><p>&#8226; Errors in the last 3 minutes.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#8226;</head><p>Hints requested in the last 20 seconds.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#8226;</head><p>Hints requested in the last minute.</p><p>&#8226; Hints requested in the last 3 minutes.</p><p>&#8226; Time since the last attempt.</p><p>&#8226; Time since the last error.</p><p>&#8226; Time since the last correct answer.</p><p>&#8226; Time since the last hint requested.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#8226;</head><p>Is the current problem a Match problem?</p><p>&#8226; Is the current problem a numeric value problem?</p><p>&#8226; Is the current problem a multiple-choice problem?</p><p>&#8226; Is the current problem an algebraic expression problem?</p><p>&#8226; Is the current problem a check all that apply problem?</p><p>&#8226; Attempts in the current problem type.</p><p>&#8226; Errors in the current problem type.</p><p>&#8226; Hints requested in the current problem type.</p><p>&#8226; Attempts in the match problems.</p><p>&#8226; Attempts in numeric value entry problems.</p><p>&#8226; Attempts in multiple-choice problems.</p><p>&#8226; Attempts in algebraic expression problems.</p><p>&#8226; Attempts in check-all that apply problems.</p><p>&#8226; Total errors in match problems.</p><p>&#8226; Total errors in numeric value entry problems.</p><p>&#8226; Total errors in multiple-choice problems.</p><p>&#8226; Total errors in algebraic expression problems.</p><p>&#8226; Total errors in check-all that apply problems.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#8226;</head><p>Total time solving problems of the current skill.</p><p>&#8226; Is this problem the first time the student has practiced this skill?</p><p>&#8226; First time practicing a skill in the last 20 seconds.</p><p>&#8226; First time practicing a skill in the last minute.</p><p>&#8226; First time practicing a skill in the last 3 minutes.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#8226;</head><p>Error in the first time the student practiced the skill.</p><p>&#8226; Total responses of the student in problems of the current skill.</p><p>&#8226; Total errors of the student practicing the current skill.</p><p>&#8226; Total hints requested by the student practicing the current skill.</p><p>&#8226; Action outside school hours (before 8 in the morning or after 5 in the afternoon).</p></div></body>
		</text>
</TEI>
