GithubHelp home page GithubHelp logo

vrkg4rec's Introduction

VRKG4Rec: Virtual Relational Knowledge Graph for Recommendation

This is the PyTorch Implementation for the paper VRKG4Rec (WSDM'23):

Lingyun Lu, Bang Wang, Zizhuo Zhang, Shenghao Liu and Han Xu. VRKG4Rec: Virtual Relational Knowledge Graph for Recommendation.

Introduction

Virtual Relational Knowledge Graph for Recommendation (VRKG4Rec) is a knowledge-aware recommendation framework, which explicitly distinguishes the influence of different relations for item representation learning and design a local weighted smoothing (LWS) mechanism for user and item encoding.

Citation

If you want to use our codes and datasets in your research, please cite:

@inproceedings{10.1145/3539597.3570482,
author = {Lu, Lingyun and Wang, Bang and Zhang, Zizhuo and Liu, Shenghao and Xu, Han},
title = {VRKG4Rec: Virtual Relational Knowledge Graph for Recommendation},
year = {2023},
isbn = {9781450394079},
publisher = {Association for Computing Machinery},
url = {https://doi.org/10.1145/3539597.3570482},
doi = {10.1145/3539597.3570482},
booktitle = {Proceedings of the Sixteenth ACM International Conference on Web Search and Data Mining},
series = {WSDM '23}
}

Environment Requirement

The code has been tested running under Python 3.8.0. The required packages are as follows:

  • pytorch == 1.10.1
  • networkx == 2.5.1
  • numpy == 1.22.4
  • pandas == 1.4.3
  • scikit-learn == 1.1.1
  • scipy == 1.7.0
  • torch == 1.9.0
  • torch-cluster == 1.5.9
  • torch-scatter == 2.0.9
  • torch-sparse == 0.6.12

Usage

The instruction of commands has been clearly stated in the codes (see the parser function in utils/parser.py).

  • Last-fm dataset
python main.py --dataset last-fm --lr 0.0001 --n_virtual 3 --context_hops 2 --n_iter 3
  • MovieLens dataset
python main.py --dataset MovieLens --lr 0.0001 --n_virtual 3 --context_hops 2 --n_iter 3

Dataset

We provide three processed datasets: Last-FM and MovieLens.

  • You can find the full version of recommendation datasets via Last-FM and MovieLens.
  • We follow the previous study to preprocess the datasets.
Last-FM MovieLens
User-Item Interaction #Users 1,872 6,036
#Items 3,915 2,347
#Interactions 42,346 753,772
Knowledge Graph #Entities 9,366 6,729
#Relations 60 7
#Triplets 15,518 20,195

vrkg4rec's People

Contributors

lulu0913 avatar

Stargazers

 avatar  avatar ZhouQianjun avatar  avatar Boris avatar Zhao Chuang avatar  avatar  avatar  avatar  avatar Nicolas Hubert avatar DUDU avatar  avatar  avatar  avatar  avatar Liu Bin avatar resistzzz avatar HUST MinsLab avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

hustminslab

vrkg4rec's Issues

数据集

请问有处理数据集的代码或处理完成的数据集吗

在论文对比实验中KGIN的参数

你好,请问KGIN的实验是如何进行的,我采用了MCCLK论文中固定采样方式8:2分别生成训练集和测试集,我的随机数种子为2023,然后进行训练,其中epoch设置为1000,batch为1024,dim为64,lr为1e-4,test_batch 128这些参数我没有改动,在多轮训练中RKG4Rec在Recall@20中能到达接近30%多的性能,但KGIN我尝试多个参数,在100次的epoch的Recall@20中总是维持在10%-12%之间,甚至会出现性能下降,我很想知道如何进行基线的实验,非常感谢

请教

你好,请教一下对于其他模型的复现,如何使用本论文的评价指标呢,比如我想对比其他模型,该如何得到本论文相同的评价模型呢?发现有些不同模型即使评价指标相同最终结果也不一样

数据

请问有提供数据处理的代码吗

在论文对比实验中KGIN的参数

你好,请问KGIN的实验是如何进行的,我采用了MCCLK论文中固定采样方式8:2分别生成训练集和测试集,我的随机数种子为2023,然后进行训练,其中epoch设置为1000,batch为1024,dim为64,lr为1e-4,test_batch 128这些参数我没有改动,在多轮训练中RKG4Rec在Recall@20中能到达接近30%多的性能,但KGIN我尝试多个参数,在100次的epoch的Recall@20中总是维持在10%-12%之间,甚至会出现性能下降,我很想知道如何进行基线的实验,非常感谢

代码运行结果有问题

你好,我运行了仓库里的代码(没做改动),处理lastfm数据集,在metric@20 (%)的条件下,结果recall=0.0647,但论文里的recall是38.78,这可能是因为什么问题呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.