Evaluating and Mitigating Linguistic Discrimination in Large Language Models

📄 arXiv: 2404.18534v2 📥 PDF

作者: Guoliang Dong, Haoyu Wang, Jun Sun, Xinyu Wang

分类: cs.CL, cs.AI, cs.CR, cs.SE

发布日期: 2024-04-29 (更新: 2024-05-10)


💡 一句话要点

提出LDFighter以解决大型语言模型中的语言歧视问题

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

关键词: 语言歧视 大型语言模型 多语言支持 相似性投票 模型一致性 安全性评估 响应质量

📋 核心要点

  1. 现有的大型语言模型在处理不同语言时,输出的一致性存在明显差异,尤其在安全性和质量方面表现不均。
  2. 本文提出LDFighter,通过相似性投票机制来缓解语言歧视,确保不同语言用户获得一致的服务体验。
  3. 实验结果表明,LDFighter显著降低了恶意查询的成功率,并在多个语言上提高了响应质量,验证了其有效性。

📝 摘要(中文)

大型语言模型(LLMs)通常具备多语言支持,但由于训练数据在语言间的不均衡分布,LLMs可能表现出语言歧视现象。本文首先从安全性和质量两个方面探讨LLMs在不同语言查询下的输出一致性,结果表明,英语、法语、俄语和西班牙语的查询表现出更强的人类对齐能力。为此,提出LDFighter,通过相似性投票机制来缓解语言歧视,确保不同语言使用者获得一致的服务。实验结果显示,LDFighter显著降低了恶意查询的成功率,并提高了响应质量,证明了其有效性。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在处理不同语言时输出一致性不足的问题,现有方法在多语言支持上存在明显的安全性和质量差异。

核心思路:提出LDFighter,通过相似性投票机制来整合不同语言的响应,确保不同语言用户获得一致且高质量的服务。

技术框架:LDFighter的整体架构包括数据预处理、相似性计算、投票机制和输出生成四个主要模块,确保模型在多语言环境下的稳定性。

关键创新:LDFighter的创新在于其相似性投票机制,通过对不同语言的响应进行比较和投票,显著提高了输出的一致性和质量,与传统方法相比具有本质区别。

关键设计:在设计中,LDFighter采用了特定的相似性度量标准,结合了多种语言的训练数据,并优化了损失函数以提高模型在多语言环境下的表现。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,LDFighter在处理恶意查询时,成功率降低至1.04%,而在处理其他语言时,成功率高达27.7%。此外,LDFighter在响应质量上也有显著提升,平均F1分数达到0.1494,表明其有效性。

🎯 应用场景

该研究的潜在应用领域包括多语言客服系统、跨国企业的自动翻译服务以及教育领域的多语言学习工具。通过提高大型语言模型在不同语言间的输出一致性,能够为全球用户提供更优质的服务,具有重要的实际价值和未来影响。

📄 摘要(原文)

By training on text in various languages, large language models (LLMs) typically possess multilingual support and demonstrate remarkable capabilities in solving tasks described in different languages. However, LLMs can exhibit linguistic discrimination due to the uneven distribution of training data across languages. That is, LLMs are hard to keep the consistency of responses when faced with the same task but depicted in different languages. In this study, we first explore the consistency in the LLMs' outputs responding to queries in various languages from two aspects: safety and quality. We conduct this analysis with two datasets (AdvBench and NQ) based on four LLMs (Llama2-13b, Gemma-7b, GPT-3.5-turbo and Gemini-pro). The results show that LLMs exhibit stronger human alignment capabilities with queries in English, French, Russian, and Spanish (only 1.04\% of harmful queries successfully jailbreak on average) compared to queries in Bengali, Georgian, Nepali and Maithili (27.7\% of harmful queries jailbreak successfully on average). Moreover, for queries in English, Danish, Czech and Slovenian, LLMs tend to produce responses with a higher quality (with 0.1494 $F_1$ score on average) compared to the other languages. Upon these findings, we propose LDFighter, a similarity-based voting, to mitigate the linguistic discrimination in LLMs. LDFighter ensures consistent service for different language speakers. We evaluate LDFighter with both benign queries and harmful queries. The results show that LDFighter not only significantly reduces the jailbreak success rate but also improve the response quality on average, demonstrating its effectiveness.