用不变性训练提升大模型检索能力,让生成更准更可靠。
Invar-RAG: Invariant LLM-aligned Retrieval for Better Generation
- 分两阶段微调:先用不变性损失优化检索,再精调生成
- 在三个开放域问答数据集上显著超越基线模型
- 适合需要高可靠性的生成系统开发者
检索增强生成(RAG)在提供可靠答案和缓解幻觉方面表现优异。传统RAG使用强大检索模型提取外部信息,再由大语言模型(LLM)生成回答。近年来,基于LLM的检索因具备语义理解能力而大幅提升信息检索效果。然而,直接将LLM用于RAG面临挑战:大规模参数化知识可能导致特征局部化问题,例如检索时常仅输入文档摘要而非全文;此外,预训练任务引入的多样性会加剧模型方差,削弱检索性能。为此,本文提出一种新型两阶段微调架构Invar-RAG。在检索阶段,通过结合LoRA的表征学习解决特征局部化问题,并设计不变与可变两种模式及不变性损失以降低模型方差。在生成阶段,采用精细化微调方法提升答案生成准确性。实验表明,Invar-RAG在三个开放域问答(ODQA)数据集上显著优于现有基线模型。代码见补充材料以供复现。
原文摘要 · Abstract (English)
Retrieval-augmented generation (RAG) has shown impressive capability in providing reliable answer predictions and addressing hallucination problems. A typical RAG implementation uses powerful retrieval models to extract external information and large language models (LLMs) to generate answers. In contrast, recent LLM-based retrieval has gained attention for its substantial improvements in information retrieval (IR) due to the LLMs' semantic understanding capability. However, directly applying LLM to RAG systems presents challenges. This may cause feature locality problems as massive parametric knowledge can hinder effective usage of global information across the corpus; for example, an LLM-based retriever often inputs document summaries instead of full documents. Moreover, various pre-trained tasks in LLMs introduce variance, further weakening performance as a retriever. To address these issues, we propose a novel two-stage fine-tuning architecture called Invar-RAG. In the retrieval stage, an LLM-based retriever is constructed by integrating LoRA-based representation learning to tackle feature locality issues. To enhance retrieval performance, we develop two patterns (invariant and variant patterns) and an invariance loss to reduce LLM variance. In the generation stage, a refined fine-tuning method is employed to improve LLM accuracy in generating answers based on retrieved information. Experimental results show that Invar-RAG significantly outperforms existing baselines across three open-domain question answering (ODQA) datasets. Code is available in the Supplementary Material for reproducibility.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。