跳到正文
Bioinformatics·· 2 天前AI 评分58

TRKG:用两阶段 LLM 检索与强化学习重排补全生物医学知识图谱

TRKG: Two-Stage LLM Retrieval and Reinforcement Reranking for Biomedical Knowledge Graph Completion

AI 导读

TRKG 是一个两阶段生物医学知识图谱补全框架,候选检索与重排都由大语言模型完成。第一阶段用带难负样本的对比学习训练查询与实体共享的 LLM 编码器,通过内积搜索从全部实体中召回候选;第二阶段把排名靠前的候选以多选题形式交给指令微调 LLM,并用 TRKG-GRPO 这一带 KL 正则的组归一化策略梯度目标做强化学习训练。

阅读原文

来源:Bioinformatics · doi.org

论文摘要

Motivation

Biomedical knowledge graphs (KGs) record relationships among entities such as drugs, diseases, genes or proteins and phenotypes as triples, and support tasks such as drug repositioning and drug–drug interaction prediction. Many potential links are still missing from existing biomedical KGs, which limits these applications. Knowledge graph completion (KGC) infers such links from known triples. In biomedicine, it faces three challenges: the candidate space is large, semantically close candidates are hard to separate by vector similarity alone, and the type of the target entity changes with the relation.

Results

We propose TRKG, a two-stage KGC framework that uses large language models (LLMs) for both candidate retrieval and reranking. In Stage 1, an LLM encoder shared by queries and entities is trained by contrastive learning with hard negatives and retrieves candidates from the full entity set by inner-product search. In Stage 2, the top-ranked candidates are presented to an instruction-tuned LLM as a multiple-choice question, and the model is trained by reinforcement learning with TRKG-GRPO, a group-normalized policy-gradient objective with KL regularization. On two medical datasets, PrimeKG and TCMKG, and the general-domain benchmark WN18RR, TRKG achieves the best MRR, Hits@1 and Hits@3 among the evaluated methods. Stage 2 raises Hits@1 from 26.4% to 51.0% for drug–disease prediction on PrimeKG and from 45.4% to 58.9% on TCMKG.

Availability and Implementation

TRKG is implemented in PyTorch. The source code, datasets and model checkpoints are available at https://github.com/2391134843/TRKG.

Supplementary Information

Supplementary data are available at Bioinformatics online.