Handling Information Loss of Graph Neural Networks for Session-based Recommendation

Overview

LESSR

A PyTorch implementation of LESSR (Lossless Edge-order preserving aggregation and Shortcut graph attention for Session-based Recommendation) from the paper:
Handling Information Loss of Graph Neural Networks for Session-based Recommendation, Tianwen Chen and Raymong Chi-Wing Wong, KDD '20

Requirements

  • PyTorch 1.6.0
  • NumPy 1.19.1
  • Pandas 1.1.3
  • DGL 0.5.2

Usage

  1. Install the requirements.
    If you use Anaconda, you can create a conda environment with the required packages using the following command.

    conda env create -f packages.yml

    Activate the created conda environment.

    conda activate lessr
    
  2. Download and extract the datasets.

  3. Preprocess the datasets using preprocess.py.
    For example, to preprocess the Diginetica dataset, extract the file train-item-views.csv to the folder datasets/ and run the following command:

    python preprocess.py -d diginetica -f datasets/train-item-views.csv

    The preprocessed dataset is stored in the folder datasets/diginetica.
    You can see the detailed usage of preprocess.py by running the following command:

    python preprocess.py -h
  4. Train the model using main.py.
    If no arguments are passed to main.py, it will train a model using a sample dataset with default hyperparameters.

    python main.py

    The commands to train LESSR with suggested hyperparameters on different datasets are as follows:

    python main.py --dataset-dir datasets/diginetica --embedding-dim 32 --num-layers 4
    python main.py --dataset-dir datasets/gowalla --embedding-dim 64 --num-layers 4
    python main.py --dataset-dir datasets/lastfm --embedding-dim 128 --num-layers 4

    You can see the detailed usage of main.py by running the following command:

    python main.py -h
  5. Use your own dataset.

    1. Create a subfolder in the datasets/ folder.
    2. The subfolder should contain the following 3 files.
      • num_items.txt: This file contains a single integer which is the number of items in the dataset.
      • train.txt: This file contains all the training sessions.
      • test.txt: This file contains all the test sessions.
    3. Each line of train.txt and test.txt represents a session, which is a list of item IDs separated by commas. Note the item IDs must be in the range of [0, num_items).
    4. See the folder datasets/sample for an example of a dataset.

Citation

If you use our code in your research, please cite our paper:

@inproceedings{chen2020lessr,
    title="Handling Information Loss of Graph Neural Networks for Session-based Recommendation",
    author="Tianwen {Chen} and Raymond Chi-Wing {Wong}",
    booktitle="Proceedings of the 26th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD '20)",
    pages="1172-–1180",
    year="2020"
}
Owner
Tianwen CHEN
A CS PhD Student in HKUST
Tianwen CHEN
It is a movie recommender web application which is developed using the Python.

Movie Recommendation 🍿 System Watch Tutorial for this project Source IMDB Movie 5000 Dataset Inspired from this original repository. Features Simple

Kushal Bhavsar 10 Dec 26, 2022
Real time recommendation playground

