REPLUG: Retrieval-Augmented Black-Box Language Models

https://papers.cool/arxiv/2301.12652

Authors: Weijia Shi ; Sewon Min ; Michihiro Yasunaga ; Minjoon Seo ; Rich James ; Mike Lewis ; Luke Zettlemoyer ; Wen-tau Yih

Summary: We introduce REPLUG, a retrieval-augmented language modeling framework that treats the language model (LM) as a black box and augments it with a tuneable retrieval model. Unlike prior retrieval-augmented LMs that train language models with special cross attention mechanisms to encode the retrieved text, REPLUG simply prepends retrieved documents to the input for the frozen black-box LM. This simple design can be easily applied to any existing retrieval and language models. Furthermore, we show that the LM can be used to supervise the retrieval model, which can then find documents that help the LM make better predictions. Our experiments demonstrate that REPLUG with the tuned retriever significantly improves the performance of GPT-3 (175B) on language modeling by 6.3%, as well as the performance of Codex on five-shot MMLU by 5.1%.


Q: 这篇论文试图解决什么问题?

A: 这篇论文介绍了REPLUG(Retrieve and Plug),这是一个增强黑盒语言模型(LM)的框架,通过将其与可调的检索模型相结合。REPLUG旨在解决以下问题:

  1. 大型语言模型(LLMs)的局限性:尽管像GPT-3和Codex这样的大型语言模型在多种语言任务上表现出色,但它们也容易受到幻觉的影响,并且无法完全代表训练语料库中的全部知识。
  2. 检索增强语言模型的适用性问题:以往的检索增强语言模型方法需要访问内部LM表示(例如,用于训练模型或索引数据存储),这使得它们难以应用于非常大的LM,尤其是那些只能通过API访问的模型。
  3. 提高语言模型的性能:REPLUG通过检索外部数据存储中的知识来增强语言模型,这有助于减少幻觉并增加模型的知识覆盖范围,从而提高语言建模和下游任务(如MMLU和开放领域问答)的性能。
  4. 检索模型与语言模型的协同优化:REPLUG提出了一种训练方案(REPLUG LSR),通过使用语言模型的输出作为监督信号来进一步改进检索模型,使其能够找到有助于LM做出更好预测的文档。

总的来说,REPLUG框架试图通过检索增强来克服大型黑盒语言模型的局限性,提高其在语言建模和理解任务中的性能,同时保持模型的灵活性和适用性。


Q: 有哪些相关研究?

A: 相关研究主要集中在以下几个方面:

  1. 大型语言模型(LLMs):研究如GPT-3 (Brown et al., 2020a) 和 Codex (Chen et al., 2021a) 展示了在多种语言任务上的卓越性能。这些模型通常在非常大的数据集上训练,并在其参数中隐式存储了大量的世界或领域知识。
  2. 检索增强语言模型(Retrieval-Augmented Language Models):这类模型可以在需要时从外部数据存储中检索知识,以减少幻觉并增加覆盖范围。例如,Khandelwal et al. (2020) 和 Borgeaud et al. (2022) 的工作。
  3. 黑盒语言模型:由于商业考虑,一些顶级的LLMs(如GPT-3)并未开源,而是作为黑盒API提供。这限制了对这些模型的直接访问和微调。研究者们探索了如何在黑盒设置中通过检索来增强这些模型,例如Mallen et al. (2022) 和 Si et al. (2023) 的工作。
  4. 检索模型:研究者们开发了各种检索模型,包括密集型(dense)和稀疏型(sparse)检索器。例如,Karpukhin et al. (2020a) 和 Izacard et al. (2022a) 提出了基于双编码器架构的密集型检索器。
  5. 检索增强模型的训练:一些研究提出了训练方法来改进检索增强语言模型,例如Sachan et al. (2022) 提出了使用语言模型的输出作为监督信号来训练检索器的方法。