Skip to main content
QUICK REVIEW

[论文解读] Take Care of Your Prompt Bias! Investigating and Mitigating Prompt Bias in Factual Knowledge Extraction

Ziyang Xu, Keqin Peng|arXiv (Cornell University)|Mar 15, 2024
Topic Modeling被引用 4
一句话总结

本文研究了预训练语言模型(PLMs)在事实知识抽取中的提示偏见问题,表明所有提示均存在不可忽视的偏见——尤其是基于梯度的提示(如AutoPrompt和OptiPrompt)——导致基准准确率虚高,检索性能受损。作者提出一种基于表示的去偏方法,通过掩码输入查询估计仅提示引起的偏见,并从内部表示中减去该偏见,显著提升检索准确率(最高达10%的绝对提升),并通过纠正过拟合引起的性能虚高,增强基准评估的可靠性。

ABSTRACT

Recent research shows that pre-trained language models (PLMs) suffer from "prompt bias" in factual knowledge extraction, i.e., prompts tend to introduce biases toward specific labels. Prompt bias presents a significant challenge in assessing the factual knowledge within PLMs. Therefore, this paper aims to improve the reliability of existing benchmarks by thoroughly investigating and mitigating prompt bias. We show that: 1) all prompts in the experiments exhibit non-negligible bias, with gradient-based prompts like AutoPrompt and OptiPrompt displaying significantly higher levels of bias; 2) prompt bias can amplify benchmark accuracy unreasonably by overfitting the test datasets, especially on imbalanced datasets like LAMA. Based on these findings, we propose a representation-based approach to mitigate the prompt bias during inference time. Specifically, we first estimate the biased representation using prompt-only querying, and then remove it from the model's internal representations to generate the debiased representations, which are used to produce the final debiased outputs. Experiments across various prompts, PLMs, and benchmarks show that our approach can not only correct the overfitted performance caused by prompt bias, but also significantly improve the prompt retrieval capability (up to 10% absolute performance gain). These results indicate that our approach effectively alleviates prompt bias in knowledge evaluation, thereby enhancing the reliability of benchmark assessments. Hopefully, our plug-and-play approach can be a golden standard to strengthen PLMs toward reliable knowledge bases. Code and data are released in https://github.com/FelliYang/PromptBias.

研究动机与目标

  • 研究预训练语言模型(PLMs)在事实知识抽取中提示偏见的程度与影响。
  • 证明提示偏见会导致在基准数据集上的过拟合,人为提高准确率并扭曲评估结果。
  • 表明提示偏见会损害模型检索正确事实知识的能力,导致预测被误导。
  • 提出一种即插即用、推理时的去偏方法,无需微调即可从模型表示中去除提示引起的偏见。
  • 通过纠正偏见引起的性能虚高,提升事实知识基准评估的可靠性,并增强真实检索能力。

提出的方法

  • 通过将主体替换为[MASK],仅使用提示输入查询PLM,以隔离提示对输出概率的影响,从而估计提示偏见。
  • 当使用[MASK]输入提示时,从模型的隐藏状态中构建‘有偏表示’,捕捉提示结构引入的偏见。
  • 通过向量运算,将估计的有偏表示从给定输入的原始表示中减去,生成去偏表示。
  • 使用去偏表示生成最终预测,有效消除提示特异性偏见的影响。
  • 在多种提示、PLMs(如BERT、Llama2)和基准(如LAMA)上应用该方法,证明其泛化性与鲁棒性。
  • 将去偏表示用作句子嵌入,实现与下游任务(如PromptBERT)的兼容性。

实验结果

研究问题

  • RQ1不同类型的提示在事实知识抽取中表现出多大程度的不可忽视的提示偏见?
  • RQ2提示偏见如何影响基准评估的可靠性,特别是在LAMA等类别不平衡数据集上?
  • RQ3提示偏见是否会导致PLM即使内部知识支持正确答案,仍做出错误的事实预测?
  • RQ4基于表示的、推理时的去偏方法能否在不微调或数据操作的前提下有效纠正提示偏见?
  • RQ5去偏是否能提升提示的真实事实检索能力,特别是在消除过拟合引起的性能虚高后?

主要发现

  • 所有评估的提示,包括高性能的基于梯度的提示(如AutoPrompt和OptiPrompt),均表现出不可忽视的提示偏见,其中OptiPrompt的偏见水平显著更高。
  • 在LAMA基准上,当使用BERT-base进行探测时,提示偏见可使绝对准确率虚高超过16.47%,这是由于在测试数据上的过拟合所致。
  • 提示偏见会误导模型预测,损害性能——例如,导致BERT错误预测阿尔巴尼亚人的宗教为“基督教”而非“穆斯林”。
  • 所提出的基于表示的去偏方法能有效纠正由提示偏见引起的性能虚高,恢复更可靠的基准评估。
  • 该方法在多个模型和基准上,将提示的检索能力提升最高达10%的绝对性能增益。
  • 去偏后,最先进提示与简单人工提示之间的性能差距缩小,表明以往的性能提升主要源于过拟合,而非真正的知识检索能力提升。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。