Automated Knowledge Concept Annotation and Question Representation Learning for Knowledge Tracing

## Abstract

Abstract Knowledge tracing (KT) is a popular approach for modeling students’ learning progress over time, which can enable more personalized and adaptive learning. However, existing KT approaches face two major limitations: (1) they rely heavily on expert-defined knowledge concepts (KCs) in questions, which is time-consuming and prone to errors; and (2) KT methods tend to overlook the semantics of both questions and the given KCs. In this work, we address these challenges and present KCQRL, a framework for automated k nowledge c oncept annotation and q uestion r epresentation l earning that can
improve the effectiveness of any existing KT model. First, we propose an automated KC annotation process using large language models (LLMs), which generates question solutions and then annotates KCs in each solution step of the questions. Second, we introduce a contrastive learning approach to generate semantically rich embeddings for questions and solution steps, aligning them with their associated KCs via a tailored false negative elimination approach. These embeddings can be readily integrated into existing KT models, replacing their randomly initialized embeddings. We demonstrate the effectiveness of KCQRL across 15 KT models on two large real-world Math learning datasets, where we achieve consistent performance improvements.

## 1 Introduction

The recent years have witnessed a surge in online learning platforms (Adedoyin & Soykan, ; Gros & García-Peñalvo, ), where students learn new knowledge concepts, which are then tested through exercises. Needless to say, personalization is crucial for effective learning: it allows that new knowledge concepts are carefully tailored to the current knowledge state of the student, which is more effective than one-size-fits-all approaches to learning (Cui & Sachan, ; Xu et al., ). However, such personalization requires that the knowledge of students is continuously assessed, which highlights the need for *knowledge tracing (KT)*.

In KT, one models the temporal dynamics of students’ learning processes (Corbett & Anderson, ) in terms of a core set of skills, which are called *knowledge concepts (KCs)*. KT models are typically time-series models that receive the past interactions of the learner as input (e.g., her previous exercises) in order to predict response of the learner to the next exercise. Early KT models were primarily based on logistic or probabilistic models (Corbett & Anderson, ; Cen et al., ; Pavlik et al., ; Käser et al., ; Vie & Kashima, ), while more recent KT models build upon deep learning (Piech et al., ; Abdelrahman & Wang, ; Long et al., ; Liu et al., ; Huang et al., ; Zhou et al., ; Cui et al., ).

Yet, existing KT models have two main limitations that hinder their applicability in practice (see Fig. 1). 1 They require a comprehensive mapping between KCs and questions, which is typically done through manual annotations by experts. However, such KC annotation is both time-intensive and prone to errors (Clark, ; Bier et al., ). While recent work shows that LLM-generated KCs may be more favorable for human subjects (Moore et al., ), its success has not yet translated into improvements in KT. 2 KT models overlook the semantics of both questions and KCs. Instead, they merely treat them as numerical identifiers, whose embeddings are randomly initialized and are learned throughout training. Therefore, existing KT models are expected to “implicitly” learn the association between questions and KCs and their sequential modeling for student histories, simultaneously. In this paper, we hypothesize – and show empirically – that both 1 and 2 are key limitations that limit the predictive performance.

