COLM 2026

INSIDE the Student’s Mind:

Jointly Modeling Latent Reasoning and Action in LLM Student Simulators

Rose Niousha, Minwoo Kang, Narges Norouzi

University of California, Berkeley

Modeling the reasoning that leads to action makes student simulators more faithful and explainable.

INSIDE overview: a student's prior attempt and tutor feedback are turned into an internal dialogue, which conditions the next code submission
Given a student's prior attempt, the AI tutor's feedback, and problem context, INSIDE first generates the student's internal dialogue, then the next code submission. Here the student takes the feedback literally and drops add(), but still misses that f should be a function.

Abstract

Large Language Model (LLM)-based simulators often reproduce observable actions but fail to capture the underlying reasoning behind them. In education, where student simulation is increasingly used for various applications such as evaluating tutoring systems, this gap is especially pronounced. Two students may submit identical submissions for entirely different reasons. We present Internal Student Dialogue (INSIDE), a student modeling framework that fine-tunes LLMs not only to act like students but also to think like them. INSIDE generates internal dialogue grounded in Bloom’s Taxonomy across cognitive, affective, and action dimensions, and fine-tunes models on paired think traces and actions. We baseline against different prompting frameworks and evaluate on two axes: fidelity of simulated actions and quality of generated internal dialogue. Our evaluations show that INSIDE improves simulation fidelity in both action fidelity, matching code generation of real students, and reasoning alignment, achieving the highest alignment across models up to 57.9%.

Motivation

In education, the reasoning behind a student's attempt is what matters for diagnosing misconceptions and giving targeted feedback. Yet most LLM-based student simulators learn to copy what students do, not why.

Same answer, different reasoning

Two students may reach the same solution, or the same wrong answer, for entirely different reasons. Observable actions give only a partial view of cognition.

Mistakes are part of learning

Work on LLM reasoning mostly targets correctness. Students make errors, hold misconceptions, and apply incomplete strategies, and a simulator has to capture that.

Beyond the black box

Prior simulators treat student behavior as a black box and only predict outcomes. A student model's key affordance is access to processes real students don't reveal.

INSIDE gives the simulator an explicit internal dialogue before each action, modeling how a student thinks, not just what they do.

Method

1 Reconstructing latent reasoning

We only observe what students do: attempt t−1, the AI tutor's feedback, and attempt t. GPT-5 works backward from these to reconstruct what the student was thinking, in two stages grounded in Bloom's Taxonomy.

Two-stage reconstruction grounded in Bloom's Taxonomy. Observed: student attempt t-1 calls add(a, -b) and add(a, b); the AI tutor explains that f is assigned an integer but should be a function; attempt t replaces the calls with a + -b and a + b. Reconstructed by GPT-5 working backward: stage 1 infers the student state as cognitive, affective, and action tags; stage 2 writes the internal dialogue: Hmm, they said f should be a function, not the result, so maybe I should just remove add().

2 Data: submission–feedback streams

We use real submission–feedback streams from an intro programming course at UC Berkeley (~900 students per semester), covering the first five Python homework assignments. Students resubmit until all autograder tests pass, and failing submissions from students who opted in also get natural-language feedback from an AI tutor. Given the problem and up to 10 prior submissions with their feedback, the simulator predicts the student's next attempt.

We train on Spring 2025 (445 students, 6,911 submissions) and test on Spring 2024 (479 different students), split two ways: familiar problems that also appear in training (5,262 submissions), and new problems the model has never seen (1,054 submissions).

Submission-feedback stream from an intro programming course at UC Berkeley. Attempts 1, 2, and 3 each receive tutor feedback, and each later attempt is preceded by a reconstructed think trace. Given this context of problem, prior submissions, feedback, and think traces, the model predicts the internal dialogue and attempt t.
Action only
Think → action
Prompted instructed to “act like a student”
Prompting
CoT · BloomCoT
Fine-tuned LoRA on real student data
SFT
INSIDE (ours)

All methods receive the problem, prior submissions, and tutor feedback.

Results

3 Action fidelity

How close is the simulated action to the real one? For each code metric (pass rate, lines of code, AST depth, AST width, PEP 8 violations), we compute the Wasserstein distance W1 between the distributions of real and simulated submissions, estimated with 500 bootstrap resamples. Lower is closer to real students.

