Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Combining relational context and relational paths for knowledge graph completion

License

NotificationsYou must be signed in to change notification settings

hwwang55/PathCon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository is the Tensorflow implementation of PathCon (paper):

Relational Message Passing for Knowledge Graph Completion
Hongwei Wang, Hongyu Ren, Jure Leskovec
In Proceedings of The 27th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD 2021)

(A PyTorch implementation of PathCon can be foundhere)

PathCon considers relational context and relational paths of (head, tail) pair in knowledge graphs for link prediction.PathCon achieves substantial gains over state-of-the-art baselines.Below is the result of Hit@1 on the test set of FB15K, FB15K-237, WN18, WN18RR, NELL995, and DDB14 datasets for relation prediction task:

MethodFB15KFB15K-237WN18WN18RRNELL995DDB14
TransE94.094.695.566.978.194.8
RotatE96.795.197.973.569.193.4
QuatE97.295.897.576.770.692.2
DRUM94.590.595.677.864.093.0
PathCon97.4 (+/-0.2)96.4 (+/-0.1)98.8 (+/-0.1)95.4 (+/-0.2)84.4 (+/-0.4)96.6 (+/-0.1)

For more results, please refer to the original paper.

Files in the folder

  • data/
    • FB15k/
    • FB15k-237/
    • wn18/
    • wn18rr/
    • NELL995/
    • DDB14/
  • src/: implementation of PathCon

Note: We provide acache/ folder for each dataset, which caches the pre-computed relational paths for the dataset.This folder is not required for running the code, because relational paths will be counted (and cached) when running the code if no corresponding cache file is found.If you are going to run FB15K-237 with max_path_len=3, please first download and unzippaths_3.zip fromhere and put all unzipped files underFB15k-237/cache/ (these files cannot be uploaded to GitHub due to the limitation on file size).

Running the code

$ python main.py

Note: The default dataset is set as WN18RR.Hyper-parameter settings for other datasets are provided inmain.py.

Required packages

The code has been tested running under Python 3.6.5, with the following packages installed (along with their dependencies):

  • tensorflow == 1.12.0
  • numpy == 1.16.5
  • scipy == 1.3.1
  • sklearn == 0.21.3

About

Combining relational context and relational paths for knowledge graph completion

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp