Filter-then-Generate: Large Language Models with Structure-Text Adapter for Knowledge Graph Completion

Ben Liu, Jihai Zhang, Fangquan Lin, Cheng Yang, Min Peng
12/12/2024
cs.CLcs.AIcs.LG

Official code: LB0828/FtG (16 stars, last commit 2025-01-17).

Abstract

Large Language Models (LLMs) present massive inherent knowledge and superior semantic comprehension capability, which have revolutionized various tasks in natural language processing. Despite their success, a critical gap remains in enabling LLMs to perform knowledge graph completion (KGC). Empirical evidence suggests that LLMs consistently perform worse than conventional KGC approaches, even through sophisticated prompt design or tailored instruction-tuning. Fundamentally, applying LLMs on KGC introduces several critical challenges, including a vast set of entity candidates, hallucination issue of LLMs, and under-exploitation of the graph structure. To address these challenges, we propose a novel instruction-tuning-based method, namely FtG. Specifically, we present a filter-then-generate paradigm and formulate the KGC task into a multiple-choice question format. In this way, we can harness the capability of LLMs while mitigating the issue casused by hallucinations. Moreover, we devise a flexible ego-graph serialization prompt and employ a structure-text adapter to couple structure and text information in a contextualized manner. Experimental results demonstrate that FtG achieves substantial performance gain compared to existing state-of-the-art methods. The instruction dataset and code are available at https://github.com/LB0828/FtG.

View on arXivView PDF

Code Implementations(1)

LB0828/FtGOfficial100%

[COLING'25] Filter-then-Generate: Large Language Models with Structure-Text Adapter for Knowledge Graph Completion

160Shell, PythonJan 2, 20241 years ago
adapterknowledge-graphknowledge-graph-completionknowledge-graph-reasoninglarge-language-models

Similar Papers

Cite this paper

@article{liu2024filterthengenerate,
  title  = {Filter-then-Generate: Large Language Models with Structure-Text Adapter for Knowledge Graph Completion},
  author = {Ben Liu and Jihai Zhang and Fangquan Lin and Cheng Yang and Min Peng},
  year   = {2024},
  eprint = {2412.09094},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.09094v3}
}

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

Discussion