Skip to main content
QUICK REVIEW

[论文解读] Shifting Attention to Relevance: Towards the Predictive Uncertainty Quantification of Free-Form Large Language Models

Jinhao Duan, Hao Cheng|arXiv (Cornell University)|Jul 3, 2023
Topic ModelingComputer Science被引用 10
一句话总结

论文提出 Shifting Attention to Relevance (SAR),通过按语义相关性对标记和句子进行加权来改进自由形式的LLMs的不确定性估计,在多种模型和领域中优于现有方法。

ABSTRACT

Large Language Models (LLMs) show promising results in language generation and instruction following but frequently "hallucinate", making their outputs less reliable. Despite Uncertainty Quantification's (UQ) potential solutions, implementing it accurately within LLMs is challenging. Our research introduces a simple heuristic: not all tokens in auto-regressive LLM text equally represent the underlying meaning, as "linguistic redundancy" often allows a few keywords to convey the essence of long sentences. However, current methods underestimate this inequality when assessing uncertainty, causing tokens with limited semantics to be equally or excessively weighted in UQ. To correct this, we propose Shifting Attention to more Relevant (SAR) components at both token- and sentence-levels for better UQ. We conduct extensive experiments involving a range of popular "off-the-shelf" LLMs, such as Vicuna, WizardLM, and LLaMA-2-chat, with model sizes extending up to 33B parameters. We evaluate various free-form question-answering tasks, encompassing domains such as reading comprehension, science Q&A, and medical Q&A. Our experimental results, coupled with a comprehensive demographic analysis, demonstrate the superior performance of SAR. The code is available at https://github.com/jinhaoduan/SAR.

研究动机与目标

  • 识别标记级与句子级生成不平等如何影响自由形式LLMs的不确定性估计。
  • 提出一种通过将注意力移向更相关组件(标记和句子)来缓解这些不平等的方法。
  • 在现成的指令微调LLMs和预训练LLMs 上,在多样的问答任务与领域中评估 SAR。

提出的方法

  • 定义标记级与句子级相关性与不确定性比例(R_T, UP_T, R_S, UP_S)。
  • 通过在移除标记时观察语义变化来衡量标记级相关性,使用 RoBERTa-large cross-encoder 作为语义相似度函数 g(·)。
  • 通过用归一化的相关性对标记熵进行加权来计算标记级移位熵 E_T(Eq. 7)。
  • 使用生成句子之间的语义相似性及其生成概率来计算句子级相关性 R_S(Eq. 4)。
  • 通过对句子相关性加权来计算句子级移位熵 E_S(Eq. 9)。
  • 通过在熵计算中用 token-SAR 推导的 p′(s|x) 替代概率,将标记和句子级移位合并为 SAR(Eq. 11)。

实验结果

研究问题

  • RQ1标记级与句子级生成不平等如何影响自由形式 LLMs 生成的不确定性估计?
  • RQ2是否通过对语言相关组件重新加权注意力,能够提高 LLM 输出不确定性估计的准确性?
  • RQ3token-SAR、sent-SAR 与 SAR 在不同 LLMs 与领域中是否优于现有的不确定性度量?

主要发现

  • 不相关的标记和携带较少语义意义的句子显著地偏移了不确定性估计。
  • Token-SAR 和 sent-SAR 在多种模型和数据集上持续提升 AUROC 相对于基线。
  • 联合 SAR(标记与句子移位)优于单独组件,在与 SE 及其他基线的比较中有显著提升。
  • SAR 在指令微调的 LLMs(Vicuna、WizardLM、LLaMA-2-chat)和预训练的 LLMs(OPT、LLaMA,参数规模高达 33B)上显示鲁棒性。
  • 在医学问答领域(MedQA、MedMCQA)中,SAR 在大多数设置下达到更好的性能。
  • SAR 具备生成效率,在仅需5次生成的情况下也能取得显著结果。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。