Skip to main content
QUICK REVIEW

[论文解读] P-Adapters: Robustly Extracting Factual Information from Language Models with Diverse Prompts

Benjamin Newman, Prafulla Kumar Choubey|arXiv (Cornell University)|Oct 14, 2021
Topic Modeling被引用 11
一句话总结

P-Adapters 是轻量级、可训练的适配器,位于冻结的大规模语言模型(LLMs)的嵌入层与第一层注意力机制之间,将自然语言提示转换为优化的连续提示,以提升事实信息抽取的效果。与仅使用自然语言提示相比,它们在精度上实现了 12–26% 的绝对提升,在一致性上提升了 36–50%,其成功主要归因于能够访问 LLM 对提示主体实体的嵌入表示。

ABSTRACT

Recent work (e.g. LAMA (Petroni et al., 2019)) has found that the quality of the factual information extracted from Large Language Models (LLMs) depends on the prompts used to query them. This inconsistency is problematic because different users will query LLMs for the same information using different wording, but should receive the same, accurate responses regardless. In this work we aim to address this shortcoming by introducing P-Adapters: lightweight models that sit between the embedding layer and first attention layer of LLMs. They take LLM embeddings as input and output continuous prompts that are used to query the LLM. Additionally, we investigate Mixture of Experts (MoE) models that learn a set of continuous prompts ("experts") and select one to query the LLM. They require a separate classifier trained on human-annotated data to map natural language prompts to the continuous ones. P-Adapters perform comparably to the more complex MoE models in extracting factual information from BERT and RoBERTa while eliminating the need for additional annotations. P-Adapters show between 12-26% absolute improvement in precision and 36-50% absolute improvement in consistency over a baseline of only using natural language queries. Finally, we investigate what makes P-Adapters successful and conclude that a significant factor is access to the LLM's embeddings of the original natural language prompt, particularly the subject of the entity pair being queried.

研究动机与目标

  • 解决在使用语义等价但措辞不同的提示时,LLM 在事实信息抽取中出现的不一致性问题。
  • 开发一种在推理时仅需自然语言提示的方法,无需关系标注或推理时的主体身份信息。
  • 提升在用户导向场景中,对冻结 LLM 进行事实抽取的鲁棒性与准确性,此类场景中提示变化不可避免。
  • 探究 LLM 对提示主体的内部嵌入表示是否对提示适配方法的性能有显著影响。

提出的方法

  • P-Adapters 是插入在冻结 LLM 的嵌入层与第一层注意力层之间的轻量级神经网络,接收输入嵌入并输出连续提示。
  • 适配器在训练时通过端到端方式使用仅包含(提示,对象)对的数据进行训练,无需关系标注或主体身份信息。
  • 模型学习将多种多样的自然语言提示映射到一个共享的、最优的连续提示表示,以提升事实预测性能。
  • 该方法通过将同一事实的不同表达方式映射到相同的预测对象,隐式地促进了输出的一致性。
  • 一种变体——Prefix P-Adapter 使用可学习的前缀标记来调节输入,而 Rewrite P-Adapter 则尝试在连续空间中重写提示。
  • 该方法与需要关系标注和主体身份以选择特定关系专家提示的 Mixture-of-Experts(MoE)模型进行对比。

实验结果

研究问题

  • RQ1我们能否在推理时无需关系标注或主体身份信息的情况下,提升对冻结 LLM 的事实信息抽取性能?
  • RQ2LLM 对提示主体的嵌入表示的访问程度在多大程度上影响提示适配方法的性能?
  • RQ3轻量级适配器模型在多种提示表达方式下,与自然语言提示相比,能在多大程度上实现精度和一致性的提升?
  • RQ4将适配器基于完整自然语言提示(而非仅关系部分)进行条件控制,是否能带来更好的泛化能力?
  • RQ5尽管监督信号更少,P-Adapters 为何仍能优于其他提示优化方法?

主要发现

  • P-Adapters 在事实抽取任务中,相较于仅使用自然语言提示,实现了 12–26% 的精度绝对提升和 36–50% 的一致性绝对提升。
  • 当无法访问 LLM 对提示主体的嵌入表示时,P-Adapters 的性能显著下降,表明主体感知的表示至关重要。
  • P-Adapters 的表现与需要关系标注和主体身份信息的复杂 MoE 模型相当,但无需这些额外要求。
  • Prefix P-Adapter 变体的性能接近 MoE 模型,表明简单的前缀调优方法可能非常有效。
  • 即使采用最优提示调优,oracle 方法在分布内对象上的精度仅为 50%,在分布外对象上仅为 25%,表明提示优化存在固有局限性。
  • 研究证实,LLM 的事实知识对提示措辞高度敏感,而通过 P-Adapters 进行的小规模、可学习的提示调整,可显著提升抽取结果的可靠性。

更好的研究,从现在开始

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

无需绑定信用卡

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