Skip to content

JarenceSJ/ReviewGraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Review Graph

This repo is an official implementation of A Review-aware Graph Contrastive Learning Framework for Recommendation.

Requirements

python == 3.8.3
transformers == 3.1.0
dgl == 0.7.2
pytorch == 1.10.2

Data prepration

  1. Run word2vector.py for word embedding. Glove pretraining weight is required. The word embedding is insufficent for RGCL but legacy for other review-based recommendation models.
  2. Make sure can run load_sentiment_data in load_data.py
  3. Run BERT/bert_whitening.py for obtaining the feature vector for each review.
  4. If previous steps successfully run, then you can run rgc_nd_ed.py.

A processed data: Digital_Music

Dowload from here. Then config dataset_path parameter in rgc.py and the review_feat_path parameter in data.py.

Files

ReviewGraph
├── BERT
│ └── bert_whitening.py   # bert-whitening 
├── README.md
├── RGCL                  # models
│ ├── data.py             # load data by dgl
│ ├── rgc.py              # review graph learning 
│ ├── rgc_ed.py           # review graph learning with edge discrimination
│ ├── rgc_nd.py           # review graph learning with node discrimination
│ └── rgc_nd_ed.py        # RGCL
├── load_data.py		  
├── nlp_util.py           # clean text
├── util.py				
└── word2vector.py        # loading Glove pretraining word vectors.

About

[SIGIR 2022] A Review-aware Graph Contrastive Learning Framework for Recommendation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages