百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

MixGCF

> 数据库
开源

MixGCF: 一种针对基于图神经网络的推荐系统的改进训练方法, KDD2021

99 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

MixGCF: 一种针对基于图神经网络的推荐系统的改进训练方法, KDD2021

MixGCF: An Improved Training Method for Graph Neural Network-based Recommender Systems

This is our PyTorch implementation for the paper:

Tinglin Huang, Yuxiao Dong, Ming Ding, Zhen Yang, Wenzheng Feng, Xinyu Wang, Jie Tang (2021). MixGCF: An Improved Training Method for Graph Neural Network-based Recommender Systems. Paper link. In KDD'2021, Virtual Event, Singapore, August 14-18, 2021.

Author: Mr. Tinglin Huang (tinglin.huang at zju.edu.cn)

Citation

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

@inproceedings{MixGCF2021,
  author    = {Tinglin Huang and
               Yuxiao Dong and
               Ming Ding and
               Zhen Yang and
               Wenzheng Feng and
               Xinyu Wang and
               Jie Tang},
  title     = {MixGCF: An Improved Training Method for Graph Neural Network-based Recommender Systems},
  booktitle = {{KDD}},
  year      = {2021}
}

Environment Requirement

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

  • pytorch == 1.7.0
  • numpy == 1.20.2
  • scipy == 1.6.3
  • sklearn == 0.24.1
  • prettytable == 2.1.0

Training

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

  • K
    • It specifies the number of negative instances in K-pair loss. Note that when K=1 (by default), the K-pair loss will degenerate into the BPR pairwise loss.
  • n_negs
    • It specifies the size of negative candidate set when using MixGCF.
  • ns
    • It indicates the type of negative sample method. Here we provide two options: rns and mixgcf.

LightGCN

Random sample(rns)
bash
python main.py --dataset ali --gnn lightgcn --dim 64 --lr 0.001 --batch_size 2048 --gpu_id 0 --context_hops 3 --pool mean --ns rns --K 1 --n_negs 1

python main.py --dataset yelp2018 --gnn lightgcn --dim 64 --lr 0.001 --batch_size 2048 --gpu_id 0 --context_hops 3 --pool mean --ns rns --K 1 --n_negs 1

python main.py --dataset amazon --gnn lightgcn --dim 64 --lr 0.001 --batch_size 2048 --gpu_id 0 --context_hops 3 --pool mean --ns rns --K 1 --n_negs 1
MixGCF
bash
python main.py --dataset ali --dim 64 --lr 0.001 --batch_size 2048 --gpu_id 0 --context_hops 3 --pool mean --ns mixgcf --K 1 --n_negs 32

python main.py --dataset yelp2018 --dim 64 --lr 0.001 --batch_size 2048 --gpu_id 0 --context_hops 3 --pool mean --ns mixgcf --K 1 --n_negs 64

python main.py --dataset amazon --dim 64 --lr 0.001 --batch_size 2048 --gpu_id 0 --context_hops 3 --pool mean --ns mixgcf --K 1 --n_negs 16

NGCF

Random sample(rns)
bash
python main.py --dataset ali --gnn ngcf --dim 64 --lr 0.0001 --batch_size 1024 --gpu_id 0 --context_hops 3 --pool concat --ns rns --K 1 --n_negs 1

python main.py --dataset yelp2018 --gnn ngcf --dim 64 --lr 0.0001 --batch_size 1024 --gpu_id 0 --context_hops 3 --pool concat --ns rns --K 1 --n_negs 1

python main.py --dataset amazon --gnn ngcf --dim 64 --lr 0.0001 --batch_size 1024 --gpu_id 0 --context_hops 3 --pool concat --ns rns --K 1 --n_negs 1
MixGCF
bash
python main.py --dataset ali --gnn ngcf --dim 64 --lr 0.0001 --batch_size 1024 --gpu_id 0 --context_hops 3 --pool concat --ns mixgcf --K 1 --n_negs 64

python main.py --dataset yelp2018 --gnn ngcf --dim 64 --lr 0.0001 --batch_size 1024 --gpu_id 0 --context_hops 3 --pool concat --ns mixgcf --K 1 --n_negs 64

python main.py --dataset amazon --gnn ngcf --dim 64 --lr 0.0001 --batch_size 1024 --gpu_id 0 --context_hops 3 --pool concat --ns mixgcf --K 1 --n_negs 64

The training log is also provided. The results fluctuate slightly under different running environment.

Dataset

We use three processed datasets: Alibaba, Yelp2018, and Amazon.

Alibaba Yelp2018 Amazon
#Users 106,042 31,668 192,403
#Items 53,591 38,048 63,001
#Interactions 907,407 1,561,406 1,689,188
Density 0.00016 0.00130 0.00014

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythongraph-neural-networkinformation-retrievalnegative-samplingnetwork-embedding

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库