让知识图谱实体用分层离散码表示,提升大模型推理能力
GS-Quant: Granular Semantic and Generative Structural Quantization for Knowledge Graph Completion

- 用分层语义增强生成结构化离散代码,模拟人类由泛到精的思维
- 在多个基准上超越现有方法,最高提升12.3%(MRR)
- 适合做知识图谱补全的大模型研究者和工程师
大语言模型在知识图谱补全任务中展现出巨大潜力,但连续图嵌入与离散语言标记之间的模态鸿沟仍是关键挑战。现有基于量化的方法通常将量化视为简单的数值压缩,导致语义混杂的编码,无法反映人类推理的层次性。本文提出GS-Quant框架,为知识图谱实体生成语义连贯、结构分层的离散代码。不同于以往方法,GS-Quant基于实体表示应遵循语言学上由粗到细逻辑的洞察,引入粒度语义增强模块,将层次化知识注入代码本,使早期代码捕捉全局语义类别,后期代码细化具体属性;同时设计生成式结构重建模块,对代码序列施加因果依赖,将独立离散单元转化为结构化语义描述。通过扩展大模型词汇表以包含这些学习到的代码,使模型能够以类自然语言生成的方式对图结构进行推理。实验表明,GS-Quant显著优于现有文本和嵌入基基线,在多个数据集上实现领先性能,最高提升12.3%(MRR)。代码已开源:https://github.com/mikumifa/GS-Quant。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have shown immense potential in Knowledge Graph Completion (KGC), yet bridging the modality gap between continuous graph embeddings and discrete LLM tokens remains a critical challenge. While recent quantization-based approaches attempt to align these modalities, they typically treat quantization as flat numerical compression, resulting in semantically entangled codes that fail to mirror the hierarchical nature of human reasoning. In this paper, we propose GS-Quant, a novel framework that generates semantically coherent and structurally stratified discrete codes for KG entities. Unlike prior methods, GS-Quant is grounded in the insight that entity representations should follow a linguistic coarse-to-fine logic. We introduce a Granular Semantic Enhancement module that injects hierarchical knowledge into the codebook, ensuring that earlier codes capture global semantic categories while later codes refine specific attributes. Furthermore, a Generative Structural Reconstruction module imposes causal dependencies on the code sequence, transforming independent discrete units into structured semantic descriptors. By expanding the LLM vocabulary with these learned codes, we enable the model to reason over graph structures isomorphically to natural language generation. Experimental results demonstrate that GS-Quant significantly outperforms existing text-based and embedding-based baselines. Our code is publicly available at https://github.com/mikumifa/GS-Quant.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。