Skip to main content
QUICK REVIEW

[Paper Review] Inductive Relation Prediction by BERT

Hanwen Zha, Zhiyu Chen|arXiv (Cornell University)|Mar 12, 2021
Advanced Graph Neural NetworksComputer Science8 citations
TL;DR

This paper proposes BertRL, a BERT-based model for inductive relation prediction in knowledge graphs that improves generalization and explainability by encoding reasoning paths between entities. It achieves state-of-the-art performance, with a 6.3% average Hits@1 gain and 6.5% MRR improvement over SOTA methods in inductive settings, and excels in few-shot learning with up to 32.7% Hits@1 improvement.

ABSTRACT

Relation prediction in knowledge graphs is dominated by embedding based methods which mainly focus on the transductive setting. Unfortunately, they are not able to handle inductive learning where unseen entities and relations are present and cannot take advantage of prior knowledge. Furthermore, their inference process is not easily explainable. In this work, we propose an all-in-one solution, called BERTRL (BERT-based Relational Learning), which leverages pre-trained language model and fine-tunes it by taking relation instances and their possible reasoning paths as training samples. BERTRL outperforms the SOTAs in 15 out of 18 cases in both inductive and transductive settings. Meanwhile, it demonstrates strong generalization capability in few-shot learning and is explainable.

Motivation & Objective

  • To address the limitations of embedding-based methods in inductive knowledge graph completion, where unseen entities and relations cannot be handled without retraining.
  • To enable explainable, generalizable relation prediction by integrating textual context and logical reasoning paths into a pre-trained language model.
  • To overcome the lack of prior knowledge utilization and poor few-shot performance in existing rule-based and neural methods.
  • To develop a unified framework that performs well in both transductive and inductive settings, including unseen relations.
  • To demonstrate that explicit path-based reasoning in BERT improves accuracy and interpretability over implicit entity-relation encoding.

Proposed method

  • BertRL linearizes local subgraphs around a target triple (h, r, t) into reasoning paths p: (h, r₀, e₁), (e₁, r₁, e₂), ..., (eₙ, rₙ, t), which are fed into BERT as input sequences.
  • The model fine-tunes BERT on relation prediction by treating the input as a natural language sequence: 'h r t' followed by the path description.
  • It explicitly retrieves knowledge from the graph during inference, enabling dynamic reasoning and explainability, unlike memorization-based methods.
  • The approach supports inductive learning by not relying on entity-specific embeddings, allowing predictions for unseen entities.
  • It evaluates multiple path encoding strategies, including combined paths, individual paths, and path sampling, to optimize performance and efficiency.
  • The model leverages pre-trained BERT’s ability to capture factual knowledge from text, enhancing performance even with limited training data.

Experimental results

Research questions

  • RQ1Can a pre-trained language model like BERT be effectively fine-tuned to perform inductive relation prediction in knowledge graphs using reasoning paths?
  • RQ2How does path-based input representation in BERT compare to entity-relation triplet-only input in terms of accuracy and generalization?
  • RQ3To what extent can BertRL generalize to unseen entities and relations in few-shot and zero-shot settings?
  • RQ4Can BertRL achieve both high performance and explainability in relation prediction, unlike traditional embedding-based models?
  • RQ5How does the choice of path encoding strategy (e.g., path sampling, combined paths) affect model performance and training efficiency?

Key findings

  • BertRL achieves a 6.3% average absolute improvement in Hits@1 and 6.5% in MRR over state-of-the-art baselines in inductive knowledge graph completion.
  • In few-shot learning, BertRL achieves up to a 32.7% absolute improvement in Hits@1 and 27.8% in MRR, significantly outperforming baselines.
  • The model demonstrates strong generalization to unseen relations, showing potential for zero-shot relation prediction.
  • Path sampling with just 5–10 paths achieves near-optimal performance, indicating robustness to training data size.
  • The ablation study shows that combining multiple paths does not improve performance over individual paths, suggesting BERT struggles with complex input under data scarcity.
  • BertRL outperforms both transductive and inductive SOTA methods, including TuckER, RuleN, and KG-BERT, across multiple benchmarks.

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.