Lune

AAAI2026Top-tier venue

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

Bohan Yu, Wei Huang, Kang Liu

Abstract

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 model's 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. Our code will be available at SR-KI.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • SnapKV: LLM Knows What You are Looking for Before Generation cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • RankRAG: Unifying Context Ranking with Retrieval-Augmented Generation in LLMs cites Finetuned Language Models are Zero-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on13

  1. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
  2. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 citations
  3. SnapKV: LLM Knows What You are Looking for Before GenerationYuhong Li, Yingbing Huang, Bowen Yang, Bharat Venkitesh et al.NeurIPS 2024 · 1,019 citations
  4. RankRAG: Unifying Context Ranking with Retrieval-Augmented Generation in LLMsYue Yu, Wei Ping, Zihan Liu, Boxin Wang et al.NeurIPS 2024 · 321 citations
  5. WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language ModelsPeng Wang, Zexi Li, Ningyu Zhang, Ziwen Xu et al.NeurIPS 2024 · 125 citations

Related papers

  1. AtlasKV: Augmenting LLMs with Billion-Scale Knowledge Graphs in 20GB VRAMHaoyu Huang, Hong Ting Tsang, Jiaxin Bai, Xi Peng et al.ICLR 2026 · 4 citations
  2. KBLaM: Knowledge Base augmented Language ModelXi Wang, Taketomo Isazawa, Liana Mikaelyan, James HensmanICLR 2025
  3. Synthetic Knowledge Ingestion: Towards Knowledge Refinement and Injection for Enhancing Large Language ModelsJiaxin Zhang, Wendi Cui, Yiran Huang, Kamalika Das et al.EMNLP 2024 · 8 citations
  4. InfuserKI: Enhancing Large Language Models with Knowledge Graphs via Infuser-Guided Knowledge IntegrationFali Wang, Runxue Bao, Suhang Wang, Wenchao Yu et al.EMNLP Findings 2024 · 16 citations
  5. mKG-RAG: Leveraging Multimodal Knowledge Graphs in Retrieval-Augmented Generation for Knowledge-intensive VQAXu Yuan, Liangbo Ning, Qingqing Ye, Wenqi Fan et al.SIGIR 2026 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines