StellarGraph 1.0 — taking graph machine learning to a new level
Today we delivered version 1.0 of the open-source, user-friendly StellarGraph library for machine learning (ML) on graphs and networks. It’s the culmination of three years of active research and engineering.
StellarGraph delivers state-of-the-art algorithms and detailed examples for a broad range of tasks, not limited to:
- Node classification: predicting properties of individual nodes
- Link prediction: predicting properties of edges, including predicting links between pairs of nodes
- Unsupervised training/representation learning: training models to without labelled data, allowing computing embedding vectors for nodes and edges
- Graph classification: predicting properties of whole graphs or subgraphs.
StellarGraph also works with existing data science workflows, is user-friendly and has detailed narrated examples designed to serve as a starting point for tasks.
It’s a stellar package.
If you’re familiar with StellarGraph, the release notes show all the improvements from 0.11 to 1.0.
The fundamentals
A graph is a collection of nodes and edges between them, where the edges represent some connection or relationship between the nodes. Graph machine learning takes conventional machine learning models like multilayer perceptron and long short-term memory that apply to single data points (representing individual nodes) and augments them to use the information provided by each data point’s connections.
StellarGraph is built using standard data science technologies like TensorFlow Keras, Pandas and NumPy. It is designed to integrate smoothly into existing data science workflows, by letting users leverage their existing skills and the plethora of learning materials for pre-processing, analysis and visualisation with tools like Pandas, Jupyter and scikit-learn.
StellarGraph’s graph machine learning models are built using the Keras functional API and operate as standard layers, making it easy to include graph ML models in a larger pipeline.
To get started with graph machine learning with StellarGraph 1.0, run pip install stellargraph, and then build a model for your task. Follow one of our examples, like doing node classification with Graph Convolutional Networks.
State of the art algorithms
StellarGraph has broad coverage of state-of-the-art graph ML algorithms:
- Graph Convolutional Network (GCN) and the Cluster-GCN training method
- Graph Attention Network (GAT)
- Personalized Propagation of Neural Predictions (PPNP) and Approximate PPNP (APPNP)
- GraphSAGE and a generalisation HinSAGE
- Relational GCN (RGCN)
- Attri2Vec
- Random walk methods like Node2Vec, Metapath2Vec and Continuous-Time Dynamic Network Embeddings (CTDNE)
- GraphWave
- Deep Graph Infomax, generalised to support unsupervised training of many of the algorithms listed here
- Deep Graph Convolutional Neural Network
- Temporal GCN (T-GCN)
- Simplified Graph Convolution
- ComplEx
- DistMult
- Watch Your Step
These algorithms solve all of the tasks mentioned above. They can be used with a variety of graphs and graph kinds, such as:
- Graphs that include time information, both in the graph structure and as node features as time series (such as spatio-temporal data
- Heterogeneous graphs, that have multiple types of nodes connected via multiple types of edges
- Knowledge graphs, that represent information entirely in the graph structure.
Your data, your way
StellarGraph knows that data preparation is always more work than expected, so it makes this as conventional and as convenient as possible. StellarGraph allows using many common data science libraries and tools, so there’s no need to learn new APIs. This includes:
- NumPy and Pandas natively supported, allowing the use of their processing facilities, as well as libraries like scitkit-learn
- Conversion to and from NetworkX
- Guidance for reading data from and saving results to Neo4j.
Each algorithm is built from Tensorflow Keras layers and yields tensors like the standard layers, allowing a graph machine learning model to be augmented with any Tensorflow functionality. This includes adding additional layers after the StellarGraph graph layers to improve model performance, and using any of the built-in callbacks and metrics for controlling and introspecting the training and prediction process.
Great documentation
StellarGraph makes it easy to get started with any algorithm, with a focus on detailed documentation and demonstration Jupyter notebooks. We see creating great demonstrations as an important step when adding new algorithms — not something we do as an afterthought.
Our documentation has:
- A helpful layout, with information about each algorithm and each demo clearly laid out
- Introduction to loading data from many formats.
- Introduction to graph machine learning, including the typical workflow with StellarGraph
- Easy access to start running and editing each notebook, where each one includes a download button and one-click execute buttons to run on cloud services like Binder and Google Colaboratory
- Many tasters of downstream tasks, giving examples of additional analysis that one can do beyond the basic training and evaluation
- Detailed testing and validation so the demonstrations always work, reducing confusion and frustration.
The demonstrations serve as great starting points for many graph machine learning tasks, making it easy to jump in and test with your data.
Thanks
StellarGraph is a team effort. It has involved dozens of hard-working contributors, helping with writing, testing and refining our code, documentation and blog posts:
- Alex Collins
- Andrew Docherty
- Anna Leontjeva
- Chuong Ho
- Daokun Zhang
- Dawei Chen
- Denis Khoshaba
- Geoff Jarrad
- Habiba @habiba-h
- Huijun Wu
- Huon Wilson
- Jeff (Zhen) Wang
- Jeremy Goh
- Jess Moore
- Kevin Jung
- Kieran Ricardo
- Kiarie Ndegwa
- Lars @LarsNeR
- Leda Kalleske
- Pantelis Elinas
- Peter Schmidbauer
- Thanh Nguyen Mueller
- Tim Pitman
- Yuriy Tyshetskiy
- Yvonne Poon
StellarGraph has also benefited enormously from users who have taken the time to ask questions and file thoughtful issues.
Thank you!
To get started with graph machine learning with StellarGraph 1.0, run pip install stellargraph. Follow one of our examples, like doing node classification with Graph Convolutional Networks.
This work is supported by CSIRO’s Data61, Australia’s leading digital research network.