Skip to content
/ SIAN Public

Code and data for ECML-PKDD paper "Social Influence Attentive Neural Network for Friend-Enhanced Recommendation"

Notifications You must be signed in to change notification settings

rootlu/SIAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SIAN

Code and data for ECML-PKDD paper "Social Influence Attentive Neural Network for Friend-Enhanced Recommendation"

Requirements

  • Python 2.7
  • PyTorch 0.4.1
  • numpy
  • scipy
  • My machine with two GPUs (NVIDIA GTX-1080 *2) and two CPUs (Intel Xeon E5-2690 * 2)

Description

β”œβ”€β”€ baselines  # baseline code
β”‚Β Β  β”œβ”€β”€ Eval4Baselines.py

β”œβ”€β”€ code  # Our Model: SIAN
β”‚Β Β  β”œβ”€β”€ Attention.py  # attention layer
β”‚Β Β  β”œβ”€β”€ DataUtil.py  # data loader 
β”‚Β Β  β”œβ”€β”€ Evaluation.py  # model evaluation
β”‚Β Β  β”œβ”€β”€ FeatureAgg.py  # attentive feature aggregator 
β”‚Β Β  β”œβ”€β”€ Fusion.py  # feature fusion layer 
β”‚Β Β  β”œβ”€β”€ HeteInf.py  # the main class for SIAN
β”‚Β Β  β”œβ”€β”€ InfluenceProp.py  # social influence coupler 
β”‚Β Β  β”œβ”€β”€ Logging.py  #log

β”‚Β Β  └── trainHeteInf.py  # the main function for SIAN
└── data  # dataset
    β”œβ”€β”€ Data4Baselines.ipynb  #
    β”œβ”€β”€ DataProcessor.ipynb
    β”œβ”€β”€ ItemProfileEmbed.ipynb
    β”œβ”€β”€ WechatTencent.ipynb
    β”œβ”€β”€ wxt  # FWD dataset 
    β”‚Β Β  β”œβ”€β”€ biz2id
    β”‚Β Β  β”œβ”€β”€ biz_profile.npy
    β”‚Β Β  β”œβ”€β”€ item2id
    β”‚Β Β  β”œβ”€β”€ item_profile.npy
    β”‚Β Β  β”œβ”€β”€ user2id
    β”‚Β Β  β”œβ”€β”€ user_profile.npy
    β”‚Β Β  β”œβ”€β”€ wxt.att.analysis
    β”‚Β Β  β”œβ”€β”€ wxt.interaction.graph
    β”‚Β Β  β”œβ”€β”€ wxt.item.biz
    β”‚Β Β  β”œβ”€β”€ wxt.social.graph
    β”‚Β Β  β”œβ”€β”€ wxt.test.rating.712
    β”‚Β Β  β”œβ”€β”€ wxt.train.rating.712
    β”‚Β Β  β”œβ”€β”€ wxt.user.biz
    β”‚Β Β  └── wxt.val.rating.712
    β”œβ”€β”€ wxt.ipynb
    β”œβ”€β”€ yelp  # yelp dataset
    β”‚Β Β  β”œβ”€β”€ item_profile.npy
    β”‚Β Β  β”œβ”€β”€ user_profile.npy
    β”‚Β Β  β”œβ”€β”€ yelp.att.analysis
    β”‚Β Β  β”œβ”€β”€ yelp.interaction.graph
    β”‚Β Β  β”œβ”€β”€ yelp.social.graph
    β”‚Β Β  β”œβ”€β”€ yelp.test.rating.712
    β”‚Β Β  β”œβ”€β”€ yelp.train.rating.712
    β”‚Β Β  └── yelp.val.rating.712
    β”œβ”€β”€ yelp.ipynb


β”œβ”€β”€ log  # saved log file
β”‚Β Β  β”œβ”€β”€ wxt.0.0.6023.0.35225.model

Dataset

FWD dataset (i.e., wxt data) can be downloaded from Google Drive and BaiduYun οΌˆζε–η οΌši6qyοΌ‰

Reproducing results in the paper

Load the saved models in log/ dir.

Training

python trainHeteInf.py  --help

Reference

@inproceedings{Yuanfu2020SIAN,
  title={Social Influence Attentive Neural Network for Friend-Enhanced Recommendation},
  author={Yuanfu Lu, Ruobing Xie, Chuan Shi, Yuan Fang, Wei Zhang, Xu Zhang, Leyu Lin.}
  booktitle={Proceedings of ECML-PKDD},
  year={2020}
}

About

Code and data for ECML-PKDD paper "Social Influence Attentive Neural Network for Friend-Enhanced Recommendation"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages