LDSim: LLM Distillation-based QA Simulator
- 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 be a student, a question, a concept, and the QA record at step , with . The student’s history up to time is . For a sequence of upcoming questions with associated concept sets , the simulator predicts multi-step correctness as
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
1
with the shorthand
2
where 3 is the latent state induced by 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 5 and 6, the LLM assesses whether they are related using a prompt template 7: 8 The method swaps positions 9 to reduce generation randomness. If both 0 and 1, the system asks whether 2 is a prerequisite of 3: 4 It again swaps the roles of 5 to capture asymmetric prerequisites. The resulting concept relation graph is 6, where 7 and 8 if 9; the edge 0 indicates that 1 is a prerequisite of 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 3, the KD graph 4, and aggregate statistics such as question and concept correct rates, a prompt template 5 asks the LLM to infer the student’s average mastery over the concepts in 6 at step 7, returning 8: 9 Here 0 is an LLM “credit score.” This produces a distilled dataset for actual QA records,
1
To enrich coverage of concepts beyond those actually answered, LDSim adds pseudo QA (PQA) augmentation. For each step 2, it selects 3 random questions 4 and prompts the LLM to infer mastery even though correctness is unknown: 5 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 6, stepwise mastery scores 7, and associated credit scores 8.
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 9 with nodes 0. Edges include the concept–concept prerequisites 1 from KD and concept–question edges when a concept 2 is covered by a question 3. A Graph Attention Network (GAT) encodes the graph: 4 where 5, 6, and 7 is the embedding dimension.
Each concept 8 is contextualized with historical student statistics. Let 9 denote the student’s historical correct rate on 0, and 1 the number of attempts. LDSim computes
2
where 3 and 4 are linear layers, 5 is concatenation, and 6 is multi-head attention. The contextual concept embeddings covered at step 7 are then aggregated as
8
The QA history is encoded into a learning state 9. Let 0 be the global correct rate of question 1 estimated from training data, and let 2 be a linear layer: 3
Distilled reasoning enters the student through a mastery head. LDSim maps 4 to a discrete mastery level distribution via 5, defined as an MLP followed by softmax over 6 levels: 7 Correctness prediction then fuses the learning state, mastery embedding, and question embedding: 8 With binary labels, 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: 0 applied over both 1 and 2. In stage 2, the model optimizes
3
where
4
and
5
The 6 term encourages consistency of the sampled mastery level when the prediction matches ground truth. Training proceeds in two stages for stability: first optimize 7, then optimize 8.
The training pipeline has three parts. In the KD pipeline, every concept pair 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 0, the full sequence 1, and aggregate statistics to obtain per-step mastery 2 and credit 3, producing 4 and 5. Student training then applies the two-stage optimization described above (Liu et al., 11 Sep 2025).
The reported hyperparameters are embedding dimension 6, attention head count in history-attention 7, Adam optimizer with learning rate 8, multi-step simulation horizon 9, and 00 in stage 2. The mastery-level embedding size 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 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 03 and positive label rate 04. Assist09 contains 258,461 records, 2,186 students, 12,625 questions, and 139 concepts, with max concepts per question 05 and positive label rate 06. Assist12 contains 825,548 records, 5,183 students, 15,575 questions, and 103 concepts, with max concepts per question 07 and positive label rate 08. Algebra (KDD Cup 2010) contains 989,189 records, 5,047 students, 13,994 questions, and 692 concepts, with max concepts per question 09 and positive label rate 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 11 and AUC 12, versus best baseline SINKT with ACC 13 and AUC 14, corresponding to 15 ACC and 16 AUC. On Assist09, LDSim reaches ACC 17 and AUC 18, versus SINKT at ACC 19 and AUC 20, corresponding to 21 ACC and 22 AUC. On Assist12, LDSim reaches ACC 23 and AUC 24, versus SINKT at ACC 25 and AUC 26, corresponding to 27 ACC and 28 AUC. On Algebra, LDSim reaches ACC 29 and AUC 30, versus SINKT at ACC 31 and AUC 32, corresponding to 33 ACC and 34 AUC. All LDSim wins indicated with “35” have 36-value 37 (Liu et al., 11 Sep 2025).
For single-step KT, LDSim reports ACC 38 and AUC 39 on Junyi, versus SINKT with ACC 40 and AUC 41. On Assist09, LDSim reports ACC 42 and AUC 43, versus SINKT with ACC 44 and AUC 45. On Assist12, LDSim reports ACC 46 and AUC 47, versus AKT with ACC 48 and AUC 49. On Algebra, LDSim reports ACC 50 and AUC 51, versus AKT with ACC 52 and AUC 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 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 55 versus LLM-KT, 56 versus Agent4Edu, and 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 58, Adam with 59, 60, single-head history attention, GLM-4-Flash as teacher LLM, data split 61, maximum history length 62, short-history filtering, and simulation horizon 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.