Code Implementation of V-A. Tran, et al. Hierarchical Latent Relation Modeling for Collaborative Metric Learning. In: Proceedings of the 15th ACM Conference on Recommender Systems (RecSys 2021), September 2021.
- Previous recommendation approaches focused heavily on Collaborative Filtering(CF) methods
- Matrix Factorization (MF)
- Factorization of the user-item matrix into dense, lower dimensional latent vectors
- Prediction based on User-Item Similarity (usually dot-product)
- Matrix Factorization (MF)
- Metric Learning introduced as an alternative to previous approaches.
- Interested in learning the metrics among data points
- Limitations
- Over-simplification of the user-item relations
- Each user&item represented with a single mapped vector
- Does not incorporate any item-item relations
- CML DL Based approach to learn hierarchical relations of user-item over item-item relations based on the following assumption...
"there exists a hierarchical structure in different relation types, and that user-item relations are built on top of item-item relations"
- The author proposes an enhanced consideration over the user-item relations with the User Attention & Item Attention Module
- For detailed descriptions of the model implementation & model experiments, refer to the Paper Summary(Korean)
- Train a specific HLRM model from
model.py
$ python train.py --train_batch_size --eval_batch_size --num_inter \
--hlrm_type --epochs --lr --lr_scheduler_gamma --clip --patience \
--emb_size --num_relations --is_pretrained_embs --freeze_embs \
--save_model -- save_dir --loss_margin
- Evaluate a specific model checkpoint on the metrics
HitRate
,MAP
,MRR
,NDCG
,PREC
,REC
$ python eval.py --eval_batch_size --num_inter --hlrm_type --save_dir \
--eval_size --emb_size --topk --num_relations --is_pretrained_embs