What are the popular Graph Neural Network (GNN) libraries

Graph neural network is currently very interesting and hot topic in a research area. The graph is the complex representation between independence objects.  Graph having many practicl application , in social network, natural science, chemistry and many other research areas. The Graph neural Network (GNN) libraries make our life easy.

What is Graph Neural Network (GNN):

Graphs are a general language for describing and analyzing entities with relations or interactions. Graph neural network (GNN) is quite new and  hot topic research area recently.  GNN are designed to perform prediction at node, edges and or entire graphs. A graph is used to solve and perform perdition task like recommender system and extensively used in molecular graphs to predict the various chemical properties.

GNN python Libraries:

  • PyTorch Geometric
  • Deep Grapgh library (DGL)
  • Graph Nets (GN)
  • Spektral

PyTorch Geometric

PyTorch Geometric (PyG) is a Python library built upon PyTorch to easily write and train Graph Neural Network for a wide range of application related to structured data. PYG is both friendly to machine learning researchers and first-time user of machine learning toolkits. The library was developed by two Ph.D. It help to modularized GNN implementation, simple hyperparameter tuning, flexible  user customization.

Alongside broad graph information structure and processing strategies, it has a various of a recent distributed techniques from the areas of social learning and 3D information processing. PyTorch Geometric accomplishes high information throughput by utilizing inadequate GPU speed increase, giving committed CUDA kernel, and presenting effective little mini batch with for input instances of various sizes. You can install from this given link PyTorch geometry.

pyTorch geometry

Deep Grapgh library (DGL)

The Deep Graph Library (DGL) is an another  popular library in graph neural network . It is easy to used , scalable and high performance GNN python library. This library was by distributed deep machine learning (DDML) community.  It is fast and memory efficient message send premtives for GNN training.  DGL help to grow and  empower various kind of  filed for learning knowledge graph embeding like DGL-KE,  DGL-Life science in cheminformatic , bioinformatic and so on.  You can install this library and check its from here  Deep Grapgh library.

Deep Grapgh library

Graph Nets (GN)

The tensorflow and Sonet used DeepMind library name Graphs Nets to build graph neural network.   Graph Nets is lower level  GNN model  and library that provide a great flexibility which help to implement any existing GNN based on 6 basic function and can be extendable. A  graph network (GN) framework defines a class of function for relation reasoning and graph structural representations.

The key expansion that the GN structure offers is its capacity to process AND foresee successions of charts and consequently the direction of a dynamical framework after some time.

The primary unit of calculation in the GN system is the “GN block”, which is a diagram to-chart model that takes a diagram as information, performs calculations of the construction, and returns a diagram as result.

In the code, such a square is addressed by the “Charts Tuple”. A GN block comprises of 6 center capacities:
3 ‘update’ capacities: one for every hub, edge and worldwide property
3 ‘accumulation’ capacities: amassing edge characteristic per hub and collecting edge and hub ascribes universally
This approach takes into account critical adaptability and as such the GN structure can be utilized to execute a wide assortment of models.

The center structure block that addresses chart organized information is the GraphsTuple class. This article addresses bunches of at least one charts and all organization modules accept occurrences of GraphsTuple as information and return GraphsTuple as result.

Graph net

Spektral Graph Neural Network (GNN) libraries

Spektral is a Python library for graph deep learning, based on the Keras API and TensorFlow . The principal objective of this task is to give a basic however adaptable system for making chart brain organizations (GNNs). You can utilize Spektral for arranging the clients of an interpersonal organization, predict sub-atomic properties, producing new graph with GANs, cluster node, predicting joins, and whatever  other task where data is described by graphs.  This library is designed by the core values of Keras to make things very straightforward for beginner while keeping up with adaptability for experts.   Some of most important graph deep learning for Spektral implemented  are

  • Graph Convolutional Network (GCN)
  • Chebyshev convolutions
  • GraphSAGE
  • ARMA Convolutions
  • Edge-Conditioned Convolutional (ECC)
  • Graph attention Network (GAT)
  • Approximated Personalized Progpagaion of Neural Predictions (APPNP)
  • Graph Isomorphism Networks (GIN)
  • Diffusion Convolutions

The simplest way to install Spektral is from PyP

pip install spektral

To install Spektral from source, run this in a terminal.

git clone https://github.com/danielegrattarola/spektral.git
cd spektral
python setup.py install  # Or 'pip install .'

To install Spektral on Google Colab

! pip install spektral


You can check and  source code  is available on Spektral.



The PyTorch Geometric (PyG), Deep Graph Library (DGL), Graph net (GN) and Spektral is the most popular libraries of GNN. All these libraries  support python language and  except Spektral other three libraries support PyTorch. It is very reliable and useful to process graph in any domain. On the basis of the problem the usage of libraries varies if you are working  with keras and Tensorflow then Spektral is good library. For any starting new GNN project , Graphnet is not useful.  If  your requirement is to developed and perform experiment on benchmark database to implement others works then PyTorch is more good.

From the last year GNN get more attention and becoming more powerful  in  the field of graph domain. This article  is just the overview of  useful GNN library.  A lot of resources and reading material are available , if you are facing any problem then just comment , we will provide according to our knowledge.

I hope  that you enjoyed by reading this article , if you have any question or need any assistance , leave a  comment.


Read more:  Graph neural network




Add a Comment

Your email address will not be published. Required fields are marked *