Giter VIP home page Giter VIP logo

crosscbr's Introduction

CrossCBR: Cross-view Contrastive Learning for Bundle Recommendation

This is our Pytorch implementation for the paper:

Yunshan Ma, Yingzhi He, An Zhang, Xiang Wang, and Tat-Seng Chua (2022). CrossCBR: Cross-view Contrastive Learning for Bundle Recommendation, Paper in arXiv. In KDD'22, August 14โ€“18, 2022, Washington, DC, USA.

Author: Yunshan Ma (yunshan.ma at u.nus.edu) and Yingzhi He (heyingzhi at u.nus.edu)

Introduction

CrossCBR is a new recommendation model based on graph neural network and contrastive learning for bundle recommendation. By explicitly modeling the cooperative association between the item-view and bundle-view representations using an auxiliary contrastive loss, CrossCBR achieves great performance on three public bundle recommendation datasets: Youshu, NetEase, and iFashion.

Citation

If you want to use our codes and datasets in your research, please cite:

@inproceedings{CrossCBR2022,
  author    = {Yunshan Ma and
               Yingzhi He and
               An Zhang and
               Xiang Wang and
               Tat{-}Seng Chua},
  title     = {CrossCBR: Cross-view Contrastive Learning for Bundle Recommendation},
  booktitle = {{KDD}},
  pages     = {1233--1241},
  publisher = {{ACM}},
  year      = {2022}
}

Requirements

  • OS: Ubuntu 18.04 or higher version
  • python == 3.7.3 or above
  • supported(tested) CUDA versions: 10.2
  • Pytorch == 1.9.0 or above

Code Structure

  1. The entry script for training and evaluation is: train.py.
  2. The config file is: config.yaml.
  3. The script for data preprocess and dataloader: utility.py.
  4. The model folder: ./models.
  5. The experimental logs in tensorboard-format are saved in ./runs.
  6. The experimental logs in txt-format are saved in ./log.
  7. The best model and associate config file for each experimental setting is saved in ./checkpoints.

How to run the code

  1. Decompress the dataset file into the current folder:

    tar -zxvf dataset.tgz

    Noted: for the iFashion dataset, we incorporate three additional files: user_id_map.json, item_id_map.json, and bundle_id_map.json, which record the id mappings between the original string-formatted id in the POG dataset and the integer-formatted id in our dataset. You may use the mappings to obtain the original content information of the items/outfits. We do not use any content information in this work.

  2. Train CrossCBR on the dataset Youshu with GPU 0:

    python train.py -g 0 -m CrossCBR -d Youshu

    You can specify the gpu id and the used dataset by cmd line arguments, while you can tune the hyper-parameters by revising the configy file config.yaml. The detailed introduction of the hyper-parameters can be seen in the config file, and you are highly encouraged to read the paper to better understand the effects of some key hyper-parameters.

crosscbr's People

Contributors

raojm avatar mysbupt avatar happypointer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.