Wasserstein distance to real students, familiar problems (lower is better). Bold marks the best value among the models shown.
ModelPass rateLOCAST depthAST widthPEP 8
Prompted
Qwen2.5-7B-Instruct0.390.710.600.981.12
Qwen2.5-Coder-7B-Instruct0.460.800.681.781.13
Qwen3-8B0.441.050.541.331.38
Prompted + CoT
Qwen2.5-7B-Instruct0.380.670.600.981.16
Qwen2.5-Coder-7B-Instruct0.470.930.751.501.25
Qwen3-8B0.481.080.591.461.38
Prompted + BloomCoT
Qwen2.5-7B-Instruct0.350.670.580.901.17
Qwen2.5-Coder-7B-Instruct0.430.880.711.401.19
Qwen3-8B0.470.980.541.301.37
Fine-tuned (SFT)
Qwen2.5-7B0.140.290.290.520.18
Qwen2.5-Coder-7B0.150.290.290.510.19
Qwen3-8B0.150.280.280.550.16
INSIDE (ours)
Qwen2.5-7B0.050.260.270.390.18
Qwen2.5-Coder-7B0.050.210.210.400.16
Qwen3-8B0.050.280.200.420.21
Wasserstein distance to real students, new problems (lower is better). Bold marks the best value among the models shown.
ModelPass rateLOCAST depthAST widthPEP 8
Prompted
Qwen2.5-7B-Instruct0.370.860.501.050.82
Qwen2.5-Coder-7B-Instruct0.450.850.520.711.01
Qwen3-8B0.451.100.611.051.13
Prompted + CoT
Qwen2.5-7B-Instruct0.360.900.521.211.00
Qwen2.5-Coder-7B-Instruct0.430.810.570.851.06
Qwen3-8B0.441.060.741.371.21
Prompted + BloomCoT
Qwen2.5-7B-Instruct0.330.840.470.960.95
Qwen2.5-Coder-7B-Instruct0.410.820.581.130.92
Qwen3-8B0.421.010.681.191.18
Fine-tuned (SFT)
Qwen2.5-7B0.010.200.190.280.14
Qwen2.5-Coder-7B0.030.350.180.390.16
Qwen3-8B0.020.230.170.280.12
INSIDE (ours)
Qwen2.5-7B0.040.160.220.370.18
Qwen2.5-Coder-7B0.050.200.180.140.19
Qwen3-8B0.040.200.190.400.18

See Table 1 in the paper for the full table, including GPT-5.

Paper Figure 2a: mean pass rate per submission step on a familiar problem (n = 968). Real students stay near 0 until a jump to about 0.6 at the final step. SFT models sit around 0.2 to 0.4 and INSIDE models around 0.1 to 0.2, both rising at the end; prompted models, with or without BloomCoT, stay around 0.5 to 1.0 throughout.
Pass-rate trajectories on a familiar problem (n = 968). Top row: without CoT (SFT, prompting). Bottom row: with CoT (INSIDE, BloomCoT).
Paper Figure 2b: mean pass rate per submission step on a new problem (n = 695). Real students stay low until a jump near the final step; SFT and INSIDE models stay around 0.2 to 0.3 before rising, while prompted models stay around 0.6 to 1.0 throughout.
Pass-rate trajectories on a new problem (n = 695).

4 Reasoning alignment

Does the generated reasoning explain the real edit? We split each generated <think> into claims and use an LLM judge (GPT-5-mini) to check whether each one is reflected in the student's actual edit from attempt t−1 to t. Alignment is the fraction of claims that are. For example, 3 of 5 claims reflected gives 60%.

Judge check: 95.2% alignment on teacher traces · 88% agreement with human labels (κ = 0.754)

Reasoning alignment (%), prompted (BloomCoT) → INSIDE, same model family. Standard error is about 0.8 on familiar problems and 2.0–2.3 on new problems, which have fewer samples.
Model Familiar problems New problems
BloomCoT INSIDE BloomCoT INSIDE
Qwen2.5-7B 49.651.8 +2.2 55.156.9 +1.8
Qwen2.5-Coder-7B 46.049.2 +3.2 51.355.5 +4.2
Qwen3-8B 47.950.5 +2.6 56.057.9 +1.9

See Table 2 in the paper for all models, including GPT-5, Qwen3-14B, and Qwen3-32B.

Citation

@inproceedings{niousha2026inside,
  title     = {{INSIDE} the Student's Mind: Jointly Modeling Latent Reasoning and Action in {LLM} Student Simulators},
  author    = {Niousha, Rose and Kang, Minwoo and Norouzi, Narges},
  booktitle = {Conference on Language Modeling (COLM)},
  year      = {2026}
}