HGCAE Pytorch implementation. CVPR2021 accepted.

Related tags

Deep LearningHGCAE
Overview

Hyperbolic Graph Convolutional Auto-Encoders

Accepted to CVPR2021 🎉

Official PyTorch code of Unsupervised Hyperbolic Representation Learning via Message Passing Auto-Encoders

Jiwoong Park*, Junho Cho*, Hyung Jin Chang, Jin Young Choi (* indicates equal contribution)

vis_cora Embeddings of cora dataset. GAE is Graph Auto-Encoders in Euclidean space, HGCAE is our method. P is Poincare ball, H is Hyperboloid.

Overview

This repository provides HGCAE code in PyTorch for reproducibility with

  • PoincareBall manifold
  • Link prediction task and node clustering task on graph data
    • 6 datasets: Cora, Citeseer, Wiki, Pubmed, Blog Catalog, Amazon Photo
    • Amazon Photo was downloaded via torch-geometric package.
  • Image clustering task on images
    • 2 datasets: ImageNet10, ImageNetDog
    • Image features extracted from ImageNet10, ImageNetDog with PICA image clustering algorithm
    • Mutual K-NN graph from the image features provided.
  • ImageNet-BNCR
    • We have constructed a new dataset, ImageNet-BNCR(Balanced Number of Classes across Roots), via randomly choosing 3 leaf classes per root. We chose three roots, Artifacts, Natural objects, and Animal. Thus, there exist 9 leaf classes, and each leaf class contains 1,300 images in ImageNet-BNCR dataset.
    • bncr

Installation Guide

We use docker to reproduce performance. Please refer guide.md

Usage

1. Run docker

Before training, run our docker image:

docker run --gpus all -it --rm --shm-size 100G -v $PWD:/workspace junhocho/hyperbolicgraphnn:8 bash

If you want to cache edge splits for train/val dataset and load faster afterwards, mkdir ~/tmp and run:

docker run --gpus all -it --rm --shm-size 100G -v $PWD:/workspace -v ~/tmp:/root/tmp junhocho/hyperbolicgraphnn:8 bash

2. train_<dataset>.sh

In the docker session, run each train shell script for each dataset to reproduce performance:

Graph data link prediction

Run following commands to reproduce results:

  • sh script/train_cora_lp.sh
  • sh script/train_citeseer_lp.sh
  • sh script/train_wiki_lp.sh
  • sh script/train_pubmed_lp.sh
  • sh script/train_blogcatalog_lp.sh
  • sh script/train_amazonphoto_lp.sh
ROC AP
Cora 0.94890703 0.94726805
Citeseer 0.96059407 0.96305937
Wiki 0.95510805 0.96200790
Pubmed 0.96207212 0.96083080
Blog Catalog 0.89683939 0.88651569
Amazon Photo 0.98240673 0.97655753

Graph data node clustering

  • sh script/train_cora_nc.sh
  • sh script/train_citeseer_nc.sh
  • sh script/train_wiki_nc.sh
  • sh script/train_pubmed_nc.sh
  • sh script/train_blogcatalog_nc.sh
  • sh script/train_amazonphoto_nc.sh
ACC NMI ARI
Cora 0.74667651 0.57252940 0.55212928
Citeseer 0.69311692 0.42249294 0.44101404
Wiki 0.45945946 0.46777881 0.21517031
Pubmed 0.74849115 0.37759262 0.40770875
Blog Catalog 0.55061586 0.32557388 0.25227964
Amazon Photo 0.78130719 0.69623651 0.60342107

Image clustering

  • sh script/train_ImageNet10.sh
  • sh script/train_ImageNetDog.sh
ACC NMI ARI
ImageNet10 0.85592308 0.79019131 0.74181220
ImageNetDog 0.38738462 0.36059650 0.22696503
  • At least 11GB VRAM is required to run on Pubmed, BlogCatalog, Amazon Photo.
  • We have used GTX 1080ti only in our experiments.
  • Other gpu architectures may not reproduce above performance.

Parameter description

  • dataset : Choose dataset. Refer to each training scripts.
  • c : Curvature of hypebolic space. Should be >0. Preferably choose from 0.1, 0.5 ,1 ,2.
  • c_trainable : 0 or 1. Train c if 1.
  • dropout : Dropout ratio.
  • weight_decay : Weight decay.
  • hidden_dim : Hidden layer dimension. Same dimension used in encoder and decoder.
  • dim : Embedding dimension.
  • lambda_rec : Input reconstruction loss weight.
  • act : relu, elu, tanh.
  • --manifold PoincareBall : Use Euclidean if training euclidean models.
  • --node-cluster 1 : If specified perform node clustering task. If not, link prediction task.

Acknowledgments

This repo is inspired by hgcn.

And some of the code was forked from the following repositories:

License

This work is licensed under the MIT License

Citation

@inproceedings{park2021unsupervised,
  title={Unsupervised Hyperbolic Representation Learning via Message Passing Auto-Encoders},
  author={Jiwoong Park and Junho Cho and Hyung Jin Chang and Jin Young Choi},
  booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
  year={2021}
}

Owner
Junho Cho
Integrated Ph.D candidate of Seoul National University (Perception and Intelligence Laboratory)
Junho Cho
Binary Stochastic Neurons in PyTorch

Binary Stochastic Neurons in PyTorch http://r2rt.com/binary-stochastic-neurons-in-tensorflow.html https://github.com/pytorch/examples/tree/master/mnis

