DrKGC: Dynamic Subgraph Retrieval-Augmented LLMs for Knowledge Graph Completion across General and Biomedical Domains

Yongkang Xiao, Sinian Zhang, Yi Dai, Huixue Zhou, Jue Hou, Jie Ding, Rui Zhang

TL;DR

This paper introduces DrKGC, a novel framework that enhances Large Language Models (LLMs) for Knowledge Graph Completion (KGC) by dynamically retrieving and integrating relevant subgraphs. DrKGC significantly improves KGC performance, especially in complex biomedical domains, by grounding LLM predictions in rich structural and logical information.

What Problem Does This Paper Address?

Knowledge Graph Completion (KGC) aims to predict missing relationships (triples) in knowledge graphs (KGs). While recent approaches leverage LLMs for this task, they often struggle to fully utilize the inherent structural information of KGs. Existing methods either encode graph context into text, losing structural nuances, or use static embeddings that don't adapt to specific queries. This leads to generic predictions, particularly problematic in dense biomedical KGs where many-to-many relationships are common. The paper addresses these limitations by proposing a method that dynamically incorporates structural information into LLM-based KGC.

Methods

DrKGC employs a multi-stage approach:

  1. Question Generation: Incomplete triples are converted into natural language questions using a template lexicon, making them more amenable to LLM understanding.
  2. Lightweight Model Training: Simple, efficient models are trained to learn global entity embeddings and logical rules from the KG. These are used to identify potential candidate entities for the missing part of a triple.
  3. Dynamic Subgraph Retrieval: A novel bottom-up retrieval strategy extracts a query-specific subgraph. This subgraph connects the query entity to the candidate entities and is enriched by incorporating learned logical rules.
  4. Structure-Aware Embedding Enhancement: A Graph Convolutional Network (GCN) adapter processes the retrieved subgraph to generate "local" embeddings. These local embeddings are then concatenated with the global embeddings to create enhanced structural representations.
  5. LLM Fine-tuning: The enhanced structural embeddings, along with the generated question and candidate entities, are fed into an LLM for fine-tuning, guiding it to make more accurate and contextually grounded predictions.

Datasets

The authors evaluated DrKGC on four datasets:

  • General Domain:
    • WN18RR (derived from WordNet)
    • FB15k-237 (derived from Freebase)
  • Biomedical Domain:
    • PharmKG (focused on genes, diseases, and chemicals)
    • PrimeKG (a multimodal BKG for precision medicine analysis, specifically a subset tailored for drug repurposing)

Key Insights and Ideas

  • Dynamic Subgraph Retrieval is Crucial: Unlike static approaches, DrKGC's ability to dynamically retrieve relevant subgraphs based on the specific query and candidate entities is key to its success. This allows the model to focus on pertinent local structures.
  • Bridging LLMs and KG Structure: The framework effectively bridges the gap between LLMs' natural language understanding and the structured, relational nature of KGs by converting KGC tasks into question-answering and enriching prompts with structural embeddings.
  • Biomedical Domain Benefits: The method shows particular promise in biomedical KGs, where complex relationships and the need for interpretability are high. The subgraph retrieval can provide mechanistic insights into predictions.
  • Question Generation Enhances LLM Performance: Reformulating KGC as question-answering improves LLM performance, especially for domain-specific relationships where explicit phrasing is beneficial.

Key Results

DrKGC achieved state-of-the-art performance on all four evaluated datasets (WN18RR, FB15k-237, PharmKG, and PrimeKG) across various metrics like MRR and Hits@k.

  • On WN18RR, DrKGC outperformed generation-based methods, showing significant improvements over DIFT.
  • On FB15k-237, DrKGC surpassed all baselines, demonstrating its ability to capture complex relational structures.
  • On PharmKG and PrimeKG, DrKGC consistently outperformed baselines, proving its effectiveness even with limited text information in BKGs.
  • Ablation studies confirmed the importance of each component: removing rule restrictions, local embeddings, or question templates led to performance degradation.
  • The model showed robustness under inductive settings (unseen entities/relations) and when injected with noise.

Limitations and Future Work

  • Computational Cost: Fine-tuning LLMs is computationally intensive.
  • LLM Capabilities: Performance is inherently limited by the current capabilities of LLMs and lightweight models.
  • Subgraph Retrieval: While the heuristic retrieval method is effective, more rigorous rule-based detection, filtering, or learning-driven subgraph retrieval could further enhance performance.
  • Future Directions: The authors plan to explore optimizing fine-tuning efficiency, enhancing LLM performance, and extending the framework to other graph tasks like reasoning and question answering. Investigating more sophisticated subgraph retrieval techniques is also a priority.

Summary updated

BibTeX
@inproceedings{xiao2025drkgc,
  author = {Yongkang Xiao and Sinian Zhang and Yi Dai and Huixue Zhou and Jue Hou and Jie Ding and Rui Zhang},
  title = {{DrKGC: Dynamic Subgraph Retrieval-Augmented LLMs for Knowledge Graph Completion across General and Biomedical Domains}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
}
Figure