- The paper introduces StsPatient, a novel framework that extracts domain-specific steering vectors via contrastive learning to simulate varied cognitive impairments.
- It employs Stochastic Token Modulation for fine-grained severity control, outperforming static prompt methods with improvements like +16.39% in domain consistency.
- Experimental results confirm high authenticity and domain fidelity across cognitive domains, offering a robust tool for clinical training simulation.
Fine-Grained Simulation of Cognitively Impaired Standardized Patients via Stochastic Steering
Introduction
Simulation of Standardized Patients (SPs) with cognitive impairment is essential for scalable and ethical clinical training, but current approaches relying on static prompt engineering are insufficient for capturing the heterogeneity of domain-specific deficits and varied severity. The paper "Beyond Prompt: Fine-grained Simulation of Cognitively Impaired Standardized Patients via Stochastic Steering" (2604.12210) introduces a new framework, StsPatient, to achieve quantitative and fine-tuned simulation of diverse cognitive impairments using LLMs. StsPatient pioneers the extraction of domain-specific steering vectors (SVs) and introduces Stochastic Token Modulation (STM) for precise control over impairment severity.

Figure 1: Simulating cognitively impaired SPs across varied domains and severity levels is challenging, demanding fine-grained control.
Methodology
Domain-Specific Steering Vector Extraction
StsPatient addresses the underspecification of cognitive deficits in generative SPs by using contrastive learning. It constructs a synthetic contrastive dataset for each cognitive domain, composed of pairs of impaired and healthy dialogues. SVs for each domain are computed as the normalized mean difference of the internal LLM hidden representations between paired samples, automatically selecting the optimal intervention layer by maximizing inter-cluster centroid separation.
Stochastic Token Modulation: Severity Control
Conventional SV steering applies a fixed-magnitude vector at each token, modulated by a scalar hyperparameter α, which is unstable and difficult to calibrate for severity gradations. Instead, STM reframes the problem: the injection of the steering vector at each generation step is controlled by a Bernoulli gate parameterized by the desired severity s∈[0,1]. This stochastic modulation ensures monotonic, perceptibly controllable severity while maintaining semantic and linguistic coherence across a wide range of impairment strengths. The selection of both α and the intervention layer is fully automated, with STM leaving only s as the user-facing control variable.

Figure 2: Overview of StsPatient. An LLM-generated contrastive dataset is utilized to extract a domain-specific SV (vd​). Then, STM is applied during inference, enabling fine-grained, probabilistic modulation of hidden states to control impairment severity.
Experimental Results
StsPatient was evaluated using both LLM and human therapists, simulating conversations across five cognitive domains (Memory, Attention, Processing Speed, Reasoning & Problem Solving, Social Cognition) at varying severity levels. The framework was assessed on both domain fidelity (Cognitive Domain Consistency [CDC], Irrelevant Domain Inconsistency [IDI]) and clinical training value (Authenticity, Training scores), following Maastricht Assessment of Simulated Patients (MaSP) rubric.
Key findings:
- StsPatient outperforms prompt-based and prior steering-vector role-play methods across all metrics. For Qwen3-8B on LLM-therapist setup, CDC improved by +16.39%, Auth by +3.39% against the strongest baseline.
- Severity controllability: StsPatient achieved ISC scores of 0.94 (LLM) and 0.92 (Human) in discrete severity discrimination, and maintained strictly monotonic and perceptible symptom gradations for fine-grained s increments. Continuous severity analysis confirmed robustness of monotonic symptom transitions.

Figure 3: (a) Severity analysis (Continuous) via ISC scores averaged across all domains. (b): Cross-domain ambiguity reflecting confusion matrix of SV-induced behaviors per domain. (c-d): SVs similarity metrics indicating minor entanglement between steering directions.
- Domain-specificity: Cross-domain confusion matrices revealed that SVs mostly induce intended domain behaviors, but partial overlap (notably Memory → Reasoning) persists due to geometric proximity between certain SVs.
- Qualitative fidelity: Patch-scoping experiments and incremental s ablations demonstrated precise emergence of domain-typical deficits—fragmentation for memory, drifting for attention impairment, and social disinhibition at high severity for social cognition—mirroring clinical reality.
Analysis and Ablations
Ablations confirmed:
- Modulating all tokens (as in prior work) is less effective for severity gradation than STM; only partial injection achieves fine control.
- Both prompt- and response-based contrastive data are necessary for effective and interpretable SV extraction.
- STM's stochastic methodology is theoretically justified (rapid concentration of modulation around the mean as sequence length increases) and empirically preserves output integrity while allowing continuous impairment spectrum simulation.
Interpretability analysis via patch-scoping demonstrates that injection of domain SVs at target tokens produces consistent, semantically aligned deficit patterns, exposing the latent representational structure captured during SV extraction.
Implications and Future Directions
StsPatient's empirical superiority in both authenticity and fine-grained control demonstrates a viable pathway for high-fidelity, privacy-preserving SP simulation using publicly deployable LLMs. The approach generalizes robustly to different backbones, including Qwen3-8B and Llama-3-8B, with transferability of steering effects.
Theoretically, this work advances representation engineering for controlled behavioral modulation, introducing stochastic token-level intervention as a stable alternative to global magnitude scaling. Practically, StsPatient provides a scalable tool for medical education, with the potential to model comorbid deficits via multi-vector composition. Limitations include current restriction to unimodal (text) outputs and the challenge of perfect disentanglement in high-dimensional model spaces when simulating overlapping deficits. Fully mapping the severity parameter s to clinical metrics remains future work.
Ethical use is emphasized, with safeguards for aberrant output at high severities (especially social cognition), recommending combined LLM-based and keyword filtering for practical human-in-the-loop deployments.
Conclusion
This work establishes that contrastive SV extraction combined with Stochastic Token Modulation enables nuanced, robust, and quantitatively controlled simulation of cognitive impairment within LLMs. StsPatient advances both the theoretical methodology for role steering in generative models and provides immediate utility for clinical training simulation. Extension to multimodal outputs, complex clinical workflows, and rigorous mapping to standardized clinical scores represent next milestones for scalable and ethical AI in medical education.