Semi-supervised Training for Knowledge Base Graph Self-attention Networks on Link Prediction

Shuanglong Yao, Dechang Pi, Junfu Chen, Yufei Liu, Zhiyuan Wu · DOI

Abstract

The task of link prediction aims to solve the problem of incomplete knowledge caused by the difficulty of collecting facts from the real world. GCNs-based models are widely applied to solve link prediction problems due to their sophistication, but GCNs-based models are suffering from two problems in the structure and training process. 1) The transformation methods of GCN layers become increasingly complex in GCN-based knowledge representation models; 2) Due to the incompleteness of the knowledge graph collection process, there are many uncollected true facts in the labeled negative samples. Therefore, this paper investigates the characteristic of the information aggregation coefficient (self-attention) of adjacent nodes and redesigns the self-attention mechanism of the GAT structure. Meanwhile, inspired by human thinking habits, we designed a semi-supervised self-training method over pre-trained models. Experimental results on the benchmark datasets FB15k-237 and WN18RR show that our proposed self-attention mechanism and semi-supervised self-training method can effectively improve the performance of the link prediction task. If you look at FB15k-237, for example, the proposed method improves Hits@1 by about 30%.

Introduction

Knowledge Graphs (KGs) are structured databases that represent facts as triplets, such as (Tony Stark, Owned by, Marvel). Despite their utility, KGs are inherently incomplete because capturing every real-world fact is practically impossible. The task of link prediction addresses this by predicting missing entities within these graphs.

Knowledge Graph representation showing missing links and the link prediction task.

Current state-of-the-art models, primarily based on Graph Neural Networks (GNNs) and Graph Attention Networks (GATs), face two significant challenges:

  1. Structural Noise: Standard GATs utilize a global attention vector to weigh neighbor importance. This often captures excessive global noise, which dilutes the specific relationship between adjacent entities.
  2. The "False Negative" Trap: During training, unrecorded facts are typically treated as negative samples. However, many of these are actually true facts that simply haven't been collected yet. This mislabeling introduces noise that hinders the model's reasoning capabilities.

Methodology: KBGSAT and Semi-supervised Training

To overcome these hurdles, this paper proposes KBGSAT (Knowledge Base Graph Self-Attention Network) alongside a novel semi-supervised self-training framework.

1. KBGSAT Architecture

The KBGSAT model simplifies the standard GAT architecture to focus on local context. Instead of complex linear transformations and global attention vectors, it employs:

  • Splicing Operations: A streamlined method for combining entity and relation features.
  • Entity-Specific Attention: The attention mechanism is redesigned so that the importance of a neighbor is determined by the transformation feature of the head entity itself. This ensures that information aggregation is "purer" and tailored to the specific neighborhood.
The overall architecture of the KBGSAT model, illustrating the self-attention layers and the decoding process.

2. Semi-supervised Self-training

Inspired by human associative memory, the authors introduced a multi-phase retraining loop:

  • Initial Training: The KBGSAT model is trained on the existing labeled data.
  • Fact Hallucination: The pre-trained model predicts missing links for unknown pairs in the validation and test sets.
  • Pseudo-labeling: The highest-scoring predictions are treated as "unverified positive samples."
  • Retraining: The model is retrained using both the original data and these new pseudo-labels, allowing it to learn from its own high-confidence inferences and mitigating the false negative problem.

Experimental Setup

The model was evaluated on two standard benchmarks:

  • FB15k-237: A subset of Freebase with 14,541 entities and 237 relations.
  • WN18RR: A subset of WordNet containing 40,943 entities and 11 relations. These datasets are specifically designed to eliminate simple reciprocal relations, making the link prediction task more challenging and realistic.

Results and Discussion

The proposed method demonstrated substantial performance gains over existing state-of-the-art (SOTA) models:

  • FB15k-237: KBGSAT achieved a Hits@1 of 34.45%, representing a 30.7% relative improvement over previous SOTA models (~26.4%). The Mean Reciprocal Rank (MRR) also reached a leading 41.5%.
  • WN18RR: The model achieved a Hits@1 of 48.2% and an MRR of 50.9%, outperforming models like ConvE, RotatE, and CompGCN.
  • Ablation Study: The self-training phase proved critical. Without it, the model remained competitive, but the addition of pseudo-labeled positives boosted Hits@1 by approximately 8-10 points across various decoders.

