From Student Risk Prediction to SC2R: Semantics-Constrained Counterfactual Recourse for Educational Decision Support
Authors: Ngoc Luyen Le, Marie-Hélène Abel, Bertrand Laforge
Organizations: Gamaizer, 93340 Le Raincy, France. · Université de Technologie de Compiègne, CNRS, Heudiasyc (Heuristics and Diagnosis of Complex Systems), CS 60319 - 60203 Compiègne Cedex, France. · Sorbonne Université, CNRS UMR 7585, LPMHE (Laboratoire de Physique Nucléaire et des Hautes Énergies), 75252 Paris cedex 05, France
Learning analytics models can identify students at risk of poor performance, but they do not directly indicate which interventions are feasible, actionable, and compatible with educational constraints. This paper introduces SC2R, a semantics-constrained counterfactual recourse framework for educational decision support. SC2R combines a calibrated predictive model, integer-programming-based recourse generation over discrete action variables, a lightweight RDF vocabulary for intervention-plan representation, and SHACL validation for enforcing timing, budget, immutability, and availability constraints. The framework is evaluated offline on the OULAD dataset using snapshots constructed relative to each assessment at two decision horizons. Results show that the predictive component provides strong performance, that compact intervention plans can be generated at scale, and that semantic validation reveals infeasible plans that lighter optimization-only settings would otherwise accept. Rather than claiming causal improvement in student outcomes, this work shows that counterfactual recourse becomes more operationally meaningful in education when recommendations are not only model-valid, but also semantically feasible and machine-checkable.
Figures & tables
Fig. 1 : Illustration of the problem formulation. Candidate plans are retained only if they satisfy both the prediction target and the semantic constraints.
Fig. 2 : Overview of SC 2 R . From student snapshots, the pipeline predicts next-assessment success, generates intervention plans, applies semantic validation, and retains only conformant plans for evaluation.
Fig. 3 : Ontology fragment for representing intervention plans, centered on cbe:ActionPlan and cbe:Action .
Intervention
Feature
Increments
Cost
Constraints
Review quizzes
Quiz clicks
+1,+2,+3
1/inc.
Before due day; available
Revisit pages
Page clicks
+1 to +5
1/2p
Before due day
Attend support
Support count
+1
3
Session available; before due day
Prep activity
Prep feature
+1
2
Schedule-compatible
TABLE I : Compact intervention vocabulary used in SC 2 R .
Item
Value
Snapshot horizons
d−14 , d−7 before next assessment
Train / val / test presentations
15/2/5
Instances per horizon (train / val / test)
190,752/29,054/84,791
Primary label
Next-assessment pass/fail ( score≥40 )
Primary recourse method
Integer programming on action variables
Full-scale IP plans scored offline
127,972
TABLE II : Dataset and protocol summary.
Fig. 4 : Predictive performance overview. Left: logistic regression performs strongly at both decision horizons, with slightly better results at d−7 . Right: supplementary nonlinear models yield only modest AUC gains on the d−14 split.
Metric
Value
Metric
Value
Plans scored
127,972
Mean number of actions
1.075
SHACL conformance rate
1.000
Mean predicted gain
0.383
Model validity rate
1.000
Mean 5-NN plausibility distance
6.950
Mean total cost
10.357
Mean noise stability
0.656
Median total cost
11.000
Mean retrain stability
0.228
TABLE III : Full-scale IP recourse summary.
Fig. 5 : Effect of semantic validation and robustness. Left: 200-case ablation comparing IP recourse, Wachter-style recourse, and IP recourse with availability constraints. Right: robustness indicators under input noise and retraining.
This study proposes a temporal modeling framework with a counterfactual policy-simulation layer for student dropout in higher education, using LMS engagement data and administrative withdrawal records. Dropout is operationalized as a time-to-event outcome at the enrollment level; weekly risk is modeled in discrete time via penalized, class-balanced logistic regression over person--period rows. Under a late-event temporal holdout, the model attains row-level AUCs of 0.8350 (train) and 0.8405 (test), with aggregate calibration acceptable but sparsely supported in the highest-risk bins. Ablation analyses indicate performance is sensitive to feature set composition, underscoring the role of temporal engagement signals. A scenario-indexed policy layer produces survival contrasts ΔS(T) under an explicit trigger/schedule contract: positive contrasts are confined to the shock branch (Tpolicy=18: 0.0102, 0.0260, 0.0819), while the mechanism-aware branch is negative (ΔSmech(18)=−0.0078, ΔSmech(38)=−0.0134). A subgroup analysis by gender quantifies scenario-induced survival gaps via bootstrap; contrasts are directionally stable but small. Results are not causally identified; they demonstrate the framework's capacity for internal structural scenario comparison under observational data constraints.
Rafael da Silva, Jeff Eicher, Gregory Longo
Applied Data Science Program, Eastern University, St. Davids, PA, USA.
We identify intervention bias as a previously unquantified failure mode of zero-shot large-language-model (LLM) educational advisory agents: without task-specific training, they recommend action when a hindsight-optimal oracle policy mandates inaction. In a six-arm ablation on the Open University Learning Analytics Dataset (N=800 students, four temporal cutoffs), at day 56 -- when the oracle designates 70.1% of students as needing no intervention -- zero-shot GPT-4o recommends action for 73%, a 43 percentage-point false-positive rate. Commercial RAG and SQL-augmented retrieval are comparably miscalibrated; at 10,000 students this implies about 4,300 unnecessary advisor contacts per cycle. Supervised policy learning eliminates this bias: a trajectory-conditioned ONNX Decision Transformer (DT) and a snapshot XGBoost classifier, trained on the same oracle-labelled trajectories under strict prefix-only features, both achieve near-zero calibration error. The DT reaches macro-F1 0.79 (macro-recall 0.85) across all five action classes, predicting even the rare load-reduction action without collapsing, at a 0% action flip rate and sub-5 ms CPU decision latency. The two supervised arms are on par; the DT's edge over XGBoost at the final cutoff is indicative only (unpaired across cohorts). Scope: we validate Stage-2 decision-making (EAV state vector to supervised policy) under controlled oracle input from structured OULAD data; high fidelity reflects feature-oracle alignment, not general high-stakes-AI capability. The most robust finding is the intervention-bias contrast, not the absolute accuracies. We also show an Evaluation Gap: LLM-as-judge scoring (DeepEval G-Eval) is blind to intervention bias, rewarding fluent over-prescription rather than decision quality.
Counterfactual explanations are widely used to provide algorithmic recourse in high-stakes decision-making systems. Most existing methods seek the smallest change to an input that flips a model's decision. However, decision-makers often rely not only on predicted labels but also on confidence thresholds and risk margins. Counterfactuals that barely cross a decision boundary can be fragile and unstable under noise or model variation. In this paper, we propose Target-confidence Recourse Using tSeTlin machines (TRUST), a framework in which users explicitly specify the desired prediction confidence for recourse. Rather than generating counterfactuals and evaluating confidence afterward, TRUST directly searches for minimal changes that satisfy a user-defined confidence target, enabling comparison of recourse options in terms of cost, confidence, and robustness. We instantiate TRUST using a Probabilistic Tsetlin Machine (PTM) combined with Bayesian optimization. The probabilistic clause-based structure of PTM links prediction confidence to the stability of decision rules. We show that counterfactuals satisfying the same rules can still differ substantially in reliability depending on how securely they satisfy those rules, revealing whether decisions are supported by robust or fragile clause activations. Experiments on synthetic and real-world datasets demonstrate that target-confidence counterfactuals produce more robust and interpretable recourse than conventional boundary-based approaches. Across multiple benchmarks, TRUST achieves perfect robustness while maintaining low recourse cost, including an L2 distance of 0.10 on the Haberman dataset at 0.92 confidence. By explicitly controlling confidence and exposing rule-level stability, TRUST provides actionable recourse for high-stakes decision support.
K. Darshana Abeyrathna, Sara El Mekkaoui, Nils Enric Canut Taugbøl +1
Group Research and Development Det Norske Veritas (DNV) Oslo, Norway