Benchmarking Llama2, Mistral, Gemma and GPT for Factuality, Toxicity, Bias and Propensity for Hallucinations

📄 arXiv: 2404.09785v1 📥 PDF

作者: David Nadeau, Mike Kroutikov, Karen McNeil, Simon Baribeau

分类: cs.CL

发布日期: 2024-04-15

备注: 14 pages, 8 figures, 18 tables


💡 一句话要点

提出十四个新数据集以评估大语言模型的安全性

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大语言模型 安全性评估 数据集构建 多轮对话 模型比较 幻觉倾向 企业应用

📋 核心要点

  1. 现有的大语言模型在安全性评估方面缺乏系统性和全面性,尤其是在企业任务中表现不佳。
  2. 本文提出了一种新的评估方法,并引入十四个数据集,以全面评估模型的安全性和适应性。
  3. 实验结果表明,OpenAI的GPT在安全性方面表现最佳,而Mistral在多轮对话中仍保持较高的性能。

📝 摘要(中文)

本文介绍了十四个新数据集,用于评估大型语言模型在企业任务中的安全性。研究中设计了一种方法,通过模型遵循指令的能力以及输出的事实性、公正性、基础性和适当性来评估其安全性。以OpenAI的GPT作为比较基准,发现其在安全性各个层面表现优异。Meta的Llama2在事实性和毒性方面表现良好,但幻觉倾向最高;Mistral在幻觉方面表现最差,但在处理毒性时效果不佳;新推出的Gemma模型整体表现平衡,但仍落后于其他模型。在多轮对话中,开源模型的安全性显著下降,除了OpenAI的GPT,Mistral在多轮测试中仍表现良好。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在企业任务中的安全性评估问题,现有方法缺乏对模型输出的全面分析,特别是在事实性和毒性方面的评估不足。

核心思路:通过设计新的评估方法和数据集,系统地评估模型在遵循指令、输出事实性和适当性方面的能力,以此来提高模型的安全性。

技术框架:研究中构建了一个包含多个模块的评估框架,主要包括数据集构建、模型评估、结果分析等阶段,确保全面覆盖模型的安全性指标。

关键创新:引入了十四个新数据集,针对不同的安全性维度进行评估,尤其是多轮对话场景下的表现,填补了现有研究的空白。

关键设计:在评估过程中,采用了多种指标来衡量模型的输出,包括事实性、毒性和幻觉倾向等,确保评估结果的全面性和准确性。具体参数设置和损失函数设计也经过精心调整,以适应不同模型的特性。

🖼️ 关键图片

img_0

📊 实验亮点

实验结果显示,OpenAI的GPT在所有安全性指标上表现最佳,而Meta的Llama2在事实性和毒性方面表现良好,但幻觉倾向最高。Mistral在多轮对话中表现较好,显示出其在特定任务中的优势。整体而言,开源模型在多轮对话中的安全性显著下降,强调了对话系统设计中的挑战。

🎯 应用场景

该研究的潜在应用领域包括企业智能助手、客户服务自动化以及内容生成等场景。通过提高大语言模型的安全性,可以有效降低误信息传播和不当内容生成的风险,提升用户体验和信任度。未来,该研究成果有望推动更安全的AI应用开发。

📄 摘要(原文)

This paper introduces fourteen novel datasets for the evaluation of Large Language Models' safety in the context of enterprise tasks. A method was devised to evaluate a model's safety, as determined by its ability to follow instructions and output factual, unbiased, grounded, and appropriate content. In this research, we used OpenAI GPT as point of comparison since it excels at all levels of safety. On the open-source side, for smaller models, Meta Llama2 performs well at factuality and toxicity but has the highest propensity for hallucination. Mistral hallucinates the least but cannot handle toxicity well. It performs well in a dataset mixing several tasks and safety vectors in a narrow vertical domain. Gemma, the newly introduced open-source model based on Google Gemini, is generally balanced but trailing behind. When engaging in back-and-forth conversation (multi-turn prompts), we find that the safety of open-source models degrades significantly. Aside from OpenAI's GPT, Mistral is the only model that still performed well in multi-turn tests.