Applying large language models (LLMs) to psychological counseling can reduce costs and lower barriers to access. However, issues inherent to LLMs, such as output hallucinations, knowledge lags, and response biases, limit the quality of counseling services. To address these challenges, we propose a psychological counseling method that integrates a knowledge graph (KG) and multi-agent collaboration (MAC). First, we design an ontology model and use an improved convolution residual network (CRN) to extract relational triples for constructing a psychological medicine KG. Second, we perform low-rank adaptation (LoRA) on Qwen1.5-7B-chat using the Text2Cypher training set. Finally, we design MAC prompts based on the characteristics of the retrieval-based question-answering (QA) process to facilitate the collaborative implementation of psychological medicine knowledge QA and updates. The experiments showed that the improved CRN achieved an extraction accuracy of 81%. The mean squared error of the general-domain capability of the LLM before and after LoRA was only 0.738, with a Text2Cypher score of 99.8 after LoRA. The results generated after prompting received a 70.44% approval rate compared to other methods. Thus, the proposed method can effectively enhance the intelligence, accuracy, and controllability of psychological counseling.
Liu Xi, Zheng Xiaohu, Cui Weiwei
. Psychological Counseling with Integration of Knowledge Graph and Multi-Agent Collaboration[J]. Journal of Shanghai Jiaotong University(Science), 2026
, 31(5)
: 1162
-1174
.
DOI: 10.1007/s12204-024-2785-1
[1] CHEN T H, LUCOCK M. The mental health of university students during the COVID-19 pandemic: An online survey in the UK [J]. PLoS One, 2022, 17(1): e0262562.
[2] MOROZ N, MOROZ I, D’ANGELO M S. Mental health services in Canada: Barriers and cost-effective solutions to increase access [J]. Healthcare Management Forum, 2020, 33(6): 282-287.
[3] SARIKHANI Y, BASTANI P, RAFIEE M, et al. Key barriers to the provision and utilization of mental health services in low-and middle-income countries: A scope study [J]. Community Mental Health Journal, 2021, 57(5): 836-852.
[4] HOGAN A, BLOMQVIST E, COCHEZ M, et al. Knowledge graphs [J]. ACM Computing Surveys, 2022, 54(4): 1-37.
[5] WANG Z, ZHANG J W, FENG J L, et al. Knowledge graph embedding by translating on hyperplanes [J]. Proceedings of the AAAI Conference on Artificial Intelligence, 2014, 28(1): 1112-1119.
[6] GU Y, KASE S E, VANNI M, et al. Beyond I.I.D.: Three levels of generalization for question answering on knowledge bases [C]// Web Conference 2021. Ljubljana: ACM, 2021: 3477-3488.
[7] DANIELI M, CIULLI T, MOUSAVI S M, et al. A conversational artificial intelligence agent for a mental health care app: Evaluation study of its participatory design [J]. JMIR Formative Research, 2021, 5(12): e30053.
[8] SHARMA E, DE CHOUDHURY M. Mental health support and its relationship to linguistic accommodation in online communities [C]// 2018 CHI Conference on Human Factors in Computing Systems. Montreal: ACM, 2018: 1-13.
[9] BROWN T, MANN B, RYDER N, et al. Language models are few-shot learners [C]//34th Conference on Neural Information Processing Systems. Vancouver: NIPS, 2020: 1877-1901.
[10] PATEL V, MISHRA P, PATNI J C. PsyHeal: An approach to remote mental health monitoring system [C]//2018 International Conference on Advances in Computing and Communication Engineering. Paris: IEEE, 2018: 384-393.
[11] SHARMA A, LIN I W, MINER A S, et al. Human–AI collaboration enables more empathic conversations in text-based peer-to-peer mental health support [J]. Nature Machine Intelligence, 2023, 5: 46-57.
[12] ABD-ALRAZAQ A A, ALAJLANI M, ALI N, et al. Perceptions and opinions of patients about mental health chatbots: Scoping review [J]. Journal of Medical Internet Research, 2021, 23(1): e17828.
[13] DEMSZKY D, YANG D Y, YEAGER D S, et al. Using large language models in psychology [J]. Nature Reviews Psychology, 2023, 2: 688-701.
[14] MAYNEZ J, NARAYAN S, BOHNET B, et al. On faithfulness and factuality in abstractive summarization [DB/OL]. (2020-05-02). https://arxiv.org/abs/2005.00661
[15] DWIVEDI Y K, KSHETRI N, HUGHES L, et al. “So what if ChatGPT wrote it?” Multidisciplinary perspectives on opportunities, challenges and implications of generative conversational AI for research, practice and policy [J]. International Journal of Information Management, 2023, 71: 102642.
[16] WEIDINGER L, MELLOR J, RAUH M, et al. Ethical and social risks of harm from Language Models [DB/OL]. (2021-12-08). https://arxiv.org/abs/2112.04359
[17] OUYANG L, WU J, JIANG X, et al. Training language models to follow instructions with human feedback [C]// 36th Conference on Neural Information Processing Systems. New Orleans: NIPS, 2022: 27730-27744.
[18] HU E J, SHEN Y, WALLIS P, et al. LoRA: Low-rank adaptation of large language models [DB/OL]. (2021-06-17). https://arxiv.org/abs/2106.09685
[19] DETTMERS T, PAGNONI A, HOLTZMAN A, et al. QLoRA: Efficient finetuning of quantized LLMs [C]//37th Conference on Neural Information Processing Systems. New Orleans: NIPS, 2023: 1-28.
[20] HUANG Y Y, WANG W Y. Deep residual learning for weakly-supervised relation extraction [DB/OL]. (2017-07-27). https://arxiv.org/abs/1707.08866
[21] PENNINGTON J, SOCHER R, MANNING C. Glove: Global vectors for word representation [C]// 2014 Conference on Empirical Methods in Natural Language Processing. Doha: ACL, 2014: 1532-1543.
[22] ZENG D J, LIU K, LAI S W, et al. Relation classification via convolutional deep neural network [J]. 25th International Conference on Computational Linguistics. Dublin: ACL, 2014: 2335-2344.
[23] RIEDEL S, YAO L M, MCCALLUM A. Modeling relations and their mentions without labeled text [M]// Machine learning and knowledge discovery in databases. Berlin, Heidelberg: Springer, 2010: 148-163.
[24] PAPINENI K, ROUKOS S, WARD T, et al. BLEU: A method for automatic evaluation of machine translation [C]// 40th Annual Meeting on Association for Computational Linguistics. Philadelphia: ACL, 2002: 311-318.
[25] LIN C Y. ROUGE: A package for automatic evaluation of summaries [C]// Workshop on Text Summarization Branches Out. Barcelona: ACL, 2004: 74-81.
[26] HUANG Y, BAI Y, ZHU Z, et al. C-eval: A multi-level multi-discipline chinese evaluation suite for foundation models [C]//37th Conference on Neural Information Processing Systems. New Orleans: NIPS, 2023: 1-20.
[27] LI H N, ZHANG Y X, KOTO F, et al. CMMLU: Measuring massive multitask language understanding in Chinese [DB/OL]. (2023-06-15). https://arxiv.org/abs/2306.09212
[28] HENDRYCKS D, BURNS C, BASART S, et al. Measuring massive multitask language understanding [DB/OL]. (2020-09-07). https://arxiv.org/abs/2009.03300
[29] LIU S Y, WANG C Y, YIN H X, et al. DoRA: Weight-decomposed low-rank adaptation [DB/OL]. (2024-02-14). https://arxiv.org/abs/2402.09353
[30] HAYOU S, GHOSH N, YU B, et al. LoRA+: Efficient low rank adaptation of large models [DB/OL]. (2024-02-19). https://arxiv.org/abs/2402.12354