Onur Kaplan 54 Nov 21, 2022
ALFRED - A Benchmark for Interpreting Grounded Instructions for Everyday Tasks

ALFRED A Benchmark for Interpreting Grounded Instructions for Everyday Tasks Mohit Shridhar, Jesse Thomason, Daniel Gordon, Yonatan Bisk, Winson Han,

ALFRED 204 Dec 15, 2022
IsoGCN code for ICLR2021

IsoGCN The official implementation of IsoGCN, presented in the ICLR2021 paper Isometric Transformation Invariant and Equivariant Graph Convolutional N

horiem 39 Nov 25, 2022
Combinatorial model of ligand-receptor binding

Combinatorial model of ligand-receptor binding The binding of ligands to receptors is the starting point for many import signal pathways within a cell

Mobolaji Williams 0 Jan 09, 2022
codes for Image Inpainting with External-internal Learning and Monochromic Bottleneck

Image Inpainting with External-internal Learning and Monochromic Bottleneck This repository is for the CVPR 2021 paper: 'Image Inpainting with Externa

97 Nov 29, 2022
Just playing with getting CLIP Guided Diffusion running locally, rather than having to use colab.

CLIP-Guided-Diffusion Just playing with getting CLIP Guided Diffusion running locally, rather than having to use colab. Original colab notebooks by Ka

Nerdy Rodent 336 Dec 09, 2022
Fast and exact ILP-based solvers for the Minimum Flow Decomposition (MFD) problem, and variants of it.

MFD-ILP Fast and exact ILP-based solvers for the Minimum Flow Decomposition (MFD) problem, and variants of it. The solvers are implemented using Pytho

Algorithmic Bioinformatics Group @ University of Helsinki 4 Oct 23, 2022
The World of an Octopus: How Reporting Bias Influences a Language Model's Perception of Color

The World of an Octopus: How Reporting Bias Influences a Language Model's Perception of Color Overview Code and dataset for The World of an Octopus: H

1 Nov 13, 2021
Second-order Attention Network for Single Image Super-resolution (CVPR-2019)

Second-order Attention Network for Single Image Super-resolution (CVPR-2019) "Second-order Attention Network for Single Image Super-resolution" is pub

516 Dec 28, 2022
A3C LSTM Atari with Pytorch plus A3G design

NEWLY ADDED A3G A NEW GPU/CPU ARCHITECTURE OF A3C FOR SUBSTANTIALLY ACCELERATED TRAINING!! RL A3C Pytorch NEWLY ADDED A3G!! New implementation of A3C

David Griffis 532 Jan 02, 2023
This repository contains the code for the paper Neural RGB-D Surface Reconstruction

Neural RGB-D Surface Reconstruction Paper | Project Page | Video Neural RGB-D Surface Reconstruction Dejan Azinović, Ricardo Martin-Brualla, Dan B Gol

Dejan 406 Jan 04, 2023
ICNet and PSPNet-50 in Tensorflow for real-time semantic segmentation

Real-Time Semantic Segmentation in TensorFlow Perform pixel-wise semantic segmentation on high-resolution images in real-time with Image Cascade Netwo

Oles Andrienko 219 Nov 21, 2022
A PyTorch implementation of the Transformer model in "Attention is All You Need".

Attention is all you need: A Pytorch Implementation This is a PyTorch implementation of the Transformer model in "Attention is All You Need" (Ashish V

Yu-Hsiang Huang 7.1k Jan 04, 2023
DeepDiffusion: Unsupervised Learning of Retrieval-adapted Representations via Diffusion-based Ranking on Latent Feature Manifold

DeepDiffusion Introduction This repository provides the code of the DeepDiffusion algorithm for unsupervised learning of retrieval-adapted representat

4 Nov 15, 2022
Multi-view 3D reconstruction using neural rendering. Unofficial implementation of UNISURF, VolSDF, NeuS and more.

Volume rendering + 3D implicit surface Showcase What? previous: surface rendering; now: volume rendering previous: NeRF's volume density; now: implici

Jianfei Guo 682 Jan 04, 2023
VarCLR: Variable Semantic Representation Pre-training via Contrastive Learning

    VarCLR: Variable Representation Pre-training via Contrastive Learning New: Paper accepted by ICSE 2022. Preprint at arXiv! This repository contain

squaresLab 32 Oct 24, 2022
Research on Tabular Deep Learning (Python package & papers)

Research on Tabular Deep Learning For paper implementations, see the section "Papers and projects". rtdl is a PyTorch-based package providing a user-f

Yura Gorishniy 510 Dec 30, 2022
PointCNN: Convolution On X-Transformed Points (NeurIPS 2018)

PointCNN: Convolution On X-Transformed Points Created by Yangyan Li, Rui Bu, Mingchao Sun, Wei Wu, Xinhan Di, and Baoquan Chen. Introduction PointCNN

Yangyan Li 1.3k Dec 21, 2022
A hobby project which includes a hand-gesture based virtual piano using a mobile phone camera and OpenCV library functions

Overview This is a hobby project which includes a hand-gesture controlled virtual piano using an android phone camera and some OpenCV library. My moti

Abhinav Gupta 1 Nov 19, 2021
A PyTorch-based Semi-Supervised Learning (SSL) Codebase for Pixel-wise (Pixel) Vision Tasks

PixelSSL is a PyTorch-based semi-supervised learning (SSL) codebase for pixel-wise (Pixel) vision tasks. The purpose of this project is to promote the

Zhanghan Ke 255 Dec 11, 2022