Papers
Topics
Authors
Recent
Search
2000 character limit reached

LDSim: LLM Distillation-based QA Simulator

Updated 10 July 2026
  • LDSim is a QA simulator that distills LLM’s knowledge and reasoning into a lightweight student model to predict correct responses using simulated student histories.
  • It integrates knowledge distillation and reasoning distillation modules with a graph attention network to construct a hierarchical concept-question graph for enhanced simulation.
  • Empirical results show significant performance and efficiency improvements over both LLM-free and LLM-based baselines for multi-step and single-step predictions.

LLM Distillation based Simulator (LDSim) is a question-answering (QA) simulator introduced to mimic real student learning behaviors and predict the correctness of responses to questions given a student’s QA history. In the formulation of "Constructing a Question-Answering Simulator through the Distillation of LLMs" (Liu et al., 11 Sep 2025), LDSim targets both multi-step QA simulation for Educational Recommender Systems (ERS) and single-step knowledge tracing (KT), and is designed to bridge two existing categories of solutions: LLM-free sequential models, which offer fast inference but generally yield suboptimal performance, and LLM-based methods, which leverage domain knowledge and reasoning capability of LLMs but incur slower inference speed and higher GPU memory consumption.

1. Problem setting and motivation

A QA simulator predicts whether a student will answer upcoming questions correctly. Let uUu \in \mathcal{U} be a student, qQq \in \mathcal{Q} a question, cCc \in \mathcal{C} a concept, and xiu=(qi,Ci,ri)x_i^u = (q_i, \mathcal{C}_i, r_i) the QA record at step ii, with ri{0,1}r_i \in \{0,1\}. The student’s history up to time tt is Htu={(x1u,,xtu)}H_t^u = \{(x_1^u,\ldots,x_t^u)\}. For a sequence of upcoming questions qt+1:t+nq_{t+1:t+n} with associated concept sets Ct+1:t+n\mathcal{C}_{t+1:t+n}, the simulator predicts multi-step correctness as

qQq \in \mathcal{Q}0

During interaction with ERS, future correctness labels are unknown, so the simulator conditions on its own previous predictions, thereby simulating student behavior with partially synthetic histories. In the single-step KT formulation, LDSim effectively models

qQq \in \mathcal{Q}1

with the shorthand

qQq \in \mathcal{Q}2

where qQq \in \mathcal{Q}3 is the latent state induced by qQq \in \mathcal{Q}4.

The motivation is tied directly to ERS training. QA simulators enable ERS to collect large amounts of training data without interacting with real students, thereby preventing harmful recommendations made by an undertrained ERS from undermining actual student learning. Within this setting, prior LLM-free KT models encode sequences of question IDs, concept IDs, and correctness labels into a hidden state, but typically underuse semantics and concept relations. Prior LLM-based predictors achieve stronger accuracy by exploiting domain knowledge and reasoning, but are impractical for real-time ERS training because inference is slow and memory-heavy. LDSim addresses this trade-off by distilling domain knowledge and reasoning from a teacher LLM into a lightweight student simulator.

2. Distillation of domain knowledge and reasoning

LDSim consists of a Knowledge Distillation (KD) module, a Reasoning Distillation (RD) module, and a Simulation (SiM) module. The KD module extracts the LLM’s world knowledge on prerequisite relations among concepts in order to build a concept relation graph. The procedure is two-stage. First, for concepts qQq \in \mathcal{Q}5 and qQq \in \mathcal{Q}6, the LLM assesses whether they are related using a prompt template qQq \in \mathcal{Q}7: qQq \in \mathcal{Q}8 The method swaps positions qQq \in \mathcal{Q}9 to reduce generation randomness. If both cCc \in \mathcal{C}0 and cCc \in \mathcal{C}1, the system asks whether cCc \in \mathcal{C}2 is a prerequisite of cCc \in \mathcal{C}3: cCc \in \mathcal{C}4 It again swaps the roles of cCc \in \mathcal{C}5 to capture asymmetric prerequisites. The resulting concept relation graph is cCc \in \mathcal{C}6, where cCc \in \mathcal{C}7 and cCc \in \mathcal{C}8 if cCc \in \mathcal{C}9; the edge xiu=(qi,Ci,ri)x_i^u = (q_i, \mathcal{C}_i, r_i)0 indicates that xiu=(qi,Ci,ri)x_i^u = (q_i, \mathcal{C}_i, r_i)1 is a prerequisite of xiu=(qi,Ci,ri)x_i^u = (q_i, \mathcal{C}_i, r_i)2 (Liu et al., 11 Sep 2025).

