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
NVIDIA Merlin is an open source library designed to accelerate recommender systems on NVIDIA’s GPUs.

NVIDIA Merlin is an open source library providing end-to-end GPU-accelerated recommender systems, from feature engineering and preprocessing to training deep learning models and running inference in

420 Jan 04, 2023
大规模推荐算法库,包含推荐系统经典及最新算法LR、Wide&Deep、DSSM、TDM、MIND、Word2Vec、DeepWalk、SSR、GRU4Rec、Youtube_dnn、NCF、GNN、FM、FFM、DeepFM、DCN、DIN、DIEN、DLRM、MMOE、PLE、ESMM、MAML、xDeepFM、DeepFEFM、NFM、AFM、RALM、Deep Crossing、PNN、BST、AutoInt、FGCNN、FLEN、ListWise等

(中文文档|简体中文|English) 什么是推荐系统? 推荐系统是在互联网信息爆炸式增长的时代背景下,帮助用户高效获得感兴趣信息的关键; 推荐系统也是帮助产品最大限度吸引用户、留存用户、增加用户粘性、提高用户转化率的银弹。 有无数优秀的产品依靠用户可感知的推荐系统建立了良好的口碑,也有无数的公司依

3.6k Dec 30, 2022
Jointly Learning Explainable Rules for Recommendation with Knowledge Graph

Jointly Learning Explainable Rules for Recommendation with Knowledge Graph

57 Nov 03, 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
RecList is an open source library providing behavioral, "black-box" testing for recommender systems.

RecList is an open source library providing behavioral, "black-box" testing for recommender systems.

Jacopo Tagliabue 375 Dec 30, 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
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
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
Persine is an automated tool to study and reverse-engineer algorithmic recommendation systems.

Persine, the Persona Engine Persine is an automated tool to study and reverse-engineer algorithmic recommendation systems. It has a simple interface a

Jonathan Soma 87 Nov 29, 2022
Codes for AAAI'21 paper 'Self-Supervised Hypergraph Convolutional Networks for Session-based Recommendation'

DHCN Codes for AAAI 2021 paper 'Self-Supervised Hypergraph Convolutional Networks for Session-based Recommendation'. Please note that the default link

Xin Xia 124 Dec 14, 2022
Price-aware Recommendation with Graph Convolutional Networks,

PUP This is the official implementation of our ICDE'20 paper: Yu Zheng, Chen Gao, Xiangnan He, Yong Li, Depeng Jin, Price-aware Recommendation with Gr

S4rawBer2y 3 Oct 30, 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 library of metrics for evaluating recommender systems

recmetrics A python library of evalulation metrics and diagnostic tools for recommender systems. **This library is activly maintained. My goal is to c

Claire Longo 458 Jan 06, 2023
Graph Neural Networks for Recommender Systems

This repository contains code to train and test GNN models for recommendation, mainly using the Deep Graph Library (DGL).

217 Jan 04, 2023
Pytorch domain library for recommendation systems

TorchRec (Experimental Release) TorchRec is a PyTorch domain library built to provide common sparsity & parallelism primitives needed for large-scale

Meta Research 1.3k Jan 05, 2023
Recommender System Papers

Included Conferences: SIGIR 2020, SIGKDD 2020, RecSys 2020, CIKM 2020, AAAI 2021, WSDM 2021, WWW 2021

RUCAIBox 704 Jan 06, 2023
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
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
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
Books Recommendation With Python

Books-Recommendation Business Problem During the last few decades, with the rise

Çağrı Karadeniz 7 Mar 12, 2022