This repository implements variational graph auto encoder by Thomas Kipf.

Overview

Variational Graph Auto-encoder in Pytorch

This repository implements variational graph auto-encoder by Thomas Kipf. For details of the model, refer to his original tensorflow implementation and his paper.

Requirements

  • Pytorch
  • python 3.x
  • networkx
  • scikit-learn
  • scipy

How to run

  • Specify your arguments in args.py : you can change dataset and other arguments there
  • run python train.py

Notes

  • The dataset is the same as what Kipf provided in his original implementation. Thus I used his preprocessing code as-is(maybe with minor modification).
  • Per-epoch training time is a bit slower then the original implementation.(0.2 sec/epoch --> 0.9 sec/epoch)
  • Train accuracy, validation(test) average precision, auroc are similar to those of the original. (over 90% for both AP and roc)
  • Dropout is not implemented now.
  • Feel free to report some inefficiencies in the code! (It's just initial version so may have much room for pytorch-adaptation)
Comments
  • what type is the data

    what type is the data

    Excuse me, I have a question about the format of data. The extensions of these data files are 'x','tx', 'allx','graph' which I haven't seen before. Further more, what I can see is shown in the following picture when I open them with Pycharm. 3YL {3PQ05)GVOX9_BWA~%D

    opened by Andrewdididi 2
  • Can this be used for clustering the nodes?

    Can this be used for clustering the nodes?

    Hello, thank you for your great work. I'm new to graph networks, and I would appreciate it if you'd explain to me if this model can be used for clustering i.e. community detection? if not, can you recommend ways to employ a GCN or a GAE for community detection?

    opened by atheeraa 2
  • About normalization constants norm and weight_tensor

    About normalization constants norm and weight_tensor

    Hi,

    I am having some trouble understanding why are we using the normalization constants norm and weight_tensor and why they are defined in this way. Could you provide some intuition behind this normalization?

    norm = adj.shape[0] * adj.shape[0] / float((adj.shape[0] * adj.shape[0] - adj.sum()) * 2)
    
    pos_weight = float(adj.shape[0] * adj.shape[0] - adj.sum()) / adj.sum()
    weight_mask = adj_label.to_dense().view(-1) == 1
    weight_tensor = torch.ones(weight_mask.size(0)) 
    weight_tensor[weight_mask] = pos_weight
    

    Thanks a lot for your help beforehand!

    opened by psanch21 2
  • About Node Classification

    About Node Classification

    Hello, Thanks for releasing your work! I have seen that you said you use GAE for node classification tasks but can not get good results, have you found why? And could you plz release the code for node classification?

    opened by Yfhu1103 1
  • Recreating the adjacancey matrix using VGAE cocept

    Recreating the adjacancey matrix using VGAE cocept

    Hi, I have been trying to recreate the adjacency of my sparse matrix using the same VGAE concept. I am not able to recreate the adjacency matrix. Do you think there is any preprocessing is necessary for such sparse graphs? Please let me know. I am attaching the data and code for your reference. I am also attaching the results I am able to reproduce using this code. Please feel free to go through the code and suggest necessary changes. Thank you!

    P.S: The graphs are unidirectional. And do not have self-loops as well.

    [states.zip](https://github.com/Daehan adjacency_pred_vgae .txt Kim/vgae_pytorch/files/8883726/states.zip)

    image (4) image (3) image (2) image (1)

    opened by akpas001 4
Owner
DaehanKim
AI Researcher in Tmax AI corp.
DaehanKim
This repository contains the data and code for the paper "Diverse Text Generation via Variational Encoder-Decoder Models with Gaussian Process Priors" (SPNLP@ACL2022)

GP-VAE This repository provides datasets and code for preprocessing, training and testing models for the paper: Diverse Text Generation via Variationa

Wanyu Du 18 Dec 29, 2022
This repository implements and evaluates convolutional networks on the Möbius strip as toy model instantiations of Coordinate Independent Convolutional Networks.

Orientation independent Möbius CNNs This repository implements and evaluates convolutional networks on the Möbius strip as toy model instantiations of

Maurice Weiler 59 Dec 9, 2022
This repository implements WGAN_GP.

Image_WGAN_GP This repository implements WGAN_GP. Image_WGAN_GP This repository uses wgan to generate mnist and fashionmnist pictures. Firstly, you ca

Lieon 6 Dec 10, 2021
An integration of several popular automatic augmentation methods, including OHL (Online Hyper-Parameter Learning for Auto-Augmentation Strategy) and AWS (Improving Auto Augment via Augmentation Wise Weight Sharing) by Sensetime Research.

An integration of several popular automatic augmentation methods, including OHL (Online Hyper-Parameter Learning for Auto-Augmentation Strategy) and AWS (Improving Auto Augment via Augmentation Wise Weight Sharing) by Sensetime Research.

null 45 Dec 8, 2022
Official repository of the paper "A Variational Approximation for Analyzing the Dynamics of Panel Data". Mixed Effect Neural ODE. UAI 2021.

Official repository of the paper (UAI 2021) "A Variational Approximation for Analyzing the Dynamics of Panel Data", Mixed Effect Neural ODE. Panel dat

Jurijs Nazarovs 7 Nov 26, 2022
This is the repository for the AAAI 21 paper [Contrastive and Generative Graph Convolutional Networks for Graph-based Semi-Supervised Learning].

CG3 This is the repository for the AAAI 21 paper [Contrastive and Generative Graph Convolutional Networks for Graph-based Semi-Supervised Learning]. R

null 12 Oct 28, 2022
Model search is a framework that implements AutoML algorithms for model architecture search at scale

Model search (MS) is a framework that implements AutoML algorithms for model architecture search at scale. It aims to help researchers speed up their exploration process for finding the right model architecture for their classification problems (i.e., DNNs with different types of layers).

Google 3.2k Dec 31, 2022
Implements Gradient Centralization and allows it to use as a Python package in TensorFlow

Gradient Centralization TensorFlow This Python package implements Gradient Centralization in TensorFlow, a simple and effective optimization technique

Rishit Dagli 101 Nov 1, 2022
Implements MLP-Mixer: An all-MLP Architecture for Vision.

MLP-Mixer-CIFAR10 This repository implements MLP-Mixer as proposed in MLP-Mixer: An all-MLP Architecture for Vision. The paper introduces an all MLP (

Sayak Paul 51 Jan 4, 2023
QueryFuzz implements a metamorphic testing approach to test Datalog engines.

Datalog is a popular query language with applications in several domains. Like any complex piece of software, Datalog engines may contain bugs. The mo

null 34 Sep 10, 2022
This framework implements the data poisoning method found in the paper Adversarial Examples Make Strong Poisons

Adversarial poison generation and evaluation. This framework implements the data poisoning method found in the paper Adversarial Examples Make Strong

null 31 Nov 1, 2022
Implements an infinite sum of poisson-weighted convolutions

An infinite sum of Poisson-weighted convolutions Kyle Cranmer, Aug 2018 If viewing on GitHub, this looks better with nbviewer: click here Consider a v

Kyle Cranmer 26 Dec 7, 2022
Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation)

Recall Loss for Semantic Segmentation (This repo implements the paper: Recall Loss for Semantic Segmentation) Download Synthia dataset The model uses

null 32 Sep 21, 2022
FastReID is a research platform that implements state-of-the-art re-identification algorithms.

FastReID is a research platform that implements state-of-the-art re-identification algorithms.

JDAI-CV 2.8k Jan 7, 2023
A mini lib that implements several useful functions binding to PyTorch in C++.

Torch-gather A mini library that implements several useful functions binding to PyTorch in C++. What does gather do? Why do we need it? When dealing w

maxwellzh 8 Sep 7, 2022
This implements one of result networks from Large-scale evolution of image classifiers

Exotic structured image classifier This implements one of result networks from Large-scale evolution of image classifiers by Esteban Real, et. al. Req

null 54 Nov 25, 2022
Implements pytorch code for the Accelerated SGD algorithm.

AccSGD This is the code associated with Accelerated SGD algorithm used in the paper On the insufficiency of existing momentum schemes for Stochastic O

null 205 Jan 2, 2023
deep-table implements various state-of-the-art deep learning and self-supervised learning algorithms for tabular data using PyTorch.

deep-table implements various state-of-the-art deep learning and self-supervised learning algorithms for tabular data using PyTorch.

null 63 Oct 17, 2022
This package implements THOR: Transformer with Stochastic Experts.

THOR: Transformer with Stochastic Experts This PyTorch package implements Taming Sparsely Activated Transformer with Stochastic Experts. Installation

Microsoft 45 Nov 22, 2022