arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2501.08248cs.CLcs.AIcs.IRcs.LG
收藏

激发长上下文大型语言模型的上下文内检索与推理能力

Eliciting In-context Retrieval and Reasoning for Long-context Large Language Models

University of Edinburgh(爱丁堡大学);Apple(苹果公司)

Yifu Qiu, Varun Embar, Yizhe Zhang, Navdeep Jaitly, Shay B. Cohen, Benjamin Han

AI总结:

针对现有长上下文基准过于简化的问题,本文提出ICR^2基准及检索微调、注意力探测和联合检索头训练方法,显著提升Mistral-7B的上下文检索推理性能。

摘要:

长上下文语言模型(LCLM)的最新进展有望通过简化流水线来变革检索增强生成(RAG)。借助扩展的上下文窗口,LCLM能够处理整个知识库并直接执行检索和推理——我们将这一能力定义为上下文内检索与推理(ICR^2)。然而,LOFT等现有基准往往因提供过度简化的上下文而高估LCLM的性能。为解决这一问题,我们推出ICR^2基准,通过纳入由强检索器检索到的干扰段落,在更真实的场景中评估LCLM。随后,我们提出三种提升LCLM性能的方法:(1)先检索后生成微调;(2)检索注意力探测,在解码过程中利用注意力头过滤长上下文并去噪;(3)与生成头联合训练检索头。我们在LOFT和ICR^2上对五个知名LCLM进行评估,结果表明,将最佳方法应用于Mistral-7B可带来显著提升:与原始RAG和监督微调相比,在LOFT上的Exact Match分别提高17分和15分,在ICR^2上分别提高13分和2分。尽管模型小得多,它甚至在大多数任务上优于GPT-4-Turbo。

英文摘要:

Recent advancements in long-context language models (LCLMs) promise to transform Retrieval-Augmented Generation (RAG) by simplifying pipelines. With their expanded context windows, LCLMs can process entire knowledge bases and perform retrieval and reasoning directly -- a capability we define as In-Context Retrieval and Reasoning (ICR^2). However, existing benchmarks like LOFT often overestimate LCLM performance by providing overly simplified contexts. To address this, we introduce ICR^2, a benchmark that evaluates LCLMs in more realistic scenarios by including confounding passages retrieved with strong retrievers. We then propose three methods to enhance LCLM performance: (1) retrieve-then-generate fine-tuning, (2) retrieval-attention-probing, which uses attention heads to filter and de-noise long contexts during decoding, and (3) joint retrieval head training alongside the generation head. Our evaluation of five well-known LCLMs on LOFT and ICR^2 demonstrates significant gains with our best approach applied to Mistral-7B: +17 and +15 points by Exact Match on LOFT, and +13 and +2 points on ICR^2, compared to vanilla RAG and supervised fine-tuning, respectively. It even outperforms GPT-4-Turbo on most tasks despite being a much smaller model.

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

↑