Papers › NSCaching: Simple and Efficient Negative Sampling for Knowledge Graph Embedding

NSCaching: Simple and Efficient Negative Sampling for Knowledge Graph Embedding

16 Dec 2018arXiv:1812.06410archive 2025-07-28

Yongqi Zhang, Quanming Yao, Yingxia Shao, Lei Chen

Knowledge Graph (KG) embedding is a fundamental problem in data mining research with many real-world applications. It aims to encode the entities and relations in the graph into low dimensional vector space, which can be used for subsequent algorithms. Negative sampling, which samples negative triplets from non-observed ones in the training data, is an important step in KG embedding. Recently, generative adversarial network (GAN), has been introduced in negative sampling. By sampling negative triplets with large scores, these methods avoid the problem of vanishing gradient and thus obtain better performance. However, using GAN makes the original model more complex and hard to train, where reinforcement learning must be used. In this paper, motivated by the observation that negative triplets with large scores are important but rare, we propose to directly keep track of them with the cache. However, how to sample from and update the cache are two important questions. We carefully design the solutions, which are not only efficient but also achieve a good balance between exploration and exploitation. In this way, our method acts as a "distilled" version of previous GA-based methods, which does not waste training time on additional parameters to fit the full distribution of negative triplets. The extensive experiments show that our method can gain significant improvement in various KG embedding models, and outperform the state-of-the-art negative sampling methods based on GAN.

PaperPDFCode

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

AutoML-4Paradigm/ERAS mentioned on GitHubpytorch report
AutoML-4Paradigm/NSCaching mentioned on GitHubpytorch report
AutoML-4Paradigm/S2S mentioned on GitHubpytorch report
AutoML-Research/S2S mentioned on GitHubpytorch report
automl-research/nscaching mentioned on GitHubpytorch report
yzhangee/NSCaching mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Graph EmbeddingKnowledge Graph EmbeddingLink PredictionReinforcement Learning

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Link Prediction FB15k ComplEx NSCaching Hits@10 0.8682 #6 of 10 Archive leaderboard report
Link Prediction FB15k ComplEx NSCaching MR 82 #6 of 10 Archive leaderboard report
Link Prediction FB15k ComplEx NSCaching MRR 0.7721 #6 of 10 Archive leaderboard report
Link Prediction FB15k ComplEx NSCaching MRR 0.7721 #13 of 23 Archive leaderboard report
Link Prediction FB15k-237 ComplEx NSCaching Hits@10 0.4805 #66 of 75 Archive leaderboard report
Link Prediction FB15k-237 ComplEx NSCaching MR 221 #66 of 75 Archive leaderboard report
Link Prediction FB15k-237 ComplEx NSCaching MRR 0.3021 #66 of 75 Archive leaderboard report
Link Prediction WN18 ComplEx NSCaching Hits@10 0.9398 #27 of 37 Archive leaderboard report
Link Prediction WN18 ComplEx NSCaching MR 1072 #27 of 37 Archive leaderboard report
Link Prediction WN18 ComplEx NSCaching MRR 0.9355 #27 of 37 Archive leaderboard report
Link Prediction WN18RR ComplEx NSCaching Hits@10 0.5089 #67 of 75 Archive leaderboard report
Link Prediction WN18RR ComplEx NSCaching MR 5365 #67 of 75 Archive leaderboard report
Link Prediction WN18RR ComplEx NSCaching MRR 0.4463 #67 of 75 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Convolution

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections