让大模型更懂情绪,生成更有同理心的聊天回复。
Emotion-Aware Embedding Fusion in LLMs (Flan-T5, LLAMA 2, DeepSeek-R1, and ChatGPT 4) for Intelligent Response Generation
- 用多级融合与注意力机制,强化心理对话中的情感特征。
- 在2000+治疗对话上测试,显著提升回复的情感一致性。
- 适合心理AI助手、智能客服等需要共情能力的场景。
在自动化心理咨询聊天机器人中,共情与连贯回应至关重要。本研究针对大语言模型在精神科应用中情感与上下文理解不足的问题,提出情感感知嵌入融合框架,结合层次化融合与注意力机制,优先处理语义与情感特征。通过整合NRC情感词典、VADER、WordNet和SentiWordNet等多个情感词典,与Flan-T5、LLAMA 2、DeepSeek-R1及ChatGPT 4等先进模型协同工作。超过2000个治疗会话样本被神经网络分层为词、句、会话三级,采用池化技术进行特征融合,再通过多头自注意力与交叉注意力进一步突出情感与上下文信息,实现跨会话的情感动态建模。使用BERT、GPT-3与RoBERTa生成的嵌入存入Facebook AI相似性搜索向量库,支持高效相似度检索与聚类。用户提问时,系统检索相关段落作为上下文输入,提升模型生成共情且贴切回应的能力。框架在多个实际应用场景中验证,可集成至现有心理健康平台,基于检索到的会话数据生成个性化响应。
原文摘要 · Abstract (English)
Empathetic and coherent responses are critical in auto-mated chatbot-facilitated psychotherapy. This study addresses the challenge of enhancing the emotional and contextual understanding of large language models (LLMs) in psychiatric applications. We introduce Emotion-Aware Embedding Fusion, a novel framework integrating hierarchical fusion and attention mechanisms to prioritize semantic and emotional features in therapy transcripts. Our approach combines multiple emotion lexicons, including NRC Emotion Lexicon, VADER, WordNet, and SentiWordNet, with state-of-the-art LLMs such as Flan-T5, LLAMA 2, DeepSeek-R1, and ChatGPT 4. Therapy session transcripts, comprising over 2,000 samples are segmented into hierarchical levels (word, sentence, and session) using neural networks, while hierarchical fusion combines these features with pooling techniques to refine emotional representations. Atten-tion mechanisms, including multi-head self-attention and cross-attention, further prioritize emotional and contextual features, enabling temporal modeling of emotion-al shifts across sessions. The processed embeddings, computed using BERT, GPT-3, and RoBERTa are stored in the Facebook AI similarity search vector database, which enables efficient similarity search and clustering across dense vector spaces. Upon user queries, relevant segments are retrieved and provided as context to LLMs, enhancing their ability to generate empathetic and con-textually relevant responses. The proposed framework is evaluated across multiple practical use cases to demonstrate real-world applicability, including AI-driven therapy chatbots. The system can be integrated into existing mental health platforms to generate personalized responses based on retrieved therapy session data.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。