{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/nscaching-simple-and-efficient-negative","title":"NSCaching: Simple and Efficient Negative Sampling for Knowledge Graph Embedding","arxiv_id":"1812.06410","date":"2018-12-16","proceeding":null,"authors":["Yongqi Zhang","Quanming Yao","Yingxia Shao","Lei Chen"],"abstract":"Knowledge Graph (KG) embedding is a fundamental problem in data mining\nresearch with many real-world applications. It aims to encode the entities and\nrelations in the graph into low dimensional vector space, which can be used for\nsubsequent algorithms. Negative sampling, which samples negative triplets from\nnon-observed ones in the training data, is an important step in KG embedding.\nRecently, generative adversarial network (GAN), has been introduced in negative\nsampling. By sampling negative triplets with large scores, these methods avoid\nthe problem of vanishing gradient and thus obtain better performance. However,\nusing GAN makes the original model more complex and hard to train, where\nreinforcement learning must be used. In this paper, motivated by the\nobservation that negative triplets with large scores are important but rare, we\npropose to directly keep track of them with the cache. However, how to sample\nfrom and update the cache are two important questions. We carefully design the\nsolutions, which are not only efficient but also achieve a good balance between\nexploration and exploitation. In this way, our method acts as a \"distilled\"\nversion of previous GA-based methods, which does not waste training time on\nadditional parameters to fit the full distribution of negative triplets. The\nextensive experiments show that our method can gain significant improvement in\nvarious KG embedding models, and outperform the state-of-the-art negative\nsampling methods based on GAN.","url_abs":"http://arxiv.org/abs/1812.06410v2","url_pdf":"http://arxiv.org/pdf/1812.06410v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"nscaching-simple-and-efficient-negative","repo_url":"https://github.com/AutoML-4Paradigm/ERAS","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"nscaching-simple-and-efficient-negative","repo_url":"https://github.com/AutoML-4Paradigm/NSCaching","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"nscaching-simple-and-efficient-negative","repo_url":"https://github.com/AutoML-4Paradigm/S2S","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"nscaching-simple-and-efficient-negative","repo_url":"https://github.com/AutoML-Research/S2S","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"nscaching-simple-and-efficient-negative","repo_url":"https://github.com/automl-research/nscaching","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"nscaching-simple-and-efficient-negative","repo_url":"https://github.com/yzhangee/NSCaching","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":null,"task_name":"Generative Adversarial Network"},{"task_slug":"graph-embedding","task_name":"Graph Embedding"},{"task_slug":"knowledge-graph-embedding","task_name":"Knowledge Graph Embedding"},{"task_slug":"link-prediction","task_name":"Link Prediction"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/link-prediction-on-fb15k-1","task":"Link Prediction","dataset":"FB15k","model":"ComplEx NSCaching","rank_in_archive_order":6,"of":10,"metrics":{"Hits@10":"0.8682","MR":"82","MRR":"0.7721"},"uses_additional_data":false},{"leaderboard":"/sota/link-prediction-on-fb15k","task":"Link Prediction","dataset":"FB15k","model":"ComplEx NSCaching","rank_in_archive_order":13,"of":23,"metrics":{"MRR":"0.7721"},"uses_additional_data":false},{"leaderboard":"/sota/link-prediction-on-fb15k-237","task":"Link Prediction","dataset":"FB15k-237","model":"ComplEx NSCaching","rank_in_archive_order":66,"of":75,"metrics":{"Hits@10":"0.4805","MR":"221","MRR":"0.3021"},"uses_additional_data":false},{"leaderboard":"/sota/link-prediction-on-wn18","task":"Link Prediction","dataset":"WN18","model":"ComplEx NSCaching","rank_in_archive_order":27,"of":37,"metrics":{"Hits@10":"0.9398","MR":"1072","MRR":"0.9355"},"uses_additional_data":false},{"leaderboard":"/sota/link-prediction-on-wn18rr","task":"Link Prediction","dataset":"WN18RR","model":"ComplEx NSCaching","rank_in_archive_order":67,"of":75,"metrics":{"Hits@10":"0.5089","MR":"5365","MRR":"0.4463"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1812.06410","mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}