Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models

Qika Lin, Tianzhe Zhao, Kai He, Zhen Peng, Fangzhi Xu +3 more
1/30/2025
cs.CLcs.AI

No official code found. Best implementation: DeepReasoning/SSQR (17 stars, last commit 2025-06-01).

Abstract

Due to the presence of the natural gap between Knowledge Graph (KG) structures and the natural language, the effective integration of holistic structural information of KGs with Large Language Models (LLMs) has emerged as a significant question. To this end, we propose a two-stage framework to learn and apply quantized codes for each entity, aiming for the seamless integration of KGs with LLMs. Firstly, a self-supervised quantized representation (SSQR) method is proposed to compress both KG structural and semantic knowledge into discrete codes (\ie, tokens) that align the format of language sentences. We further design KG instruction-following data by viewing these learned codes as features to directly input to LLMs, thereby achieving seamless integration. The experiment results demonstrate that SSQR outperforms existing unsupervised quantized methods, producing more distinguishable codes. Further, the fine-tuned LLaMA2 and LLaMA3.1 also have superior performance on KG link prediction and triple classification tasks, utilizing only 16 tokens per entity instead of thousands in conventional prompting methods.

View on arXivView PDF

Code Implementations(1)

DeepReasoning/SSQRCommunity73%

Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models

170PythonJun 1, 20251 years ago

Similar Papers

Cite this paper

@article{lin2025selfsupervised,
  title  = {Self-supervised Quantized Representation for Seamlessly Integrating Knowledge Graphs with Large Language Models},
  author = {Qika Lin and Tianzhe Zhao and Kai He and Zhen Peng and Fangzhi Xu and Ling Huang and Jingying Ma and Mengling Feng},
  year   = {2025},
  eprint = {2501.18119},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.18119v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.18119.svg)](https://codeofpaper.com/paper/2501.18119)

Discussion