arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.00715cs.CLcs.AIcs.LG
收藏

记忆还是检索:考虑RAG的缩放规律

To Memorize or to Retrieve: Scaling the Interaction Between Pretraining and Retrieval

Stanford University(斯坦福大学);Independent Researcher(独立研究员);Patronus AI;The Ohio State University(俄亥俄州立大学);Carnegie Mellon University(卡内基梅隆大学)

Karan Singh, Michael Yu, Varun Gangal, Zhuofu Tao, Sachin Kumar, Emmy Liu, Steven Y. Feng

AI总结:

研究探讨了预训练知识与检索知识的平衡,提出三维缩放框架,揭示在不同模型规模和任务类型下检索的边际效用,为语言模型设计提供数据资源分配指导。

摘要:

检索增强生成(RAG)通过在测试时提供相关上下文来提升语言模型(LM)性能,特别是在知识密集型场景中。然而,预训练过程中获得的参数化知识与通过检索访问的非参数化知识之间的关系仍不明确,尤其是在固定数据预算下。本文系统研究了预训练语料库大小与检索存储大小之间的权衡,训练了从30M到3B参数的OLMo-2基语言模型,使用最多100B个DCLM数据 token,同时调整预训练数据规模(1-150倍参数数)和检索存储大小(1-20倍),并在涵盖推理、科学问答和开放领域问答的多样化基准测试中评估性能。发现检索在所有模型规模上均优于仅参数化基线,并引入了一个三维缩放框架,将性能建模为模型大小、预训练 token 和检索语料库大小的函数。此缩放流形使我们能够估算固定数据预算在预训练和检索之间的最佳分配,揭示检索的边际效用强烈依赖于模型规模、任务类型和预训练饱和度的程度。我们的结果为理解何时以及如何补充预训练提供了定量基础,为可扩展语言模型系统的设计提供实用指导。

英文摘要:

Retrieval-augmented generation (RAG) improves language model (LM) performance by providing relevant context at test time for knowledge-intensive situations. In this work, we systematically study the trade-off between pretraining and retrieval by training OLMo-2-based LMs ranging from 30M to 3B parameters on up to 100B DCLM tokens, while varying pretraining data scale, retrieval store size, and retrieval store source (pretraining vs. new data) across reasoning, scientific QA, and open-domain QA benchmarks. We find that retrieval gains depend on model capacity and pretraining exposure and are strongly front-loaded, with a median 91% of the largest observed improvement realized by one retrieval token per model parameter. However, the interaction is objective-dependent: smaller models gain more in gold-answer perplexity, whereas larger, more-pretrained models gain more in accuracy. Retrieval from previously seen data also preserves most of the held-out retrieval gain. Retrieval is therefore a task-, regime-, and metric-dependent complement to parametric learning whose value also depends on datastore size and information novelty. Overall, this motivates the explicit partitioning of data between internalization and external access for LM design.

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

↑