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
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
基于个性化推荐的音乐播放系统

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

Cedric Niu 6 Nov 19, 2022
A PyTorch implementation of "Say No to the Discrimination: Learning Fair Graph Neural Networks with Limited Sensitive Attribute Information" (WSDM 2021)

FairGNN A PyTorch implementation of "Say No to the Discrimination: Learning Fair Graph Neural Networks with Limited Sensitive Attribute Information" (

31 Jan 04, 2023
Cross-Domain Recommendation via Preference Propagation GraphNet.

PPGN Codes for CIKM 2019 paper Cross-Domain Recommendation via Preference Propagation GraphNet. Citation Please cite our paper if you find this code u

Information Retrieval Group, Wuhan University, China 20 Dec 15, 2022
Movie Recommender System

Movie-Recommender-System Movie-Recommender-System is a web application using which a user can select his/her watched movie from list and system will r

1 Jul 14, 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
Bert4rec for news Recommendation

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

saran pandian 2 Feb 04, 2022
[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
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
Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk

Annoy Annoy (Approximate Nearest Neighbors Oh Yeah) is a C++ library with Python bindings to search for points in space that are close to a given quer

Spotify 10.6k Jan 01, 2023
Temporal Meta-path Guided Explainable Recommendation (WSDM2021)

Temporal Meta-path Guided Explainable Recommendation (WSDM2021) TMER Code of paper "Temporal Meta-path Guided Explainable Recommendation". Requirement

Yicong Li 13 Nov 30, 2022
Recommendation Systems for IBM Watson Studio platform

Recommendation-Systems-for-IBM-Watson-Studio-platform Project Overview In this project, I analyze the interactions that users have with articles on th

Milad Sadat-Mohammadi 1 Jan 21, 2022
Implementation of a hadoop based movie recommendation system

Implementation-of-a-hadoop-based-movie-recommendation-system 通过编写代码,设计一个基于Hadoop的电影推荐系统,通过此推荐系统的编写,掌握在Hadoop平台上的文件操作,数据处理的技能。windows 10 hadoop 2.8.3 p

汝聪(Ricardo) 5 Oct 02, 2022
Code for KHGT model, AAAI2021

KHGT Code for KHGT accepted by AAAI2021 Please unzip the data files in Datasets/ first. To run KHGT on Yelp data, use python labcode_yelp.py For Movi

32 Nov 29, 2022
6002project-rl - An implemention of offline RL on recommender system

An implemention of offline RL on recommender system @author: misajie @update: 20

Tzay Lee 3 May 24, 2022
fastFM: A Library for Factorization Machines

Citing fastFM The library fastFM is an academic project. The time and resources spent developing fastFM are therefore justified by the number of citat

1k Dec 24, 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
RecSim NG: Toward Principled Uncertainty Modeling for Recommender Ecosystems

RecSim NG, a probabilistic platform for multi-agent recommender systems simulation. RecSimNG is a scalable, modular, differentiable simulator implemented in Edward2 and TensorFlow. It offers: a power

Google Research 110 Dec 16, 2022
Handling Information Loss of Graph Neural Networks for Session-based Recommendation

LESSR A PyTorch implementation of LESSR (Lossless Edge-order preserving aggregation and Shortcut graph attention for Session-based Recommendation) fro

Tianwen CHEN 62 Dec 03, 2022
Incorporating User Micro-behaviors and Item Knowledge 59 60 3 into Multi-task Learning for Session-based Recommendation

MKM-SR Incorporating User Micro-behaviors and Item Knowledge into Multi-task Learning for Session-based Recommendation Paper data and code This is the

ciecus 38 Dec 05, 2022