An LLM-based Simulation Framework for Embodied Conversational Agents in Psychological Counseling

Lixiu Wu, Yuanrong Tang, Qisen Pan, Xianyang Zhan, Yucheng Han, Lanxi Xiao, Tianhong Wang, Chen Zhong, Jiangtao GongarXiv 2024

TL;DR

The ECAs framework addresses the severe shortage of mental health datasets by using LLMs to simulate realistic client agents grounded in Cognitive Behavioral Therapy (CBT) and life-stage memory structures. Validated by licensed human counselors, this approach generates high-fidelity synthetic counseling dialogues that significantly outperform standard LLM baselines and human-to-human datasets in clinical utility.

What Problem Does This Paper Address?

Training novice therapists and developing AI-assisted mental health tools requires massive amounts of high-quality dialogue data. However, real-world counseling sessions are highly private and strictly protected, creating a severe data scarcity bottleneck.

Existing workarounds fall short: human roleplay is expensive and limited by individual biases, while standard AI data synthesis typically only captures surface-level language patterns. Without deep psychological modeling, standard synthetic data suffers from "pattern collapse" during iterative model training, leading to progressive model degradation. The authors tackle this by asking: How can we build LLM-based simulations deeply grounded in psychological theory to generate authentic, rich counseling data?

Methods

The authors introduce ECAs (Embodied Conversational Agents), a framework structured around six core Simulation Principles (SPs) derived from psychotherapy and embodied cognition theories.

The framework operates in three distinct steps:

  1. Real Dataset Processing: Sparse baseline information (symptoms, risk levels, basic demographics) is extracted from a seed dataset.
  2. Simulating Embodied Memory: The framework expands this sparse data into a rich Client Profile (Personal and Social) and an Embodied Memory Space using a 4-phase LLM generation paradigm based on CBT. It explicitly models core beliefs (e.g., "I am incompetent"), intermediate beliefs, factual memories across four life stages (Childhood, Adolescence, Youth, Middle Age), and automatic thoughts/perceptual responses.
  3. Real Conversation & Dynamic Retrieval: During a simulated counseling session, the agent does not simply dump its profile. Instead, it utilizes a context-aware retrieval mechanism (via cosine similarity of text embeddings) to selectively recall and share memories relevant to the counselor's specific questions.
Figure 1: ECAs Framework Overview. The process consists of three steps: Step 1, extracting base information for the Client Agent from real datasets; Step 2, expanding the agent’s two profiles during memory simulation to form a complete Client Profile, and generating a embodied memory space, including beliefs, cognitive processes, and memories, based on this comprehensive profile; Step 3, dynamically retrieving context-relevant memories during real conversations to ensure realism and consistency.

Datasets

  • $D^4$ Dataset: A Chinese dialogue dataset for depression-diagnosis-oriented chat, used as the foundational seed data.
  • ECAs-dataset (New): The newly introduced dataset containing detailed personal and social profiles for 451 client agents, along with an extensive embodied memory space for 100 of them. Each agent possesses between 400 to 1,500 individual memory nodes, drastically scaling up the depth and quantity of thinking information compared to existing benchmarks like Patient-Ψ-CM or CharacterGLM.

Key Insights and Ideas

  • Psychology over Surface Text: Standard LLM roleplay mimics how a depressed person talks, but ECAs models why they think that way by explicitly hardcoding CBT structures into the agent's prompt architecture.
  • The Importance of Social Trajectories: Depressive states are deeply tied to interpersonal relationships over time. Simulating the evolution of a client's social network across life stages yields much more realistic triggers for psychological distress.
  • Memory Gating Mimics Reality: Real clients don't reveal their entire trauma upfront. The dynamic retrieval mechanism ensures information is disclosed naturally in response to specific therapeutic probing, preventing the "hallucination dump" common in vanilla LLM roleplay.

Key Results

  • Human Expert Validation: Five licensed counseling professionals evaluated the generated dialogues. ECAs significantly outperformed vanilla GPT-4o and even the original human-to-human $D^4$ dataset across four dimensions: Necessity, Sufficiency, Fidelity, and Consistency.
  • Diagnostic Utility: Dialogues generated by ECAs proved more informative for downstream tasks. When used to classify depression and suicide risk levels, ECAs data achieved the highest Macro F1 scores (0.42 for depression risk, 0.67 for suicide risk), beating out both vanilla GPT-4o (0.35 / 0.59) and the baseline human dataset (0.40 / 0.59).
Necessity and Sufficiency Comparison Boxplots

Limitations and Future Work

The authors note that early iterations of the framework lacked depth regarding highly sensitive topics like active suicide risk and eating disorders, requiring careful prompt engineering and iterative refinement with professional therapists to get right.

Looking ahead, the team plans to extend the ECAs framework to allow clinicians to generate custom, on-demand counseling scenarios, creating tailored training environments for student therapists and more robust testing grounds for mental health AIs.

Summary updated

BibTeX
@misc{wu2024llm,
  author = {Lixiu Wu and Yuanrong Tang and Qisen Pan and Xianyang Zhan and Yucheng Han and Lanxi Xiao and Tianhong Wang and Chen Zhong and Jiangtao Gong},
  title = {{An LLM-based Simulation Framework for Embodied Conversational Agents in Psychological Counseling}},
  year = {2024},
  eprint = {2410.22041},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.22041},
}
Figure