1. Introduction
This section frames the motivation and scope of the work. We first identify the core research problem and the limitations of existing approaches that motivate it. We then summarise the main contributions of the proposed solution, and conclude with the research questions that structure the experimental evaluation.
1.1. Problem Statement and Motivation
Knowledge Tracing (KT) [
1] is a foundational problem in Intelligent Tutoring Systems and Learning Analytics [
2] aimed at estimating the evolution of student knowledge as they interact with a sequence of educational work items. Accurate mastery tracking enables data-driven personalisation, yet current approaches are caught in a dichotomy between interpretable but rigid probabilistic models and high-accuracy but opaque Deep Knowledge Tracing (DKT) architectures [
3,
4,
5]. While recent efforts have sought to bridge this gap, they generally do not aim for interpretability based on alignment with pedagogical principles [
6,
7,
8]. Consequently, a critical research gap remains regarding architectures that can maintain the capacity of deep learning while remaining grounded in educational theory. Specifically, there is a need for models that track student mastery through conceptual constructs, such as
initial mastery and
learn rates, rather than opaque latent features, addressing the transparency and accountability concerns essential for trust in educational artificial intelligence [
9].
1.2. Research Contributions
To address the challenge of achieving both high predictive accuracy and pedagogical transparency, this work provides the following key contributions:
Grounded Architecture: We introduce gTransformer, a variant of attention-based Transformers that implements a novel representational grounding methodology. This approach explicitly anchors the model’s latent representations to the concepts of an intrinsically interpretable reference model, bridging the gap between deep learning expressiveness and theoretical alignment.
Performance–Interpretability Trade-Off: We demonstrate that grounded models achieve state-of-the-art predictive performance, providing a significant Area Under the Curve (AUC) gain over traditional theory-based models (+19.9%) while incurring a minimal cost (3.9%) relative to non-interpretable configurations.
Context-Aware Personalisation: By leveraging attention mechanisms to encode longitudinal interaction histories into context-aware parameters, gTransformer overcomes the structural rigidity and limitations of traditional approaches, enabling the differentiation of students based on their unique learning trajectories.
Rigorous Validation Protocol: We establish a triple-validation methodology consisting of structural, semantic, and functional alignment to quantify the pedagogical integrity and reliability of the model’s internal diagnostic representations.
1.3. Research Questions
Our research is guided by three primary research questions:
RQ1: Performance–Interpretability Trade-Off.
Are gTransformer models able to produce interpretable outputs while remaining competitive in terms of predictive performance? What is the trade-off between predictive performance and interpretability?
RQ2: Grounded Interpretability.
How can we check that the parameters used to get interpretable outputs are really grounded in theory-based estimations?
RQ3: Context-Aware Personalisation.
How can the historical learning context captured by a Transformer-based model enhance student-centred personalisation, and how does this compare with capabilities of KT traditional models?
To address these questions, we implement a validation approach that quantifies the trade-off between predictive performance and interpretability (RQ1), assesses the pedagogical grounding of internal representations through a triple-validation methodology (RQ2), and demonstrates practical applications for achieving context-aware personalisation (RQ3).
2. Related Work
This section situates gTransformer within the broader landscape of KT research. We begin by tracing the historical evolution of KT models and the emergence of the interpretability–performance dichotomy. We then examine the theoretical foundations of Bayesian Knowledge Tracing (BKT) as our pedagogically grounded reference framework, followed by a review of the transition from recurrent to attention-based DKT architectures. Subsequently, we categorise existing efforts to bridge the interpretability gap through post hoc and ante hoc methodologies. Finally, we map our approach to Informed Machine Learning, establishing the connection with this paradigm.
2.1. Interpretability–Performance Dichotomy
Historically, the development of KT has been characterized by a dichotomy between two distinct paradigms [
3]. The first, which predominated in the field for years, is characterized by probabilistic models such as BKT [
1] and Factor Analysis Models based on logistic regression, including Additive Factor Models [
10], Performance Factor Analysis [
11], and Knowledge Tracing Machines [
12]. Factor Analysis Models are theoretically supported by the Item Response Theory (IRT) [
13], which has played a large role in educational assessment and measurement. These traditional approaches are intrinsically interpretable: they model learning as a process governed by explicit parameters related to pedagogical, cognitive or psychometric principles. Because the model structure mirrors a theoretical understanding of human learning, educators can inspect these values to validate the model’s reasoning and trust its outputs. However, this transparency comes at the cost of representational rigidity; the simplifying assumptions required by these models often limit their predictive power, causing them to struggle with the complex, non-linear and long-range dependencies inherent in real-world student behaviour [
4].
The second paradigm emerged with the advent of DKT [
14], which leverages deep learning techniques ranging from initial Recurrent Neural Networks to more recent Transformer architectures [
5]. The latter, based on encoder–decoder components and attention mechanisms, are especially relevant as they provide the foundation for current Large Language Models (LLM). By treating student interaction histories as temporal sequences, Transformer models apply techniques similar to those that characterize LLM. DKT models have achieved state-of-the-art predictive performance, significantly outperforming classical baselines due to a high structural capacity that allows them to extract latent features from vast amounts of data [
3]. However, this substantial gain in predictive performance has come at the cost of model transparency, creating a significant interpretability gap. Deep learning models are notoriously opaque “black boxes”, where the internal high-dimensional representations bear no direct correspondence to constructs that are interpretable in terms of human-understandable concepts or established domain knowledge. In a high-stakes domain such as education, where algorithmic decisions influence learning trajectories, grades and opportunities, this lack of transparency raises critical concerns regarding accountability and trust [
9].
Extensive research has sought to bridge this gap, with Bai et al. [
6] classifying modalities into post hoc and ante hoc categories. While post hoc methods aim to extract explanations from black-box models after training, ante hoc approaches seek to achieve intrinsic interpretability by design, ensuring the model’s internal logic is transparent from the outset. Within this latter category, recent models have attempted to achieve intrinsic transparency by integrating attention mechanisms [
15,
16] or by incorporating side information such as IRT parameters [
17,
18,
19]. These efforts aim to make the decision-making process visible, moving away from pure black-box architectures toward systems whose internal states can be inspected.
However, from the perspective of domain experts such as teachers and pedagogical designers, these solutions frequently fall short. Post hoc explanations often rely on technical relevance scores or local approximations that remain disconnected from domain knowledge [
7] while most current ante hoc methods do not produce outputs that map directly to human-understandable concepts. As noted in various surveys [
6,
8], when deep learning models incorporate domain knowledge, the primary objective is typically the optimization of predictive performance, while interpretability is often overlooked or left as an unaddressed concern.
Consequently, there is a critical need for new approaches that move beyond technical transparency toward true pedagogical interpretability. For a KT system to be confidently adopted in high-stakes educational environments, its estimations must be grounded in trusted and empirically validated principles derived from relevant fields such as pedagogy, cognitive science, and psychometrics. Educators require models that align with their domain knowledge, tracking mastery not through opaque latent features but through concepts explicitly defined by established frameworks, including the initial mastery, learn rates and knowledge components postulated by traditional approaches such as BKT and Factor Analysis Models.
2.2. Bayesian Knowledge Tracing
For this study, we selected BKT [
1] as our reference theoretical framework. Student action sequences in Intelligent Tutoring Systems can be modelled as Hidden Markov Models, where the probability of a transition depends only on the previous state [
20]. BKT models the learning process as a Hidden Markov process governed by four parameters that provide a causal narrative of student learning progress, which is intuitive to educators and aligned with cognitive science principles:
Initial Mastery (): The probability that a student knows a concept prior to practice.
Learn Rate (): The probability of transitioning from unlearned to learned states after a practice opportunity.
Guess (): The probability of a correct response despite a lack of mastery.
Slip (): The probability of an incorrect response despite mastery.
These four parameters enable a recursive estimation of student mastery: the initial mastery provides the starting probabilistic state, which is updated at each interaction using Bayes’ theorem to incorporate the observed outcome (moderated by guess and slip probabilities) and shifted by the learn rate to account for knowledge acquisition. This recursive cycle allows BKT to generate a transparent causal explanation of the student’s learning progress that is directly interpretable by educators.
But standard BKT suffers from a significant limitation: it typically operates at a population level, estimating a single set of parameters for all students interacting with a given skill. While individualised BKT approaches exist, they are often computationally expensive and struggle with data sparsity [
21]. The gTransformer approach offers a new way to address individualisation by leveraging the capabilities of Transformers to compress student interaction history into a context vector. This allows the model to infer parameter values at the student level, transforming population-level BKT insights into high-granularity student diagnostics.
2.3. Deep Knowledge Tracing
The application of deep learning to KT was initiated by the DKT model [
14], which framed student performance as a sequence modelling task. While pioneering, DKT was constrained by the inherent limitations of Recurrent Neural Networks (RNNs). These architectures are difficult to train [
22] and their sequential nature precludes parallelization, a bottleneck that becomes critical at longer sequence lengths where memory constraints limit efficiency.
The introduction of attention-based architectures [
5], such as Self-Attentive Knowledge Tracing (SAKT) [
15] and Separated Self-AttentIve Neural Knowledge Tracing (SAINT) [
23], addressed these limitations by enabling parallel processing of interaction histories. This marked a significant shift toward the attention-based Transformer architectures that characterise modern LLM. By replacing recurrent units with multi-head attention, these models capture long-range dependencies more effectively, allowing for a historical learning context-aware representation of a student’s entire history. More recently, Attentive Knowledge Tracing (AKT) [
16] further refined this approach by incorporating skill difficulty and attention mechanisms that weigh past interactions based on their temporal distance.
Beyond the prominent recurrent and attention-based paradigms, the research community has explored several other architectural directions to capture the multifaceted nature of student learning. Notable categories include memory-augmented models that utilize external storage to explicitly track concept mastery, graph-based approaches that model the topological relationships between skills, and specialized variations such as text-aware or forgetting-aware models that incorporate exercise semantics and temporal decay into the tracing process [
3]. While these variants exploit diverse dimensions of domain knowledge to augment predictive performance, achieving intrinsic interpretability has generally not been prioritised as a primary objective.
2.4. Interpretability in Deep Knowledge Tracing
Interpretability in DKT remains an open challenge despite a variety of attempts, which can be categorised into two primary modalities: ante hoc and post hoc. Post hoc methods attempt to explain trained black-box models by utilizing either model-specific techniques, such as Layer-Wise Relevance Propagation (LRP) [
24], or model-agnostic approaches like Local Interpretable Model-agnostic Explanations (LIME) [
25]. However, it has been argued that relying on post hoc explanations for high-stakes decision-making is fundamentally flawed [
7]. For teachers and domain experts, these methods offer limited utility as they produce explanations based on deep learning structures rather than pedagogically sound principles, necessitating significant technical expertise for meaningful interpretation.
The second category, ante hoc methods, pursues intrinsic interpretability through two primary approaches. The first consists of traditional models that rely on transparent structures, such as BKT or Factor Analysis Models (e.g., Additive Factor Models [
10], Performance Factor Analysis [
11], and Knowledge Tracing Machines [
12]). The second encompasses DKT variants that achieve interpretability by incorporating additional modules or utilising side information [
6]. Among these, attention mechanisms have emerged as the most prominent architectural extensions. They have been integrated into a wide range of models, from the pioneering SAKT [
15] to more recent architectures like AKT [
16]. However, relying solely on attention weights presents similar practical obstacles to those of post hoc methods for educational practitioners, as these mechanisms do not provide an explicit interpretation grounded in pedagogically sound principles.
In the integration of side information for ante hoc interpretability, IRT [
13] has served as the most prominent foundation. It estimates the probability of a correct response based on a student’s latent ability and the item’s difficulty. This theory has been coupled with DKT models such as Deep-IRT [
17], which utilises dynamic key–value memory networks to capture learners’ trajectories and uses inferred abilities and difficulties to predict performance. Similarly, TC-MIRT [
18] embeds multidimensional IRT parameters to predict student states. Other relevant models include KIKT [
26], which harnesses IRT to simulate student performance; LANA [
27], which adopts an IRT variant for ability clustering; and QIKT [
19], which features question-centric representations integrated with an interpretable IRT layer. Beyond IRT, researchers have leveraged diverse principles, such as constructive learning [
28,
29], learning and forgetting curves [
30], finite state automata (FSAs) [
31], classical test theory (CTT) [
32], and monotonicity constraints [
33]. Furthermore, recent research has explored the use of surrogate explainable models and mixup-based loss functions to regularize deep learning predictors, providing a path toward balancing predictive performance with pedagogical transparency [
34].
In contrast to the aforementioned models, whose diagnostic utility is often restricted by the specificity and scope of the single underlying theory serving as side information [
6], gTransformer offers a more flexible framework. It can be grounded in any established theoretical reference, effectively decoupling the expressiveness of deep learning from the constraints of specific pedagogical models. The viability of this paradigm is further supported by recent developments in neural parameter generation, such as the BKTransformer architecture [
35], which enhances the predictive performance of a BKT model utilising attention-based sequence modelling to estimate individualised, temporally evolving BKT parameters.
2.5. Informed Machine Learning
The integration of domain knowledge into deep learning has been broadly explored through conceptual frameworks such as Theory-Guided Data Science (TGDS) [
36], Physics-Informed Machine Learning (PIML) [
37], and Informed Machine Learning (IML) [
8].
TGDS emerged as a paradigm to address the limitations of purely data-driven “black-box” models, which may produce results inconsistent with established domain knowledge [
36]. By explicitly requiring scientific consistency, TGDS integrates theoretical insights into the learning process to ensure that models remain scientifically plausible. This integration is typically achieved via theory-guided learning, where domain-specific invariants serve as regularisation terms, or through the design of neural architectures that respect the structural constraints of the problem [
36,
38]. A prominent implementation of this paradigm is Physics-Informed Neural Networks (PINNs) [
37,
39], which embed differential equations directly into the loss function, forcing the model to satisfy theoretical constraints while learning from empirical data.
A widely adopted technique to enforce this consistency involves incorporating domain-specific constraints into the loss function as follows [
36,
40]:
where
measures the supervised error between true labels
and predicted labels
, while
penalises violations of theoretical constraints, weighted by the hyperparameter
.
Von Rueden et al. [
8] formalized these efforts into an IML taxonomy, which categorises knowledge integration by its source, representation and the stage of the machine learning pipeline where it is incorporated. Knowledge can be represented as algebraic equations, logical rules or probabilistic priors and integrated at various stages: within the training data, through the design of tailored architectures, or by influencing the model’s final output.
We operationalised these taxonomic dimensions in gTransformer by integrating theoretical priors from an interpretable BKT model into the inputs and employing a multi-objective loss function to anchor the model’s predictions to BKT parameters. However, while most IML approaches focus on using prior knowledge to maximise predictive accuracy [
8], gTransformer aims to achieve theory-based interpretability while offering competitive predictive performance, as detailed in
Section 3.1.
3. The gTransformer Model
This section details the design and implementation of gTransformer, a hybrid architecture that bridges the gap between deep learning expressiveness and theoretical alignment by grounding the Transformer’s latent representations in concepts established by a reference model. We begin by mapping its components to the taxonomic dimensions of IML, clarifying how theoretical priors and empirical data are processed using specialised inductive biases and multi-objective optimisation. We then provide a comprehensive description of the model’s architecture, detailing its functional layers: from embeddings enriched with prior knowledge to the core attention-based encoder–decoder engine. We explain the projection mechanism enabling the estimation of individualised, pedagogically meaningful parameters, which are fed into an output head implementing BKT logic to produce interpretable predictions. Finally, we detail the loss functions that anchor the model’s predictions to BKT parameters.
3.1. Dimensions of Informed Machine Learning in gTransformer
Figure 1 illustrates the information flow through gTransformer, mapped to the taxonomic dimensions of IML as defined by Von Rueden et al. [
8].
Within the context of our architecture, the operationalisation of these dimensions can be explained as follows:
Prior Knowledge: The source of theoretical information comprises simulation results from a reference model, typically expressed as parameter values that represent foundational pedagogical constructs.
Training Data: Empirical student interaction histories are augmented with prior knowledge to train the model.
Hypothesis Set: An attention-based Transformer architecture is employed to provide the inductive biases necessary to lead the model toward desired states.
Learning Algorithm: The model is optimised via a multi-objective loss function formulated to balance the trade-off between predictive performance and pedagogical interpretability.
Final Hypothesis: This comprises a set of learned weights that drive latent representations from which parameter values aligned with the reference model can be extracted.
Mastery Estimations: The outputs generated through the grounded parameters serve as inputs to the reference model to produce interpretable mastery estimations.
3.2. Architecture
The gTransformer architecture, illustrated in
Figure 2, implements a theory-guided deep learning framework that integrates BKT concepts throughout the processing pipeline. The architecture is organised into six functional layers, which are detailed in the following subsections. Specifically, we: (1) begin with input data comprising student interaction sequences along with prior knowledge from the Bayesian reference model (
Section 3.2.1); (2) proceed to explain difficulty-aware embeddings that encode skill-specific variations (
Section 3.2.2); (3) describe the attention-based encoder–decoder mechanism used to construct contextualised latent representations (
Section 3.2.3); (4) explain how grounded parameters are obtained by combining theoretical bases with contextual projections (
Section 3.2.4); (5) present the output heads intended to generate supervised predictions and interpretable predictions (
Section 3.2.5); and (6) conclude with the multi-objective loss function that orchestrates the training process to achieve both predictive performance and theory-based interpretability (
Section 3.2.6).
3.2.1. Input Components
The problem of KT can be formally conceptualised as a supervised sequence modelling task aimed at estimating the longitudinal evolution of student knowledge based on their historical interaction traces. The input to the system consists of a temporal sequence of student interaction sequences enriched with population-level parameters from a pre-fit BKT reference model. Student interactions are represented as temporal sequences of tuples , where denotes the question identifier, represents the associated knowledge component, concept or skill, and indicates the binary correctness of the student’s response at timestep t.
These empirical interaction traces are augmented with theoretical priors extracted from the BKT reference model. For each knowledge component
c, we obtain population-level estimates of the four BKT parameters introduced in
Section 2.2: initial mastery
, learn rate
, guess probability
, and slip probability
. Only
and
undergo the grounding process to calculate the interpretable predictions
.
In contrast the guess and slip parameters are set to fixed, population-level values estimated by the reference BKT model to prioritise the interpretability of knowledge acquisition over the modelling of performance errors. In the established BKT literature,
and
are considered the primary parameters reflecting a student’s latent state, whereas guess and slip are often viewed as performance parameters tied to the assessment item properties [
21]. By fixing the latter, the model remains focused on the core pedagogical constructs whilst avoiding model degeneracy challenges [
41] that arise when all four parameters vary simultaneously.
3.2.2. Embeddings
For question embeddings, we define
where
represents the invariant concept base embedding (encoding the semantic identity of the knowledge component),
is a scalar difficulty parameter specific to question
q, and
is the concept-specific difficulty variation axis. This formulation allows multiple questions targeting the same concept to share a common semantic core (
) while differing in their position along a learned difficulty direction (
), with the magnitude of displacement controlled by the per-question difficulty scalar (
).
Similarly, for interaction history embeddings (encoding both the question and the student’s response), we employ
where
is the interaction base embedding (jointly encoding the concept
c and response outcome
r), and
is the interaction-specific difficulty variation axis.
These embeddings serve as the primary inputs to the Transformer’s attention mechanism, providing multidimensional representations that enable attention-driven discovery of relevant behavioural patterns across the student’s learning history.
3.2.3. Attention-Based Encoders–Decoders
The core processing engine of gTransformer is a stacked Transformer architecture composed of
n encoder blocks and
decoder blocks. In our default configuration (
), this results in 4 encoder layers and 8 decoder layers, providing a total of 12 sequential attention-driven processing stages. The architecture does not utilise explicit pooling layers (such as max pooling or average pooling) but rather relies on the attention mechanism to perform dynamic, context-aware aggregation of information across the temporal sequence. The encoder processes the student’s longitudinal interaction history through
n sequential self-attention layers, transforming the sequence of interaction embeddings
into a tensor of contextualised latent representations. Each encoder block applies multi-head self-attention (
or
depending on the dataset) with masking to prevent information leakage from future timesteps, followed by a position-wise feed-forward network (FFN) with a hidden dimension of
. Within each block, we apply residual connections followed by Layer Normalization and dropout (
) to ensure numerical stability and prevent over-fitting, following the established Transformer standards [
5].
The decoder architecture employs an alternating pattern of sequential layers. Odd-numbered decoder layers (layers 1, 3, 5, ..., ) perform self-attention over the current question embeddings using four or eight heads, allowing the model to examine multiple aspects of the current task without incorporating response history. Even-numbered decoder layers (layers 2, 4, 6, ..., ) perform cross-attention between the current question representation and the encoder’s output, effectively acting as a knowledge retriever that selectively weights relevant evidence from the student’s encoded learning trajectory.
The final decoder layer produces an output tensor
, which is concatenated with the question embedding to form the high-dimensional context vector
where the dimensionality of
is the combined dimensionality of the decoder output and question embedding space. This context vector serves as a comprehensive encoding of the student’s current cognitive state, synthesising information from both the observed interaction history and the current task characteristics.
3.2.4. Grounded Parameters
To ensure pedagogical interpretability, gTransformer estimates BKT parameters through an additive composition mechanism operating in logit space. For each knowledge component
c, we define theoretical base parameters
and
, initialised as the logit-transformed population-level BKT priors:
These bases are implemented as scalar embeddings with Gaussian initialisation centred at the theoretical values.
Contextual adjustments are computed via dot products between the latent context vector
and learnable semantic axes. For each concept
c, we define a knowledge axis
and a learning rate axis
. The contextual projections, representing the student-specific knowledge (
) and learning rate (
), are calculated as
These dot products project the high-dimensional latent state onto interpretable semantic dimensions, quantifying how much the student’s observed behaviour deviates from the population average along the dimensions of initial mastery and learning rate.
The final grounded parameters are obtained through additive composition in logit space, followed by sigmoid activation to ensure valid probability bounds:
This design ensures that the model’s parameter estimates remain structurally anchored to BKT theory, with the base terms providing pedagogically sound initialisation, while contextual projections enable individualised adjustments driven by observed student behaviour.
3.2.5. Output Heads
The gTransformer model generates predictions through various output heads, each serving a distinct functional role in the architecture’s dual objectives of predictive accuracy and pedagogical interpretability:
Supervised Prediction Head (): A multi-layer perceptron (MLP) directly maps the high-dimensional context vector to a correctness prediction. The context vector () is passed through a sequence of three linear layers with neuron sizes of 512, 256, and 1, respectively. Each hidden layer is followed by a ReLU activation function and a dropout layer (). This head is optimised purely for predictive accuracy via binary cross-entropy loss, leveraging the full expressive capacity of the Transformer’s learned representations without theoretical constraints.
Interpretable Output Head (): The grounded BKT parameters are passed through an implementation of BKT logic, which performs a retrospective belief update walk over the student’s interaction history. At each timestep, the BKT logic computes the probability of correctness using the standard BKT update equations with the model’s grounded parameters and the fixed population-level guess and slip values. These predictions are intrinsically interpretable because they can be directly tracked to established pedagogical constructs, providing a transparent causal explanation that justifies each estimation through the theoretical lens of BKT. This head ensures that the grounded parameters retain their intended semantic meaning by requiring them to produce valid predictions subjected to the reference model’s reasoning process.
Linear Probe Heads: Two dedicated linear layers extract BKT parameter estimates directly from the context vector: and . Unlike the grounded parameter projections (which use concept-specific semantic axes), these probes are global linear extractors shared across all concepts. They serve to verify that the Transformer’s internal representations explicitly encode the targeted pedagogical constructs in a linearly accessible manner.
3.2.6. Multi-Objective Loss
The training objective balances predictive performance with pedagogical grounding through a weighted combination of three loss terms:
The supervised loss
measures the binary cross-entropy between the MLP’s direct predictions
and the ground truth responses
, driving the model to maximise predictive accuracy:
The reference loss
applies the same binary cross-entropy metric to the BKT logic head’s predictions
, ensuring that the grounded parameters
produce pedagogically meaningful predictions when constrained to operate through BKT’s causal inference mechanism:
The probing loss
enforces global alignment between the Transformer’s latent representations and BKT constructs by minimising the mean squared error between linear probe predictions and population-level BKT targets:
This loss implements a grounding mechanism that constrains the context vector to align its internal structure such that pedagogical parameters can be extracted via simple linear transformations. By constraining the latent space globally, rather than merely regularising output parameters locally, the probing loss ensures that interpretability is structurally embedded throughout the model’s representations.
The default configuration uses weight coefficients , , and , balancing supervised performance with theoretical grounding while prioritising global latent space alignment through active probing.
4. Experimental Setup
This section details the experimental setup employed to train and evaluate gTransformer relative to various baseline models. It includes a description of the validation methodology, training setup, datasets, and benchmark models selected for comparative evaluation.
4.1. Methodology
This subsection details the evaluation methodology developed to address each research question. We describe the metrics and protocols for quantifying the performance–interpretability trade-off (
Section 4.1.1), the triple-validation approach for verifying the pedagogical grounding of internal representations (
Section 4.1.2), and the comparative analysis strategy for evaluating context-aware personalisation capabilities (
Section 4.1.3).
4.1.1. Quantifying the Performance–Interpretability Trade-Off (RQ1)
To quantify the balance between predictive power and transparency, we assess gTransformer using four distinct prediction variants: (1) ablated supervised predictions (), representing the model’s maximum capacity without grounding; (2) grounded supervised predictions () from the non-ablated supervised output; (3) interpretable predictions (), derived exclusively from the BKT logic using grounded parameters; and (4) population-level BKT predictions ().
We establish three key metrics to quantify the trade-off:
where
(interpretability drop) measures the impact of theoretical constraints on neural capacity,
(interpretability cost) quantifies the accuracy reduction when switching to interpretable logic, and
(interpretability gain) represents the advantage over traditional population-level models.
4.1.2. Validation Methodology for Grounded Interpretability (RQ2)
To verify that gTransformer’s internal states are pedagogically valid, we implement a triple-validation methodology based on the following hypotheses:
4.1.3. Evaluation Protocols for Context-Aware Personalisation (RQ3)
To evaluate the model’s ability to provide context-aware predictions, we implement an approach that clusters students along two dimensions corresponding to the predicted parameter values: initial mastery () and learn rate (). We select students with identical responses to the same sequence of questions but belonging to different clusters (i.e., demonstrating different longitudinal learning patterns). We then illustrate how gTransformer customises predictions based on these diverse learning contexts, whereas traditional BKT models, being fundamentally Markovian, produce identical predictions for the same response sequence regardless of the historical learning context. This approach highlights the non-Markovian patterns and context-aware personalisation that population-level baselines fundamentally cannot represent.
4.2. Training Setup
The gTransformer model was implemented in PyTorch (v2.4.1) using the pyKT library (v0.0.38) [
44] for standardised data preprocessing, dataset splitting, and baseline model implementation. Training and evaluation followed a standard five-fold cross-validation protocol using an 80/20 train/test split. Predictive performance was measured using AUC, applying the question-level mean late-fusion protocol as recommended in [
44]. Hyperparameter configurations for benchmark models were aligned with the optimised values reported in the official pyKT repository. The specific configurations used for gTransformer are detailed in
Table 1. All experiments were conducted utilising 24 CPU cores and 5 NVIDIA Tesla GPUs. For the BKT baseline, we utilised pyBKT (v1.4.1) [
45], a Python implementation of the algorithm that estimates student cognitive mastery from problem-solving sequences.
4.3. Datasets
For our analysis, we utilised the datasets for which the pyKT library [
44] provides standardised preprocessing mechanisms, thereby ensuring a rigorous and consistent treatment of student interactions. From this collection, we excluded the datasets that lack explicit mapping to knowledge components (Statics2011 and POJ), as this information is essential for pedagogical interpretability, allowing mastery estimations to be anchored to defined educational concepts. The five datasets selected for this study are described below:
ASSISTments 2009 (AS2009): Collected from the ASSISTments platform during the 2009–2010 school year, this dataset consists of math exercises and has served as the de facto standard benchmark for KT research for the past decade [
46].
ASSISTments 2015 (AS2015): A larger release from the same platform for the 2015 school year, this dataset contains the highest number of students among the ASSISTments datasets. It focuses on a specific set of 100 knowledge concepts [
46].
Algebra 2005 (AL2005): Released as part of the KDD Cup 2010 EDM Challenge, it contains responses from 13–14-year-old students solving Algebra problems [
47].
Bridge to Algebra 2006 (BDG2006): Also from the KDD Cup 2010 Challenge, this dataset focuses on the Bridge to Algebra tutoring system and includes a high number of total interactions [
47].
NeurIPS 2020 Education Challenge (NIPS34): This is a more recent dataset from the Eedi platform containing student answers to multiple-choice math questions, characterised by subject trees used for concept mapping [
48].
The characteristics of the datasets are summarised in
Table 2.
4.4. Baseline Models
For the comparative analysis, we selected six models that are among the most frequently mentioned baselines [
44]: DKT [
14], DKVMN [
49], SAKT [
15], SAINT [
23], AKT [
16] and ATKT [
50]. These models represent a representative selection of the recurrent (DKT), memory-augmented (DKVMN), adversarial (ATKT), and attention-based (SAKT, SAINT, and AKT) paradigms, providing a robust and diverse benchmark for evaluating our model.
5. Results and Discussion
This section presents and discusses the experimental results in correspondence with the three research questions.
Section 5.1 quantifies the accuracy–interpretability trade-off across benchmark datasets.
Section 5.2 assesses the pedagogical grounding of the model’s internal representations through the triple-validation protocol.
Section 5.3 evaluates the model’s capacity to deliver context-aware personalised predictions.
5.1. Performance–Interpretability Trade-Off (RQ1)
To evaluate the predictive performance of gTransformer, we utilise the AUC across the benchmark datasets described in
Section 4.3. The experimental results are summarised in
Table 3.
Compared to baseline models, gTransformer achieves highly competitive performance across all benchmarks. To ensure a fair comparison with these non-interpretable baselines, we evaluate gTransformer in an ablated configuration (). This approach establishes the model’s maximum predictive capacity in the absence of theoretical constraints, allowing for a direct assessment against other deep learning architectures. On AS2009, gTransformer achieves an AUC of 0.7831, outperforming all other evaluated models. It ranks second on AL2005, BDG2006 and NIPS34 (surpassed only by AKT) and third on AS2015 (behind ATKT and AKT).
To evaluate the performance trade-off, we compare the results of the ablated configuration (
), the grounded supervised output (
), the interpretable predictions (
) and the BKT baseline (
). Binary cross-entropy metrics (
) are omitted for AS2015 because this dataset lacks the question-level identifiers required for evaluation.
Table 4 presents the results for these evaluations, quantifying the interpretability drop, cost, and gain as defined in
Section 4.1.
The results reveal two insights regarding the accuracy–interpretability trade-off:
Low Cost of Interpretability. This cost can be analysed through two distinct metrics. The interpretability drop (
) measures the impact of grounding constraints (
and
) on the Transformer’s original representational capacity. The results in
Table 4 show that this drop is negligible, with an average of only 0.0018 AUC points (0.2%), demonstrating that the model internalises pedagogical theory without sacrificing its expressive power. The interpretability cost (
) measures the performance impact of constraining final predictions to the causal logic of the reference model. The results show that the average cost across datasets is 0.0313 AUC points (3.9% reduction), which is highly acceptable given the substantial gains in interpretability.
General Interpretability Gain. Comparing against provides a measure of the interpretability gain (). In all comparable datasets, interpretable gTransformer predictions consistently outperform classical BKT with an average improvement of 0.1229 AUC points (19.9%), showing a general advantage over population-level priors.
In summary, the cost of interpretability is consistently low and highly acceptable for practical educational applications. By accurately recovering student-specific learning parameters, gTransformer bridges the gap between black-box performance and theoretical rigor, offering a superior diagnostic alternative to traditional symbolic approaches without sacrificing performance.
5.2. Grounded Interpretability (RQ2)
For the remainder of this study, we employ AS2009 as our reference dataset. Given its status as a widely used benchmark and its rich interaction data, it provides an ideal testbed for validating structural and semantic alignment, especially considering the high predictive AUC that gTransformer achieves on this data.
5.2.1. Structural Alignment via Diagnostic Probing (H2.1)
The H2.1 objective is to demonstrate that grounding constraints actively shape the model’s internal structure, rather than merely correlating with outputs. To verify whether gTransformer’s latent representations genuinely internalise pedagogical concepts, we analyse the quality of the parameter recovery from the final hidden states .
Figure 3 and
Figure 4 present the diagnostic probing results via parity plots, comparing BKT theoretical priors (x-axis) with probe-extracted parameters (y-axis). Each point represents an aggregate of interactions, with its size proportional to the sample density. The high adherence to the diagonal confirms a high degree of linear recoverability, with the obtained values indicating strong structural encoding:
Initial Mastery : Achieves fidelity with Pearson , indicating strong linear recoverability. The selectivity exceeds the threshold of 0.5, demonstrating that this is a dominant organising principle in the latent space rather than an incidental pattern. The control task yields a negative (indicating performance worse than a mean-based baseline), confirming that probes cannot recover shuffled targets.
Learn Rate : Shows strong structural encoding with fidelity and Pearson . The selectivity reaches , demonstrating robust encoding of learn rate dynamics, with control .
Interpretation: The high selectivity (>0.5) for both parameters validates the H2.1 (structural alignment) hypothesis: BKT constructs are preserved through all Transformer layers and remain as primary organising concepts in final representations used for prediction.
5.2.2. Semantic Alignment (H2.2)
Hypothesis H2.2 examines whether grounded parameters retain their pedagogical semantics after processing, ensuring models do not repurpose theoretical constructs for black-box optimisation. Unlike H2.1, which probes latent representations, H2.2 validates monotonic relationship preservation in final projected parameters. We use Spearman’s rank correlation () to measure alignment, as it captures monotonic consistency without assuming linearity ( strong, moderate).
Figure 5 and
Figure 6 present parity plots comparing BKT theoretical priors (x-axis) with grounded parameters (y-axis), where each bubble represents an aggregate of test interactions with size encoding sample density. The patterns reveal that:
Initial Mastery () shows weak alignment () with substantial scatter, indicating strong student-specific individualisation. However, MAE = validates that refinements remain within pedagogical bounds, indicating that the model neither abandons nor mechanically reproduces theoretical priors.
Learn Rate () demonstrates moderate alignment (). A low MAE = confirms that the model preserves pedagogical understanding of practice effects while enabling context-aware refinement.
These findings support that grounded parameters maintain meaningful monotonic alignment with theory while capturing individual heterogeneity. The differential alignment reveals that learn rates preserve more theoretical structure while initial mastery estimates undergo stronger individualisation.
5.2.3. Functional Alignment (H2.3)
For the third hypothesis we compare two prediction paths: interpretable predictions generated by feeding enriched parameters (projected from context vectors ) through BKT logic and supervised predictions obtained directly from an MLP applied to . While uses the full representational capacity of the neural network for maximum predictive accuracy, constrains predictions through pedagogically interpretable BKT parameters, enabling causal explanations at the cost of some predictive power. We assess the confidence with which the interpretable reference path can functionally replace the supervised path.
In
Figure 7, we observe heterogeneous confidence patterns across AS2009 interactions. For the generation of this heatmap, balanced weight values (
) were used to assign equal importance to all criteria while slightly prioritising numerical calibration. Overall, 89.2% of student–skill pairs achieve medium or high confidence, while only 10.8% exhibit low confidence. This indicates that interpretable predictions provide actionable diagnostic value with quantified uncertainty, enabling educators to leverage theory-grounded explanations while recognising situations requiring additional validation.
5.3. Context-Aware Personalisation (RQ3)
To validate RQ3, we show how gTransformer differentiates students based on their longitudinal learning context (i.e., their sequence of interactions) rather than just response patterns. This capability enables context-aware personalisation beyond what population-based models such as BKT can provide. Classical BKT is fundamentally Markovian: given the same response sequence, it produces identical predictions regardless of the student’s learning history. The gTransformer model, by contrast, uses its high capacity to capture temporal learning dynamics (the individualized parameters extracted from interaction history) to differentiate students even when their observable responses are identical. By synthesising this history into a latent context vector and projecting it onto student-specific parameters ( and ), the model identifies unique learning signatures that Markovian transitions fundamentally cannot represent. This allows gTransformer to differentiate students even when their immediate observable responses are identical.
In order to demonstrate this capability, we perform a cluster analysis on the AS2009 dataset based on the historical parameters and and then select representative students from each cluster to show how gTransformer can provide customized recommendations.
Students are categorised into four learning situations based on their historical learning parameters.
Figure 8 illustrates the distribution of students across the four quadrants:
Low Initial Mastery/Low Learn Rate: Observations for students in this quadrant suggest limited foundational mastery with slow skill acquisition.
Low Initial Mastery/High Learn Rate: Despite initial knowledge gaps, rapid progress indicates responsiveness to instruction.
High Initial Mastery/Low Learn Rate: Strong foundational mastery but minimal progress may signal disengagement or instructional mismatch.
High Initial Mastery/High Learn Rate: Consistent mastery and rapid skill development suggest readiness for advanced material.
In order to demonstrate gTransformer’s ability to capture historical learning context and overcome the Markovian limitations characteristic of traditional approaches, we show a comparative analysis of mastery trajectories for students with identical response sequences.
We select representative skills with meaningful sequence lengths (5–30 interactions) and identify students from at least two different learning quadrants who provide the same responses to the same questions in the same order. These trajectories are illustrated in the 4 × 3 mosaic shown in
Figure 9, where each subplot displays different predictions for students from different quadrants despite their identical performance within each skill. The dotted grey BKT lines overlap perfectly, reflecting the Markovian assumption: BKT produces identical probability estimates for all students who provide the same sequence of responses, regardless of their broader learning history. In contrast, the solid coloured gTransformer lines diverge based on the whole learning trajectory, demonstrating that the model attends to historical learning context, i.e., to the full trajectory of previous interactions across all skills, to differentiate students even when their current skill-specific responses are identical. This confirms that gTransformer captures non-Markovian personalisation patterns that classical models fundamentally cannot represent.
These findings validate our hypothesis for RQ3, showing how the historical learning context captured by a Transformer-based model can enhance student-centred personalisation.
5.4. Practical and Social Implications
By providing differentiated diagnostics based on longitudinal interaction histories, the model acknowledges that students are dynamic learners with unique contexts rather than static entities defined by fixed traits, thereby enabling more personalised instructional interventions. For instance, high-momentum learners can be identified for accelerated pacing to maintain engagement, while students whose profiles indicate a need for foundational remediation can receive targeted scaffolding before significant learning gaps emerge.
In general, the balance between accuracy and interpretability provided by our gTransformer model is crucial for promoting transparency and trust. This allows educators to clearly understand the pedagogical rationale behind the model’s estimations, even for students with similar response patterns. Thus, our approach offers a practical path toward building AI tools that are not only accurate but also student-centred and pedagogically justifiable.
6. Limitations and Future Research
The representational grounding methodology explored in this work is fundamentally domain-independent, which suggests that the resulting pedagogical insights and the accuracy–interpretability trade-off could be generalised to diverse educational contexts. Nonetheless, extending the empirical validation of gTransformer beyond the benchmark datasets utilised in this study to a wider range of domains and subjects represents a valuable research direction to further demonstrate its versatility.
In this initial study, the grounding process was restricted to the two primary knowledge parameters: initial mastery and learn rate . Future research could address the impact of incorporating student-specific guess and slip values to further refine the granularity of context-aware individualisation.
While gTransformer was validated using BKT as the primary reference model, the underlying representational grounding approach is inherently extensible. Within the educational domain, future research could investigate the integration of alternative theoretical frameworks, such as Additive Factor Models or Performance Factor Analysis, allowing for the use of diverse pedagogical parameters while leveraging the Transformer architecture’s awareness of the historical learning context. Furthermore, the applicability of the gTransformer approach extends beyond Knowledge Tracing. The representational grounding framework can be adapted to any scientific field where established theoretical models coexist with high-volume empirical data. By anchoring latent representations to domain-specific concepts, this methodology offers a generalisable path toward bridging deep learning expressiveness with rigorous scientific grounding. Evaluating how different theoretical assumptions influence both the accuracy–interpretability trade-off and the context-awareness of domain-specific predictions across diverse disciplines remains an open and promising avenue for future research.
7. Conclusions
This work introduces gTransformer, a Transformer-based model that bridges the gap between deep learning performance and intrinsic interpretability through representational grounding. By anchoring latent representations to semantically meaningful constructs, we demonstrate that competitive predictive accuracy can coexist with theoretical alignment.
Our results validate the approach across three dimensions. First, quantifying the accuracy–interpretability trade-off, we showed that interpretable gTransformer predictions consistently surpass classical BKT with a low interpretability cost relative to black-box architectures (RQ1). Second, we confirmed that gTransformer internalises BKT constructs as its primary organising principle, achieving high structural selectivity and semantic alignment with theoretical priors (RQ2). Finally, we demonstrated that gTransformer enables context-aware personalisation by capturing longitudinal learning patterns that Markovian models inherently overlook, allowing for differentiated diagnostics for students with similar response patterns but different interaction histories (RQ3).
Ultimately, gTransformer provides a practical approach for transforming opaque deep learning predictors into actionable interpretable tools. By grounding high-capacity models in established domain theory, this approach offers a path toward highly accurate, pedagogically justifiable, and context-aware personalisation.
Author Contributions
Conceptualisation, C.L.; methodology, C.L. and O.C.S.; software, C.L.; validation, C.L. and O.C.S.; formal analysis, C.L.; investigation, C.L.; resources, C.L. and O.C.S.; data curation, C.L.; writing—original draft preparation, C.L.; writing—review and editing, C.L. and O.C.S.; visualisation, C.L.; supervision, O.C.S. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Corbett, A.T.; Anderson, J.R. Knowledge tracing: Modeling the acquisition of procedural knowledge. User Model. User-Adapt. Interact. 1994, 4, 253–278. [Google Scholar] [CrossRef]
- Romero, C.; Ventura, S. Educational data mining and learning analytics: An updated survey. Wiley Interdiscip. Rev. Data Min. Knowl. Discov. 2020, 10, e1355. [Google Scholar] [CrossRef]
- Abdelrahman, G.; Wang, Q.; Nunes, B. Knowledge tracing: A survey. ACM Comput. Surv. 2023, 55, 1–37. [Google Scholar] [CrossRef]
- Šarić-Grgić, I.; Ani, G.; Angelina, G. Twenty-Five Years of Bayesian knowledge tracing: A systematic review. User Model. User-Adapt. Interact. 2024, 34, 1127–1173. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention is all you need. In Advances in Neural Information Processing Systems; NeurIPS: San Diego, CA, USA, 2017; Volume 30. [Google Scholar]
- Bai, Y.; Zhao, J.; Wei, T.; Cai, Q.; He, L. A survey of explainable knowledge tracing. Appl. Intell. 2024, 54, 6483–6514. [Google Scholar] [CrossRef]
- Rudin, C. Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nat. Mach. Intell. 2019, 1, 206–215. [Google Scholar] [CrossRef]
- Von Rueden, L.; Mayer, S.; Beckh, K.; Georgiev, B.; Giesselbach, S.; Heese, R.; Kirsch, B.; Pfrommer, J.; Pick, A.; Ramamurthy, R.; et al. Informed Machine Learning—A Taxonomy and Survey of Integrating Knowledge into Learning Systems. IEEE Trans. Knowl. Data Eng. 2021, 35, 614–633. [Google Scholar]
- Holmes, W.; Porayska-Pomsta, K.; Holstein, K.; Sutherland, E.; Baker, T.; Shum, S.B.; Santos, O.C.; Rodrigo, M.T.; Cukurova, M.; Bittencourt, I.I.; et al. Ethics of AI in Education: Towards a Community-Wide Framework. Int. J. Artif. Intell. Educ. 2022, 32, 504–526. [Google Scholar] [CrossRef]
- Cen, H.; Koedinger, K.; Junker, B. Comparing two IRT models for conjunctive skills. In Proceedings of the International Conference on Intelligent Tutoring Systems; Springer: Berlin/Heidelberg, Germany, 2008; pp. 796–798. [Google Scholar]
- Pavlik, P.I.; Cen, H.; Koedinger, K.R. Performance factors analysis - A new alternative to knowledge tracing. Front. Artif. Intell. Appl. 2009, 200, 531–538. [Google Scholar] [CrossRef]
- Vie, J.J.; Kashima, H. Knowledge tracing machines: Factorization machines for knowledge tracing. In Proceedings of the AAAI Conference on Artificial Intelligence; AAAI Press: Washington, DC, USA, 2019; Volume 33, pp. 750–757. [Google Scholar]
- Embretson, S.E.; Reise, S.P. Item Response Theory for Psychologists; Psychology Press: Hove, UK, 2013. [Google Scholar]
- Piech, C.; Bassen, J.; Huang, J.; Ganguli, S.; Sahami, M.; Guibas, L.J.; Sohl-Dickstein, J. Deep knowledge tracing. In Advances in Neural Information Processing Systems; NeurIPS: San Diego, CA, USA, 2015; Volume 28. [Google Scholar]
- Pandey, S.; Karypis, G. A self-attentive model for knowledge tracing. In Proceedings of the 12th International Conference on Educational Data Mining (EDM 2019); International Educational Data Mining Society: Montreal, QC, Canada, 2019; pp. 384–389. [Google Scholar]
- Ghosh, A.; Heffernan, N.; Lan, A.S. Context-aware attentive knowledge tracing. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Virtual, 6–10 July 2020; pp. 2330–2339. [Google Scholar]
- Yeung, C.K. Deep-IRT: Make deep learning based knowledge tracing explainable using item response theory. In Proceedings of the 12th International Conference on Educational Data Mining (EDM 2019); International Educational Data Mining Society: Worcester, MA, USA, 2019; pp. 683–686. [Google Scholar]
- Su, Y.; Cheng, Z.; Luo, P.; Wu, J.; Zhang, L.; Liu, Q.; Wang, S. Time-and-concept enhanced deep multidimensional item response theory for interpretable knowledge tracing. Knowl.-Based Syst. 2021, 218, 106819. [Google Scholar] [CrossRef]
- Chen, J.; Liu, Z.; Huang, S.; Liu, Q.; Luo, W. Improving interpretability of deep sequential knowledge tracing models with question-centric cognitive representations. In Proceedings of the AAAI Conference on Artificial Intelligence; AAAI Press: Washington, DC, USA, 2023; Volume 37, pp. 14196–14204. [Google Scholar]
- Arnau-González, P.; Wu, Y.; Solera-Monforte, S.; Arnau, D.; Arevalillo-Herráez, M. Predicting User Actions in Algebra Intelligent Tutoring Systems with Markov Models. Lect. Notes Comput. Sci. 2025, 15881 LNAI, 195–202. [Google Scholar] [CrossRef]
- Yudelson, M.V.; Koedinger, K.R.; Gordon, G.J. Individualized bayesian knowledge tracing models. In Proceedings of the International Conference on Artificial Intelligence in Education; Springer: Berlin/Heidelberg, Germany, 2013; pp. 171–180. [Google Scholar]
- Pascanu, R.; Mikolov, T.; Bengio, Y. On the difficulty of training recurrent neural networks. In Proceedings of the 30th International Conference on Machine Learning (ICML 2013); International Machine Learning Society (IMLS): San Diego, CA, USA, 2013; pp. 2347–2355. [Google Scholar]
- Choi, Y.; Lee, Y.; Cho, J.; Baek, J.; Kim, B.; Cha, Y.; Shin, D.; Bae, C.; Heo, J. Towards an appropriate query, key, and value computation for knowledge tracing. In Proceedings of the Seventh ACM Conference on Learning@ Scale; Association for Computing Machinery: New York, NY, USA, 2020; pp. 341–344. [Google Scholar]
- Bach, S.; Binder, A.; Montavon, G.; Klauschen, F.; Müller, K.R.; Samek, W. On pixel-wise explanations for non-linear classifier decisions by layer-wise relevance propagation. PLoS ONE 2015, 10, e0130140. [Google Scholar] [CrossRef] [PubMed]
- Ribeiro, M.T.; Singh, S.; Guestrin, C. “Why should I trust you?” Explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 1135–1144. [Google Scholar]
- Gan, W.; Sun, Y.; Sun, Y. Knowledge interaction enhanced knowledge tracing for learner performance prediction. In Proceedings of the 2020 7th International Conference on Behavioural and Social Computing (BESC), Bournemouth, UK, 5-7 November 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 1–6. [Google Scholar]
- Zhou, Y.; Li, X.; Cao, Y.; Zhao, X.; Ye, Q.; Lv, J. LANA: Towards Personalized Deep Knowledge Tracing Through Distinguishable Interactive Sequences. In Proceedings of the 14th International Conference on Educational Data Mining (EDM 2021); International Educational Data Mining Society: Worcester, MA, USA, 2021; pp. 602–608. [Google Scholar]
- Liu, S.; Yu, J.; Li, Q.; Liang, R.; Zhang, Y.; Shen, X.; Sun, J. Ability boosted knowledge tracing. Inf. Sci. 2022, 596, 567–587. [Google Scholar] [CrossRef]
- Sun, J.; Wei, M.; Feng, J.; Yu, F.; Li, Q.; Zou, R. Progressive knowledge tracing: Modeling learning process from abstract to concrete. Expert Syst. Appl. 2024, 238, 122280. [Google Scholar] [CrossRef]
- Zhang, L. Learning factors knowledge tracing model based on dynamic cognitive diagnosis. Math. Probl. Eng. 2021, 2021, 8777160. [Google Scholar] [CrossRef]
- Zhu, J.; Yu, W.; Zheng, Z.; Huang, C.; Tang, Y.; Fung, G.P.C. Learning from interpretable analysis: Attention-based knowledge tracing. In Proceedings of the International Conference on Artificial Intelligence in Education; Springer: Berlin/Heidelberg, Germany, 2020; pp. 364–368. [Google Scholar]
- Lee, U.; Park, Y.; Kim, Y.; Choi, S.; Kim, H. Monacobert: Monotonic attention based convbert for knowledge tracing. In Proceedings of the International Conference on Intelligent Tutoring Systems; Springer: Berlin/Heidelberg, Germany, 2024; pp. 107–123. [Google Scholar]
- Zhang, M.; Zhu, X.; Zhang, C.; Qian, W.; Pan, F.; Zhao, H. Counterfactual Monotonic Knowledge Tracing for Assessing Students’ Dynamic Mastery of Knowledge Concepts. In Proceedings of the 32nd ACM International Conference on Information and Knowledge Management, Birmingham, UK, 21–25 October 2023; pp. 3236–3246. [Google Scholar]
- Labra, C.; Santos, O.C. Exploring cognitive models to augment explainability in Deep Knowledge Tracing. In Proceedings of the Adjunct Proceedings of the 31st ACM Conference on User Modeling, Adaptation and Personalization (UMAP ’23 Adjunct); Association for Computing Machinery: New York, NY, USA, 2023; pp. 220–223. [Google Scholar] [CrossRef]
- Badrinath, A.; Pardos, Z. Optimizing Bayesian Knowledge Tracing with Neural Network Parameter Generation. J. Educ. Data Min. 2025, 17, 41–65. [Google Scholar]
- Karpatne, A.; Atluri, G.; Faghmous, J.; Steinbach, M.; Banerjee, A.; Ganguly, A.; Shekhar, S.; Samatova, N.; Kumar, V. Theory-guided Data Science: A New Paradigm for Scientific Discovery from Data. IEEE Trans. Knowl. Data Eng. 2017, 29, 2318–2331. [Google Scholar] [CrossRef]
- Karniadakis, G.E.; Kevrekidis, I.G.; Lu, L.; Perdikaris, P.; Wang, S.; Yang, L. Physics-informed machine learning. Nat. Rev. Phys. 2021, 3, 422–440. [Google Scholar] [CrossRef]
- Jia, X.; Willard, J.; Karpatne, A.; Read, J.S.; Zwart, J.A.; Steinbach, M.; Kumar, V. Physics-guided machine learning for scientific discovery: An application in simulating lake temperature profiles. ACM/IMS Trans. Data Sci. 2021, 2, 1–26. [Google Scholar] [CrossRef]
- Raissi, M.; Perdikaris, P.; Karniadakis, G.E. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J. Comput. Phys. 2019, 378, 686–707. [Google Scholar] [CrossRef]
- Willard, J.; Jia, X.; Xu, S.; Steinbach, M.; Kumar, V. Integrating scientific knowledge with machine learning for engineering and environmental systems. ACM Comput. Surv. 2022, 55, 1–37. [Google Scholar] [CrossRef]
- Baker, R.S.d.; Corbett, A.T.; Aleven, V. More accurate student modeling through contextual estimation of slip and guess probabilities in bayesian knowledge tracing. In Proceedings of the International Conference on Intelligent Tutoring Systems; Springer: Berlin/Heidelberg, Germany, 2008; pp. 406–415. [Google Scholar]
- Hewitt, J.; Liang, P. Designing and Interpreting Probes with Control Tasks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP); Inui, K., Jiang, J., Ng, V., Wan, X., Eds.; Association for Computational Linguistics: Stroudsburg, PA, USA, 2019; pp. 2733–2743. [Google Scholar]
- Belinkov, Y. Probing classifiers: Promises, shortcomings, and advances. Comput. Linguist. 2022, 48, 207–219. [Google Scholar] [CrossRef]
- Liu, Z.; Liu, Q.; Chen, J.; Huang, S.; Tang, J.; Luo, W. pyKT: A python library to benchmark deep learning based knowledge tracing models. Adv. Neural Inf. Process. Syst. 2022, 35, 18542–18555. [Google Scholar]
- Badrinath, A.; Wang, F.; Pardos, Z. pyBKT: An Accessible Python Library of Bayesian Knowledge Tracing Models. In Proceedings of the 14th International Conference on Educational Data Mining (EDM 2021); International Educational Data Mining Society: Worcester, MA, USA, 2021; pp. 468–474. [Google Scholar]
- Feng, M.; Heffernan, N.; Koedinger, K. Addressing the assessment challenge with an online system that tutors as it assesses. User Model. User-Adapt. Interact. 2009, 19, 243–266. [Google Scholar] [CrossRef]
- Stamper, J.; Niculescu-Mizil, A.; Ritter, S.; Gordon, G.; Koedinger, K. Algebra I 2005–2006 and Bridge to Algebra 2006–2007. Development Data Sets from KDD Cup. 2010. Available online: https://pslcdatashop.web.cmu.edu/KDDCup/downloads.jsp (accessed on 28 December 2025).
- Wang, Z.; Lamb, A.; Saveliev, E.; Cameron, P.; Zaykov, Y.; Hernández-Lobato, J.M.; Turner, R.E.; Baraniuk, R.G.; Barton, C.; Jones, S.P.; et al. Results and Insights from Diagnostic Questions: The NeurIPS 2020 Education Challenge. In Proceedings of the Proceedings of Machine Learning Research; ML Research Press: Amherst, MA, USA, 2020; Volume 133, pp. 191–205. [Google Scholar]
- Zhang, J.; Shi, X.; King, I.; Yeung, D.Y. Dynamic key-value memory networks for knowledge tracing. In Proceedings of the 26th international conference on World Wide Web; International World Wide Web Conferences Steering Committee: Geneva, Switzerland, 2017; pp. 765–774. [Google Scholar]
- Guo, X.; Huang, Z.; Gao, J.; Shang, M.; Shu, M.; Sun, J. Enhancing Knowledge Tracing via Adversarial Training. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, Virtual, 14–18 August 2021. [Google Scholar]
Figure 1.
Dimensions of Informed Machine Learning (IML) in gTransformer.
Figure 1.
Dimensions of Informed Machine Learning (IML) in gTransformer.
Figure 2.
Functional layers of the gTransformer architecture. Grey denotes standard Transformer elements; blue denotes gTransformer-specific elements.
Figure 2.
Functional layers of the gTransformer architecture. Grey denotes standard Transformer elements; blue denotes gTransformer-specific elements.
Figure 3.
Structural fidelity for Initial Mastery . Plot demonstrating strong linear recoverability (, , ) between BKT theoretical priors and probe-extracted parameters. Each bubble represents a binned aggregate of test interactions, with size encoding sample density. The high adherence to the diagonal and high selectivity () validate that this is a dominant organising principle in latent representations.
Figure 3.
Structural fidelity for Initial Mastery . Plot demonstrating strong linear recoverability (, , ) between BKT theoretical priors and probe-extracted parameters. Each bubble represents a binned aggregate of test interactions, with size encoding sample density. The high adherence to the diagonal and high selectivity () validate that this is a dominant organising principle in latent representations.
Figure 4.
Structural fidelity for Learn Rate . Plot demonstrating robust linear recoverability (, , ) between BKT theoretical priors and probe-extracted parameters. Each bubble represents a binned aggregate of test interactions, with size encoding sample density. The high adherence to the diagonal and high selectivity () confirm that learn rate dynamics are dominantly encoded in latent representations.
Figure 4.
Structural fidelity for Learn Rate . Plot demonstrating robust linear recoverability (, , ) between BKT theoretical priors and probe-extracted parameters. Each bubble represents a binned aggregate of test interactions, with size encoding sample density. The high adherence to the diagonal and high selectivity () confirm that learn rate dynamics are dominantly encoded in latent representations.
Figure 5.
Semantic alignment for Initial Mastery . Plot showing weak monotonic relationship preservation (Spearman , Mean Absolute Error (MAE) = ) between BKT theoretical priors and grounded parameters after neural transformation. Each bubble represents an aggregate of test interactions, with size encoding sample density. The substantial scatter indicates strong student-specific individualisation, with the model prioritising context-aware adaptation over strict adherence to population priors.
Figure 5.
Semantic alignment for Initial Mastery . Plot showing weak monotonic relationship preservation (Spearman , Mean Absolute Error (MAE) = ) between BKT theoretical priors and grounded parameters after neural transformation. Each bubble represents an aggregate of test interactions, with size encoding sample density. The substantial scatter indicates strong student-specific individualisation, with the model prioritising context-aware adaptation over strict adherence to population priors.
Figure 6.
Semantic alignment for Learn Rate . Plot demonstrating moderate monotonic relationship preservation (Spearman , MAE = ) between BKT theoretical priors and grounded parameters. Each bubble represents an aggregate of test interactions, with size encoding sample density. The clustering around the diagonal across the full range indicates that the model preserves pedagogical understanding of practice effects through neural processing while enabling context-aware refinement.
Figure 6.
Semantic alignment for Learn Rate . Plot demonstrating moderate monotonic relationship preservation (Spearman , MAE = ) between BKT theoretical priors and grounded parameters. Each bubble represents an aggregate of test interactions, with size encoding sample density. The clustering around the diagonal across the full range indicates that the model preserves pedagogical understanding of practice effects through neural processing while enabling context-aware refinement.
Figure 7.
Student skill confidence heatmap. Green cells indicate high confidence (≥0.8) in the interpretable predictions. Yellow shows medium confidence and red indicates low confidence.
Figure 7.
Student skill confidence heatmap. Green cells indicate high confidence (≥0.8) in the interpretable predictions. Yellow shows medium confidence and red indicates low confidence.
Figure 8.
Clustering of students into four learning situations based on their historical parameters (computed as averages across all previous interactions).
Figure 8.
Clustering of students into four learning situations based on their historical parameters (computed as averages across all previous interactions).
Figure 9.
Context-aware prediction mosaic showing non-Markovian personalisation. Each panel displays students with identical response sequences (same green and red ground truth bars for correct and incorrect responses, respectively) but different learning profiles. BKT predictions (dotted grey) overlap due to Markovian constraints, while gTransformer predictions (solid coloured) diverge based on historical parameters (). Circles represent predictions of correctness, while crosses indicate predicted failures. This demonstrates that gTransformer differentiates students not by what they answered, but by how they learned along their whole learning trajectory.
Figure 9.
Context-aware prediction mosaic showing non-Markovian personalisation. Each panel displays students with identical response sequences (same green and red ground truth bars for correct and incorrect responses, respectively) but different learning profiles. BKT predictions (dotted grey) overlap due to Markovian constraints, while gTransformer predictions (solid coloured) diverge based on historical parameters (). Circles represent predictions of correctness, while crosses indicate predicted failures. This demonstrates that gTransformer differentiates students not by what they answered, but by how they learned along their whole learning trajectory.
Table 1.
Hyperparameter configurations for experimental benchmark and trade-off evaluation.
Table 1.
Hyperparameter configurations for experimental benchmark and trade-off evaluation.
| Hyperparameter | Performance | Trade-Off |
|---|
| Ablation Configuration |
| Ablation mode | all | none |
| 1.0 | 1.0 |
| 0 | 0.5 |
| 0 | 1.0 |
| Architecture Configuration |
| 64 | 64 |
| (Encoder/Decoder) | 4/8 | 4/8 |
| Total attention layers | 12 | 12 |
| 256 | 256 |
| Attention heads | 4 | AS2009: 8 others: 4 |
| Output MLP dimensions | [128, 512, 256, 1] | [128, 512, 256, 1] |
| Activation function | ReLU | ReLU |
| Normalization | LayerNorm | LayerNorm |
| Training Configuration |
| Learning rate | NIPS34: others: | |
| Batch size | 64 | 64 |
| Optimiser | Adam | Adam |
| Epochs | 200 | 200 |
| Dropout (p) | 0.1 | 0.1 |
| Weight initialization | Xavier/ Orthogonal | Xavier/ Orthogonal |
Table 2.
Characteristics of the benchmark datasets used to evaluate Area Under the Curve (AUC). , , and denote the total number of sequences (students), knowledge components, questions and student–item interactions, respectively.
Table 2.
Characteristics of the benchmark datasets used to evaluate Area Under the Curve (AUC). , , and denote the total number of sequences (students), knowledge components, questions and student–item interactions, respectively.
| Dataset | Sequences () | Concepts () | Questions () | Interactions () |
|---|
| AS2009 | 4217 | 123 | 26,688 | 346,860 |
| AS2015 | 19,917 | 100 | — | 708,631 |
| AL2005 | 574 | 112 | 210,710 | 809,694 |
| BDG2006 | 1146 | 493 | 207,856 | 3,679,199 |
| NIPS34 | 4918 | 57 | 948 | 1,382,727 |
Table 3.
Comparison of predictive performance across various benchmark datasets. The table reports AUC values for gTransformer and baseline models evaluated at the question level, following a mean late-fusion protocol. Values in bold indicate the best-performing model for each dataset.
Table 3.
Comparison of predictive performance across various benchmark datasets. The table reports AUC values for gTransformer and baseline models evaluated at the question level, following a mean late-fusion protocol. Values in bold indicate the best-performing model for each dataset.
| Model | AS2009 | AS2015 | AL2005 | BDG2006 | NIPS34 |
|---|
| AKT | 0.7825 | 0.7081 | 0.8306 | 0.8208 | 0.8033 |
| ATKT | 0.7715 | 0.7810 | 0.7995 | 0.7889 | 0.7665 |
| DKT | 0.7528 | 0.7031 | 0.8149 | 0.8015 | 0.7689 |
| DKVMN | 0.7440 | 0.7013 | 0.8054 | 0.7983 | 0.7673 |
| SAKT | 0.7263 | 0.6947 | 0.7880 | 0.7740 | 0.7517 |
| SAINT | 0.6921 | 0.6836 | 0.7775 | 0.7781 | 0.7873 |
| gTransformer | 0.7831 | 0.7078 | 0.8240 | 0.8148 | 0.8006 |
Table 4.
AUC–interpretability trade-offs in gTransformer across datasets. The table shows AUC scores for the predictions of the ablated configuration (), predictions of the grounded configuration (), interpretable predictions () and classical Bayesian Knowledge Tracing (BKT) predictions (). The column shows the cost of grounding () and shows the interpretability cost (), while shows the interpretability gain ().
Table 4.
AUC–interpretability trade-offs in gTransformer across datasets. The table shows AUC scores for the predictions of the ablated configuration (), predictions of the grounded configuration (), interpretable predictions () and classical Bayesian Knowledge Tracing (BKT) predictions (). The column shows the cost of grounding () and shows the interpretability cost (), while shows the interpretability gain ().
| Dataset | | | | | (%) | (%) | (%) |
|---|
| AS2009 | 0.7831 | 0.7814 | 0.7436 | 0.6097 | 0.0017 (0.2%) | 0.0378 (4.8%) | 0.1339 (22.0%) |
| AS2015 | 0.7078 | 0.7070 | 0.6940 | — | 0.0008 (0.1%) | 0.0130 (1.8%) | — |
| AL2005 | 0.8240 | 0.8237 | 0.7800 | 0.7215 | 0.0003 (0.0%) | 0.0437 (5.3%) | 0.0585 (8.1%) |
| BDG2006 | 0.8148 | 0.8107 | 0.7810 | 0.6756 | 0.0041 (0.5%) | 0.0297 (3.6%) | 0.1054 (15.6%) |
| NIPS34 | 0.8006 | 0.7987 | 0.7666 | 0.5729 | 0.0019 (0.2%) | 0.0321 (4.0%) | 0.1937 (33.8%) |
| Mean | 0.7861 | 0.7843 | 0.7530 | 0.6449 | 0.0018 (0.2%) | 0.0313 (3.9%) | 0.1229 (19.9%) |
| Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |