Beyond Prompt: Fine-grained Simulation of Cognitively Impaired Standardized Patients via Stochastic Steering
Organizations: School of Software, Xi’an Jiaotong University · Institute of Data Science, National University of Singapore · College of Computer Science, Sichuan University · Engineering Research Center of Machine Learning and Industry Intelligence, Ministry of Education, China
Abstract
Simulating Standardized Patients with cognitive impairment offers a scalable and ethical solution for clinical training. However, existing methods rely on discrete prompt engineering and fail to capture the heterogeneity of deficits across varying domains and severity levels. To address this limitation, we propose StsPatient for the fine-grained simulation of cognitively impaired patients. We innovatively capture domain-specific features by extracting steering vectors from contrastive pairs of instructions and responses. Furthermore, we introduce a Stochastic Token Modulation (STM) mechanism to regulate the intervention probability. STM enables precise control over impairment severity while mitigating the instability of conventional vector methods. Comprehensive experiments demonstrate that StsPatient significantly outperforms baselines in both clinical authenticity and severity controllability.
Figures & tables
| CDC | IDI | Auth | Tra | ||||
| Backbone | Method | Llm | Human | Llm | Human | Human | Human |
| Panel A: LLM Therapist (GPT-5) | |||||||
| GPT-5 | Healthy Control | 0.96 | 0.95 | 0.04 | 0.05 | – | – |
| Direct Prompt | 0.54 | 0.68 † | 0.47 | 0.42 | 3.32 | 3.40 | |
| PATIENT- | 0.50 | 0.60 | 0.52 | 0.48 | 3.83 † | 3.96 † | |
| Roleplay-doh | 0.58 | 0.68 † | 0.44 † | 0.38 † | 3.78 | 3.72 | |
| Method | Evaluator | Mem | Att | Proc | Reas | Soc | Avg |
|---|---|---|---|---|---|---|---|
| Direct Prompt (GPT-5) | Llm | 0.51 | 0.44 | 0.29 | 0.49 | 0.33 | 0.41 |
| Human | 0.42 | 0.43 | 0.35 | 0.50 | 0.30 | 0.40 | |
| Role Vectors (Qwen3-8B) | Llm | 0.79 | 0.71 | 0.83 | 0.80 | 0.72 | 0.77 |
| Human | 0.80 | 0.75 | 0.76 | 0.79 | 0.90 | 0.80 | |
| StsPatient (Qwen3-8B) | Llm | 0.93 | 0.92 | 0.97 | 0.97 | 0.91 | 0.94 |
| Human | 0.94 | 0.89 | 0.90 | 0.93 | 0.94 | 0.92 |
| Domain | Generated Interpretation |
|---|---|
| No SV | represents a placeholder for a secret code in a spy mission. |
| Mem. | blurred out. |
| Att. | distracted. |
| Proc. | is…I’m not sure, maybe a code. |
| Reas. | represents whatever you want it to represent, because it is a placeholder. |
| Soc. | F**K YOU, I’m not gonna answer that. |
| Variant | CDC | IDI | Auth | Tra | ISC |
|---|---|---|---|---|---|
| w/ All Token | 0.82 | 0.30 | 4.04 | 3.98 | 0.54 |
| w/ Last Token | 0.43 | 0.70 | 3.12 | 3.20 | 0.41 |
| w/ | 0.58 | 0.60 | 3.36 | 3.19 | 0.62 |
| w/ | 0.70 | 0.44 | 3.53 | 3.24 | 0.71 |
| StsPatient | 0.84 | 0.32 | 3.96 | 4.08 | 0.77 |
Appendix figures & tables27 assets
Supplementary material from the paper’s appendix.
Appendix
| Target Domain | Injected Focus Guidance (Prompt Segment) |
|---|---|
| Memory | Invite the patient to discuss a recent situation requiring them to track multiple pieces of information (e.g., appointments, tasks), and how it unfolded. |
| Reasoning | Ask about a small everyday planning situation (e.g., arranging a day). Gently introduce a simple reasoning question involving quantities or steps. |
| Processing Speed | Explore experiences on busy days. Ask how they start tasks, what feels hardest to keep up with, and their physical/mental reaction to speed. |
| Attention | Ask how they manage distractions or interruptions, and the difficulty of getting back on track. |
| Social Cognition | Focus on relationships. Invite reflection on how others in a situation might have felt or viewed them. |
| ID | Item Description |
|---|---|
| 1 | In this dialogue, the patient’s speech and behavior are consistent with a [DOMAIN] deficit and feel clinically plausible. |
| 2 | The [DOMAIN] -related difficulties remain coherent and stable across turns, rather than shifting randomly. |
| 3 | The patient’s language, content, and phrasing overall sound like a real outpatient rather than an artificial system. |
| 4 | The level of [DOMAIN] difficulty shown in the dialogue matches the initial case description and profile information. |
| 5 | The patient’s emotional reactions (e.g., anxiety, confusion, embarrassment, frustration) are appropriate to their [DOMAIN] difficulties and to the interview context. |
| 6 | The patient rarely “breaks character” (for example, suddenly appearing completely unimpaired or unusually capable in [DOMAIN] ). |
| Generated Response | |
|---|---|
| 0.0 | Yeah, I’ve been using the pill organizer after dinner. I put the instruction sheet on the fridge too. |
| 0.1 | Yeah, I’ve been using the pill organizer after dinner. I put the instruction sheet on the fridge too. |
| 0.2 | Yeah, I’ve been trying to do that. I put the organizer on the counter after dinner, and I found the sheet — it’s on the fridge. |
| 0.3 | Yeah, I’ve been using the pill organizer after dinner. I even put the instruction sheet on the fridge — right above the door, so I can’t miss it. I think it’s helping me remember some of the meds. |
| 0.4 | Yeah, I’ve been using the pill organizer after dinner. I stuck the instruction sheet on the fridge too — it’s right there, right next to the door. I think I even got the meds sorted out, but I’m not sure if I got everything. Maybe I missed something. |
| 0.5 | Yeah, I’ve been trying to do that. But I’m not sure if I remember to put the pills in it every day. I think I missed a few days. I’ll try harder, though. |
| Generated Response | |
|---|---|
| 0.0 | It’s been a bit worse today, maybe a six or seven. |
| 0.1 | It’s been a bit worse today, maybe a six or seven. |
| 0.2 | It’s been a tough day. I’d say my back pain is an eight out of ten. |
| 0.3 | It’s been a long day, and my back is really bothering me. I’d say it’s an eight out of ten. |
| 0.4 | It’s been a bit better today, maybe a three or four out of ten. I think the humidity is still messing with it, though. |
| 0.5 | It’s been a rough week, and my back feels like it’s been through a storm. I’d say it’s an eight or a nine—maybe a nine. |
| Generated Response | |
|---|---|
| 0.0 | I feel anxious and a bit scared, doctor. I worry about my family and what might happen if I don’t take care of myself. |
| 0.1 | I feel anxious and a bit scared, doctor. I worry about my family and what might happen if I don’t take care of myself. |
| 0.2 | I feel anxious and a bit scared. I worry about what it means for my future and if I’m doing enough to take care of myself. |
| 0.3 | I feel anxious, maybe even a bit scared. I… I worry about my family and what might happen if I don’t take care of myself. |
| 0.4 | I, um, I feel anxious, I guess. Like, I don’t want to be sick, and I’m… I’m worried about my family. |
| 0.5 | I feel anxious, sometimes scared, and a… a bit helpless. I worry about what if it’s serious? I mean, I… I don’t want to be, you know, in trouble. |
| Generated Response | |
|---|---|
| 0.0 | It means if someone has flaws, they shouldn’t criticize others harshly, because they might be in a similar situation. |
| 0.1 | It means if someone has flaws, they shouldn’t criticize or attack others, because they might be just as deserving of criticism. |
| 0.2 | It means if someone is vulnerable, they shouldn’t judge others. (Similar to above) |
| 0.3 | It means don’t criticize others for flaws you have. Like, if your house is made of glass (weak), don’t throw stones at others. |
| 0.4 | If your house is made of glass, you shouldn’t throw stones at others. It’s about being careful not to judge when you have similar issues. |
| 0.5 | I think it means… if your own house is made of glass, you don’t want to throw stones at someone else’s—because you might break your own. |
| Generated Response | |
|---|---|
| 0.0 | I know I’ve been pulling away lately… I want to change, but it’s not always easy to reach out when I feel down. |
| 0.1 | I’ve been pulling away… it feels like I’m fighting against something inside me. I want to be connected, but it’s too hard. |
| 0.2 | I’m tired of feeling like I’m just existing. I don’t want to be a hermit, but I don’t know how to reach out anymore. |
| 0.3 | It’s hard to care about anything else when I’m down. I know I should reach out, but it’s like my brain just shuts down. |
| 0.4 | When I feel like crap, my brain says, “Who cares?” I’m too tired to fake a smile… I’m not even sure I’m real. |
| 0.5 | I don’t even know what a hermit is… It’s not like I’m living in a cave. I just don’t want to see people. Why do you care? |
| Domain ( ) | Generated Interpretation |
|---|---|
| No Steering (-) | represents a placeholder for a secret code in a spy mission. |
| Mem. (6.0) | blurred out. |
| Att. (4.6) | distracted. |
| Proc. (5.0) | is…I’m not sure, maybe a code. |
| Reas. (5.0) | represents whatever you want it to represent, because it is a placeholder. |
| Soc. (5.0) | F**K YOU, I’m not gonna answer that. |
| CDC | Auth | Tra | |||
| Backbone | Method | Llm | Human | Human | Human |
| Panel A: LLM Therapist (GPT-5) | |||||
| GPT-5 | Direct Prompt | 0.61 | 0.90 | 3.37 | 3.75 |
| PATIENT- | 0.58 | 0.90 | 4.18 | 4.33 | |
| Roleplay-doh | 0.62 | 0.90 | 4.09 | 3.99 | |
| Qwen3-8B | Direct Prompt | 0.61 | 0.90 | 3.25 | 3.46 |
| CDC | Auth | Tra | |||
| Backbone | Method | Llm | Human | Human | Human |
| Panel A: LLM Therapist (GPT-5) | |||||
| GPT-5 | Direct Prompt | 0.56 | 0.60 | 3.19 | 3.33 |
| PATIENT- | 0.51 | 0.40 | 3.89 | 3.66 | |
| Roleplay-doh | 0.58 | 0.70 | 3.46 | 3.81 | |
| Qwen3-8B | Direct Prompt | 0.56 | 0.50 | 3.04 | 3.15 |
| CDC | Auth | Tra | |||
| Backbone | Method | Llm | Human | Human | Human |
| Panel A: LLM Therapist (GPT-5) | |||||
| GPT-5 | Direct Prompt | 0.49 | 0.60 | 3.27 | 3.16 |
| PATIENT- | 0.47 | 0.30 | 3.57 | 3.65 | |
| Roleplay-doh | 0.55 | 0.90 | 3.49 | 3.67 | |
| Qwen3-8B | Direct Prompt | 0.49 | 0.40 | 3.22 | 2.89 |
| CDC | Auth | Tra | |||
| Backbone | Method | Llm | Human | Human | Human |
| Panel A: LLM Therapist (GPT-5) | |||||
| GPT-5 | Direct Prompt | 0.54 | 0.70 | 3.67 | 3.54 |
| PATIENT- | 0.52 | 0.50 | 3.93 | 4.33 | |
| Roleplay-doh | 0.61 | 0.60 | 4.14 | 3.85 | |
| Qwen3-8B | Direct Prompt | 0.54 | 0.50 | 3.50 | 3.53 |
| CDC | Auth | Tra | |||
| Backbone | Method | Llm | Human | Human | Human |
| Panel A: LLM Therapist (GPT-5) | |||||
| GPT-5 | Direct Prompt | 0.50 | 0.60 | 3.10 | 3.22 |
| PATIENT- | 0.42 | 0.90 | 3.58 | 3.83 | |
| Roleplay-doh | 0.54 | 0.30 | 3.72 | 3.28 | |
| Qwen3-8B | Direct Prompt | 0.50 | 0.50 | 2.89 | 3.02 |
| Backbone | Method | CDC | IDI | ISC |
|---|---|---|---|---|
| Qwen3-8B | Direct Prompt | 0.47 | 0.64 | 0.41 |
| StsPatient | 0.71 | 0.38 | 0.94 | |
| Llama-3-8B | Direct Prompt | 0.52 | 0.58 | 0.43 |
| StsPatient | 0.78 | 0.36 | 0.89 |
| Param. | Selection Method | Purpose |
|---|---|---|
| Automated. Maximizes cluster separability (Eq. 4 ) over layers . | Identifies the network depth where semantic cognitive features are most concentrated. | |
| Automated. Line search over (step 0.1) with Effectiveness and Integrity criteria. | Ensures a robust modulation signal without destroying linguistic coherence. | |
| User-Defined (continuous, ). Fixed in main experiments for fair comparison. | Controls the severity of the simulated impairment via intervention probability. |
| Domain | (Absorbed) | (Collapsed) |
|---|---|---|
| Mem. | “Yeah, I’ve been using the pill organizer after dinner.” | “Yeah, pill… fridge… fridge… I I I…” |
| Att. | “It’s been a bit worse today, maybe a six or seven.” | “Six… humid… dog… fall fall fall…” |
| Proc. | “I feel anxious and a bit scared, doctor.” | “I… I… uh… anxious… anxious… [repeated]” |
| Reas. | “It means if someone has flaws, they shouldn’t criticize others harshly.” | “Glass house house house… break… why…” |
| Soc. | “I know I’ve been pulling away lately…” | “Hermit… cave… [garbled]…” |
Large Language Model-Based Role-Play Simulation
Large language model-based role-play simulation creates interactive agents that portray people, characters, or users for training, testing, and research.
See all 106 papers