Code for ICML2019 Paper "Compositional Invariance Constraints for Graph Embeddings"

Overview

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 try again, and if you're still stuck please send me an email: [email protected]

Paper Link: https://arxiv.org/abs/1905.10674

  1. Comet ML for logging. You will need an API key, username, and project name to do online logging.
  2. Pytorch version=1.0
  3. scikit-learn
  4. tqdm for progress bar
  5. pickle
  6. json
  7. joblib
  8. networkx for creating reddit graph

To conduct experiments you will need to download the appropriate datasets and preprocess them with the given preprocesssing scripts. This will involve changing the file paths from their default ones. For FB15k-237 there is the main dataset as well as the entity types dataset (links are provided in the main paper). Further, note that reddit uses 2 steps of preprocessing, the first to parse the json objects and then a second one to create the K-core graph.

Sample Commands

To reproduce the results we provide sample commands. Command Line arguments control which sensitive attributes are use and whether there is a compositional adversary or not.

  1. FB15k-237: ipython --pdb -- paper_trans_e.py --namestr='FB15k Comp Gamma=1000' --do_log --num_epochs=100 --embed_dim=20 --test_new_disc --sample_mask=True --use_attr=True --gamma=1000 --valid_freq=50

  2. MovieLens1M:

ipython --pdb -- main_movielens.py --namestr='100 GCMC Comp and Dummy' --use_cross_entropy --num_epochs=200 --test_new_disc --use_1M=True --show_tqdm=True --report_bias=True --valid_freq=5 --use_gcmc=True --num_classifier_epochs=200 --embed_dim=30 --sample_mask=True --use_attr=True --gamma=10 --do_log

  1. Reddit:

ipython --pdb -- main_reddit.py --namestr='Reddit Compositional No Held Out V2 Gamma=1' --valid_freq=5 --num_sensitive=10 --use_attr=True --use_cross_entropy --test_new_disc --num_epochs=50 --num_nce=1 --sample_mask=True --debug --gamma=1000

If you use this codebase or ideas in the paper please cite:

@article{bose2019compositional, \ title={Compositional Fairness Constraints for Graph Embeddings},\ author={Bose, Avishek Joey and Hamilton, William},\ conference={Proceedings of the Thirty-sixth International Conference on Machine Learning, Long Beach CA},\ year={2019} \ }

Owner
Avishek (Joey) Bose
I’m a PhD student at McGill / MILA where I work on Generative Models and Graph Representation Learning. Previously at Uber AI, UofT and Borealis AI
Avishek (Joey) Bose
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
Bert4rec for news Recommendation

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

saran pandian 2 Feb 04, 2022
A TensorFlow recommendation algorithm and framework in Python.

TensorRec A TensorFlow recommendation algorithm and framework in Python. NOTE: TensorRec is not under active development TensorRec will not be receivi

James Kirk 1.2k Jan 04, 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
Global Context Enhanced Social Recommendation with Hierarchical Graph Neural Networks

SR-HGNN ICDM-2020 《Global Context Enhanced Social Recommendation with Hierarchical Graph Neural Networks》 Environments python 3.8 pytorch-1.6 DGL 0.5.

xhc 9 Nov 12, 2022
Spotify API Recommnder System

This project will access your last listened songs on Spotify using its API, then it will request the user to select 5 favorite songs in that list, on which the API will proceed to make 50 recommendat

Kevin Luke 1 Dec 14, 2021
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
Beyond Clicks: Modeling Multi-Relational Item Graph for Session-Based Target Behavior Prediction

MGNN-SPred This is our Tensorflow implementation for the paper: WenWang,Wei Zhang, Shukai Liu, Qi Liu, Bo Zhang, Leyu Lin, and Hongyuan Zha. 2020. Bey

Wen Wang 18 Jan 02, 2023
A library of Recommender Systems

A library of Recommender Systems This repository provides a summary of our research on Recommender Systems. It includes our code base on different rec

MilaGraph 980 Jan 05, 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
An Efficient and Effective Framework for Session-based Social Recommendation

SEFrame This repository contains the code for the paper "An Efficient and Effective Framework for Session-based Social Recommendation". Requirements P

Tianwen CHEN 23 Oct 26, 2022
Hierarchical Fashion Graph Network for Personalized Outfit Recommendation, SIGIR 2020

hierarchical_fashion_graph_network This is our Tensorflow implementation for the paper: Xingchen Li, Xiang Wang, Xiangnan He, Long Chen, Jun Xiao, and

LI Xingchen 70 Dec 05, 2022
Accuracy-Diversity Trade-off in Recommender Systems via Graph Convolutions

Accuracy-Diversity Trade-off in Recommender Systems via Graph Convolutions This repository contains the code of the paper "Accuracy-Diversity Trade-of

2 Sep 16, 2022
This library intends to be a reference for recommendation engines in Python

Crab - A Python Library for Recommendation Engines

Marcel Caraciolo 85 Oct 04, 2021
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
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
基于个性化推荐的音乐播放系统

MusicPlayer 基于个性化推荐的音乐播放系统 Hi, 这是我在大四的时候做的毕设,现如今将该项目开源。 本项目是基于Python的tkinter和pygame所著。 该项目总体来说,代码比较烂(因为当时水平很菜)。 运行的话安装几个基本库就能跑,只不过里面的数据还没有上传至Github。 先

Cedric Niu 6 Nov 19, 2022
Cloud-based recommendation system

This project is based on cloud services to create data lake, ETL process, train and deploy learning model to implement a recommendation system.

Yi Ding 1 Feb 02, 2022
Use Jupyter Notebooks to demonstrate how to build a Recommender with Apache Spark & Elasticsearch

Recommendation engines are one of the most well known, widely used and highest value use cases for applying machine learning. Despite this, while there are many resources available for the basics of

International Business Machines 793 Dec 18, 2022
A tensorflow implementation of the RecoGCN model in a CIKM'19 paper, titled with "Relation-Aware Graph Convolutional Networks for Agent-Initiated Social E-Commerce Recommendation".

This repo contains a tensorflow implementation of RecoGCN and the experiment dataset Running the RecoGCN model python train.py Example training outp

xfl15 30 Nov 25, 2022