Official code for "InfoGraph: Unsupervised and Semi-supervised Graph-Level Representation Learning via Mutual Information Maximization" (ICLR 2020, spotlight)

Overview

InfoGraph: Unsupervised and Semi-supervised Graph-Level Representation Learning via Mutual Information Maximization

Authors: Fan-yun Sun, Jordan Hoffman, Vikas Verma, Jian Tang

Link to Paper

Tested on pytorch 1.6.0 and pytorch_geometric 1.6.1

Experiments reported on the paper are conducted in 2019 with pytorch_geometric==1.3.1. Note that the code regarding of QM9 dataset in pytorch_geometric has been changed since then. Thus, if you run this repo with pytorch_geometric>=1.6.1, you may obtain results differ from those reported on the paper.

Code regarding mutual information maximization is partially referenced from: https://github.com/rdevon/DIM

Cite

Please cite our paper if you use this code in your own work:

@inproceedings{sun2019infograph,
  title={InfoGraph: Unsupervised and Semi-supervised Graph-Level Representation Learning via Mutual Information Maximization},
  author={Sun, Fan-Yun and Hoffman, Jordan and Verma, Vikas and Tang, Jian},
  booktitle={International Conference on Learning Representations},
  year={2019}
}
Comments
  • "ZeroDivisionError: float division by zero" when testing with dataset without node labels, like IMDB-BINARY

    Thanks for your work first!

    I am testing on unsupervised graph classification. I saw in the paper experiments on 6 well known dataset: MUTAG, PTC, REDDIT-BINARY, REDDIT-5K, IMDB-BINARY and IMDB-MULTI were conducted. Among these datasets some have node/edge labels (like MUTAG), while some just contain necessarily three files A.txt, graph_indicator.txt and graph_labels.txt (like IMDB-BINARY, IMDB-MULTI). For dataset with node labels, I see the code initialized node feature h(0) as a one-hot vector from the node label. While when I was testing with dataset without node labels, I met the "float division by zero" error when initializing the Linear() in the first gc_layer in the Encoder class of 'gin.py'.

    I tried to debug based on current code and found that this is because the input 'num_feature' is 0 when there are no node labels provided. I am wondering how do you initialize the node features on the dataset without node labels, for example using the node degree instead? I also tried to find additional parameters and different handling this exceptions, while I didn't find it. I am wondering could you please possible give some suggestions or see if there is any modification that should be made when testing on dataset without labels, based on the current code? Thanks!

    opened by HennyJie 6
  • Gap between the performance reported and that of this repo on QM9.

    Gap between the performance reported and that of this repo on QM9.

    Hi, we notice that there is a gap between the performance on the QM9 dataset reported and that we reproduced using your code. e.g. for HOMO(2), the reported RMSE is 0.0060, while with your code it's 0.1560.

    opened by hengruizhang98 3
  • Problem when ran the Reddit-BINARRY dataset.

    Problem when ran the Reddit-BINARRY dataset.

    Hi @fanyun-sun,

    Thanks for your nice work and released code first!

    When I ran the code on the Reddit-BINARY dataset, I got the problem as follows: image

    Could you pls help me with the bug? Thanks in advance!

    opened by ha-lins 2
  • one question about the paper

    one question about the paper

    Thanks for sharing you work, it's interesting and solid. But I want to know what is the exact from of mutual infomation in equation(8)'s third term. Thanks!

    opened by Yfhu1103 1
  • what is PriorDiscriminator and GlobalDiscriminator?

    what is PriorDiscriminator and GlobalDiscriminator?

    I'm curious about the utility of PriorDiscriminator and GlobalDiscriminator, it seems that in your default parameter setting the code set prior=False and does not use PriorDiscriminator to cacluate part of the loss

    opened by A-Rain 1
  • Question about the reported results

    Question about the reported results

    Hi @fanyun-sun,

    Thanks for your released code! I have two minor questions about the reported results as follows:

    1. When I ran the code, the saved log file reported the performance of 20 epochs. I wonder how to obtain the reported results in the paper (e.g. 89.10 for MUTAG dataset).

    Here are the printed results for MUTAG dataset: "linearsvc": [0.7950584795321638, 0.8650584795321636, 0.8351169590643275, 0.868216374269006, 0.8592397660818714, 0.8723391812865497, 0.8939766081871345, 0.8783625730994153, 0.8770175438596493, 0.855877192982456, 0.8981286549707603, 0.8586549707602339, 0.8731578947368421, 0.8789473684210527, 0.8550584795321639, 0.8631286549707602, 0.8656432748538011, 0.8717251461988305, 0.8503508771929825, 0.8814327485380117, 0.8831286549707602],

    1. Could you pls explain the meaning of 10-fold cross-validation accuracy for me? Maybe you can point out the specific implementation in the code.

    Thanks a lot!

    opened by ha-lins 0
  • Question about sum() being called on the errors

    Question about sum() being called on the errors

    When I look at :

     error += (model(data) * std - data.y * std).abs().sum().item()  # MAE
    

    I am curious what the .sum is doing here? Aren't these just the errors for each entry in the batch, why do you need to sum them?

    opened by melnimr 0
  • About negative loss

    About negative loss

    Hi,

    I find that as the training goes (beyond 20 epochs), the loss will gradually become negative. May I ask if this is harmful to downstream tasks?

    Thank you!

    opened by zhikaili 2
Owner
Fan-Yun Sun
CS Ph.D. student @Stanford
Fan-Yun Sun
[ICLR 2021, Spotlight] Large Scale Image Completion via Co-Modulated Generative Adversarial Networks

Large Scale Image Completion via Co-Modulated Generative Adversarial Networks, ICLR 2021 (Spotlight) Demo | Paper [NEW!] Time to play with our interac

Shengyu Zhao 373 Jan 2, 2023
[ICLR 2021 Spotlight Oral] "Undistillable: Making A Nasty Teacher That CANNOT teach students", Haoyu Ma, Tianlong Chen, Ting-Kuei Hu, Chenyu You, Xiaohui Xie, Zhangyang Wang

Undistillable: Making A Nasty Teacher That CANNOT teach students "Undistillable: Making A Nasty Teacher That CANNOT teach students" Haoyu Ma, Tianlong

VITA 71 Dec 28, 2022
Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy" (ICLR 2022 Spotlight)

About Code release for Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy (ICLR 2022 Spotlight)

THUML @ Tsinghua University 221 Dec 31, 2022
Pytorch code for "State-only Imitation with Transition Dynamics Mismatch" (ICLR 2020)

This repo contains code for our paper State-only Imitation with Transition Dynamics Mismatch published at ICLR 2020. The code heavily uses the RL mach

null 20 Sep 8, 2022
A supplementary code for Editable Neural Networks, an ICLR 2020 submission.

Editable neural networks A supplementary code for Editable Neural Networks, an ICLR 2020 submission by Anton Sinitsin, Vsevolod Plokhotnyuk, Dmitry Py

Anton Sinitsin 32 Nov 29, 2022
This codebase is the official implementation of Test-Time Classifier Adjustment Module for Model-Agnostic Domain Generalization (NeurIPS2021, Spotlight)

Test-Time Classifier Adjustment Module for Model-Agnostic Domain Generalization This codebase is the official implementation of Test-Time Classifier A

null 47 Dec 28, 2022
This is an official PyTorch implementation of Task-Adaptive Neural Network Search with Meta-Contrastive Learning (NeurIPS 2021, Spotlight).

NeurIPS 2021 (Spotlight): Task-Adaptive Neural Network Search with Meta-Contrastive Learning This is an official PyTorch implementation of Task-Adapti

Wonyong Jeong 15 Nov 21, 2022
Codes accompanying the paper "Learning Nearly Decomposable Value Functions with Communication Minimization" (ICLR 2020)

NDQ: Learning Nearly Decomposable Value Functions with Communication Minimization Note This codebase accompanies paper Learning Nearly Decomposable Va

Tonghan Wang 69 Nov 26, 2022
Implementation of "Selection via Proxy: Efficient Data Selection for Deep Learning" from ICLR 2020.

Selection via Proxy: Efficient Data Selection for Deep Learning This repository contains a refactored implementation of "Selection via Proxy: Efficien

Stanford Future Data Systems 70 Nov 16, 2022
[NeurIPS 2021 Spotlight] Code for Learning to Compose Visual Relations

Learning to Compose Visual Relations This is the pytorch codebase for the NeurIPS 2021 Spotlight paper Learning to Compose Visual Relations. Demo Imag

Nan Liu 88 Jan 4, 2023
Official code for the ICLR 2021 paper Neural ODE Processes

Neural ODE Processes Official code for the paper Neural ODE Processes (ICLR 2021). Abstract Neural Ordinary Differential Equations (NODEs) use a neura

Cristian Bodnar 50 Oct 28, 2022
UDP++ (ECCVW 2020 Oral), (Winner of COCO 2020 Keypoint Challenge).

UDP-Pose This is the pytorch implementation for UDP++, which won the Fisrt place in COCO Keypoint Challenge at ECCV 2020 Workshop. Top-Down Results on

null 20 Jul 29, 2022
[NeurIPS 2021 Spotlight] Aligning Pretraining for Detection via Object-Level Contrastive Learning

SoCo [NeurIPS 2021 Spotlight] Aligning Pretraining for Detection via Object-Level Contrastive Learning By Fangyun Wei*, Yue Gao*, Zhirong Wu, Han Hu,

Yue Gao 139 Dec 14, 2022
PyTorch implementation for our NeurIPS 2021 Spotlight paper "Long Short-Term Transformer for Online Action Detection".

Long Short-Term Transformer for Online Action Detection Introduction This is a PyTorch implementation for our NeurIPS 2021 Spotlight paper "Long Short

null 77 Dec 16, 2022
The official implementation of NeMo: Neural Mesh Models of Contrastive Features for Robust 3D Pose Estimation [ICLR-2021]. https://arxiv.org/pdf/2101.12378.pdf

NeMo: Neural Mesh Models of Contrastive Features for Robust 3D Pose Estimation [ICLR-2021] Release Notes The offical PyTorch implementation of NeMo, p

Angtian Wang 76 Nov 23, 2022
Official implementation of the ICLR 2021 paper

You Only Need Adversarial Supervision for Semantic Image Synthesis Official PyTorch implementation of the ICLR 2021 paper "You Only Need Adversarial S

Bosch Research 272 Dec 28, 2022
Official implementation of Self-supervised Graph Attention Networks (SuperGAT), ICLR 2021.

SuperGAT Official implementation of Self-supervised Graph Attention Networks (SuperGAT). This model is presented at How to Find Your Friendly Neighbor

Dongkwan Kim 127 Dec 28, 2022
This project is the official implementation of our accepted ICLR 2021 paper BiPointNet: Binary Neural Network for Point Clouds.

BiPointNet: Binary Neural Network for Point Clouds Created by Haotong Qin, Zhongang Cai, Mingyuan Zhang, Yifu Ding, Haiyu Zhao, Shuai Yi, Xianglong Li

Haotong Qin 59 Dec 17, 2022
Official repository for the ICLR 2021 paper Evaluating the Disentanglement of Deep Generative Models with Manifold Topology

Official repository for the ICLR 2021 paper Evaluating the Disentanglement of Deep Generative Models with Manifold Topology Sharon Zhou, Eric Zelikman

Stanford Machine Learning Group 34 Nov 16, 2022