Fine-tuned small language models trained on text-formatted wearable sensor readings matched conventional machine learning in overall accuracy while substantially improving the detection of self-reported student disengagement in a classroom dataset. Published in the Journal of Ambient Intelligence and Humanized Computing by Rika Tanaka and Yusuke Fukazawa, the study evaluated Microsoft’s Phi-3 and Phi-3.5 models on a three-class task classifying Engagement, Neutral, and Disengagement states from wristband biosignals and contextual metadata. Across five-fold cross-validation, a fine-tuned Phi-3.5 model using minute-by-minute temporal summaries reached 0.44 overall accuracy, edging out a LightGBM classifier using statistical summaries at 0.43. While overall accuracy differed little between the top models, class-wise recall diverged sharply: fine-tuned Phi-3.5 identified disengaged states with 0.52 recall, compared with 0.07 to 0.10 for LightGBM. Because the analysis covered 105 matched class sessions from 23 students, the authors frame the results as a feasibility demonstration.
Estimating classroom engagement from physiological sensors poses persistent modeling challenges because educational studies typically collect high-dimensional, fine-grained time-series data from fewer than several dozen students. Under those small-sample conditions, conventional machine learning models trained from scratch risk severe overfitting when parameter counts exceed available supervision, while manual feature engineering remains labor-intensive and task-specific. Prior educational work has examined wearable heart rate and electrodermal activity, smartphone and smartwatch sensors, eye-tracking, and computer-vision facial expression analysis. Tanaka and Fukazawa instead tested whether reformulating sensor data into structured natural language prompts lets pre-trained small language models—compact architectures under five billion parameters—adapt to non-linguistic physiological patterns through fine-tuning.
Rather than gathering new recordings, the researchers analyzed a publicly available dataset originally collected by Gao and colleagues in 2022 and published on PhysioNet in February 2023. That field study took place at a private K–12 high school in Melbourne, Australia, with RMIT University ethics approval, school permission, and informed consent. Over 5.5 months, 23 students aged 15 to 17 wore Empatica E4 wristbands across 248 class sessions—recording heart rate, electrodermal activity, skin temperature, and triaxial acceleration—and completed post-class engagement surveys on a five-point Likert scale. Focusing on 80-minute academic classes with complete sensor and survey data, Tanaka and Fukazawa retained 105 matched samples spanning 59 unique sessions across six subjects: English, Health, Language, Maths, Politics, and Science. Target labels averaged two behavioral items—“I paid attention in class” and reverse-coded “I pretended to participate in class but actually did not,” rated from -2 to 2 with a 0.56 correlation—classifying averages of 1 or higher as Engagement, -1 or lower as Disengagement, and intermediate values as Neutral.
To standardize the raw wristband streams, the team resampled all four modalities to 1 hertz by computing per-second averages and filtered out physiologically implausible values, removing heart rates below 60 beats per minute and skin temperatures below 30 degrees Celsius. From each 80-minute session, they randomly selected start times to extract up to 20 ten-minute segments, then balanced the classes by downsampling Engagement and Neutral segments to match the 423 Disengagement samples, yielding 1,269 complete samples with no missing values. Each sample combined six feature types: student demographics (23 participant IDs and binary gender), class metadata (session ID and subject), and the four physiological signals. As the paper notes, heart rate—typically 60 to 100 beats per minute at rest—can indicate sympathetic nervous system activity linked to tension, anxiety, or cognitive load; x-axis acceleration tracks physical movement and posture; electrodermal activity indexes sweat-gland conductance tied to arousal and stress; and skin temperature reflects blood flow, metabolism, and thermoregulation.
For each 10-minute segment, the authors built two text-based representations. The temporal version computed per-minute medians for heart rate, acceleration, electrodermal activity, and skin temperature, forming a 10-dimensional sequence per sensor to reduce outlier and noise effects. The statistical version condensed each 10-minute window into four summary values per modality: mean, standard deviation, maximum, and minimum. Both formats followed a dual-structure prompt design aligned with prior wearable-sensor work such as Health-LLM, placing static demographic and class context in an introductory sentence while itemizing dynamic sensor readings in structured lists. The team deliberately kept prompts short, uniform, and unweighted, avoiding chain-of-thought or multi-step reasoning instructions. Citing earlier behavioral and health benchmarks, they noted that explicit reasoning prompts can fail to improve or even degrade accuracy and induce bias, whereas a minimal template isolated the models’ direct learning of physiological signals.
The researchers fine-tuned Microsoft’s Phi-3-mini-128k-instruct (3.8 billion parameters) and Phi-3.5-mini-instruct (2.7 billion parameters) using Low-Rank Adaptation, a parameter-efficient method that updates injected low-rank matrices instead of all weights. Training used a rank of 32 and scaling factor of 16 across all linear and Conv1D layers without dropout or bias adjustments, running four epochs with the Paged AdamW optimizer, a 0.0002 learning rate, 0.001 weight decay, cosine scheduling, 3 percent warm-up, FP16 mixed precision, gradient clipping at 0.3, batch size 1, and eight-step gradient accumulation. Experiments ran on a local Linux machine with an NVIDIA GeForce RTX 4060 Ti GPU (16 gigabytes VRAM), a 28-core CPU, and 98 gigabytes of RAM. Baselines included default Support Vector Machine and LightGBM classifiers, a fine-tuned bert-base-uncased encoder trained for 10 epochs at a 0.00001 learning rate with batch size 16, and zero-shot Phi-3 and Phi-3.5, evaluated via five-fold cross-validation grouped by student and session in a 3:1:1 split to prevent leakage.
Across five-fold cross-validation, fine-tuned Phi-3.5 with temporal prompts achieved the strongest overall performance, pairing 0.44 accuracy with balanced recall of 0.56 for Engagement and 0.52 for Disengagement alongside competitive precision. LightGBM with statistical features reached a nearly identical 0.43 accuracy, but its Disengagement recall fell to 0.07 to 0.10 depending on feature representation, indicating weaker identification of disengaged states in this dataset. Among fine-tuned small language models, temporal sequences generally outperformed statistical summaries, suggesting that minute-by-minute trajectories aided classification. Fine-tuned BERT models reached competitive recall for Engagement and Disengagement in some settings but recorded lower overall accuracy than the top fine-tuned Phi models. Zero-shot Phi-3 and Phi-3.5 displayed limited predictive capability, underscoring that task-specific fine-tuning was necessary to adapt language models to classroom physiological signals.
To inspect which features guided the language model’s predictions, the authors applied Shapley additive explanations, or SHAP, which assign numeric importance scores to individual inputs. Because token-based prompts do not map cleanly onto classical feature attribution, the team trained binary LightGBM proxy classifiers on statistical summaries of heart rate, acceleration, electrodermal activity, skin temperature, gender, and class name to approximate the fine-tuned Phi-3 statistical model. Across three pairwise tasks—Engagement versus Neutral, Engagement versus Disengagement, and Disengagement versus Neutral—the proxy models replicated the language model’s predictions with accuracies of 0.9978, 0.9972, and 0.9967, respectively, making only two misclassifications out of 724 instances. In the SHAP summary plots, higher mean acceleration and higher mean heart rate pushed predictions toward Engagement, whereas higher skin temperature metrics—maximum, mean, and minimum—were linked to Disengagement predictions in the Disengagement-related comparisons.
The researchers also ran nonparametric Kruskal-Wallis tests across engagement labels after Shapiro-Wilk tests revealed non-normal feature distributions. All four acceleration metrics differed significantly at p below 0.05: the Engagement group exhibited the highest mean and maximum values alongside significantly lower standard deviation, indicating greater yet more stable movement, while Disengagement showed the lowest minimum acceleration. The authors suggested that actions such as taking notes, raising hands, or nodding might relate to movement during focus, but stressed this remains a hypothesis requiring further study. Heart rate mean, maximum, and minimum likewise differed significantly at p below 0.05 and were higher during Engagement, whereas heart rate standard deviation did not differ significantly at p equals 0.14; citing prior physiological work, the paper linked moderately elevated minimum heart rate to sympathetic arousal and very low heart rate to parasympathetic dominance or drowsiness. All four skin temperature metrics also differed significantly at p below 0.05, with Engagement showing slightly higher mean, maximum, and standard deviation values in the group comparison—contrasting with the proxy SHAP direction linking higher temperature to Disengagement—while noting that resting temperature increases can reflect parasympathetic vasodilation and relaxation.
The authors highlighted five limitations that qualify these results. First, 105 sessions from 23 students at one school restrict generalizability to other student populations, courses, and settings. Second, because the models received manually structured temporal medians and statistical summaries rather than raw signals, it remains uncertain whether performance stemmed primarily from the language models or the engineered representations. Third, including student and class identifiers in prompts may introduce memorization effects that reduce accuracy on unseen students or classes, calling for student-independent and class-independent validation. Fourth, SHAP values from a LightGBM proxy provide indirect interpretations rather than direct explanations of the language model itself. Fifth, the study omitted modern deep time-series architectures such as Transformers and Temporal Convolutional Networks because the limited dataset made reliable training of data-intensive sequence models unlikely. Future work will test multimodal prompts adding learning logs, interaction records, facial expressions, and gaze on larger datasets, while synthetic-data demonstration code is available on GitHub and Google Colab alongside the original PhysioNet dataset.
Subject of Research: Predicting high school students' in-class engagement from wearable physiological sensor data using fine-tuned small language models
Article Title: Predicting in-class engagement from biosignals via fine-tuned small language models
Article References: Tanaka, R., & Fukazawa, Y. (2026). Predicting in-class engagement from biosignals via fine-tuned small language models. Journal of Ambient Intelligence and Humanized Computing. https://doi.org/10.1007/s12652-026-05142-y
Image Credits: AI Generated
DOI: 10.1007/s12652-026-05142-y
Keywords: Small Language Models, Phi-3, Phi-3.5, Wearable Biosignals, Classroom Engagement, Empatica E4, LoRA Fine-Tuning, Prompt Engineering, Heart Rate, Electrodermal Activity, Skin Temperature, Triaxial Acceleration, SHAP Analysis, LightGBM, BERT, Educational Data Analysis, Time-Series Classification, Kruskal-Wallis Test
Cite Scienmag News
Denise Maddox. (December 2, 2026). Small language models match machine learning in wearable classroom engagement study. Scienmag. https://scienmag.com/small-language-models-match-machine-learning-in-wearable-classroom-engagement-study/
Denise Maddox. "Small language models match machine learning in wearable classroom engagement study." Scienmag, 2 December 2026, https://scienmag.com/small-language-models-match-machine-learning-in-wearable-classroom-engagement-study/. Accessed 2 December 2026.
Denise Maddox. "Small language models match machine learning in wearable classroom engagement study." Scienmag. December 2, 2026. https://scienmag.com/small-language-models-match-machine-learning-in-wearable-classroom-engagement-study/