The RD module distills the LLM’s ability to reason about a student’s mastery on concepts at each time step. Given the full QA record sequence xiu=(qi,Ci,ri)x_i^u = (q_i, \mathcal{C}_i, r_i)3, the KD graph xiu=(qi,Ci,ri)x_i^u = (q_i, \mathcal{C}_i, r_i)4, and aggregate statistics such as question and concept correct rates, a prompt template xiu=(qi,Ci,ri)x_i^u = (q_i, \mathcal{C}_i, r_i)5 asks the LLM to infer the student’s average mastery over the concepts in xiu=(qi,Ci,ri)x_i^u = (q_i, \mathcal{C}_i, r_i)6 at step xiu=(qi,Ci,ri)x_i^u = (q_i, \mathcal{C}_i, r_i)7, returning xiu=(qi,Ci,ri)x_i^u = (q_i, \mathcal{C}_i, r_i)8: xiu=(qi,Ci,ri)x_i^u = (q_i, \mathcal{C}_i, r_i)9 Here ii0 is an LLM “credit score.” This produces a distilled dataset for actual QA records,

ii1

To enrich coverage of concepts beyond those actually answered, LDSim adds pseudo QA (PQA) augmentation. For each step ii2, it selects ii3 random questions ii4 and prompts the LLM to infer mastery even though correctness is unknown: ii5 This better distills the teacher’s reasoning across a broader concept set.

The teacher LLM used for both knowledge and reasoning signals is GLM-4-Flash. A common misconception is to treat LDSim as a standard logit-matching KD system. In the paper’s formulation, the distilled signals are not teacher logits but a concept prerequisite graph ii6, stepwise mastery scores ii7, and associated credit scores ii8.

3. Simulation module and latent-state construction

The Simulation module is the lightweight student network that consumes the distilled concept graph and mastery signals to predict correctness quickly and accurately. It constructs a hierarchical concept-question graph ii9 with nodes ri{0,1}r_i \in \{0,1\}0. Edges include the concept–concept prerequisites ri{0,1}r_i \in \{0,1\}1 from KD and concept–question edges when a concept ri{0,1}r_i \in \{0,1\}2 is covered by a question ri{0,1}r_i \in \{0,1\}3. A Graph Attention Network (GAT) encodes the graph: ri{0,1}r_i \in \{0,1\}4 where ri{0,1}r_i \in \{0,1\}5, ri{0,1}r_i \in \{0,1\}6, and ri{0,1}r_i \in \{0,1\}7 is the embedding dimension.

Each concept ri{0,1}r_i \in \{0,1\}8 is contextualized with historical student statistics. Let ri{0,1}r_i \in \{0,1\}9 denote the student’s historical correct rate on tt0, and tt1 the number of attempts. LDSim computes

tt2

where tt3 and tt4 are linear layers, tt5 is concatenation, and tt6 is multi-head attention. The contextual concept embeddings covered at step tt7 are then aggregated as

tt8

The QA history is encoded into a learning state tt9. Let Htu={(x1u,,xtu)}H_t^u = \{(x_1^u,\ldots,x_t^u)\}0 be the global correct rate of question Htu={(x1u,,xtu)}H_t^u = \{(x_1^u,\ldots,x_t^u)\}1 estimated from training data, and let Htu={(x1u,,xtu)}H_t^u = \{(x_1^u,\ldots,x_t^u)\}2 be a linear layer: Htu={(x1u,,xtu)}H_t^u = \{(x_1^u,\ldots,x_t^u)\}3

