All Projects → THUwangcy → Rechorus

THUwangcy / Rechorus

Licence: mit
“Chorus” of recommendation models: a light and flexible PyTorch framework for Top-K recommendation.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Rechorus

Stove
Domain Driven Design oriented application framework, meets CRUD needs
Stars: ✭ 160 (-2.44%)
Mutual labels:  framework
Mono
Minimalist Framework on top of Express.js
Stars: ✭ 163 (-0.61%)
Mutual labels:  framework
Qframework
Unity3D System Design Architecture
Stars: ✭ 2,326 (+1318.29%)
Mutual labels:  framework
Busker
An extremely simple web framework.
Stars: ✭ 161 (-1.83%)
Mutual labels:  framework
Fastapi Crudrouter
A dynamic FastAPI router that automatically creates CRUD routes for your models
Stars: ✭ 159 (-3.05%)
Mutual labels:  framework
Gene For Php7
Simple, high performance,C extension framework for php!(php-gene-for-php7)
Stars: ✭ 163 (-0.61%)
Mutual labels:  framework
Zimfw
Zim: Modular, customizable, and blazing fast Zsh framework
Stars: ✭ 2,219 (+1253.05%)
Mutual labels:  framework
Primitiv
A Neural Network Toolkit.
Stars: ✭ 164 (+0%)
Mutual labels:  framework
Mandarinets
Mandarine.TS is a typescript, decorator-driven framework that allows you to create server-side applications. Mandarine.TS provides a range of built-in solutions such as Dependency Injection, Components, ORM and more. Under its umbrella, Mandarine.TS has 4 modules: Core, Data, Security and MVC, these modules will offer you the requirements to build a Mandarine-powered application.
Stars: ✭ 161 (-1.83%)
Mutual labels:  framework
Amazium
The responsive CSS web framework
Stars: ✭ 163 (-0.61%)
Mutual labels:  framework
Discord Player
🎧 Complete framework to simplify the implementation of music commands using discords.js v12
Stars: ✭ 161 (-1.83%)
Mutual labels:  framework
Objfw
[Official Mirror] A portable framework for the Objective-C language.
Stars: ✭ 161 (-1.83%)
Mutual labels:  framework
Uibench
UI Benchmark
Stars: ✭ 163 (-0.61%)
Mutual labels:  framework
Goat
[DEPRECATED] 🐐 A minimalistic JSON API server in Go
Stars: ✭ 161 (-1.83%)
Mutual labels:  framework
Uhaha
High Availability Framework for Happy Data
Stars: ✭ 164 (+0%)
Mutual labels:  framework
Anpylar
Python client-side web development framework
Stars: ✭ 160 (-2.44%)
Mutual labels:  framework
Snail
An observables framework for Swift
Stars: ✭ 163 (-0.61%)
Mutual labels:  framework
Fuselibs
Fuselibs is the Uno-libraries that provide the UI framework used in Fuse apps.
Stars: ✭ 164 (+0%)
Mutual labels:  framework
Revo
Event Sourcing, CQRS and DDD framework for C#/.NET Core.
Stars: ✭ 162 (-1.22%)
Mutual labels:  framework
Shackle
High-Performance Erlang Network Client Framework
Stars: ✭ 163 (-0.61%)
Mutual labels:  framework

logo

License

ReChorus is a general PyTorch framework for Top-K recommendation with implicit feedback, especially for research purpose. It aims to provide a fair benchmark to compare different state-of-the-art algorithms. We hope this can partially alleviate the problem that different papers adopt non-comparable experimental settings, so as to form a "Chorus" of recommendation algorithms.

This framework is especially suitable for researchers to compare algorithms under the same experimental setting, and newcomers to get familar with classical methods. The characteristics of our framework can be summarized as follows:

  • Agile: concentrate on your model design in a single file and implement new models quickly
  • Easy: the framework is accomplished in less than a thousand lines of code, which is easy to use with clean codes and adequate comments
  • Efficient: multi-thread batch preparation, special implementations for the evaluation, and around 90% GPU utilization during training for deep models
  • Flexible: implement new readers or runners for different datasets and experimental settings, and each model can be assigned with specific helpers

Generally, ReChorus decomposes the whole process into three modules:

  • Reader: read dataset into DataFrame and append necessary information to each instance
  • Runner: control the training process and model evaluation
  • Model: define how to generate ranking scores and prepare batches

Getting Started

  1. Install Anaconda with Python >= 3.5
  2. Clone the repository and install requirements
git clone https://github.com/THUwangcy/ReChorus.git
  1. Install requirements and step into the src folder
cd ReChorus
pip install -r requirements.txt
cd src
  1. Run model with the build-in dataset
python main.py --model_name BPR --emb_size 64 --lr 1e-3 --l2 1e-6 --dataset Grocery_and_Gourmet_Food
  1. (optional) Run jupyter notebook in data folder to download and build new amazon datasets, or prepare your own datasets according to README in data

  2. (optional) Implement your own models according to README in src

Models

We have implemented the following methods (still updating):

The table below lists the results of these models in Grocery_and_Gourmet_Food dataset (145.8k entries). Leave-one-out is applied to split data: the most recent interaction of each user for testing, the second recent item for validation, and the remaining items for training. We randomly sample 99 negative items for each test case to rank together with the ground-truth item. These settings are all common in Top-K sequential recommendation.

Model [email protected] [email protected] Time/iter Sequential Knowledge Time-aware
BPR 0.3574 0.2480 2.5s
NCF 0.3248 0.2235 3.4s
Tensor 0.3547 0.2670 2.8s
GRU4Rec 0.3664 0.2597 4.9s
NARM 0.3621 0.2586 8.2s
SASRec 0.3888 0.2923 7.2s
TiSASRec 0.3916 0.2922 35.7s
CFKG 0.4228 0.3010 8.7s
SLRC+ 0.4514 0.3329 4.3s
Chorus 0.4739 0.3443 4.9s
KDA 0.5174 0.3876 9.9s

For fair comparison, the batch size is fixed to 256, and the embedding size is set to 64. We strive to tune all the other hyper-parameters to obtain the best performance for each model (may be not optimal now, which will be updated if better scores are achieved). Current commands are listed in run.sh. We repeat each experiment 5 times with different random seeds and report the average score (see exp.py). All experiments are conducted with a single GTX-1080Ti GPU.

Citation

This is also our public implementation for the following papers (codes and datasets to reproduce the results can be found at corresponding branch):

git clone -b SIGIR20 https://github.com/THUwangcy/ReChorus.git
git clone -b TOIS21 https://github.com/THUwangcy/ReChorus.git

Please cite this paper if you use our codes. Thanks!

@inproceedings{wang2020make,
  title={Make it a chorus: knowledge-and time-aware item modeling for sequential recommendation},
  author={Wang, Chenyang and Zhang, Min and Ma, Weizhi and Liu, Yiqun and Ma, Shaoping},
  booktitle={Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval},
  pages={109--118},
  year={2020}
}

Contact

Chenyang Wang ([email protected])

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].