/PETER

ACL'21, Personalized Transformer for Explainable Recommendation

PETER (PErsonalized Transformer for Explainable Recommendation)

Paper

Lei Li, Yongfeng Zhang, Li Chen. Personalized Transformer for Explainable Recommendation. ACL'21. [Paper]

Datasets to download

  • TripAdvisor Hong Kong
  • Amazon Movies & TV
  • Yelp 2019

For those who are interested in how to obtain (feature, opinion, template, sentiment) quadruples, please refer to Sentires-Guide.

Usage

Below are examples of how to run PETER (with and without the key feature).

python -u main.py \
--data_path ../TripAdvisor/reviews.pickle \
--index_dir ../TripAdvisor/1/ \
--cuda \
--checkpoint ./tripadvisorf/ \
--peter_mask \
--use_feature >> tripadvisorf.log

python -u main.py \
--data_path ../TripAdvisor/reviews.pickle \
--index_dir ../TripAdvisor/1/ \
--cuda \
--checkpoint ./tripadvisor/ \
--peter_mask >> tripadvisor.log

Code dependency

  • Python 3.6
  • PyTorch 1.6

Code reference

Citation

@inproceedings{ACL21-PETER,
	title={Personalized Transformer for Explainable Recommendation},
	author={Li, Lei and Zhang, Yongfeng and Chen, Li},
	booktitle={ACL},
	year={2021}
}