Sphinx1126 / RelaGraph

Improving Embedding on Small-scale Sparse Knowledge Graphs by Neighborhood Relations
4 stars 1 forks source link

RelaGraph

The code and data of "RelaGraph: Improving Embedding on Small-scale Sparse Knowledge Graphs by Neighborhood Relations" (paper)

In this paper, we propose a new KGE method named RelaGraph, which works well on small-scale sparse knowledge graphs. RelaGraph is based on StarGraph and improves the process of subgraph generation and entity encoding in StarGraph. We extend the neighborhood information by aggregate the links between the target node and its neighbors. In addition, we also make some improvements to the loss function and other aspects to adapt the KGE model to small sparse data sets. We tested our method on 3 small sparse KGs, and achieved SOTA performance. The experimental results proves that RelaGraph nicely compensates for the poor performance of current KGE algorithms on small KGs, and the improvement demonstrates its great effectiveness of representation learning on small-scale knowledge graphs.

image

Datasets

In this paper, we conducted experiments on three small-scale sparse KGs in total, including:

Running

  1. Install the requirements from the ./requirements.txt
  2. Check the datasets. The training set, test set, and validation set should be named train.txt, test.txt, and valid.txt, respectively, and a line in each file represents a triple (h,r,t), split by '\t'.
  3. Run the ./run.py to train and evaluate the KGE model. You can change the hyperparameters if necessary.

Hyperparameters

You may need to change the hyperparameters in ./run.py for best performance. And here comes the expression of some important hyperparameters.

Reference

Citation

If you find this work useful, please consider citing the paper:

@article{SHI2023103447, 
    author = {Bin Shi and Hao Wang and Yueyan Li and Sanhong Deng}, 
    title = {RelaGraph: Improving Embedding on Small-scale Sparse Knowledge Graphs by Neighborhood Relations}, 
    journal = {Information Processing & Management}, 
    volume = {60}, 
    number = {5},
    pages = {103447},
    year = {2023},
    issn = {0306-4573}, 
    doi = {https://doi.org/10.1016/j.ipm.2023.103447},
    url = {https://www.sciencedirect.com/science/article/pii/S030645732300184X},
    keywords = {Knowledge graph, Knowledge graph embedding, Deep learning, StarGraph}
}