Beyond Textual Context: Structural Graph Encoding with Adaptive Space Alignment to alleviate the hallucination of LLMs

Yifang Zhang, Pengfei Duan, Yiwen Yang, Shengwu Xiong
9/26/2025
cs.CLcs.AI

Official code: yfangZhang/SSKG-LLM (0 stars, Python, last commit 2025-02-14).

Abstract

Currently, the main approach for Large Language Models (LLMs) to tackle the hallucination issue is incorporating Knowledge Graphs(KGs).However, LLMs typically treat KGs as plain text, extracting only semantic information and limiting their use of the crucial structural aspects of KGs. Another challenge is the gap between the embedding spaces of KGs encoders and LLMs text embeddings, which hinders the effective integration of structured knowledge.

Show full abstract

To overcome these obstacles, we put forward the SSKG-LLM, an innovative model architecture that is designed to efficiently integrate both the Structural and Semantic information of KGs into the reasoning processes of LLMs. SSKG-LLM incorporates the Knowledge Graph Retrieval (KGR) module and the Knowledge Graph Encoding (KGE) module to preserve semantics while utilizing structure. Then, the Knowledge Graph Adaptation (KGA) module is incorporated to enable LLMs to understand KGs embeddings. We conduct extensive experiments and provide a detailed analysis to explore how incorporating the structural information of KGs can enhance the factual reasoning abilities of LLMs. Our code are available at https://github.com/yfangZhang/SSKG-LLM.

View on arXivView PDF

Code Implementations(1)

00Python, ShellFeb 14, 20251 years ago

Similar Papers

Cite this paper

@article{zhang2025beyond,
  title  = {Beyond Textual Context: Structural Graph Encoding with Adaptive Space Alignment to alleviate the hallucination of LLMs},
  author = {Yifang Zhang and Pengfei Duan and Yiwen Yang and Shengwu Xiong},
  year   = {2025},
  eprint = {2509.22251},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.22251v1}
}

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/2509.22251.svg)](https://codeofpaper.com/paper/2509.22251)

Discussion