In this work, we propose a novel framework for *automated knowledge concept annotation and question representation learning*, which we call KCQRL(^1^11Our code is available at https://github.com/oezyurty/KCQRL .). Our KCQRL framework is flexible and can be applied on top of any existing KT model, and we later show that our KCQRL consistently improves the performance of state-of-the-art KT models by a clear margin. Importantly, our framework is carefully designed to address the two limitations 1 and 2 from above. Technically, we achieve this through the following three modules:

- 1.
We develop a novel, automated KC annotation approach using large language models (LLMs) that both generates solutions to the questions and labels KCs for each solution step. Thereby, we effectively circumvent the need for manual annotation from domain experts ($\rightarrow$ limitation 1).
- 2.
We propose a novel contrastive learning paradigm to jointly learn representations of question content, solution steps, and KCs. As a result, our KCQRL effectively leverages the semantics of question content and KCs, as a clear improvement over existing KT models ($\rightarrow$ limitation 2).
- 3.
We integrate the learned representations into KT models to improve their performance. Our KCQRL is flexible and can be combined with any state-of-the-art KT model for improved results.

Finally, we demonstrate the effectiveness of our KCQRL framework on two large real-world datasets curated from online math learning platforms. We compare 15 state-of-the-art KT models, which we combine with our KCQRL framework. Here, we find consistent evidence that our framework improves performance by a large margin.

## 2 Preliminaries: Standard Formulation of Knowledge Tracing

Figure: Figure 1: Overview of standard KT formulation and its limitations.
Refer to caption: x1.png

Knowledge tracing: We consider the standard formulation of KT (e.g., Piech et al., ; Sonkar et al., ; Zhou et al., ), which is the performance prediction of the next exercise for a student based on time-series data (see Fig. 1). Specifically, for a student $s$, the history of $t$ exercises are modeled as $s=\{e_{i}\}_{i=1}^{t}$ with exercises $e_{i}$. Each exercise $e_{i}$ is a 3-tuple, i.e. $e_{i}=\{q_{i},\,\{c_{i,j}\}_{j=1}^{N_{q_{i}}},\,r_{i}\}$, where $q_{i}\in{\mathbb{Q}}$ is the question ID, $c_{i,j}\in{\mathbb{C}}$ is a KC ID of $q_{i}$, and $r_{i}\in\{0,1\}$ is the binary response (=incorrect/correct) of student $s$ for exercise $e_{i}$.

The aim of a KT model $F_{\theta}$ is to predict the binary response $\hat{r}_{t+1}$ of a student given the history of exercises and information about the next exercise. We denote the predicted response by $\hat{r}_{t+1}=F_{\theta}\big{(}q_{t+1},\,\{c_{t+1,j}\}_{j=1}^{N_{q_{t+1}}},\,
\{e_{i}\}_{i=1}^{t}\big{)}$.

Limitations: In practice, the above KT formulation has two key limitations: 1 It requires thousands of questions from ${\mathbb{Q}}$ to be manually annotated with each relevant KC from ${\mathbb{C}}$ among hundreds of categories Choi et al. (); Wang et al. (); Liu et al. (). Domain experts must ensure the consistency of manual annotations, a process that is not only resource-intensive but also prone to human error (Moore et al., ).
2 Existing KT models overlook the semantic context of both questions and knowledge concepts (KCs), which weakens their ability to model learning sequences effectively. Typically, KT models initialize random embeddings $\textrm{Emb}(q_{i})$ for each question $q_{i}\in{\mathbb{Q}}$ and/or $\textrm{Emb}(c_{i,j})$ for each KC $c_{i,j}\in{\mathbb{C}}$ (Abdelrahman et al., ; Zhu et al., ). The embeddings are then trained as part of the supervised learning objective of the KT task. As a result, the parameters $\theta$ of a KT model $F_{\theta}$ are trained simultaneously for both (a) learning the relationships between questions and KCs and (b) sequential dynamics of student learning histories.

Proposed KT formulation: In our work, we address the limitations 1 and 2 from above, and for this purpose, we propose a new formulation of the KT task. Specifically, our framework proceeds as follows: 1) We propose an automated KC annotation framework (Sec. 3.1) using chain-of-thought prompting of large language models (LLMs). Thereby, we effectively circumvent the need for manual annotation by domain experts ($\rightarrow$ limitation 1). (2) We disentangle the two objectives of KT algorithms and intentionally integrate the semantic context of both questions and KCs ($\rightarrow$ limitation 2). Here, we first introduce a contrastive learning framework (Sec. 3.2) to generate representations for questions and KCs independently of student learning histories. Then, we leverage the learned representations of questions (Sec. 3.3 to model the sequential dynamics of student learning histories via existing KT algorithms. Importantly, our proposed framework is generalizable and can be combined with any existing KT model for additional performance improvements.

## 3 Proposed KCQRL Framework

Figure: Figure 2: Overview of our KCQRL framework and how it can be applied on top of existing KT models. *Top left:* simplified illustration of the standard KT formulation, where the embeddings of questions and/or KC identifiers are initialized randomly for the prediction task. Our KCQRL improves the standard KT formulation via three modules: (1) *Bottom left:* shows how question IDs are translated into question content, solution steps (simplified for readability), and KCs via KC annotation (Sec. 3.1). (2) *Bottom right:* shows how these annotations are leveraged for representation learning of questions via a tailored contrastive learning and false negative elimination (Sec. 3.2). (3) *Top right:* shows how these learned representations initialize the embeddings of a KT model to improve the performance of the latter (Sec. 3.3).
Refer to caption: x2.png

Our KCQRL framework has three main modules (see Fig. 2): (1) The first module takes the question content and annotates the question with a step-by-step solution and the corresponding knowledge concepts (KCs) (Sec. 3.1). (2) The second module learns the representations of questions by leveraging solution steps and KCs via a tailored contrastive learning objective (Sec. 3.2). (3) The third module integrates the learned question representations into existing KT models (Sec.3.3).

### 3.1 Knowledge Concept Annotation via LLMs (Module 1)

Our KCQRL leverages the complex reasoning abilities of an LLM $P_{\phi}(\cdot)$ and annotates the KCs of a question in a grounded manner. This is done in three steps: (i) the LLM generates the step-by-step solution to reveal the underlying techniques to solve the problem. (ii) The LLM then annotates the required KCs to solve the problem, informed by the solution steps. (iii) Finally, it further maps each solution step with its underlying KCs, which is particularly important for the second component of our framework. The details of these three steps are given below:(^2^22For each step, we provide the exact prompts in Appendix H.)

(i) Solution step generation: For a question $q\in{\mathbb{Q}}$, our framework generates the solution steps $s_{1},\,\ldots,\,s_{n}$ via chain-of-thought (CoT) prompting (Wei et al., ) of $P_{\phi}(.)$. Here, each $s_{k}$ is a coherent language sequence that serves as an intermediate step towards solving the problem $q$. To solve the problems, $s_{k}$ is sampled sequentially using a decoding algorithm; in our framework, we use temperature sampling, i. e., $s_{k}\sim P_{\phi}(s_{k}\,|\,\textrm{prompt}(q),\,s_{1},\,\ldots,\,s_{k-1})$, where $s_{k}$ is the $k$-th solution step of a question $q$ and $\textrm{prompt}(q)$ is the CoT prompt for $q$. Note that CoT prompting allows us to decompose the solutions in multiple steps, which is especially relevant for questions that require complex problem-solving such as in Maths, Computer Science, Physics, Chemistry, and Medicine.

(ii) KC annotation: For the question $q$ from above, the LLM further generates relevant KCs $c_{1},\,\ldots,\,c_{m}$ based on the question content of $q$ and the solutions steps $\{s_{k}\}_{k=1}^{n}$ generated from the previous step (i). Similar to previous step, the $c_{j}$ are sampled sequentially, i. e., $c_{j}\sim P_{\phi}(c_{j}\,|\,\textrm{prompt}(q,\,\{s_{k}\}_{k=1}^{n}),\,c_{1},
\,\ldots,\,c_{j-1})$, where $c_{j}$ is the $j$-th generated KC of question $q$ and $\textrm{prompt}(q,\,\{s_{k}\}_{k=1}^{n})$ is the prompt for an LLM that leverages the question content and solution steps.

(iii) Solution step $\rightarrow$ KC mapping: Not all KCs have been practiced at each solution step of a problem. To better understand the association between each solution step and KC, our KCQRL framework further maps each solution step to its associated KCs. Specifically, $P_{\phi}(.)$ is presented with the question content $q$, the solution steps $\{s_{k}\}_{k=1}^{n}$, and the KCs $\{c_{j}\}_{j=1}^{m}$. Then, the LLM is asked to sequentially generate the relevant pairs of solution step and KC, i. e.,

$$ $(s_{\pi_{s}(l)},c_{\pi_{c}(l)})\sim P_{\phi}((s_{\pi_{s}(l)},c_{\pi_{c}(l)})\, |\,\textrm{prompt}(q,\{s_{k}\}_{k=1}^{n},\{c_{j}\}_{j=1}^{m}),(s_{\pi_{s}(1)}, c_{\pi_{c}(1)}),\ldots,(s_{\pi_{s}(l-1)},c_{\pi_{c}(l-1)})),$ $$

with the following variables: $(s_{\pi_{s}(l)},\,c_{\pi_{c}(l)})$ is the $l$-th generated pair of solution step and KC; $\pi_{s}(l)$ denotes the index of a solution step (from 1 to $n$) for the $l$-th generation; $\pi_{c}(l)$ analogously denotes the index of a KC (from 1 to $m$) for the $l$-th generation; and $\textrm{prompt}(q,\,\{s_{k}\}_{k=1}^{n},\,\{c_{j}\}_{j=1}^{m})$ is the prompt that incorporates the question content, the solution steps, and the KCs.

### 3.2 Representation Learning of Questions (Module 2)

Our KCQRL framework provides a tailored contrastive learning (CL) approach to generate embeddings for questions and solution steps that are semantically aligned with their associated KCs.(^3^33For an introduction to CL, we refer to (Oord et al., ; Chen et al., ; He et al., ).) A naïve approach would be to use a pre-trained LLM, which can then generate general-purpose embeddings. However, such general-purpose embeddings lack the domain-specific focus required in education. (We provide evidence for this in our ablation studies in Sec. 5.2.) To address this, CL allows us to explicitly teach the encoder to bring question and solution step embeddings closer to the representations of their relevant KCs. After CL training, these ‘enriched’ embeddings are aggregated and used as input for the downstream KT model to improve the modeling capabilities of the latter.

We achieve the above objective via a carefully designed CL loss. CL has shown to be effective in representation learning of textual contents in other domains, such as information retrieval (Karpukhin et al., ; Khattab & Zaharia, ; Zhu et al., ), where CL was used to bring the relevant query and document embeddings closer. However, this gives rise to an important difference: In our framework, we leverage CL to bring question embeddings closer to their KC embeddings, and solution step embeddings to their KC embeddings, respectively.

To bring the embeddings of relevant texts closer, our CL loss should learn similar representations for the positive pair (e. g., the question and one of its KCs) in contrast to many negative pairs (e. g., the question and a KC from another question) from the same batch. In our setup, different questions in the same batch can be annotated with semantically similar KCs (e. g., Understanding of Addition vs. Ability to Perform Addition). Constructing the negative pairs from semantically similar KCs adversely affects representation learning. This is an extensively studied problem in CL for other domains, and it is called *false negatives* (Chen et al., ; Huynh et al., ; Yang et al., ; Sun et al., ; Byun et al., ). Informed by the literature, we carefully design a mechanism to pick negative pairs from the batch that avoids false negatives. For this, we consider the semantic information in annotated KCs, i. e., before the CL training, which we use to cluster the KCs that share similar semantics. Then, for a given KC in the positive pair, we discard other KCs in the same cluster when constructing the negative pairs.

Formally, after the annotation steps from the previous modules, a question $q_{i}$ has $N_{i}$ solution steps $\{s_{ik}\}_{k=1}^{N_{i}}$ and $M_{i}$ knowledge concepts $\{c_{ij}\}_{j=1}^{M_{i}}$. To avoid false negatives in CL, we cluster all KCs of all questions in the corpus $\{c_{i^{\prime}j^{\prime}}\}_{i^{\prime}=1,j^{\prime}=1}^{N,M_{i^{\prime}}}$ via a clustering algorithm $\mathcal{A}(\cdot)$. As a result, we have that, if $c_{ij}$ and $c_{i^{\prime}j^{\prime}}$ are semantically similar, then $\mathcal{A}(c_{ij})=\mathcal{A}(c_{i^{\prime}j^{\prime}})$.

To train the encoder LLM $E_{\psi}(\cdot)$ with our tailored CL objective, we first compute the embeddings of question content, solution steps, and KCs via

$$ $z^{q}_{i}=E_{\psi}(q_{i}),\qquad z^{s}_{ik}=E_{\psi}(s_{ik}),\qquad z^{c}_{ij} =E_{\psi}(c_{ij}).$ (1) $$

We then leverage the embeddings to jointly learn (i) the representation of the question content and (ii) the representation of the solution steps. We describe (i) and (ii) below, as well as the training objective to learn both jointly.

(i) Learning the representation of a question content (via $\mathcal{L}_{\textrm{question}_{i}}$): Each question in the corpus can be associated with more than one KCs. Hence, the objective here is to simultaneously achieve two objectives: (a) bring the embeddings of a given question closer to the embeddings of its KCs ($\hateq$positive pairs) and (b)  push it apart from the embeddings of irrelevant KCs ($\hateq$negative pairs without false negatives). For a question $q_{i}$ and its KC $c_{ij}$, we achieve this by the following loss

$$ $\mathcal{L}_{q}(z^{q}_{i},z^{c}_{ij})=-\log\frac{\textrm{sim}(z^{q}_{i},z^{c}_ {ij})}{\textrm{sim}(z^{q}_{i},z^{c}_{ij})+\sum_{\begin{subarray}{c}i^{\prime} \in{\mathcal{B}}\\ i^{\prime}\neq i\end{subarray}}\sum_{j^{\prime}=1}^{M_{i^{\prime}}}{\color[rgb ]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}\mathbb{I}_{\left\{ \mathcal{A}(c_{ij})\neq\mathcal{A}(c_{i^{\prime}j^{\prime}})\right\}}}\, \textrm{sim}(z^{q}_{i},z^{c}_{i^{\prime}j^{\prime}})},$ (2) $$

