Skip to main content
QUICK REVIEW

[Paper Review] Exploring Large Language Models for Knowledge Graph Completion

Liang Yao, Jiazhen Peng|arXiv (Cornell University)|Aug 26, 2023
Topic ModelingComputer Science23 citations
TL;DR

The paper introduces KG-LLM, a framework that turns KG triples into text prompts and uses instruction-tuned large language models to perform KG completion, achieving strong results and showing that smaller fine-tuned models can outperform ChatGPT/GPT-4 on several tasks.

ABSTRACT

Knowledge graphs play a vital role in numerous artificial intelligence tasks, yet they frequently face the issue of incompleteness. In this study, we explore utilizing Large Language Models (LLM) for knowledge graph completion. We consider triples in knowledge graphs as text sequences and introduce an innovative framework called Knowledge Graph LLM (KG-LLM) to model these triples. Our technique employs entity and relation descriptions of a triple as prompts and utilizes the response for predictions. Experiments on various benchmark knowledge graphs demonstrate that our method attains state-of-the-art performance in tasks such as triple classification and relation prediction. We also find that fine-tuning relatively smaller models (e.g., LLaMA-7B, ChatGLM-6B) outperforms recent ChatGPT and GPT-4.

Motivation & Objective

  • Motivate knowledge graph completion as a text-sequence modeling task using large language models (LLMs).
  • Investigate whether instruction tuning of open LLMs can yield state-of-the-art KG completion results.
  • Assess performance of various LLMs and fine-tuning configurations on standard KG benchmarks.
  • Explore the impact of incorporating structural information from KGs into prompting and training.

Proposed method

  • Treat entities, relations, and triples as textual sequences and frame KG completion as a sequence-to-sequence problem.
  • Fine-tune open LLMs (ChatGLM-6B with P-tuning v2 and LLaMA 1/2 with LoRA) to become KG-LLM models.
  • Form task prompts for triple classification, relation prediction, and entity/link prediction, enabling the model to generate plausible answers.
  • Incorporate local KG structure by sampling K neighboring entities for entity prediction tasks to provide contextual cues in prompts.
  • Compare instruction-tuned KG-LLMs against standard KG embeddings and pre-trained LMs (including ChatGPT and GPT-4) across multiple datasets.
  • Evaluate on datasets WN11, FB13, WN18RR, and YAGO3-10, including 100-example subsets FB13-100 and YAGO3-10-100 due to GPT-4 access limits.

Experimental results

Research questions

  • RQ1Can instruction-tuned open LLMs serve as effective knowledge graph completion models across triple classification, relation prediction, and entity prediction tasks?
  • RQ2Do smaller, instruction-tuned LLMs outperform proprietary ChatGPT and GPT-4 on KG completion benchmarks?
  • RQ3How does incorporating KG structural information via prompts affect KG completion performance?
  • RQ4What are the relative strengths of LLaMA-based vs. ChatGLM-based KG-LLMs in different KG completion tasks?

Key findings

  • KG-LLM achieves strong results across KG completion tasks, with instruction tuning aiding performance significantly.
  • KG-LLaMA-7B and KG-LLaMA-13B show competitive or superior results compared with ChatGPT and even GPT-4 on several measures.
  • KG-LLaMA-13B and KG-LLaMA2-13B achieve high triple classification accuracy on WN11 and FB13, outperforming LLaMA baselines and approaching or matching GPT-4 in some instances.
  • KG-LLaMA-7B achieves leading Hits@1 in relation prediction on YAGO3-10, outperforming several baselines and some large LLMs.
  • Incorporating structural information (neighboring entities) yields substantial gains, highlighting the benefit of combining textual prompts with KG structure.
  • Instruction turning enables LLMs to leverage stored knowledge more effectively, as shown by improved responses compared to non-instruction-tuned baselines.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.