基于LoRA适配器潜在路由的参数化检索增强生成
Parametric Retrieval-Augmented Generation using Latent Routing of LoRA Adapters
AI总结:
Poly-PRAG通过少量LoRA适配器和潜在路由函数,高效整合外部知识,降低存储与推理成本。
摘要:
参数化检索增强生成(PRAG)是一种整合外部知识直接进入模型参数的RAG方法,通过LoRA适配器实现,旨在降低与传统RAG相比的推理成本。然而,当前PRAG方法采用一对一文档编码方案,为每个单独文档使用专门的LoRA适配器。这种方案引入了两个主要限制:1)随着文档数量的增加,训练和存储成本将变得不可接受。2)由于文档间共享的知识,LoRA适配器可能大量重叠,使该方法效率极低。为克服这些挑战,我们提出了Poly-PRAG方法,使用少量LoRA适配器,能够编码更广泛的知识。每个文档可以通过潜在路由函数结合它们进行编码。通过联合训练LoRA适配器和潜在路由函数,每个LoRA适配器能够编码文档间共享的知识部分,而路由函数可为文档选择最佳的适配器组合。在四个基准测试上的实验结果表明,Poly-PRAG相比其他强大的PRAG基线方法更有效。此外,这种方法通过避免存储大量LoRA适配器减少了存储需求,并提供了一种更高效地将外部知识编码到大语言模型中的方法。
英文摘要:
Parametric Retrieval-Augmented Generation (PRAG) is a RAG approach that integrates external knowledge directly into model parameters using a LoRA adapter, aiming at reducing the inference cost compared to traditional RAG. However, current PRAG approaches adopt a \textit{one-to-one} document encoding scheme, using a dedicated LoRA adapter for each individual document. This scheme introduces two major limitations: 1) As the number of documents increases, there will be a prohibitive cost for training and storage. 2) The LoRA adapters may largely overlap due to the shared knowledge across documents, making the approach highly inefficient. To overcome these challenges, we propose the Poly-PRAG approach, which uses a small set of LoRA adapters that are able to encode more general knowledge. Each document can be encoded using a combination of them through a latent routing function. By jointly training the LoRA adapters and the latent routing function, each LoRA adapter is able to encode a shared part of the knowledge across documents, and the routing function can select the best combination of adapters for a document. Experimental results on four benchmarks demonstrate the effectiveness of the Poly-PRAG compared to other strong PRAG baselines. In addition, this approach reduces the storage requirement by avoiding the need to store a large number of LoRA adapters and offers a more efficient way to encode external knowledge into LLMs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。