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

SR-KI:通过监督注意力实现可扩展且实时的知识集成到LLM

SR-KI: Scalable and Real-Time Knowledge Integration into LLMs via Supervised Attention

Baidu(百度)

Bohan Yu, Wei Huang, Kang Liu

AI总结:

SR-KI通过将知识库编码为键值对注入LLM的KV缓存,并在潜在空间内以监督注意力进行端到端检索,实现单GPU上7B模型集成40K知识库,同时保持高检索性能与高压缩率。

摘要:

本文提出了SR-KI,一种将实时和大规模结构化知识库(KBs)集成到大语言模型(LLMs)中的新方法。SR-KI首先使用预训练编码器将知识库编码为键值对,并将其注入LLMs的KV缓存中。在此表示基础上,我们采用两阶段训练范式:首先在LLM内部定位一个专用的检索层,然后在该层应用基于注意力的损失,以显式监督对相关知识库条目的注意力。与严重依赖外部检索器性能和多阶段流水线的传统检索增强生成方法不同,SR-KI通过完全在模型潜在空间内执行检索来支持端到端推理。该设计能够高效压缩注入的知识,并促进动态知识更新。综合实验表明,SR-KI能够在单块A100 40GB GPU上将多达40K个知识库集成到一个7B LLM中,并实现了强大的检索性能,在最佳任务上保持超过98%的Recall@10,在所有任务上平均超过88%。在问答和知识库ID生成上的任务性能也表明,SR-KI在保持强大性能的同时,实现了对注入知识库高达99.75%的压缩。

英文摘要:

This paper proposes SR-KI, a novel approach for integrating real-time and large-scale structured knowledge bases (KBs) into large language models (LLMs). SR-KI begins by encoding KBs into key-value pairs using a pretrained encoder, and injects them into LLMs' KV cache. Building on this representation, we employ a two-stage training paradigm: first locating a dedicated retrieval layer within the LLM, and then applying an attention-based loss at this layer to explicitly supervise attention toward relevant KB entries. Unlike traditional retrieval-augmented generation methods that rely heavily on the performance of external retrievers and multi-stage pipelines, SR-KI supports end-to-end inference by performing retrieval entirely within the models latent space. This design enables efficient compression of injected knowledge and facilitates dynamic knowledge updates. Comprehensive experiments demonstrate that SR-KI enables the integration of up to 40K KBs into a 7B LLM on a single A100 40GB GPU, and achieves strong retrieval performance, maintaining over 98% Recall@10 on the best-performing task and exceeding 88% on average across all tasks. Task performance on question answering and KB ID generation also demonstrates that SR-KI maintains strong performance while achieving up to 99.75% compression of the injected KBs.

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

↑