where $\textrm{sim}(z^{q}_{i},z^{c}_{ij})=\exp\big{(}\frac{z^{q}_{i}\cdot z^{c}_{ij}}
{\tau\left\lVert z^{q}_{i}\right\rVert\cdot\left\lVert z^{c}_{ij}\right\rVert}
\big{)}$ and where ${\mathcal{B}}$ is the set of question IDs in the batch. The indicator function $\mathbb{I}_{\left\{\mathcal{A}(c_{ij})\neq\mathcal{A}(c_{i^{\prime}j^{\prime}}
)\right\}}$ (in blue) eliminates the false negative question-KC pairs. Note that the latter distinguishes our custom CL loss from the standard CL loss.

Recall that each question $q_{i}$ can have multiple KCs, i. e., $\{c_{ij}\}_{j=1}^{M_{i}}$. Hence, we bring the embedding of $q_{i}$ closer to *all* of its KCs via

$$ $\mathcal{L}_{\textrm{question}_{i}}=\frac{1}{M_{i}}\sum_{j=1}^{M_{i}}\mathcal{ L}_{q}(z^{q}_{i},z^{c}_{ij}).$ (3) $$

(ii) Learning the representation of a solution step (via $\mathcal{L}_{\textrm{step}_{i}}$): We now proceed similarly to our KC annotation, which is also grounded in the solution steps. Hence, we carefully train our encoder $E_{\psi}(\cdot)$ in a grounded manner to the solution steps. Here, our objective is two-fold: (a) to bring the embedding of a solution step closer to the embeddings of its KCs, and (b) to separate it from the embeddings of irrelevant KCs. For a solution step $s_{ik}$ and its KC $c_{ij}$, we achieve this by the following loss

$$ $\mathcal{L}_{s}(z^{s}_{ik},z^{c}_{ij})=-\log\frac{\textrm{sim}(z^{s}_{ik},z^{c }_{ij})}{\textrm{sim}(z^{s}_{ik},z^{c}_{ij})+\sum_{i^{\prime}\in{\mathcal{B}}} \sum_{j^{\prime}=1}^{M_{i^{\prime}}}{\color[rgb]{0,0,1}\definecolor[named]{ pgfstrokecolor}{rgb}{0,0,1}\mathbb{I}_{\left\{\mathcal{A}(c_{ij})\neq\mathcal{ A}(c_{i^{\prime}j^{\prime}})\right\}}}\,\textrm{sim}(z^{s}_{ik},z^{c}_{i^{ \prime}j^{\prime}})},$ (4) $$

where $\textrm{sim}(\cdot,\cdot)$, ${\mathcal{B}}$ and the indicator function (in blue) are defined in the same as earlier.

Different from (i), not all KCs $\{c_{ij}\}_{j=1}^{M_{i}}$ of a question $q_{i}$ are relevant to a particular solution step $s_{ik}$. For this, we leverage the mapping from solution step to KC from the first module of our KCQRL framework. Based on this mapping, we define $\mathcal{P}(s_{ik})$ as the set of relevant KCs (i. e., $c_{ij}$) for $s_{ik}$, so that we can consider only the relevant KCs in the loss. Overall, for a question $q_{i}$, we compute the loss via

$$ $\mathcal{L}_{\textrm{step}_{i}}=\frac{1}{N_{i}}\sum_{k=1}^{N_{i}}\frac{1}{| \mathcal{P}(s_{ik})|}\sum_{j\in\mathcal{P}(s_{ik})}\mathcal{L}_{s}(z^{s}_{ik}, z^{c}_{ij}).$ (5) $$

Training objective: Our framework *jointly* learns the representations of the questions and the representations of the corresponding solution steps. Specifically, for a batch of questions ${\mathcal{B}}$, the overall training objective is given by

$$ $\mathcal{L}=\frac{1}{|{\mathcal{B}}|}\sum_{i\in{\mathcal{B}}}\mathcal{L}_{ \textrm{question}_{i}}+\alpha\mathcal{L}_{\textrm{step}_{i}},$ (6) $$

where $\alpha$ controls the balance between the contributions of $\mathcal{L}_{\textrm{question}_{i}}$ and $\mathcal{L}_{\textrm{step}_{i}}$.(^4^44Since both losses are already normalized by the number of KCs and steps, our initial experiments indicated that a choice of $\alpha=1$ yields very good performance and that the need for additional hyperparameter tuning can be circumvented. Hence, we set $\alpha=1$ for all experiments.)

### 3.3 Improving Knowledge Tracing via Learned Question Embeddings (Module 3)

The final component of our KCQRL framework proceeds in a simple yet effective manner by integrating the learned representations of each question into existing KT models. To achieve this, we simply replace the randomly initialized question embeddings of the KT model $F_{\theta}$ with our learned representations. To keep the dimensionality of the embeddings consistent across the questions with different number of solution steps, we calculate the embedding of a question via

$$ $\textrm{Emb}(q_{i})=[z^{q}_{i};\,\tilde{z}^{s}_{i}],\qquad\tilde{z}^{s}_{i}= \frac{1}{N_{i}}\sum_{k=1}^{N_{i}}z^{s}_{ik}.$ (7) $$

After this step, the KT model $F_{\theta}$ is trained based on its original loss function.

Note that, without loss of generality, the above approach can be applied to KT models that capture sequences of KCs over time. Here, the KC embeddings are replaced with our learned question embeddings, and, for the training/testing, question IDs are provided instead of KC IDs. If a KT model leverages both question and KC embeddings, we then replaced the question embeddings with our learned embeddings and fix KC embeddings to a vector with zeros to have a fair comparison and to better demonstrate the effectiveness of our work.

## 4 Experimental Setup

Datasets: We show the effectiveness of our framework on two large-scale, real-world datasets for which high-quality question contents are available (Table 1). These are: XES3G5M (Liu et al., ) and Eedi (Eedi, ). Both datasets are collected from online math learning platforms and are widely used to model the learning processes of students. Both datasets include data from thousands of students and questions, and millions of interactions, and, hence, these datasets are ideal for benchmarking various KT models and effectively demonstrating the impact of question semantics. Of note, the XES3G5M dataset was originally composed in Chinese, which we translated into English and made it available for future research. We additionally provide KC annotations of our KCQRL framework (i. e., the output of our module 1 in Sec. 3.1) for the XES3G5M dataset. We provide further details in Appendix B.

**Table 1: Overview of datasets.**
| Dataset | # Students | # KCs | # Questions | # Interactions | Language |
| --- | --- | --- | --- | --- | --- |
| XES3G5M (Liu et al., ) | 18,066 | 865 | 7,652 | 5,549,635 | English (translated from Chinese) |
| Eedi (Eedi, ) | 47,560 | 1,215 | 4,019 | 2,324,162 | English |

Baselines: Note that our framework is highly flexible and works with any state-of-the-art KT model. We thus consider a total of 15 KT models: DKT (Piech et al., ), DKT+ (Yeung & Yeung, ), KQN (Lee & Yeung, ), qDKT (Sonkar et al., ), IEKT (Long et al., ), AT-DKT (Liu et al., ), QIKT (Chen et al., ), DKVMN (Zhang et al., ), DeepIRT (Yeung, ), ATKT (Guo et al., ), SAKT (Pandey & Karypis, ), SAINT (Choi et al., ), AKT (Ghosh et al., ), simpleKT (Liu et al., ). and sparseKT (Huang et al., ). For all the baselines, we make the following comparison: (a) the original implementations without our framework versus (b) the KT model together with our KCQRL framework. Hence, any performance improvement must be attributed to our framework.

We leverage pykt library (Liu et al., ) for the implementation. We follow prior literature (e.g., Piech et al., ; Sonkar et al., ; Zhou et al., ) and evaluate the performance of KT models based on the AUC.