concierge A continuous learning collaborative filter1 deployed with a light web server2. Distributed updates are live (real time pubsub + delta traini

Mark Essel 16 Nov 07, 2022
This is our implementation of GHCF: Graph Heterogeneous Collaborative Filtering (AAAI 2021)

GHCF This is our implementation of the paper: Chong Chen, Weizhi Ma, Min Zhang, Zhaowei Wang, Xiuqiang He, Chenyang Wang, Yiqun Liu and Shaoping Ma. 2

Chong Chen 53 Dec 05, 2022
Code for ICML2019 Paper "Compositional Invariance Constraints for Graph Embeddings"

Dependencies NOTE: This code has been updated, if you were using this repo earlier and experienced issues that was due to an outaded codebase. Please

Avishek (Joey) Bose 43 Nov 25, 2022
Spark-movie-lens - An on-line movie recommender using Spark, Python Flask, and the MovieLens dataset

A scalable on-line movie recommender using Spark and Flask This Apache Spark tutorial will guide you step-by-step into how to use the MovieLens datase

Jose A Dianes 794 Dec 23, 2022
A Python scikit for building and analyzing recommender systems

Overview Surprise is a Python scikit for building and analyzing recommender systems that deal with explicit rating data. Surprise was designed with th

Nicolas Hug 5.7k Jan 01, 2023
Learning Fair Representations for Recommendation: A Graph-based Perspective, WWW2021

FairGo WWW2021 Learning Fair Representations for Recommendation: A Graph-based Perspective As a key application of artificial intelligence, recommende

lei 39 Oct 26, 2022
Bundle Graph Convolutional Network

Bundle Graph Convolutional Network This is our Pytorch implementation for the paper: Jianxin Chang, Chen Gao, Xiangnan He, Depeng Jin and Yong Li. Bun

55 Dec 25, 2022
The official implementation of "DGCN: Diversified Recommendation with Graph Convolutional Networks" (WWW '21)

DGCN This is the official implementation of our WWW'21 paper: Yu Zheng, Chen Gao, Liang Chen, Depeng Jin, Yong Li, DGCN: Diversified Recommendation wi

FIB LAB, Tsinghua University 37 Dec 18, 2022
Respiratory Health Recommendation System

Respiratory-Health-Recommendation-System Respiratory Health Recommendation System based on Air Quality Index Forecasts This project aims to provide pr

Abhishek Gawabde 1 Jan 29, 2022
A framework for large scale recommendation algorithms.

A framework for large scale recommendation algorithms.

Alibaba Group - PAI 880 Jan 03, 2023
Code for MB-GMN, SIGIR 2021

MB-GMN Code for MB-GMN, SIGIR 2021 For Beibei data, run python .\labcode.py For Tmall data, run python .\labcode.py --data tmall --rank 2 For IJCAI

32 Dec 04, 2022
RetaGNN: Relational Temporal Attentive Graph Neural Networks for Holistic Sequential Recommendation

RetaGNN: Relational Temporal Attentive Graph Neural Networks for Holistic Sequential Recommendation Pytorch based implemention of Relational Temporal

28 Dec 28, 2022
A Python implementation of LightFM, a hybrid recommendation algorithm.

LightFM Build status Linux OSX (OpenMP disabled) Windows (OpenMP disabled) LightFM is a Python implementation of a number of popular recommendation al

Lyst 4.2k Jan 02, 2023
[ICDMW 2020] Code and dataset for "DGTN: Dual-channel Graph Transition Network for Session-based Recommendation"

DGTN: Dual-channel Graph Transition Network for Session-based Recommendation This repository contains PyTorch Implementation of ICDMW 2020 (NeuRec @ I

Yujia 25 Nov 17, 2022
A movie recommender which recommends the movies belonging to the genre that user has liked the most.

Content-Based-Movie-Recommender-System This model relies on the similarity of the items being recommended. (I have used Pandas and Numpy. However othe

Srinivasan K 0 Mar 31, 2022
Elliot is a comprehensive recommendation framework that analyzes the recommendation problem from the researcher's perspective.

Comprehensive and Rigorous Framework for Reproducible Recommender Systems Evaluation

Information Systems Lab @ Polytechnic University of Bari 215 Nov 29, 2022
Bert4rec for news Recommendation

News-Recommendation-system-using-Bert4Rec-model Bert4rec for news Recommendation

saran pandian 2 Feb 04, 2022
A Library for Field-aware Factorization Machines

Table of Contents ================= - What is LIBFFM - Overfitting and Early Stopping - Installation - Data Format - Command Line Usage - Examples -

1.6k Dec 05, 2022
Plex-recommender - Get movie recommendations based on your current PleX library

plex-recommender Description: Get movie/tv recommendations based on your current

5 Jul 19, 2022