用大模型检测自杀倾向文本,效果远超传统方法。
Large Language Models for Detection of Life-Threatening Texts
- 用Gemma、Mistral、Llama-2等开源大模型微调识别危险文本。
- 在平衡与不平衡数据下,Mistral和Llama-2表现最优,准确率超传统方法。
- 大模型对数据不平衡不敏感,适合真实场景中的危机干预应用。
识别生命威胁性语言对保护心理危机个体、促进心理健康和预防伤害至关重要。本文提出一种基于大语言模型(LLMs)的高效检测方法,并与传统方法如词袋模型、词嵌入、主题建模及BERT进行对比。我们使用Gem、Mistral、Llama-2三个7B参数量的开源大模型,在构建了平衡、不平衡及极端不平衡三种数据分布的语料上进行微调。实验表明,大模型在各类数据条件下均显著优于传统方法:在平衡与不平衡数据中,Mistral与Llama-2表现最佳,而Gemma略逊一筹。通过过采样处理不平衡数据,虽提升了传统方法性能,但对大模型提升有限。研究证明大模型在现实场景中检测生命威胁文本具有巨大潜力。
原文摘要 · Abstract (English)
Detecting life-threatening language is essential for safeguarding individuals in distress, promoting mental health and well-being, and preventing potential harm and loss of life. This paper presents an effective approach to identifying life-threatening texts using large language models (LLMs) and compares them with traditional methods such as bag of words, word embedding, topic modeling, and Bidirectional Encoder Representations from Transformers. We fine-tune three open-source LLMs including Gemma, Mistral, and Llama-2 using their 7B parameter variants on different datasets, which are constructed with class balance, imbalance, and extreme imbalance scenarios. Experimental results demonstrate a strong performance of LLMs against traditional methods. More specifically, Mistral and Llama-2 models are top performers in both balanced and imbalanced data scenarios while Gemma is slightly behind. We employ the upsampling technique to deal with the imbalanced data scenarios and demonstrate that while this method benefits traditional approaches, it does not have as much impact on LLMs. This study demonstrates a great potential of LLMs for real-world life-threatening language detection problems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。