All Projects → cszhangzhen → Hgp Sl

cszhangzhen / Hgp Sl

Hierarchical Graph Pooling with Structure Learning

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Hgp Sl

Competitive coding
This repository contains some useful codes, techniques, algorithms and problem solutions helpful in Competitive Coding.
Stars: ✭ 393 (+147.17%)
Mutual labels:  graph, graph-algorithms
Lightgraphs.jl
An optimized graphs package for the Julia programming language
Stars: ✭ 611 (+284.28%)
Mutual labels:  graph, graph-algorithms
C Sharp Algorithms
📚 📈 Plug-and-play class-library project of standard Data Structures and Algorithms in C#
Stars: ✭ 4,684 (+2845.91%)
Mutual labels:  graph, graph-algorithms
Ngraph.graph
Graph data structure in JavaScript
Stars: ✭ 295 (+85.53%)
Mutual labels:  graph, graph-algorithms
Deepwalk C
DeepWalk implementation in C++
Stars: ✭ 88 (-44.65%)
Mutual labels:  graph, graph-algorithms
Vivagraphjs
Graph drawing library for JavaScript
Stars: ✭ 3,442 (+2064.78%)
Mutual labels:  graph, graph-algorithms
Swiftgraph
A Graph Data Structure in Pure Swift
Stars: ✭ 588 (+269.81%)
Mutual labels:  graph, graph-algorithms
Graph Data Science
Source code for the Neo4j Graph Data Science library of graph algorithms.
Stars: ✭ 251 (+57.86%)
Mutual labels:  graph, graph-algorithms
Cracking The Coding Interview
Solutions for Cracking the Coding Interview - 6th Edition
Stars: ✭ 35 (-77.99%)
Mutual labels:  graph, graph-algorithms
Leaderboardx
A tool for building graphs quickly
Stars: ✭ 13 (-91.82%)
Mutual labels:  graph, graph-algorithms
Data Structures
Common data structures and algorithms implemented in JavaScript
Stars: ✭ 139 (-12.58%)
Mutual labels:  graph, graph-algorithms
Ogre
Clojure library for querying Apache TinkerPop graphs
Stars: ✭ 118 (-25.79%)
Mutual labels:  graph, graph-algorithms
Rgl
RGL is a framework for graph data structures and algorithms in Ruby.
Stars: ✭ 279 (+75.47%)
Mutual labels:  graph, graph-algorithms
Communities
Library of community detection algorithms and visualization tools
Stars: ✭ 348 (+118.87%)
Mutual labels:  graph, graph-algorithms
Javascript Datastructures Algorithms
📚 collection of JavaScript and TypeScript data structures and algorithms for education purposes. Source code bundle of JavaScript algorithms and data structures book
Stars: ✭ 3,221 (+1925.79%)
Mutual labels:  graph, graph-algorithms
Littleballoffur
Little Ball of Fur - A graph sampling extension library for NetworKit and NetworkX (CIKM 2020)
Stars: ✭ 505 (+217.61%)
Mutual labels:  graph, graph-algorithms
Yfiles For Html Demos
Contains demo sources for the JavaScript diagramming library yFiles for HTML
Stars: ✭ 202 (+27.04%)
Mutual labels:  graph, graph-algorithms
Grakn
TypeDB: a strongly-typed database
Stars: ✭ 2,947 (+1753.46%)
Mutual labels:  graph, graph-algorithms
Fxgraphalgorithmsimulator
Visualizes specific Graph Algorithms like BFS, DFS, MST etc. on interactive user input graphs.
Stars: ✭ 22 (-86.16%)
Mutual labels:  graph, graph-algorithms
Verse
Reference implementation of the paper VERSE: Versatile Graph Embeddings from Similarity Measures
Stars: ✭ 98 (-38.36%)
Mutual labels:  graph, graph-algorithms

HGP-SL

Hierarchical Graph Pooling with Structure Learning (Preprint version is available on arXiv).

This is a PyTorch implementation of the HGP-SL algorithm, which learns a low-dimensional representation for the entire graph. Specifically, the graph pooling operation utilizes node features and graph structure information to perform down-sampling on graphs. Then, a structure learning layer is stacked on the pooling operation, which aims to learn a refined graph structure that can best preserve the essential topological information.

Requirements

  • python3.6
  • pytorch==1.5.0
  • torch-scatter==2.0.4
  • torch-sparse==0.6.4
  • torch-cluster==1.5.4
  • torch-geometric==1.5.0

Note: This code repository is heavily built on pytorch_geometric, which is a Geometric Deep Learning Extension Library for PyTorch. Please refer here for how to install and utilize the library.

Datasets

Graph classification benchmarks are publicly available at here.

This folder contains the following comma separated text files (replace DS by the name of the dataset):

n = total number of nodes

m = total number of edges

N = number of graphs

(1) DS_A.txt (m lines)

sparse (block diagonal) adjacency matrix for all graphs, each line corresponds to (row, col) resp. (node_id, node_id)

(2) DS_graph_indicator.txt (n lines)

column vector of graph identifiers for all nodes of all graphs, the value in the i-th line is the graph_id of the node with node_id i

(3) DS_graph_labels.txt (N lines)

class labels for all graphs in the dataset, the value in the i-th line is the class label of the graph with graph_id i

(4) DS_node_labels.txt (n lines)

column vector of node labels, the value in the i-th line corresponds to the node with node_id i

There are OPTIONAL files if the respective information is available:

(5) DS_edge_labels.txt (m lines; same size as DS_A_sparse.txt)

labels for the edges in DS_A_sparse.txt

(6) DS_edge_attributes.txt (m lines; same size as DS_A.txt)

attributes for the edges in DS_A.txt

(7) DS_node_attributes.txt (n lines)

matrix of node attributes, the comma seperated values in the i-th line is the attribute vector of the node with node_id i

(8) DS_graph_attributes.txt (N lines)

regression values for all graphs in the dataset, the value in the i-th line is the attribute of the graph with graph_id i

Run

To run HGP-SL, just execute the following command for graph classification task:

python main.py

Parameter Settings

Datasets lr weight_decay batch_size pool_ratio dropout net_layers
PROTEINS 0.001 0.001 512 0.5 0.0 3
Mutagenicity 0.001 0.001 512 0.8 0.0 3
NCI109 0.001 0.001 512 0.8 0.0 3
NCI1 0.001 0.001 512 0.8 0.0 3
DD 0.0001 0.001 64 0.3 0.5 2
ENZYMES 0.001 0.001 128 0.8 0.0 2

Citing

If you find HGP-SL useful for your research, please consider citing the following paper:

@article{zhang2019hierarchical,
  title={Hierarchical Graph Pooling with Structure Learning},
  author={Zhang, Zhen and Bu, Jiajun and Ester, Martin and Zhang, Jianfeng and Yao, Chengwei and Yu, Zhi and Wang, Can},
  journal={arXiv preprint arXiv:1911.05954},
  year={2019}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].