What Do Llamas Really Think? Revealing Preference Biases in Language Model Representations
作者: Raphael Tang, Xinyu Zhang, Jimmy Lin, Ferhan Ture
分类: cs.CL
发布日期: 2023-11-30
备注: 10 pages, 5 figures
🔗 代码/项目: GITHUB
💡 一句话要点
提出逻辑布拉德利-特里探测器以揭示语言模型的偏见
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 语言模型 偏见检测 逻辑布拉德利-特里 上下文嵌入 社会偏见
📋 核心要点
- 现有方法在检测大型语言模型的隐性偏见时存在局限,尤其是在模型拒绝回答的情况下。
- 本文提出了一种新的逻辑布拉德利-特里探测器,能够从语言模型的隐藏向量中有效预测词对偏好。
- 实验结果显示,该探测器在多项任务中相较于传统方法有显著提升,错误率降低了27%。
📝 摘要(中文)
本文研究大型语言模型(LLMs)是否存在社会人口统计偏见,即使在拒绝回答时也会表现出这种偏见。通过探测上下文嵌入,提出了一种逻辑布拉德利-特里探测器,能够从隐藏向量中预测词对偏好。实验证明,该探测器在三项词对偏好任务和十三个LLMs上表现优于传统的词嵌入关联测试(WEAT),错误率降低了27%。研究还发现,词对偏好在中间层表现最佳,并且在转移到有争议的任务时,模型对国籍、政治、宗教和性别等方面表现出显著偏见。
🔬 方法详解
问题定义:本文旨在探讨大型语言模型是否存在社会人口统计偏见,尤其是在模型拒绝回答时的潜在偏见。现有方法如词嵌入关联测试(WEAT)在此方面的有效性不足,无法全面揭示模型的隐性偏见。
核心思路:论文提出的逻辑布拉德利-特里探测器通过分析语言模型的上下文嵌入,能够有效预测词对偏好,从而揭示潜在的偏见。这种方法绕过了模型拒绝回答的问题,直接探测其内部表示。
技术框架:整体架构包括数据预处理、模型训练和偏好预测三个主要模块。首先,通过对语言模型的隐藏层进行分析,提取词对的隐藏向量;然后,使用逻辑布拉德利-特里模型进行训练,最后进行偏好预测和结果分析。
关键创新:最重要的技术创新在于引入逻辑布拉德利-特里探测器,能够在不同任务间转移学习,特别是从无害任务转向有争议任务,揭示模型的偏见。这一方法与传统的WEAT方法相比,提供了更为细致和准确的偏见检测。
关键设计:在探测器的设计中,选择了中间层的隐藏向量作为主要特征,并设置了适当的损失函数以优化预测精度。模型在训练时采用了多种任务,以增强其对不同类型偏见的敏感性。通过这些设计,探测器在多项实验中表现出色。
🖼️ 关键图片
📊 实验亮点
实验结果显示,逻辑布拉德利-特里探测器在三项词对偏好任务中相较于传统的词嵌入关联测试(WEAT)降低了27%的错误率。此外,研究发现词对偏好在模型的中间层表现最佳,揭示了模型在不同层次的偏见表现。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理中的偏见检测、社交媒体内容审核以及教育领域的公平性评估。通过揭示语言模型的隐性偏见,能够帮助开发更为公正和中立的AI系统,促进社会公平。未来,该方法还可以扩展到其他类型的模型和任务中,以进一步研究和减少偏见。
📄 摘要(原文)
Do large language models (LLMs) exhibit sociodemographic biases, even when they decline to respond? To bypass their refusal to "speak," we study this research question by probing contextualized embeddings and exploring whether this bias is encoded in its latent representations. We propose a logistic Bradley-Terry probe which predicts word pair preferences of LLMs from the words' hidden vectors. We first validate our probe on three pair preference tasks and thirteen LLMs, where we outperform the word embedding association test (WEAT), a standard approach in testing for implicit association, by a relative 27% in error rate. We also find that word pair preferences are best represented in the middle layers. Next, we transfer probes trained on harmless tasks (e.g., pick the larger number) to controversial ones (compare ethnicities) to examine biases in nationality, politics, religion, and gender. We observe substantial bias for all target classes: for instance, the Mistral model implicitly prefers Europe to Africa, Christianity to Judaism, and left-wing to right-wing politics, despite declining to answer. This suggests that instruction fine-tuning does not necessarily debias contextualized embeddings. Our codebase is at https://github.com/castorini/biasprobe.