Skip to main content
QUICK REVIEW

[Paper Review] Comprehensive Analysis of Negative Sampling in Knowledge Graph Representation Learning

Hidetaka Kamigaito, Katsuhiko Hayashi|arXiv (Cornell University)|Jun 21, 2022
Advanced Graph Neural NetworksComputer Science9 citations
TL;DR

This paper provides a theoretical analysis of negative sampling (NS) loss in knowledge graph embedding (KGE), revealing that models with bounded score ranges—like TransE and RotatE—require distinct hyperparameter tuning for margin terms and negative sample counts compared to unbounded models such as ComplEx and DistMult. The authors propose theoretically grounded subsampling methods (Freq and Uniq) that improve KGC performance across FB15k-237, WN18RR, and YAGO3-10, with empirical results confirming alignment with theoretical predictions.

ABSTRACT

Negative sampling (NS) loss plays an important role in learning knowledge graph embedding (KGE) to handle a huge number of entities. However, the performance of KGE degrades without hyperparameters such as the margin term and number of negative samples in NS loss being appropriately selected. Currently, empirical hyperparameter tuning addresses this problem at the cost of computational time. To solve this problem, we theoretically analyzed NS loss to assist hyperparameter tuning and understand the better use of the NS loss in KGE learning. Our theoretical analysis showed that scoring methods with restricted value ranges, such as TransE and RotatE, require appropriate adjustment of the margin term or the number of negative samples different from those without restricted value ranges, such as RESCAL, ComplEx, and DistMult. We also propose subsampling methods specialized for the NS loss in KGE studied from a theoretical aspect. Our empirical analysis on the FB15k-237, WN18RR, and YAGO3-10 datasets showed that the results of actually trained models agree with our theoretical findings.

Motivation & Objective

  • To theoretically analyze the behavior of negative sampling (NS) loss in knowledge graph embedding (KGE), particularly focusing on the role of margin terms and normalization of negative samples.
  • To identify the differences in hyperparameter sensitivity between KGE models with bounded score ranges (e.g., TransE, RotatE) and those with unbounded ranges (e.g., ComplEx, DistMult).
  • To develop subsampling methods specifically tailored for NS loss in KGE, grounded in theoretical analysis of data distribution and loss function behavior.
  • To empirically validate the theoretical findings and evaluate the effectiveness of proposed subsampling methods on standard KGE benchmark datasets.

Proposed method

  • Theoretical analysis of NS loss in KGE, focusing on the impact of margin terms and normalization of negative samples, derived from the interplay between score function range and loss function structure.
  • Derivation of theoretical conditions under which margin terms and negative sample counts must be adjusted differently for bounded vs. unbounded scoring functions.
  • Proposed two novel subsampling methods—Freq and Uniq—based on theoretical modeling of the true data distribution and loss function behavior in KGE.
  • Implementation and evaluation of the proposed subsampling methods using the SANS (self-adversarial negative sampling) loss, which is standard in modern KGE training.
  • Empirical evaluation on three benchmark datasets: FB15k-237, WN18RR, and YAGO3-10, using standard metrics including MRR, Hits@1, Hits@3, and Hits@10.
  • Hyperparameter tuning guided by theoretical insights, with performance comparisons against baseline uniform subsampling and existing methods.

Experimental results

Research questions

  • RQ1How does the boundedness of score functions in KGE models affect the optimal configuration of margin terms and negative sample counts in negative sampling loss?
  • RQ2What theoretical principles govern the effective use of normalization and margin terms in NS loss for KGE, especially when extending from word2vec to knowledge graphs?
  • RQ3How can subsampling methods be designed to align with the theoretical properties of NS loss in KGE, particularly under self-adversarial negative sampling?
  • RQ4To what extent do theoretically derived subsampling methods (Freq and Uniq) improve KGC performance compared to uniform or heuristic baselines on real-world datasets?
  • RQ5Does the theoretical distinction between bounded and unbounded scoring models hold in practice across diverse KGE models and datasets?

Key findings

  • Models with bounded score ranges—such as TransE and RotatE—require distinct hyperparameter tuning for margin terms and negative sample counts compared to unbounded models like ComplEx and DistMult.
  • Theoretical analysis confirms that the margin term and normalization of negative samples are not neutral in KGE training and must be adjusted based on the score function's range properties.
  • The proposed subsampling methods Freq and Uniq, derived from theoretical modeling of data distribution, consistently outperform or match baseline uniform subsampling across all evaluated datasets and models.
  • Empirical results on FB15k-237, WN18RR, and YAGO3-10 show that Freq and Uniq improve MRR, Hits@1, Hits@3, and often Hits@10, with the strongest gains observed in low-shot and sparse settings.
  • The performance of subsampling methods varies by model and dataset, indicating that model-specific bias correction is necessary and that theoretical derivation of subsampling should be complemented by empirical validation on development sets.
  • The study confirms that theoretical insights into NS loss behavior can guide effective hyperparameter selection and subsampling design, reducing reliance on costly empirical tuning in KGE training.

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.