Distilled reasoning enters the student through a mastery head. LDSim maps Htu={(x1u,,xtu)}H_t^u = \{(x_1^u,\ldots,x_t^u)\}4 to a discrete mastery level distribution via Htu={(x1u,,xtu)}H_t^u = \{(x_1^u,\ldots,x_t^u)\}5, defined as an MLP followed by softmax over Htu={(x1u,,xtu)}H_t^u = \{(x_1^u,\ldots,x_t^u)\}6 levels: Htu={(x1u,,xtu)}H_t^u = \{(x_1^u,\ldots,x_t^u)\}7 Correctness prediction then fuses the learning state, mastery embedding, and question embedding: Htu={(x1u,,xtu)}H_t^u = \{(x_1^u,\ldots,x_t^u)\}8 With binary labels, Htu={(x1u,,xtu)}H_t^u = \{(x_1^u,\ldots,x_t^u)\}9.

This design makes the latent learning state explicitly dependent on concept semantics, concept-question coverage, and historical performance signals. The use of a hierarchical concept-question graph is central: the graph injects prerequisite relations distilled from the teacher LLM into the student model’s representation space.

4. Optimization, training schedule, and preprocessing

LDSim’s student losses do not use KL distillation or temperature scaling. Instead, the system directly regresses mastery and trains correctness prediction with binary cross-entropy plus an auxiliary mastery-level alignment term. In stage 1, the model optimizes mastery regression: qt+1:t+nq_{t+1:t+n}0 applied over both qt+1:t+nq_{t+1:t+n}1 and qt+1:t+nq_{t+1:t+n}2. In stage 2, the model optimizes

qt+1:t+nq_{t+1:t+n}3

where

qt+1:t+nq_{t+1:t+n}4

and

qt+1:t+nq_{t+1:t+n}5

The qt+1:t+nq_{t+1:t+n}6 term encourages consistency of the sampled mastery level when the prediction matches ground truth. Training proceeds in two stages for stability: first optimize qt+1:t+nq_{t+1:t+n}7, then optimize qt+1:t+nq_{t+1:t+n}8.

The training pipeline has three parts. In the KD pipeline, every concept pair qt+1:t+nq_{t+1:t+n}9 is assessed for relevance twice with swapped order, and mutually relevant pairs are further queried for prerequisite relations in both directions. In the RD pipeline, each QA sequence is prompted with Ct+1:t+n\mathcal{C}_{t+1:t+n}0, the full sequence Ct+1:t+n\mathcal{C}_{t+1:t+n}1, and aggregate statistics to obtain per-step mastery Ct+1:t+n\mathcal{C}_{t+1:t+n}2 and credit Ct+1:t+n\mathcal{C}_{t+1:t+n}3, producing Ct+1:t+n\mathcal{C}_{t+1:t+n}4 and Ct+1:t+n\mathcal{C}_{t+1:t+n}5. Student training then applies the two-stage optimization described above (Liu et al., 11 Sep 2025).

The reported hyperparameters are embedding dimension Ct+1:t+n\mathcal{C}_{t+1:t+n}6, attention head count in history-attention Ct+1:t+n\mathcal{C}_{t+1:t+n}7, Adam optimizer with learning rate Ct+1:t+n\mathcal{C}_{t+1:t+n}8, multi-step simulation horizon Ct+1:t+n\mathcal{C}_{t+1:t+n}9, and qQq \in \mathcal{Q}00 in stage 2. The mastery-level embedding size qQq \in \mathcal{Q}01 is not enumerated in the paper and is implemented as an embedding table.

Data preprocessing fixes the maximum QA history length per student at 200. Students with fewer than 50 records are removed for Assist09, and students with fewer than 100 records are removed for the other datasets. The train/validation/test split is qQq \in \mathcal{Q}02. Extracted features include per-student concept-level historical correct rates and attempt counts, global question correct rates, concept coverage per question, and timestamps implicit in sequence order.

5. Benchmarks, baselines, and empirical performance

