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 · 2025
Read DrKGC: Dynamic Subgraph Retrieval-Augmented LLMs for Knowledge Graph Completion across General and Biomedical Domains by Yongkang Xiao, Sinian Zhang, Yi Dai, Huixue Zhou, Jue Hou, Jie Ding, Rui Zhang (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-00708.txt.
Introduction
Yongkang Xiao and co-authors present a system that fills gaps in knowledge graphs with help from language models, in this 2025 paper. A knowledge graph stores facts as triples, such as a drug treating a disease, and many true triples are missing. Language models can guess the gaps, but feeding them the graph as plain text wastes its structure.
Their system, DrKGC, first learns structural codes and logical rules from the graph with a light model. For each question it then retrieves a small, rule-guided subgraph of the most relevant facts. A graph network polishes the codes using that subgraph, and the result is folded into the prompt for final tuning of the language model. Tests on two general and two medical datasets beat rival methods. A medical case study showed the system can also explain its guesses in human terms, which matters for clinical use.
Catalog record
| CREATOR | Yongkang Xiao, Sinian Zhang, Yi Dai, Huixue Zhou, Jue Hou, Jie Ding, Rui Zhang |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 47 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2506-00708
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
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 Abstract Knowledge graph completion (KGC) aims to predict missing triples in knowledge graphs (KGs) by leveraging existing triples and textual information. Recently, generative large language models (LLMs) have been increasingly employed for graph tasks. However, current approaches typically encode graph context in textual form, which fails to fully exploit the potential of LLMs for perceiving and reasoning about graph structures. To address this limitation, we propose DrKGC ( D ynamic Subgraph R etrieval-Augmented LLMs for K nowledge G raph C ompletion). DrKGC employs a flexible lightweight model training strategy to learn structural embeddings and logical rules within the KG. It then leverages a novel bottom-up graph retrieval method to extract a subgraph for each query guided by the learned rules. Finally, a graph convolutional network (GCN) adapter uses the retrieved subgraph to enhance the structural embeddings, which are then integrated into the prompt for effective LLM fine-tuning. Experimental results on two general domain benchmark datasets and two biomedical datasets demonstrate the superior performance of DrKGC. Furthermore, a realistic case study in the biomedical domain highlights its interpretability and practical utility. 1 Introduction Knowledge graphs (KGs) are structured representations of real-world facts, typically formulated as a set of triples that consist of entities and their relationships ( Nickel et al. 2015 ; Ji et al. 2021 ) . Biomedical Knowledge Graphs (BKGs) are specialized forms of KGs tailored to the biomedical domain. In a BKG, nodes represent biomedical entities—such as molecules, diseases, and genes—while edges capture various relationships among these entities, typically through functional predicates relevant to the biomedical domain (e.g., “treats,” “inhibits,” and “causes”) ( Walsh et al. 2020 ) . BKGs have proved instrumental in numerous biological tasks, including drug repurposing, side-effect prediction, and drug–drug interaction detection ( Himmelstein et al. 2017 ; Zitnik et al. 2018 ; Lin et al. 2020 ) . BKGs, like other KGs, often suffer from incompleteness, typically manifested as missing edges between nodes ( Chen et al. 2020 ) . This incompleteness may arise because (1) the facts are absent from the data source, or (2) they remain undiscovered by humans. Such issues are particularly prevalent in BKGs, as their data primarily originates from experimental results, clinical trials, and scientific literature. To address the challenge of predicting missing information in knowledge graphs, a wide range of Knowledge Graph Completion (KGC) models have been developed. These include structure-based models such as TransE ( Bordes et al. 2013 ) and graph neural network (GNN) based models such as R-GCN ( Schlichtkrull et al. 2018 ) , rule-based approaches like Neural-LP ( Yang et al. 2017 ) , text-based methods such as KG-BERT ( Yao et al. 2019 ) . Recently, the advent of generative large language models (LLMs) has given rise to a new class of generation-based KGC approaches. Unlike traditional text-based methods that encode entity and relation descriptions into fixed embeddings, these approaches leverage LLMs to generate missing triples in a sequence-to-sequence manner, often relying on prompting or fine-tuning strategies (e.g., KICGPT ( Wei et al. 2024 ) , KoPA ( Zhang et al. 2024 ) ). Although generation-based methods have shown promise in KGC, they face several key limitations: ❶ Structural Information Loss : These methods often fail to preserve the rich structural information inherent in knowledge graphs. While graph paths or subgraphs can be encoded as text prompts, overly long inputs introduce noise and increase computational costs. ❷ Static Embedding Limitations : Incorporating structural embeddings into LLMs offers a partial solution but remains limited, as such embeddings are static and do not adapt to the query-specific context or dynamic subgraph structure. ❸ Generic Responses from LLMs : In the absence of additional constraints, LLMs tend to generate generic predictions influenced by pretraining data. This is especially problematic in biomedical KGs, where high-degree entities and many-to-many relations make multiple answers plausible—yet not all are contextually correct or desirable. To tackle these challenges, we propose D ynamic Subgraph R etrieval-Augmented LLMs for K nowledge G raph C ompletion ( DrKGC ). Our approach begins by converting incomplete triples into natural language questions using an automatically generated template lexicon. It then employs a lightweight model to learn structure embeddings for entities and rank candidate entities based on their relevance to the query. This anchors the reasoning process in semantic and structural context without requiring long or noisy text prompts (❶). To overcome the limitations of static embeddings (❷), DrKGC dynamically constructs a query-specific subgraph using retrieved candidates and learned logical rules. This enables the model to focus on relevant local structures and incorporate adaptive, context-aware structural cues during inference. Finally, to mitigate the risk of generic or irrelevant responses (❸), DrKGC restricts the output space by explicitly defining a candidate entity set. The prompt is enriched with both global and local graph signals, guiding the LLM to generate contextually grounded and targeted predictions—especially in cases involving complex, many-to-many biomedical relations. The key contributions of our work are as follows: • We propose DrKGC, a novel and flexible framework for knowledge graph completion that effectively supports both general KGs and domain BKGs. • We develop two critical components of DrKGC to effectively integrate graph-structural information into the generative model. Specifically, we extend the standard retrieval-augmented generation to the graph scenario where we leverage logical rules to obtain a local subgraph that represents entities of potential interest. Then, we develop a technique that applies graph convolutional networks to the retrieved subgraphs to further generate local embeddings of entities, effectively supplying structural information for LLM-based prediction. • We perform comprehensive experiments on both benchmark datasets and biomedical use cases to evaluate the performance of DrKGC and show its significant improvement over state-of-the-art baseline approaches. We further conduct a biomedical case study on drug repurposing to demonstrate the practical applicability of DrKGC. 2 Related Work 2.1 Structure-based Methods Knowledge graph completion (KGC) can be approached by leveraging the structural information of nodes and edges in large heterogeneous graphs. Early methods learn low-dimensional embeddings for entities and relations based on individual triples—for example, TransE ( Bordes et al. 2013 ) views a relation as a translation from the subject to the object, while RotatE ( Sun et al. 2019 ) extends TransE into a complex space to model symmetric relations. Semantic matching approaches (e.g., ComplEx ( Trouillon et al. 2016 ) , DistMult ( Yang et al. 2014 ) ) compute the similarity of entity and relation representations. However, these triple-based methods handle each triple independently and ignore higher-order neighborhood information. To address this, GNN-based methods, such as R-GCN ( Schlichtkrull et al. 2018 ) and CompGCN ( Vashishth et al. 2019 ) , introduce message passing and neighborhood aggregation. 2.2 Rule-based Methods Because two entities in a KG may be linked by a few one-hop paths but numerous multi-hop paths, rule-based methods have emerged to learn probabilistic logic rules from these relation paths for inferring missing triples. For example, Neural-LP ( Yang et al. 2017 ) offers an end-to-end differentiable framework that jointly learns the parameters and structures of first-order logical