ConceptFormer: Towards Efficient Use of Knowledge-Graph Embeddings in Large Language Models

📄 arXiv: 2504.07624v1 📥 PDF

作者: Joel Barmettler, Abraham Bernstein, Luca Rossetto

分类: cs.CL, cs.AI, cs.IR

发布日期: 2025-04-10


💡 一句话要点

提出ConceptFormer以高效整合知识图谱嵌入至大型语言模型

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 知识图谱 大型语言模型 检索增强生成 概念向量 事实回忆 自然语言处理

📋 核心要点

  1. 现有的RAG方法在整合知识图谱时效率低下,通常需要修改预训练模型或依赖文本化的知识表示。
  2. ConceptFormer通过在LLM嵌入空间中直接创建和注入概念向量,避免了对模型结构的修改,提升了知识整合的效率。
  3. 实验结果显示,添加概念向量后,GPT-2的事实回忆能力显著提升,尤其在维基百科句子上提升了272%。

📝 摘要(中文)

检索增强生成(RAG)在最近得到了广泛关注,尤其是在大型语言模型(LLMs)中整合世界知识的重要性日益突出。现有的RAG方法通常会修改预训练语言模型(PLMs)的内部架构或依赖于文本化的知识图谱(KGs),这在令牌使用上效率较低。本文提出了ConceptFormer,一种新的方法,通过在LLM嵌入向量空间中创建和注入概念向量,直接将KG节点的信息整合到LLMs中,而无需改变其内部结构或依赖KG的文本输入。通过与冻结的LLM共同训练,ConceptFormer生成了一个全面的查找表,将KG节点映射到相应的概念向量。实验表明,向GPT-2 0.1B添加概念向量显著提高了其事实回忆能力,测试结果显示在维基百科句子上提升了272%,在合成生成句子上提升了348%。

🔬 方法详解

问题定义:本文旨在解决现有RAG方法在整合知识图谱时的低效率问题,尤其是对预训练语言模型的结构修改和文本化知识表示的依赖。

核心思路:ConceptFormer的核心思路是通过在LLM的嵌入向量空间中直接生成和注入概念向量,来整合知识图谱的信息,从而避免对模型内部结构的修改。

技术框架:整体架构包括一个冻结的LLM和一个生成概念向量的模块,ConceptFormer通过训练生成一个查找表,将KG节点映射到概念向量。

关键创新:最重要的创新在于ConceptFormer能够在不修改LLM内部结构的情况下,直接利用KG信息,显著提高了知识整合的效率。

关键设计:在设计中,ConceptFormer使用了特定的损失函数来优化概念向量的生成,并确保这些向量能够有效地表示KG节点的信息。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,向GPT-2 0.1B添加概念向量后,其事实回忆能力(Hit@10)在维基百科句子上提升了272%,在合成生成句子上提升了348%。即使仅注入一个概念向量,维基百科句子的事实回忆能力也提升了213%,且输入令牌消耗减少了130倍,显著优于传统的RAG方法。

🎯 应用场景

该研究的潜在应用领域包括智能问答系统、知识驱动的对话系统以及信息检索等。通过高效整合知识图谱,ConceptFormer能够提升模型的事实回忆能力,从而在多种自然语言处理任务中发挥重要作用,未来可能对知识管理和信息获取产生深远影响。

📄 摘要(原文)

Retrieval Augmented Generation (RAG) has enjoyed increased attention in the recent past and recent advancements in Large Language Models (LLMs) have highlighted the importance of integrating world knowledge into these systems. Current RAG methodologies often modify the internal architecture of pre-trained language models (PLMs) or rely on textifying knowledge graphs (KGs), which is inefficient in terms of token usage. This paper introduces ConceptFormer, a new approach to augment LLMs with structured knowledge from KGs, such as Wikidata, without altering their internal structure or relying on textual input of KGs. ConceptFormer operates in the LLM embedding vector space, creating and injecting \emph{concept vectors} that encapsulate the information of the KG nodes directly. Trained in conjunction with a frozen LLM, ConceptFormer generates a comprehensive lookup table that maps KG nodes to their respective concept vectors. The approach aims to enhance the factual recall capabilities of LLMs by enabling them to process these concept vectors natively, thus enriching them with structured world knowledge in an efficient and scalable manner. Our experiments demonstrate that the addition of concept vectors to GPT-2 0.1B substantially increases its factual recall ability (Hit@10) by up to 272\% when tested on sentences from Wikipedia and up to 348\% on synthetically generated sentences. Even injecting only a single concept vector into the prompt increases factual recall ability (Hit@10) by up to 213\% on Wikipedia sentences, significantly outperforming RAG with graph textification while consuming 130x fewer input tokens.