The evaluation uses four datasets. Junyi contains 2,525,877 QA records, 9,879 students, 9,811 questions, and 574 concepts, with max concepts per question qQq \in \mathcal{Q}03 and positive label rate qQq \in \mathcal{Q}04. Assist09 contains 258,461 records, 2,186 students, 12,625 questions, and 139 concepts, with max concepts per question qQq \in \mathcal{Q}05 and positive label rate qQq \in \mathcal{Q}06. Assist12 contains 825,548 records, 5,183 students, 15,575 questions, and 103 concepts, with max concepts per question qQq \in \mathcal{Q}07 and positive label rate qQq \in \mathcal{Q}08. Algebra (KDD Cup 2010) contains 989,189 records, 5,047 students, 13,994 questions, and 692 concepts, with max concepts per question qQq \in \mathcal{Q}09 and positive label rate qQq \in \mathcal{Q}10.

The baselines span both LLM-free and LLM-based methods. LLM-free KT or simulator baselines are DKT, AKT, ATKT, SAKT, Deep-IRT, DisKT, and DSim. LLM-based baselines are LLM-KT, Agent4Edu, and SINKT. The predictive metrics are Accuracy (ACC) and AUC, while the computational metrics are inference time in seconds and GPU memory in MB for simulating the last 30 steps of a student with a 200-record history.

For multi-step simulation with 30-step horizon, LDSim reports the following results. On Junyi, LDSim reaches ACC qQq \in \mathcal{Q}11 and AUC qQq \in \mathcal{Q}12, versus best baseline SINKT with ACC qQq \in \mathcal{Q}13 and AUC qQq \in \mathcal{Q}14, corresponding to qQq \in \mathcal{Q}15 ACC and qQq \in \mathcal{Q}16 AUC. On Assist09, LDSim reaches ACC qQq \in \mathcal{Q}17 and AUC qQq \in \mathcal{Q}18, versus SINKT at ACC qQq \in \mathcal{Q}19 and AUC qQq \in \mathcal{Q}20, corresponding to qQq \in \mathcal{Q}21 ACC and qQq \in \mathcal{Q}22 AUC. On Assist12, LDSim reaches ACC qQq \in \mathcal{Q}23 and AUC qQq \in \mathcal{Q}24, versus SINKT at ACC qQq \in \mathcal{Q}25 and AUC qQq \in \mathcal{Q}26, corresponding to qQq \in \mathcal{Q}27 ACC and qQq \in \mathcal{Q}28 AUC. On Algebra, LDSim reaches ACC qQq \in \mathcal{Q}29 and AUC qQq \in \mathcal{Q}30, versus SINKT at ACC qQq \in \mathcal{Q}31 and AUC qQq \in \mathcal{Q}32, corresponding to qQq \in \mathcal{Q}33 ACC and qQq \in \mathcal{Q}34 AUC. All LDSim wins indicated with “qQq \in \mathcal{Q}35” have qQq \in \mathcal{Q}36-value qQq \in \mathcal{Q}37 (Liu et al., 11 Sep 2025).

For single-step KT, LDSim reports ACC qQq \in \mathcal{Q}38 and AUC qQq \in \mathcal{Q}39 on Junyi, versus SINKT with ACC qQq \in \mathcal{Q}40 and AUC qQq \in \mathcal{Q}41. On Assist09, LDSim reports ACC qQq \in \mathcal{Q}42 and AUC qQq \in \mathcal{Q}43, versus SINKT with ACC qQq \in \mathcal{Q}44 and AUC qQq \in \mathcal{Q}45. On Assist12, LDSim reports ACC qQq \in \mathcal{Q}46 and AUC qQq \in \mathcal{Q}47, versus AKT with ACC qQq \in \mathcal{Q}48 and AUC qQq \in \mathcal{Q}49. On Algebra, LDSim reports ACC qQq \in \mathcal{Q}50 and AUC qQq \in \mathcal{Q}51, versus AKT with ACC qQq \in \mathcal{Q}52 and AUC qQq \in \mathcal{Q}53. The observed trend is that single-step prediction is easier than multi-step simulation due to lack of error accumulation.

