arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.07280cs.CL
收藏

P-适配器:从具有不同特征的语言模型中鲁棒地提取事实信息

P-Adapters: Robustly Extracting Factual Information from Language Models with Diverse Prompts

Stanford University(斯坦福大学);Salesforce Research(Salesforce研究院)

Benjamin Newman, Prafulla Kumar Choubey, Nazneen Rajani

摘要:

最近的工作(例如LAMA(Petroni等人,2019))发现,从大语言模型(LLM)中提取的事实信息的质量取决于用于查询它们的提示。这种不一致性是有问题的,因为不同的用户将使用不同的措辞查询LLM以获得相同的信息,但无论如何都应该收到相同的准确响应。在这项工作中,我们的目标是通过引入P-Adapters来解决这个缺点:轻量级模型位于LLM的嵌入层和第一个注意层之间。它们将LLM嵌入作为输入,并输出用于查询LLM的连续提示。此外,我们研究混合专家(MoE)模型,学习一组连续提示("专家"),并选择一个查询LLM。它们需要一个单独的分类器来训练人类注释的数据,以将自然语言提示映射到连续的提示。P-Adapters在从BERT和RoBERTa中提取事实信息时执行对更复杂的MoE模型的验证,同时消除了对额外注释的需要。与仅使用自然语言查询的基线相比,P适配器显示出12 - 26%的精确度绝对提高和36 - 50%的一致性绝对提高。最后,我们调查是什么使P-适配器成功,并得出结论,一个重要的因素是访问LLM的嵌入的原始自然语言提示,特别是被查询的实体对的主题。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