Home

Awesome

Ranking Distillation

A PyTorch implementation of Ranking Distillation:

Ranking Distillation: Learning Compact Ranking Models With High Performance for Recommender System, Jiaxi Tang and Ke Wang , KDD '18

Requirements

Usage

Training student models (Model-S)

  1. Run <code>python train_caser.py</code> with <code>d=50</code> to get the performance of student model.

    When finished, we will have the model saved in folder checkpoints/

Training teacher models (Model-T)

  1. Run <code>python train_caser.py</code> with <code>d=100</code> to get the performance of teacher model.

    When finished, we will have the model saved in folder checkpoints/

Training student models with ranking distillation (Model-RD)

  1. Run <code>python train_caser.py</code> with <code>d=100</code> to get the well-trained teacher model.

    When finished, we will have the teacher model saved in folder checkpoints/

    (you can also skip this step, as there is one in the checkpoint/gowalla-caser-dim=100.pth.tar)

  2. Run <code>python distill_caser.py</code> with <code>d=50</code> and <code>teacher_model_path</code> pointed to the teacher model.

Configurations

Model Args (in train_caser.py)

Model Args (in distill_caser.py)

Citation

If you use this Caser in your paper, please cite the paper:

@inproceedings{tang2018ranking,
  title={Ranking Distillation: Learning Compact Ranking Models With High Performance for Recommender System},
  author={Tang, Jiaxi and Wang, Ke},
  booktitle={ACM SIGKDD International Conference on Knowledge Discovery & Data Mining},
  year={2018}
}

Acknowledgment

This project (utils.py, interactions.py, etc.) is heavily built on Spotlight. Thanks Maciej Kula for his great work.