6. Ablation, efficiency, limitations, and broader LDSim usage

The ablation study isolates the effects of KD and RD. In the w/o KD condition, the LLM-derived qQq \in \mathcal{Q}54 is replaced with a fully connected concept graph, and performance drops modestly. In the w/o RD condition, the LLM-generated mastery is removed and stage-1 training is skipped, and performance drops substantially. The paper’s key observation is that both KD and RD contribute positively, with RD being the dominant source of gains. KD still helps, but some world knowledge may already be indirectly captured via mastery signals, making KD’s marginal effect smaller. A case study reports that KD produces meaningful concept relations, such as “Area Parallelogram” as a prerequisite for “Surface Area of Prism,” and that post-training embeddings reflect distilled structure because correlated concept embeddings are closer than uncorrelated ones (Liu et al., 11 Sep 2025).

The efficiency comparison is reported for predicting the last 30 steps for one student with a 200-record history. LLM-KT requires 170.24 s and 2338.01 MB. Agent4Edu requires 3117.62 s, with memory unavailable because it is API-based. SINKT requires 12.30 s and 66.43 MB. LDSim requires 0.73 s and 170.28 MB. The reported speedups are approximately qQq \in \mathcal{Q}55 versus LLM-KT, qQq \in \mathcal{Q}56 versus Agent4Edu, and qQq \in \mathcal{Q}57 versus SINKT. The discussion attributes this to lightweight graph-attention and attention encoders that yield near-real-time inference suitable for ERS training and online deployments.

The limitations are also explicit. The prerequisite graph and mastery signals inherit LLM biases and nondeterminism. The paper mitigates this by symmetric prompting but does not apply self-consistency or majority voting. Domain shift may make distilled knowledge noisy if the concept taxonomy or question phrasing is out-of-domain for the teacher LLM. LDSim does not distill chain-of-thought rationales; only mastery scalars and graph structure are used. Explicit calibration is not explored, although the paper notes that improved calibration could benefit downstream ERS policies. Ethics and privacy are discussed in terms of aggregate performance statistics, textual concept descriptions, and the need for privacy-preserving distillation and fairness across subpopulations.

Reproducibility is supported through a public code repository and a concise implementation summary: a student simulator with GAT over a hierarchical concept-question graph, attention encoders for concept context and history, a mastery-level head and classifier, MLP prediction, two-stage training with Stage 1 on MSE mastery regression and Stage 2 on BCE plus qQq \in \mathcal{Q}58, Adam with qQq \in \mathcal{Q}59, qQq \in \mathcal{Q}60, single-head history attention, GLM-4-Flash as teacher LLM, data split qQq \in \mathcal{Q}61, maximum history length qQq \in \mathcal{Q}62, short-history filtering, and simulation horizon qQq \in \mathcal{Q}63.

Beyond educational QA simulation, the label or framing of an LLM Distillation based Simulator appears in other arXiv work as a broader pattern rather than a single architecture. "LLM-Powered User Simulator for Recommender System" frames an LLM-powered recommender simulator as an LDSim in which ChatGLM-6B distills interpretable pros/cons and category predicates into logical models and a SASRec-based statistical component (Zhang et al., 2024). "Can Low-Rank Knowledge Distillation in LLMs be Useful for Microelectronic Reasoning?" presents design guidance for an LDSim built from LoRA-KD with a Llama-2-70B teacher and Llama-2-7B student for offline microelectronic reasoning (Rouf et al., 2024). "SiliconMind-V1: Multi-Agent Distillation and Debug-Reasoning Workflows for Verilog Code Generation" maps a multi-agent reasoning-and-verification pipeline into an LDSim blueprint centered on verified training tuples and testbench-driven debugging (Chen et al., 10 Feb 2026). This suggests that, in current usage, “LDSim” may denote a family of systems in which LLM-derived knowledge or reasoning is distilled into a more efficient simulator or student model, while the specific architecture remains task-dependent.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to LLM Distillation based Simulator (LDSim).