• Stars
    star
    391
  • Rank 106,715 (Top 3 %)
  • Language
    Python
  • Created about 5 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Graph Markov Neural Networks

GMNN

This is an implementation of the GMNN (Graph Markov Neural Networks) model.

Table of Contents

Introduction

GMNN integrates statistical relational learning methods (e.g., relational Markov networks and Markov logic networks) and graph neural networks (e.g., graph convolutional networks and graph attention networks) for semi-supervised object classification. GMNN uses a conditional random field to define the joint distribution of all the object labels conditioned on object features, and the framework can be optimized with a pseudolikelihood variational EM algorithm, which alternates between an E-step and M-step. In the E-step, we infer the labels of unlabeled objects, and in the M-step, we learn the parameters to maximize the pseudolikelihood.

To benefit training such a model, we introduce two graph neural networks in GMNN, i.e., GNNp and GNNq. GNNq is used to improve inference by learning effective object representations through feature propagation. GNNp is used to model local label dependency through local label propagation. The variational EM algorithm for optimizing GMNN is similar to the co-training framework. In the E-step, GNNp annotates unlabeled objects for updating GNNq, and in the M-step, GNNq annotates unlabeled objects for optimizing GNNp.

GMNN can also be applied to many other applications, such as unsupervised node representation learning and link classification. In this repo, we provide codes for both semi-supervised object classification and unsupervised node representation learning.

Illustration

Semi-supervised Object Classification

We focus on the problem of semi-supervised object classification. Given some labeled objects in a graph, we aim at classifying the unlabeled objects.

Two Graph Neural Networks

GMNN uses two graph neural networks, one for learning object representations through feature propagation to improve inference, and the other one for modeling local label dependency through label propagation.

Optimization

Both GNNs are optimized with the variational EM algorithm, which is similar to the co-training framework.

E-Step

M-Step

Data

For semi-supervised object classification, we provide the Cora, Citeseer and Pubmed datasets. For unsupervised node representation learning, we provide the Cora and Citeseer datasets. The datasets are constructed by Yang et al., 2016, and we preprocess the datasets into our format by using the codes from Thomas N. Kipf. Users can also use their own datasets by following the format of the provided datasets.

Usage

The codes for semi-supervised object classification can be found in the folder semisupervised. The implementation corresponds to the variant GMNN W/o Attr. in p in the Table 2 of the original paper. To run the codes, go to the folder semisupervised/codes and execute python run_cora.py. Then the program will print the results over 100 runs with seeds 1~100.

The mean accuracy and standard deviation are summarized in the following tables:

Dataset Cora Citeseer Pubmed
GMNN 83.4 (0.8) 73.0 (0.8) 81.3 (0.5)

The codes for unsupervised node representation learning are in the folder unsupervised. The implementation corresponds to the variant GMNN With q and p in the Table 3 of the original paper. To run the codes, go to the folder unsupervised/codes and execute python run_cora.py. Then the program will print the results over 50 runs.

The mean accuracy and standard deviation are summarized in the following tables:

Dataset Cora Citeseer
GMNN 82.6 (0.5) 71.4 (0.5)

Note that the numbers are slightly different from those in the paper, since we make some changes to the codes before release. In addition, the above experiment was conducted with PyTorch 0.4.1, and the results might be slightly different if different versions of PyTorch are used.

Further Improvement

The results reported in the previous section are not carefully tuned, and there is still a lot of room for further improvement. For example, by slightly tuning the model, the results on semi-supervised object classification can easily reach 83.675 (Cora), 73.576 (Citeseer), 81.922 (Pubmed), as reported in the appendix of the paper. Some potential ways for further improving the results include:

  1. Train the model for longer iterations.

  2. Use more complicated architectures for GNNp and GNNq.

  3. Use different learning rate and number of training epochs for GNNp and GNNq.

  4. Draw more samples to approximate the expectation terms in objective functions.

  5. Integrate GNNp and GNNq for final prediction.

  6. Adjust the annealing temperature when using GNNp to annotate unlabeled objects.

  7. Use more effective strategies for early stopping in training.

  8. Tune the weight of the unsupervised objective function for training GNNq.