Implementation details of KCQRL: We leverage the reasoning abilities of GPT-4o(^5^55The exact version is gpt-4o-2024-05-13 at https://platform.openai.com/docs/models/gpt-4o) for our LLM $P_{\phi}(\cdot)$ in Sec. 3.1. We provide the exact prompts in Appendix H. We use BERT (Devlin, ) as our LLM encoder $E_{\psi}(\cdot)$ for representation learning in Sec. 3.2. For the elimination of false negative pairs, we use HDBSCAN (Campello et al., ) as the clustering algorithm $\mathcal{A}(\cdot)$ over Sentence-BERT (Reimers & Gurevych, ) embeddings of KCs. For training $E_{\psi}(\cdot)$, we use Nvidia Tesla A100 with 40GB GPU memory. We follow the standard five-fold cross-validation procedure to tune the parameters of the KT models $F_{\theta}(\cdot)$ in Sec. 3.3 and report results on the test set. For the KT models, we use NVIDIA GeForce RTX 3090 with 24GB GPU memory. Further details are given in Appendix D.

## 5 Results

### 5.1 Prediction Performance

Main results: Table 2 reports the performance of different KT models, where we each compare in two variants: (a) without (i. e., Default) versus (b) with our framework. We find the following: (1) Our KCQRL framework consistently boosts performance across all KT models and across all datasets. The relative improvements range between 1 % to 7 %. (2) Our framework improves the state-of-the-art (SOTA) performance on both datasets. For XES3G5M, the AUC increases from 82.24 to 83.04 (+0.80), and, for Eedi, from 75.15 to 78.96 (+3.81). (3) For KT models that have otherwise a lower performance, the performance gains from our KCQRL framework are particularly large. Interestingly, this helps even low-performing KT models to reach near-SOTA performance when provided with semantically rich inputs from our framework. *Takeaway:* Our framework leads to consistent performance gains and achieves SOTA performance.

**Table 2: Improvement in the performance of KT models from our KCQRL framework. Shown: AUC with std. dev. across 5 folds. Improvements are shown as both absolute and relative (%) values.**
| Model | XES3G5M | Eedi |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  | Default | w/ KCQRL | Imp. (abs.) | Imp. (%) | Default | w/ KCQRL | Imp. (abs.) | Imp. (%) |
| DKT | 78.33 $\pm$ 0.06 | 82.13 $\pm$ 0.02 | $+$3.80 | $+$4.85 | 73.59 $\pm$ 0.01 | 74.97 $\pm$ 0.03 | $+$1.38 | $+$1.88 |
| DKT$+$ | 78.57 $\pm$ 0.05 | 82.34 $\pm$ 0.04 | $+$3.77 | $+$4.80 | 73.79 $\pm$ 0.03 | 75.32 $\pm$ 0.04 | $+$1.53 | $+$2.07 |
| KQN | 77.81 $\pm$ 0.03 | 82.10 $\pm$ 0.06 | $+$4.29 | $+$5.51 | 73.13 $\pm$ 0.01 | 75.16 $\pm$ 0.04 | $+$2.03 | $+$2.78 |
| qDKT | 81.94 $\pm$ 0.05 | 82.13 $\pm$ 0.05 | $+$0.19 | $+$0.23 | 74.09 $\pm$ 0.03 | 74.97 $\pm$ 0.04 | $+$0.88 | $+$1.19 |
| IEKT | 82.24 $\pm$ 0.07 | 82.82 $\pm$ 0.06 | $+$0.58 | $+$0.71 | 75.12 $\pm$ 0.02 | 75.56 $\pm$ 0.02 | $+$0.44 | $+$0.59 |
| AT-DKT | 78.36 $\pm$ 0.06 | 82.36 $\pm$ 0.07 | $+$4.00 | $+$5.10 | 73.72 $\pm$ 0.04 | 75.25 $\pm$ 0.02 | $+$1.53 | $+$2.08 |
| QIKT | 82.07 $\pm$ 0.04 | 82.62 $\pm$ 0.05 | $+$0.55 | $+$0.67 | 75.15 $\pm$ 0.04 | 75.74 $\pm$ 0.02 | $+$0.59 | $+$0.79 |
| DKVMN | 77.88 $\pm$ 0.04 | 82.64 $\pm$ 0.02 | $+$4.76 | $+$6.11 | 72.74 $\pm$ 0.05 | 75.51 $\pm$ 0.02 | $+$2.77 | $+$3.81 |
| DeepIRT | 77.81 $\pm$ 0.06 | 82.56 $\pm$ 0.02 | $+$4.75 | $+$6.10 | 72.61 $\pm$ 0.02 | 75.18 $\pm$ 0.05 | $+$2.57 | $+$3.54 |
| ATKT | 79.78 $\pm$ 0.07 | 82.37 $\pm$ 0.04 | $+$2.59 | $+$3.25 | 72.17 $\pm$ 0.03 | 75.28 $\pm$ 0.04 | $+$3.11 | $+$4.31 |
| SAKT | 75.90 $\pm$ 0.05 | 81.64 $\pm$ 0.03 | $+$5.74 | $+$7.56 | 71.60 $\pm$ 0.03 | 74.77 $\pm$ 0.02 | $+$3.17 | $+$4.43 |
| SAINT | 79.65 $\pm$ 0.02 | 81.50 $\pm$ 0.07 | $+$1.85 | $+$2.32 | 73.96 $\pm$ 0.02 | 75.20 $\pm$ 0.04 | $+$1.24 | $+$1.68 |
| AKT | 81.67 $\pm$ 0.03 | 83.04 $\pm$ 0.05 | $+$1.37 | $+$1.68 | 74.27 $\pm$ 0.03 | 75.49 $\pm$ 0.03 | $+$1.22 | $+$1.64 |
| simpleKT | 81.05 $\pm$ 0.06 | 82.92 $\pm$ 0.04 | $+$1.87 | $+$2.31 | 73.90 $\pm$ 0.04 | 75.46 $\pm$ 0.02 | $+$1.56 | $+$2.11 |
| sparseKT | 79.65 $\pm$ 0.11 | 82.95 $\pm$ 0.09 | $+$3.30 | $+$4.14 | 74.98 $\pm$ 0.09 | 78.96 $\pm$ 0.08 | $+$3.98 | $+$5.31 |
| Best values are in bold. The shading in green shows the magnitude of the performance gain. |  |  |  |  |  |  |  |  |

Sensitivity to the number of students: Fig. 3 shows the prediction results for each KT model under a varying number of students available for training (starting from 5 % of the actual number of students). Our KCQRL significantly improves the performance of KT models for both datasets and for all % of available training data. In general, the performance gain from our framework tends to be larger for small-student settings. For instance, the performance of DKVMN on Eedi improves by almost +6 AUC even when *only* 5 % of the actual number of students are available for training. This underscores the benefits of our KCQRL during the early phases of online learning platforms and for specialized platforms (e.g., in-house training for companies). The results for other KT models are given in Appendix E. *Takeaway:* Our framework greatly helps generalization performance, especially in low-sample size settings.

Figure: Figure 3: Improvement of our KCQRL across different training set sizes. Plots show different KT models, where, on the x-axis, we report the performance when varying the number of students in our datasets. Green area covers the improvement from our framework.
Refer to caption: x3.png

Multi-step ahead prediction: We now follow Liu et al. () and focus on the task of predicting a span of student’s responses given the history of interactions. Example: given the initial 60 % of the interactions, the task is to predict the student’s performance in the next 40 % of the exercises. We distinguish two scenarios (Liu et al., ): (a) accumulative or (b) non-accumulative manner, where (a) means that KT models makes predictions in a rolling manner (so that predictions for the $n$-outcome are used to prediction the $(n+1)$-th) and (b) means that the KT models predict all future values at once (but assume that the predictions are independent).

Fig. 4 presents the results. Overall, our KCQRL improves the performance of KT models for both datasets and for both settings. The only exception is sparseKT during the early stages of accumulative prediction on Eedi. Detailed results for other KT models are given in Appendix F. *Takeaway:* Our framework greatly improves long-term predictions of students’ learning journeys and their outcomes.

Figure: Figure 4: Improvement of our KCQRL in multi-step-ahead prediction. Plots show different KT models, where we vary the portion of observed learning history and predict the rest of the entire learning journey. Green [red] area shows the improvement [decline] from using our framework.
Refer to caption: x4.png

### 5.2 Ablation Studies

Quality of the automated KC annotation: Here, we perform an ablation for module 1 of our framework (in Sec. 3.1) where we assess the quality of the KC annotations. We compare against two ablations: (a) the original KC annotations from the dataset and (b) the annotations from our KCQRL but without leveraging the solution steps. For the ablation study, we ran our automated evaluation via a different LLM, i.e., Llama-3.1-405B (Dubey et al., ), to avoid the potential bias from using the same model as in our KC annotation.

Table 3 shows the pairwise comparison of three KC annotations (i. e., ours and two ablations) based on 5 criteria, where the LLM model is prompted to choose the best of the given two annotations for each criterion. The two key observations are: (1) Both annotations from KCQRL (i.e., with and without solution steps) are clearly preferred over the annotations from the original dataset, confirming the findings from Moore et al. (). (2) Overall, KC annotations from our full framework are preferred over the annotations without solution steps, confirming our motivation of our KC annotation. Further details and example KC annotations are in Appendix G. *Takeaway:* A large performance gain is due to module 1 where we ground the automated KC annotations in chain-of-thought reasoning.

**Table 3: Ablation study showing the relevance of automated KC annotation. We report the quality (in %) for different KC annotations.**
|  | XES3G5M | Eedi |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Criteria | Original | KCQRL w/o<br>sol. steps | Original | KCQRL | KCQRL w/o<br>sol. steps | KCQRL | Original | KCQRL w/o<br>sol. steps | Original | KCQRL | KCQRL w/o<br>sol. steps | KCQRL |
| Correctness | 33.9 | 66.1 | 6.8 | 93.2 | 15.9 | 84.1 | 44.2 | 55.8 | 25.9 | 74.1 | 27.0 | 73.0 |
| Coverage | 41.9 | 58.1 | 13.5 | 86.5 | 13.3 | 86.7 | 25.9 | 74.1 | 7.7 | 92.3 | 22.5 | 77.5 |
| Specificity | 33.5 | 66.5 | 25.5 | 74.5 | 36.0 | 64.0 | 37.0 | 63.0 | 39.2 | 60.8 | 55.8 | 44.2 |
| Ability of Integration | 40.3 | 59.7 | 12.7 | 87.3 | 12.5 | 87.5 | 34.7 | 65.3 | 20.6 | 79.4 | 25.0 | 75.0 |
| Overall | 38.6 | 61.4 | 7.8 | 92.2 | 13.1 | 86.9 | 36.7 | 63.3 | 21.2 | 78.8 | 24.1 | 75.9 |

Performance of question embeddings w/o CL: We now demonstrate the effectiveness of module 2 (defined Sec. 3.2), which is responsible for the representation learning of questions. We thus compare our framework’s embeddings against five ablations without any CL training from the same LLM encoder. These are the embeddings of (a) question content, (b) question and its KCs, (c) question and its solution steps, (d) question and its solution steps and KCs, and (e) only the KCs of a question.

Fig. 5 plots the embeddings of questions. For all five baselines, the representations of questions from the same KC are scattered very broadly. In comparison, our KCQRL is effective in bundling the questions from the same KC in close proximity as desired. *Takeaway:* This highlights the importance of our CL training in Sec. 3.2.

Fig. 6 shows the performance of KT models with these five baseline embeddings in comparison to the default implementation and our complete framework. In most cases, baseline embeddings perform better than the default implementation of KT models, which again highlights the importance of semantic representations (as compared to randomly initialized embeddings). Further, our KCQRL is consistently better than the baseline embeddings, which highlights the benefit of domain-specific representation learning. *Takeaway:* A large performance gain is from module 2, which allows our framework to capture the semantics of both questions and KCs.

Figure: Figure 5: Visualization of question embeddings. For better intuition, we chose the same question as in the example from Fig. 2, and, for each of its KCs, we color the question representations sharing the same KC. Evidently, our CL loss is highly effective.
Refer to caption: x5.png

Figure: Figure 6: Ablation studies showing the effectiveness of our representation learning. Evaluation is done across different training set sizes.
Refer to caption: x6.png

Ablations for CL training: To demonstrate the effectiveness of our CL loss, we implement the following ablations: (f) KCQRL w/o false negative elimination, whose CL loss is calculated without the blue indicator function in Eq. 2 and Eq. 4, and (g) KCQRL w/o sol. steps, whose CL loss is calculated based only on $\mathcal{L}_{\textrm{question}_{i}}$ by ignoring $\mathcal{L}_{\textrm{step}_{i}}$.

Fig. 5 shows the embeddings are better organized than the ablations with no CL training. Yet, our complete framework brings the representations of questions from the same KCs much closer together.

Fig. 7 compares the different variants of the CL loss. Here, the performance improvement from using either false negative elimination or using the representation solution steps is somewhat similar (compared to a default CL loss), but the combination of both is best. *Takeaway:* Our custom CL loss outperforms the standard CL loss by a clear margin.

Figure: Figure 7: Ablation studies showing the effectiveness of custom CL loss. Evaluation is done across different training set sizes. Here, we assess the contributions of (i) false negative elimination and (ii) representation learning of solution steps to the overall performance.
Refer to caption: x7.png

## 6 Related Work

We provide a brief summary of relevant works below. An extended related work (including representation learning and custom CL) is in Appendix A.

Knowledge tracing (KT) aims to model the temporal dynamics of students’ interactions with learning content to predict their knowledge over time (Corbett & Anderson, ). A large number of machine learning models, including deep neural networks, have been proposed for this purpose (Piech et al., ; Yeung & Yeung, ; Lee & Yeung, ; Sonkar et al., ; Long et al., ; Liu et al., ; Chen et al., ; Zhang et al., ; Yeung, ; Guo et al., ; Pandey & Karypis, ; Choi et al., ; Ghosh et al., ; Liu et al., ; Huang et al., ).

We later use all of the above-mentioned KT models in our experiments, as our KCQRL framework is designed to enhance the performance of *any* KT model. However, existing works (1) require a comprehensive mapping between knowledge concepts and questions, and (2) overlook the semantics of question content and KCs. Our KCQRL effectively addresses both limitations, which leads to performance improvements across all of the state-of-the-art KT models.

KC annotation aims to infer the KCs of a given exercise in an automated manner. (i) One research line infers KCs from students’ learning histories as latent states (e.g., Barnes, ; Cen et al., ; Liu et al., ; Shi et al., ). However, these latent states lack interpretability, limiting their use in KT. (ii) Another approach reformulates KC annotation as a classification task (e.g., Patikorn et al., ; Tian et al., ; Li et al., ; ), but this requires large annotated datasets, making it often infeasible. (iii) Recent works have also explored KC annotation in free-text form (Moore et al., ; Didolkar et al., ), but their annotations are not informed by the question’s solution steps, which we show is suboptimal in our ablations. In our work, we leverage LLMs’ reasoning abilities to generate step-by-step solutions and produce grounded KCs for each question.

## 7 Discussion

We present a novel framework for improving the effectiveness of any existing KT model: *automated knowledge concept annotation and question representation learning*, which we call KCQRL. Our KCQRL framework is carefully designed to address two key limitations of existing KT models. Limitation 1: Existing KT models require a comprehensive mapping between knowledge concepts (KCs) and questions, typically done manually by domain experts. Contribution 1: We circumvent such a need by introducing a novel, automated KC annotation module grounded in solution steps. Limitation 2: Existing KT models overlook the semantics of both questions and KCs, treating them as identifiers whose embeddings are learned from scratch. Contribution 2: We propose a novel contrastive learning paradigm to effectively learn representations of questions and KC, also grounded in solution steps. We integrate the learned representations into KT models to improve their performance. Conclusion: We demonstrate the effectiveness of our KCQRL across 15 KT models on two large real-world Math learning datasets, where we achieve consistent performance improvements.

Implications: Our framework allows even the simplest KT models to reach near state-of-the-art (SoTA) performance, suggesting that much of the existing literature may have “overfit” to the paradigm of modeling sequences based only on IDs. Future KT research can advance by focusing on sequential models “designed to” inherently understand semantics. As a first step, we release an English version of the XES3G5M dataset with full annotations, including question content, solutions, and KCs.

## Appendix A Related Work (Extended)

Knowledge tracing (KT) aims to model the temporal dynamics of students’ interactions with learning content to predict their knowledge over time (Corbett & Anderson, ). Early works in KT primarily leveraged logistic and probabilistic models (Corbett & Anderson, ; Cen et al., ; Pavlik et al., ; Käser et al., ; Vie & Kashima, ). Later, many KT works focused on deep learning-based approaches, which can loosely be grouped into different categories: (1) deep sequential models that leverage auto-regressive architectures such as RNN or LSTM (Piech et al., ; Yeung & Yeung, ; Lee & Yeung, ; Liu et al., ; Nagatani et al., ; Sonkar et al., ; Guo et al., ; Long et al., ; Shen et al., ; Chen et al., ; Liu et al., ); (2) memory augmented models to externally capture the latent states of the students during the learning process (Zhang et al., ; Abdelrahman & Wang, ; Yeung, ); (3) graph-based models that use graph neural networks to capture the interactions between knowledge concepts and questions (Nakagawa et al., ; Song et al., ; Cui et al., ); and (4) attention-based models that either employ a simple attention mechanism or transformer-based encoder-decoder architecture for modeling student interactions (Pandey & Karypis, ; Pandey & Srivastava, ; Choi et al., ; Ghosh et al., ; Huang et al., ; Im et al., ; Liu et al., ; Yin et al., ; Ke et al., ; Li et al., ).

Outside these categories, Lee et al. () fits entire history of students exercises into the context window of a language model to make predictions. Guo et al. () designs an adversarial training to have robust representations of latent states, and Zhou et al. () develops a generative model to track the knowledge states of the students. However, the existing works (1) require a comprehensive mapping between knowledge concepts and questions, and (2) overlook the semantics of questions’ content and KCs. Our KCQRL framework effectively addresses both limitations.

KC annotation aims at inferring the KCs of a given exercise in an automated manner. (i) One line of research infers KCs of questions by learning patterns from students’ learning histories in the form of latent states (e.g., Barnes, ; Cen et al., ; Liu et al., ; Shi et al., ). Yet, such latent states lack interpretability, because of which their use in KT is typically *prohibited*. (ii) Another line of research reformulates KCs annotation as a classification task, typically via model training (Patikorn et al., ; Tian et al., ) or LLM prompting (Li et al., ; ). Although these works do not require human experts at inference, they *still* require them to curate a large annotated dataset for the model to learn the task. (iii) Recent works also explored the KC annotation in free-text form (Moore et al., ; Didolkar et al., ). However, their KC annotations are *not* informed by the solution steps of the question. We show that this is *suboptimal* in our ablations.

In our work, we leverage the reasoning abilities of LLMs (Wei et al., ; Fu et al., ; Shridhar et al., ; Wang et al., ; Yu et al., ) to generate the step-by-step solution steps of a given question and therefore generate the associated KCs in a grounded manner.

Representation learning for textual data has been extensively studied in the context of LLMs. While pre-trained LLMs generate effective general-purpose semantic representations, these embeddings often turn out to be suboptimal for domain-specific tasks (Karpukhin et al., ). Through CL training, the model learns to bring the positive pairs of textual data closer together (but not the negative pairs in the embeddings).

Many works designed tailored CL losses (e.g., Oord et al., ; Chen et al., ; He et al., ; Ozyurt et al., ) to improve the representations of textual data in various domains. Examples are information retrieval (Karpukhin et al., ; Khattab & Zaharia, ; Lee et al., ; Sun et al., ; Zhu et al., ; Zhao et al., ), textual entailment (Gao et al., ; Li & Li, ; Ou & Xu, ), code representation learning (Zhang et al., ), and question answering (Yue et al., ; ). To our knowledge, we are the *first* to leverage a CL loss for the representation learning of questions specific to KT tasks.

The prevalence of *false negative* pairs can significantly degrade the quality of CL (Saunshi et al., ), as it causes semantically similar samples to be incorrectly pushed apart. To address this, several works in computer vision have proposed methods to detect and eliminate false negative pairs by leveraging the similarity of sample embeddings during training (Chen et al., ; Huynh et al., ; Yang et al., ; Sun et al., ; Byun et al., ). Different from these works, we develop a custom CL approach that is carefully designed to our task. Therein, we detect similarities between samples (i. e., KCs) in advance (e. g., Understanding of Addition vs. Ability to Perform Addition), and eliminate false negative question-KC and solution step-KC pairs during our custom CL training.

## Appendix B Dataset Details

XES3G5M (Liu et al., ): XES3G5M contains the history student exercises for 7,652 unique questions. These questions are mapped to 865 unique KCs in total. It has a total of 18,066 students’ learning histories and a total of 5,549,635 interactions for all students. Fig. 8(a) shows the distribution of interaction numbers across students. Of note, XES3G5M dataset is originally provided in Chinese, which we translated to English to make it compatible to our framework. Details are given below.

Figure: (a) XES3G5M
Refer to caption: x8.png

Translation: The original XES3G5M dataset is provided in Chinese. To make it compatible with our KCQRL framework, we first translated the question contents to English. We did the translation via Google Translate via deep-translate library in Python.

Conversion to proper question format: XES3G5M dataset contains 6,142 fill-in-the-blank style questions out of 7,652. After the translation, we manually inspected the quality of question contents and found that blanks are disappeared in the translation for fill-in-the-blank questions. For instance, one question is translated as “…There are different ways to wear it.”, which should have been “…There are ___ different ways to wear it.”

To make the fill-in-the-blank questions consistent in the dataset (and also consistent with our other dataset Eedi), We prompt GPT-4o to convert these questions to proper question phrases. For example, “…There are ___ different ways to wear it.” is converted to “…How many ways are there to wear it?”. We provide our prompt template in Appendix B.1.

Eedi (Eedi, ): Eedi contains the history student exercises for 4,019 unique questions. These questions are mapped to 1215 unique KCs in total. It has a total of 47,560 students’ learning histories and a total of 2,324,162 interactions for all students. Fig. 8(b) shows the distribution of interaction numbers across students.

### B.1 Prompt for converting XES3G5M to proper question format

Below we show our prompt to convert the fill-in-the-balnk style questions into proper question phrases.

## Appendix C KT Models Details

In our KCQRL framework, we report the performance of 15 KT algorithms on two real-world large online math learning datasets. The summary of these KT algorithms are given below:

- •
DKT (Piech et al., ): It is the first deep learning-based KT algorithm. It uses the LSTM to model the temporality in students’ learning histories. The original DKT turns each KC into a one-hot or a random vector. The recent implementation from pykt (Liu et al., ) learns the embeddings for each KC, which are then processed by an LSTM layer.
- •
DKT+ (Yeung & Yeung, ): It extends the above DKT model by a custom regularization approach. Specifically, it adds a reconstruction loss to the last exercise’s prediction. Further, it adds a regularization term to make the predictions of the same KC consistent across the time dimension.
- •
KQN (Lee & Yeung, ): It models the students’ learning histories via RNN. Further, it has an explicit neural network mechanism to capture the latent knowledge states.
- •
qDKT (Sonkar et al., ): It is a variant of DKT that learns the temporal dynamics of students’ learning processes via the questions rather than KCs.
- •
IEKT (Long et al., ): It models the students’ learning histories via a RNN. In addition, it has two additional neural network modules, namely, for student cognition and knowledge acquisition estimation.
- •
AT-DKT (Liu et al., ): It has the same model backbone as in DKT. On top of it, AT-DKT addresses two auxiliary tasks: question tagging prediction and student’s individual prior knowledge prediction.
- •
QIKT (Chen et al., ): It combines three neural network modules to model the learning processes: question-centric knowledge acquisition module via an LSTM, question-agnostic knowledge state module via another LSTM and question-centric problem solving module via a MLP.
- •
DKVMN (Zhang et al., ): It employs key-value memory networks to model the relationships between the latent concepts and output the student’s knowledge mastery of each concept.
- •
DeepIRT (Yeung, ): It incorporates the architecture of DKVMN and further leverages the item-response theory (Rasch, ) to make interpretable predictions.
- •
ATKT (Guo et al., ): It models the students learning histories via LSTM. Further, it employs an adversarial training mechanism to increase the generalization of model predictions.
- •
SAKT (Pandey & Karypis, ): It develops a simple self-attention mechanism to model the learning histories and make the prediction.
- •
SAINT (Choi et al., ): It employs a transformer-based model that is using mulitple layers of encoders and decoders to model the history of exercise information and responses.
- •
AKT (Ghosh et al., ): This model employs a monotonic attention mechanism between the exercises via exponential decay over time. It also employs Rasch model (Rasch, ) to characterize the question’s difficulty and the learner’s ability.
- •
simpleKT (Liu et al., ): As a simple but tough-to-beat baseline, this model employs and ordinary dot product as an attention mechanism to the embeddings of questions.
- •
sparseKT (Huang et al., ): On top of simpleKT, this model further introduces a sparse attention mechanism such that, for the next exercise’s prediction, the model attends to at most $K$ exercises in the past.

The implementation details of the KT models are given in Appendix D.

## Appendix D Implementation Details

Here, we explain the implementation details of each part of our KCQRL framework.

KC Annotation (Sec. 3.1): We leverage the reasoning abilities of OpenAI’s GPT-4o(^6^66https://platform.openai.com/docs/models/gpt-4o) model as our LLM $P_{\phi}(\cdot)$ at each step. We set its temperature parameter to 0 to get deterministic answers from the model. For each question in the dataset, the GPT-4o model is prompted three times in total: once for solution steps generation, once for KC annotation, and once for solution step-KC mapping. Overall, the cost is around 80 USD for XES3G5M dataset with 7,652 questions and 50 USD for Eedi dataset with 4,019 questions.

Representation learning of questions (Sec. 3.2): We train BERT (Devlin, ) as our LLM encoder $E_{\psi}(\cdot)$. For the elimination of false negative pairs, we use HDBSCAN (Campello et al., ) as the clustering algorithm $\mathcal{A}(\cdot)$. The clustering is done over the Sentence-BERT (Reimers & Gurevych, ) embeddings of KCs, which is a common practice in identifying relevant textual documents (Liu et al., ; Ozyurt et al., ). For HDBSCAN clustering, we set the minimum cluster size to 2, the minimum samples to 2, and the metric to cosine similarity between the embeddings. For CL training, we train BERT (Devlin, ) as our LLM encoder. To better distinguish three three types of inputs, i. e. question content, solution step, and KC, we introduce three new tokens [Q], [S], [KC] to be learned during the training. These new tokens are added at the beginning of the question content, solution step, and KC, respectively, during both training and inference. For all input types, we use [CLS] token’s embeddings as the embeddings of the entire input text. For the training objective, we set $\alpha=1$. Since both losses $\mathcal{L}_{\textrm{question}_{i}}$ and $\mathcal{L}_{\textrm{step}_{i}}$ are already normalized by the number of KCs and steps, our initial exploration ($\alpha$ varying from 0.2 to 5.0) indicated that setting $\alpha=1$ yields the best performance. We train the encoder for 50 epochs with the following hyperparameters: batch size = 32, learning rate = 5e-5, dropout = 0.1, and temperature (of the similarity function) = 0.1. For training $E_{\psi}(\cdot)$, we use an Nvidia Tesla A100 with 40GB GPU memory. The entire training is completed under 4 hours.

Improving KT via learned question embeddings: We adopt the following strategy to ensure a fair evaluation of KT models and their improvements via our novel KCQRL framework. We first did a grid search over the hyperparameters of each KT model (see Table D for parameters) to find the best configuration for each model. Then, we replaced the model’s embeddings with our learned question embeddings and trained/tested the KT models with the same configurations found earlier (i. e., no further grid search is applied). To ensure a fair evaluation between the KT model and in comparisons to the versions improved by our framework, we fixed their embedding dimensions to 300. As BERT embeddings’ default dimensionality is larger (i. e., 768), we just added a linear layer (no non-linear activation function is added) on top of the replaced embeddings to reduce its dimensionality to 300 to ensure that model capacities are subjected to a fair comparison. As KT models are much smaller than the LLM encoders, we now used NVIDIA GeForce RTX 3090 with 24GB GPU memory for even larger batch sizes.

Evaluation of KC-centric KT models: Some KT models (such as DKT (Piech et al., ), simpleKT (Liu et al., ), etc.) expand the sequence of questions into the sequence of KCs for both training and inference. For instance, if there are 3 questions with 2 KCs each, they transform the sequence $\{q_{1},\,q_{2},\,q_{3}\}$ into $\{c_{11},\,c_{12},\,c_{21},\,c_{22},\,c_{31},\,c_{32}\}$ and assign the labels of original questions to each of their corresponding KCs for training. This paradigm causes information leakage in the evaluation as highlighted by Liu et al. (). The reason is that, during the prediction of $c_{32}$, the label of $c_{31}$ is already given as the history, which is the same label (to be predicted) for $c_{32}$. To eliminate the information leakage, we followed the literature (Liu et al., ; ) and applied the following procedure. Consider the above example where we predict the label of $q_{3}$. (1) We provided the expanded KC sequence of earlier questions as before, i. e., $\{c_{11},\,c_{12},\,c_{31},\,c_{32}\}$. (2) We next appended $c_{31}$ and $c_{32}$ separately to the given sequence and run the predictions independently. (3) Finally, we aggregated these predictions by taking their mean and used it as the model’s final prediction. Important note: With our KCQRL framework, these KT models do not suffer the information leakage anymore, as all models learn from the sequence of questions with our improved version.

Scalability: Our novel KCQRL framework scales well to any KT model with no additional computational overhead. Specifically, our KC annotation and representation learning modules are completed independently from the KT models, and they need to run only one time in the beginning. After the embeddings are computed, they can be used in any standard KT model without impacting the models’ original runtimes.

Table: Table 4: Hyperparameter tuning of KT algorithms.

## Appendix E Sensitivity to the Number of Students

Fig. 9 demonstrates the extended prediction results for KT models with varying numbers of students available for training (starting from 5 % of the total number of students). Across all 15 KT models, our KCQRL consistently improves performance on both datasets and for all ranges of student numbers. Overall, our framework significantly enhances generalization, especially in low-sample settings. This highlights the advantages of KCQRL in the early phases of online learning platforms, where the number of students using the system is limited.

Figure: Figure 9: Improvement of our KCQRL across models and datasets with varying availability of training data. Green area covers the improvement from our framework.
Refer to caption: x10.png

## Appendix F Performance on Multi-step ahead Prediction Task

Fig. 10 demonstrates the extended prediction results for KT models for multi-step ahead prediction task with both scenarios: (a) accumulative and (b)  non-accumulative prediction. Of note, we excluded IEKT from this task due to its slow inference. As described in the implementation details (Appendix D), our KCQRL does not affect the models’ original runtimes, so the slow inference is solely attributed to IEKT’s original implementation.

Across 14 KT models, our KCQRL improves the prediction performance for both datasets and for both settings. The only exception is sparseKT during the early stages of accumulative prediction on Eedi. As a result, our framework greatly improves long-term predictions of students’ learning journeys and their outcomes.

Figure: Figure 10: Improvement of our KCQRL across models and datasets in multi-step ahead prediction scenario. Green [red] area covers the improvement [decline] from our framework.
Refer to caption: x11.png

## Appendix G Quality of Automated KC Annotation

In this section, we provide the details how we evaluate the quality of our KCQRL’s KC annotations as part of our ablation study in Sec. 5.2. For this, we compared our annotations against two baselines: (1) KC annotations from the original datasets and (2) KC annotations of our KCQRL without leveraging the solution steps.

We picked 1,000 random questions from each dataset, XES3G5M and Eedi. We used Llama-3.1-405B (Dubey et al., ) for the evaluations of these questions. Here, we chose a Llama-based model instead of GPT-based models (e. g., GPT-4o) to prevent the potential bias of GPT models towards their own generations, as we already used GPT-4o for our KC annotations earlier.

For a structured comparison, we introduce the following five criteria. (1) Correctness measure which annotation has correct KC(s), relative to the other annotations. (2) Coverage is an evaluation criterion for questions with multiple KCs. It measures how well the KCs from an annotation cover the set of KCs that the question is associated with. (3) Specificity compares which annotation has a more modular set of KCs rather than long and complicated ones. Of note, modular and simpler KCs enable identifying the common skills required for different questions. (4) We additionally defined ability of integration to evaluate how well the described KCs are widely applicable to other Math problems, beyond the question being solved. (5) Finally, overall is about choosing the best KC annotation by considering all criteria.

As explained in Sec. 5.2, we made a pair-wise comparison between KC annotations: (i) original vs. KCQRL w/o sol. steps; (ii) original vs. KCQRL,; and (iii) KCQRL w/o sol. steps vs. KCQRL. To eliminate any potential bias from the order of KC annotations in the prompt, we randomly assigned KC annotations to groups A and B. Our prompt is given in Appendix G.2.

### G.1 Example KC Annotations

Here, we build upon our example question from Fig. 2 and provide the KC annotations of two baselines and our framework.

Question: $65\cdot 34+65\cdot 45+79\cdot 35=?$

Solution steps: Below is the extended version of the solution steps, provided by our framework:

- •
First, factor out the common factor from the first two terms, which is 65. So, the expression becomes $65\times(34+45)+79\times 35$.
- •
Next, simplify the addition inside the parentheses: $34+45=79$. So, the expression now is $65\times 79+79\times 35$.
- •
Notice that 79 is a common factor in both terms, so factor it out: $79\times(65+35)$.
- •
Simplify the addition inside the parentheses: $65+35=100$. So, the final result is $79\times 100=7900$.

For the above Math question, the KC annotations are the following:

$\bullet$ Original from the dataset: (a) Extracting common factors of integer multiplication (ordinary type).

$\bullet$ KCQRL w/o solution steps: (a) Understanding of addition, and (b) Ability to perform multiplication.

$\bullet$ Our complete KCQRL framework: (a) Understanding of multiplication, (b) Understanding of addition, c) Factoring out a common factor, (d) Simplifications of expressions, and (e) Distributive property.

$\Rightarrow$ *Takeaway:* The original KC annotation is just one phrase with complex combinations of multiple KCs. It is also missing out some KCs such as addition and simplifications of expressions. On the other hand, KC annotations of KCQRL w/o solution steps are missing the important techniques asked by the problem, such as extracting the common factor. The reason is that this technique is hidden in the solution steps, which thus need to be provided for a better KC annotation. Overall, our complete framework correct set of KCs with better coverage and in a modular way in comparison to two baseline annotations.

### G.2 Prompt for Quality Comparison of KC Annotations

Below is the prompt for comparing the qualities of different KC annotations via LLMs.

## Appendix H Prompts for KC Annotation via LLMs

Our framework leverages the reasoning abilities of LLMs to annotate the KCs of each question in a grounded manner, which is at the core of our Module 1: KC annotation via LLMs (Sec. 3.1). This is done in three steps. Below, we provide the prompts for each step in order.

### H.1 Solution step generation

As the first step, our framework generates the solution steps for the given question. The prompt is given below.

### H.2 KC Annotation

For the given question and its generated solution steps from the earlier part, our KCQRL framework annotates the KCs in a grounded manner. The prompt of this step is given below.

### H.3 Solution Step-KC Mapping

As the final part, our framework maps each solution step to its associated KCs for a given question. This step is particularly needed for Module 2 of our framework: representation learning of questions (Sec. 3.2). The prompt of this step is given below.

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: The one clarification question I had was regarding if KCs are generally taken from a SME-generated taxonomy and this is relying on (instruction-constrained, but still open-ended) LLM generation. If there is a fixed taxonomy, it would be interesting to see references and/or summary statistics. For the LLM generated cases, it would be interesting to see the statistics of this generated set (e.g., unique labels, perplexity). Clarifying my understanding would be helpful.

The second question is any discussion regarding additional education domains, simpler embeddings, and lower-power LLMs. I don't expect full experiments, but any additional information would be helpful.
soundness: 3
strengths: This is primarily an applied research submission as it relies on both SotA LLM capabilities (i.e., CoT, knowledge concept generation) within the target domain and existing methods for representation learning with contrastive learning (albeit with domain specific considerations). As previously stated, I think the authors make a convincing case in establishing SotA for the KT setting.

From an originality perspective: (1) other than the task specification and benchmark datasets, there is ostensibly significant methodological innovation within this domain and (2) from a ML/NLP perspective, there is very limited originality; the LLM prompts are relatively straightforward and the contrastive learning procedure follows from a relatively standard 'cookbook'. However, the existing methods are applied correctly, perform well, and introduce new methods to this domain.

From a quality perspective, overall the formulation is well-motivated, conceptually sensible, and performs well. Again, as an applied piece of research, I am convinced that this is advancing the SotA for knowledge tracing. Additionally, the developed methods produce advancements that apply to many existing KT systems (and likely future KT systems) -- and show consistent improvements when applied to existing systems. The 'secondary' experiments are solid from the perspective of supporting the chosen models (e.g., contrastive learning) and answering practical questions with respect to deployment (e.g., number of students in training).

Regarding clarity, the paper is well-motivated, rigorously presented, and easy to understand. The figures are clear overall and any ambiguities can be clarified by the prompts in the appendices. The discussion of experimental results highlights the key findings and makes specific references to table to help the reader focus on the most important quantifications.

Regarding significance, I am not an expert in education, but am convinced that this is a successful application of LLMs to this domain and a notable improvement in performance for the KT task.
summary: The authors address two primary shortcomings of existing work on knowledge tracing (KT): (1) mapping questions to knowledge concepts (KCs) being evaluated (I believe from a KC taxonomy defined by subject-matter experts) and (2) a lack of pre-trained embeddings for questions aligned with KCs when applying to KT systems. Methodologically, (1) is addressed by using a SotA LLM to produce a chain-of-thought (CoT)-based answer to a given question and annotate each step with automatically generated KCs and (2) is addressed through a contrastive learning approach to producing questions embeddings that align questions and reasoning steps with KCs produced in (1). Since the learned embeddings are application and not system specific (i.e., it is designed for this task, but not a specific KT model), they can be used as pre-trained embeddings for KT tasks. Accordingly, the authors experiment with adding these to 15 recent KT models with two widely used benchmarks for predicting student response from a sequence of retrospective student interactions, showing consistent improvements over the baseline implementations. Secondary results are provided for the amount of training data (the proposed system needs to see fewer student training examples), quality of the automated KC annotations (generated KCs are better than default annotations as evaluated by a LLM), and the value of the proposed contrastive learning procedure (it is better than embedding generation alternatives). Overall, the authors make a convincing case that the proposed improvements utilizing SotA LLMs advance the SotA for KT problems.
weaknesses: Conversely, below are some of my concerns with this paper:
- From an applied perspective, the experiments are conducted on mathematical reasoning datasets. Since this work is heavily dependent on CoT and KC annotation, it isn't clear that it would work for other domains (e.g., physics, history, etc. -- lines 168-169).
- From a methods perspective, there are limited experiments (e.g., simpler embeddings as a baseline, variety in LLM quality). These aren't mandatory from an applied perspective, but would possible broaden the interest of the paper (which is another potential weakness).
- I am not an education expert, but I am guessing that evaluating KCs with another LLM isn't the standard evaluation procedure. This isn't a big deal since the primary goal of the paper is improving KT results. However, some human-in-the-loop evaluation would help strengthen this specific evaluation.

---

confidence: 5
contribution: 1
initial_rating: 3
presentation: 3
questions: N/A
soundness: 1
strengths: 1. Traditional methods are more like a sequential prediction task which ignores the semantic information in both Qs and KCs. This paper leverages the power of LLMs to automatically annotate the KCs for each question, and learn a better question embedding guided by the contrastive learning.
2. Figures are well-drawn for readers to follow.
3. Extensive experiments are conducted to support the claim and the importance of question embedding.
summary: In this paper, authors bridge the gap by emphasizing the importance of learning question embeddings and propose to automatically annotate the knowledge concepts by using BERT. The idea is somehow recognized, however, the design of both components is not satisfactory. I have commented below with some suggestions for further improvements.
weaknesses: * The authors claim to have a careful negative sampling in this paper to avoid false negatives for contrastive learning. However, the auto-annotation is generated by LLMs which is difficult to control for a consistent and high-quality output all the time. There will definitely be noise introduced or similar concepts annotated in different ways during the annotation which may greatly decrease the performance during semantic learning.
> Authors cluster the similar KCs in the same cluster to reduce the impacts, however, this will still definitely affect the learning performance since they are indeed different KCs in the data level. 

> Reversely, I suggest to carefully clean the annotation by asking LLMs to bootstrap a pool or seed bank for standardized KC candidates. Each time, a new KC will be verified with the seeds we already have to avoid chaos, and a checked new one will be added into the bank.

* The design of question embedding is partially recognized for its advantages. However, there is totally nothing to do with the Student history! Seems like authors are just considering them as labels. This is a big problem where in KT tasks, student interactions are very important to guide the personalized prediction based on his/her historical performance. But in this paper, authors completely abandon the semantic or sequence guidance from student histories, which is one of the biggest problems here.

* The notations are confusing, both student and s solution steps are represented as 's'.

* BERT is not an LLM at all. The title is mis-claimed.

---

confidence: 2
contribution: 3
initial_rating: 6
presentation: 3
questions: - How does KCQRL handle ambiguous or multi-topic questions that might not map clearly to a single KC?
- What steps, if any, are planned to improve interpretability of the model’s embeddings, especially with similar or overlapping KCs? 
- How does KCQRL adapt when LLMs used for KC annotations become outdated or unavailable?
soundness: 3
strengths: - The proposed framework’s use of LLMs for KC annotation reduces dependency on manual input, potentially streamlining the annotation process. KCQRL is presented as a flexible solution that can enhance multiple KT models. 

- The experimental results across various KT models demonstrate consistent performance gains, supporting the efficacy of integrating semantic embeddings.

- The framework shows potential for low-sample settings, which could benefit platforms with limited data.
summary: This paper proposes a framework named KCQRL, designed to address key limitations in traditional knowledge tracing (KT) models. KT models typically require extensive manual annotation of knowledge concepts (KCs) and often overlook the semantic content of questions. KCQRL introduces automated KC annotation using large language models (LLMs) and employs contrastive learning to create semantically rich question representations. The framework is intended to integrate seamlessly with existing KT models, enhancing performance on prediction tasks across datasets.
weaknesses: - The quality of KC annotations and question representations is heavily influenced by the LLM used. Reporting the effects of using different LLMs would provide insights into the adaptability of the proposed method. For example, instead of using GPT-4o, employing domain-specific LLMs might enhance the performance? 

- The framework's heavy reliance on contrastive learning to handle false negatives might reduce model interpretability, particularly when working with similar KCs. 

- Experiments focus solely on two math-focused datasets, making it unclear how well KCQRL would generalize to other subject areas or to question types that are more complex, such as open-ended responses.

Meta-review: Summary:

This paper presents KCQRL, a framework for automated knowledge concept (KC) annotation and question representation learning to improve the effectiveness of any existing knowledge tracing (KT) model. It proposes an automated KC annotation process using large language models (LLMs), which generates question solutions and then annotates KCs in each solution step of the questions. Then it introduces a contrastive learning approach to generate semantically rich embeddings for questions and solution steps, aligning them with their associated KCs via a tailored false negative elimination approach. These embeddings can be readily integrated into existing KT models, replacing their randomly initialized embeddings. The paper demonstrates the effectiveness of KCQRL across 15 KT algorithms on two large real-world Math learning datasets. 

Strengths:

Reviewers generally agree that the paper is well motivated, well presented, and easy to understand. The authors conducted extensive experiments to support the claims on the focused settings. 

Weaknesses:

After rebuttal, the following weaknesses still exist:

It is a complete piece of work, but methodological advancements are incremental (Reviewer Mphq, h76s). Focus and experimental scope are a bit narrow, and it is less clear how the proposed framework would work for other domains (Reviewer Mphq, NywH).

Decision: Reject