Graph Neural Networks with Keras and Tensorflow.
Welcome to Spektral
Spektral is a Python library for graph deep learning, based on Keras and TensorFlow. The main goal of this project is to provide a simple but flexible framework for creating graph neural networks (GNNs).
You can use Spektral for classifying the nodes of a network, predicting molecular properties, generating new graphs with GANs, clustering nodes, predicting links, and any other task where data is described by graphs.
Spektral implements some of the most popular layers for graph deep learning, including:
- Graph convolutional networks (GCN)
- Chebyshev networks (ChebNets)
- Edge-conditioned convolutions (ECC)
- Graph attention networks (GAT)
- ARMA convolutions
- Approximated personalized propagation of neural predictions (APPNP)
- Graph isomorphism networks (GIN)
You can also find pooling layers, including:
- Top-K pooling
- Self-attention graph (SAG) pooling
- MinCUT pooling
- Global sum, average, and max pooling
- Global gated attention pooling
Spektral also includes lots of utilities for your graph deep learning projects.
Spektral is compatible with Python 3.5+, and is tested on Ubuntu 16.04+ and MacOS. Other Linux distros should work as well, but Windows is not supported for now.
To install the required dependencies on Ubuntu run:
$ sudo apt install graphviz libgraphviz-dev libcgraph6
Some features of Spektral also require the following optional dependencies:
- RDKit, a library for cheminformatics and molecule manipulation (available through Anaconda);
- dyfunconn, a library to build functional connectivity networks (available through PyPi);
The simplest way to install Spektral is from PyPi:
$ 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:
! apt install graphviz libgraphviz-dev libcgraph6 ! pip install spektral
Spektral is an open source project available on Github, and contributions of all types are welcome. Feel free to open a pull request if you have something interesting that you want to add to the framework.
Release history Release notifications
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size spektral-0.1.2-py3-none-any.whl (62.5 kB)||File type Wheel||Python version py3||Upload date||Hashes View hashes|
|Filename, size spektral-0.1.2.tar.gz (49.4 kB)||File type Source||Python version None||Upload date||Hashes View hashes|