Acknowledgement

Some codes of the project are from the following repo: pygcn.

Citation

Please consider citing the following paper if you find our codes helpful. Thank you!

@inproceedings{qu2019gmnn,
title={GMNN: Graph Markov Neural Networks},
author={Qu, Meng and Bengio, Yoshua and Tang, Jian},
booktitle={International Conference on Machine Learning},
pages={5241--5250},
year={2019}
}

More Repositories

1

LiteratureDL4Graph

A comprehensive collection of recent papers on graph deep learning
3,062
star
2

torchdrug

A powerful and flexible machine learning platform for drug discovery
Python
1,382
star
3

graphvite

GraphVite: A General and High-performance Graph Embedding System
C++
1,194
star
4

KnowledgeGraphEmbedding

Python
1,184
star
5

RecommenderSystems

Python
1,058
star
6

ULTRA

A foundation model for knowledge graph reasoning
Python
377
star
7

GearNet

GearNet and Geometric Pretraining Methods for Protein Structure Representation Learning, ICLR'2023 (https://arxiv.org/abs/2203.06125)
Python
242
star
8

NBFNet

Official implementation of Neural Bellman-Ford Networks (NeurIPS 2021)
Python
191
star
9

ConfGF

Implementation of Learning Gradient Fields for Molecular Conformation Generation (ICML 2021).
Python
145
star
10

pLogicNet

Python
143
star
11

AStarNet

Official implementation of A* Networks
Python
121
star
12

RNNLogic

C++
118
star
13

GNN-QE

Official implementation of Graph Neural Network Query Executor (ICML 2022)
Python
88
star
14

PEER_Benchmark

PEER Benchmark, appear at NeurIPS 2022 Dataset and Benchmark Track (https://arxiv.org/abs/2206.02096)
Python
74
star
15

GraphLoG

Implementation of Self-supervised Graph-level Representation Learning with Local and Global Structure (ICML 2021).
Python
68
star
16

DiffPack

Implementation of DiffPack: A Torsional Diffusion Model for Autoregressive Protein Side-Chain Packing
Python
63
star
17

ProtST

[ICML-23 ORAL] ProtST: Multi-Modality Learning of Protein Sequences and Biomedical Texts
Python
62
star
18

GraphAF

49
star
19

ESM-GearNet

ESM-GearNet for Protein Structure Representation Learning (https://arxiv.org/abs/2303.06275)
Python
48
star
20

InductiveQE

Official implementation of Inductive Logical Query Answering in Knowledge Graphs (NeurIPS 2022)
Python
47
star
21

ContinuousGNN

Python
42
star
22

FewShotRE

Python
38
star
23

SiamDiff

Code for Pre-training Protein Encoder via Siamese Sequence-Structure Diffusion Trajectory Prediction (https://arxiv.org/abs/2301.12068)
Python
31
star
24

SPN

Python
28
star
25

esm-s

Structure-Informed Protein Language Model
Python
22
star
26

DrugTutorial_AAAI2021

Tutorial for Drug Discovery on AAAI 2021.
CSS
8
star
27

DeepGraphLearning

Homepage
7
star
28

torchdrug-site

Website for TorchDrug
SCSS
6
star
29

GraphRepresentationLiterature

The literature on graph representation learning
4
star
30

ultra_torchdrug

A TorchDrug version of ULTRA for reproducibility
Python
4
star
31

AAAI19Tutorial

Tutorial "graph representation learning" given at AAAI'19
3
star
32

torchprotein-site

Website for TorchProtein
SCSS
3
star
33

coursewebsite

Course website for Deep Learning and Applications
CSS
2
star
34

Math80600A_2021W

Python
1
star