Skip to main content
QUICK REVIEW

[Paper Review] Graph Neural Networks in TensorFlow and Keras with Spektral

Daniele Grattarola, Cesare Alippi|arXiv (Cornell University)|Jun 22, 2020
Advanced Graph Neural NetworksComputer Science62 citations
TL;DR

Spektral is a TensorFlow/Keras library that provides diverse graph neural network layers (message passing and pooling) and benchmark datasets, enabling easy building and prototyping of GNNs for node, graph, and graph-level tasks.

ABSTRACT

In this paper we present Spektral, an open-source Python library for building graph neural networks with TensorFlow and the Keras application programming interface. Spektral implements a large set of methods for deep learning on graphs, including message-passing and pooling operators, as well as utilities for processing graphs and loading popular benchmark datasets. The purpose of this library is to provide the essential building blocks for creating graph neural networks, focusing on the guiding principles of user-friendliness and quick prototyping on which Keras is based. Spektral is, therefore, suitable for absolute beginners and expert deep learning practitioners alike. In this work, we present an overview of Spektral's features and report the performance of the methods implemented by the library in scenarios of node classification, graph classification, and graph regression.

Motivation & Objective

  • Provide an accessible, user-friendly library for building GNNs in TensorFlow and Keras.
  • Survey and implement a broad range of GNN layers including message passing and pooling.
  • Demonstrate performance on node classification, graph classification, and graph regression tasks.
  • Offer datasets and utilities to streamline graph data processing and experimentation.

Proposed method

  • Implement 15 message-passing layers (e.g., GCN, ChebNets, GraphSAGE, GAT, APPNP, GIN) as Keras layers.
  • Provide 10 pooling methods (e.g., DiffPool, MinCut, Top-K, SAGPool) and six global pooling strategies.
  • Represent graphs with adjacency, node features, and edge features compatible with Keras/TensorFlow data structures.
  • Support multiple data modes (single, disjoint, batch, mixed) for flexible graph batching and processing.
  • Include dataset utilities to load benchmarks like Cora, Citeseer, Pubmed, PPI, Reddit, QM9, MNIST-8N, and graph kernels datasets.
  • Benchmark and compare Spektral’s performance on node classification, graph classification, and graph regression tasks.

Experimental results

Research questions

  • RQ1What is the breadth of graph neural network methods that can be implemented as Keras layers within TensorFlow?
  • RQ2How do different message-passing and pooling strategies perform across standard node and graph-level tasks?
  • RQ3Can Spektral provide a user-friendly, production-friendly workflow for building and evaluating GNNs in the TensorFlow ecosystem?
  • RQ4How do the implemented methods compare to existing libraries in terms of features, compatibility, and performance?

Key findings

  • Spektral implements 15 message-passing layers and 10 pooling layers within TensorFlow and Keras.
  • The library supports a variety of graph tasks including node classification, graph classification, and graph regression using standard benchmarks.
  • Global pooling methods and graph pooling layers show task-dependent performance variations across datasets.
  • The framework emphasizes ease of use and rapid prototyping, aligning with Keras design principles.
  • Compared to other libraries, Spektral provides feature parity with core GNN components within the TensorFlow ecosystem and competitive performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.