Key Insights

  • Local vs. Global Attention: By basing attention on the source entity rather than a global vector, the model adapts its focus to the specific semantic neighborhood (e.g., distinguishing between family relations and corporate ownership).
  • Self-Training Efficacy: While self-training can sometimes lead to model collapse in other domains, in link prediction, high-confidence "hallucinations" are often missing ground-truth facts. Incorporating them builds a more cohesive internal logic.

Conclusion

KBGSAT demonstrates that refining how information is weighted (attention) and labeled (self-training) is more effective than simply increasing the complexity of GCN layers. Future work will explore more sophisticated strategies for selecting pseudo-positive samples beyond the current greedy approach and investigate the scalability of this retraining loop for industrial-scale knowledge graphs.

Summary updated

Abstract

The task of link prediction aims to solve the problem of incomplete knowledge caused by the difficulty of collecting facts from the real world. GCNs-based models are widely applied to solve link prediction problems due to their sophistication, but GCNs-based models are suffering from two problems in the structure and training process. 1) The transformation methods of GCN layers become increasingly complex in GCN-based knowledge representation models; 2) Due to the incompleteness of the knowledge graph collection process, there are many uncollected true facts in the labeled negative samples. Therefore, this paper investigates the characteristic of the information aggregation coefficient (self-attention) of adjacent nodes and redesigns the self-attention mechanism of the GAT structure. Meanwhile, inspired by human thinking habits, we designed a semi-supervised self-training method over pre-trained models. Experimental results on the benchmark datasets FB15k-237 and WN18RR show that our proposed self-attention mechanism and semi-supervised self-training method can effectively improve the performance of the link prediction task. If you look at FB15k-237, for example, the proposed method improves Hits@1 by about 30%.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
FB15k-237KBGSATHits@134.45+8.05 vs baselinetraining=semi-supervised self-training
Source quote
L364: KBGSAT │ 34.45 │ 56.13 │ 218 │ 41.5 │ 48.2 │ 57.1 │ 3485 │ 50.9
WN18RRKBGSATHits@148.2+3.9 vs baselinetraining=semi-supervised self-training
Source quote
L364: KBGSAT │ 34.45 │ 56.13 │ 218 │ 41.5 │ 48.2 │ 57.1 │ 3485 │ 50.9
FB15k-237KBGSAT+ConvE (2 layers)Hits@10.3445layers=2 · decoder=ConvE · training=semi-supervised self-training
Source quote
L412: ConvE │ 0.4154 │ 217.6 │ 0.3445 │ 0.4352 │ 0.5613 │ 0.50863 │ 3484.8 │ 0.48227 │ 0.51595 │ 0.57063
FB15k-237KBGSAT+ConvE (2 layers)Hits@10.2663layers=2 · decoder=ConvE · training=without semi-supervised self-training
Source quote
L392: ConvE │ 0.3555 │ 224.3 │ 0.2663 │ 0.3879 │ 0.5350 │ 0.46717 │ 3380.1 │ 0.43267 │ 0.47735 │ 0.53829
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
FB15k-237CompGCN baselineHits@126.4Filtered link prediction; published baseline reported in Table 3. Value is on the table…
Source quote
L362: CompGCN [\star] │ 26.4 │ 53.5 │ 197 │ 35.5 │ 44.3 │ 54.6 │ 3533 │ 47.9
WN18RRCompGCN baselineHits@144.3Filtered link prediction; published baseline reported in Table 3. Value is on the table…
Source quote
L362: CompGCN [\star] │ 26.4 │ 53.5 │ 197 │ 35.5 │ 44.3 │ 54.6 │ 3533 │ 47.9
BibTeX
@misc{yao2022semi,
  author = {Shuanglong Yao and Dechang Pi and Junfu Chen and Yufei Liu and Zhiyuan Wu},
  title = {{Semi-supervised Training for Knowledge Base Graph Self-attention Networks on Link Prediction}},
  year = {2022},
  eprint = {2209.01350},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.01350},
}
Figure