Practical overview
When it fits
Use TensorFlow GNN when a TensorFlow graph-learning project needs graph representations, sampled subgraph preparation, Keras modeling components or training orchestration.
Who it is for
- Machine-learning developers building graph neural networks with TensorFlow.
- Teams preparing sampled subgraphs from large graph datasets for training or inference.
- Researchers exploring graph tasks such as molecular classification or shortest-path prediction.
Documented uses
- Represent heterogeneous graphs with multiple types of nodes and edges.
- Prepare streams of smaller subgraphs from large graph data.
- Build graph-learning models with supplied models and Keras layers.
- Orchestrate graph neural network training.
Requirements & limits
The repository provides a pip installation command and browser-based Colab examples that require no local installation. Apache-2.0 licensed open-source code is available in the public repository.
- TensorFlow 2.12 or higher and Keras v2 are required; TensorFlow 2.16+ also requires tf-keras and the TF_USE_LEGACY_KERAS=1 setting.
- Apache Beam is required for distributed graph sampling.
- The project is developed and tested on Linux; use on other TensorFlow-supported platforms is described as possible, not assured.
- Colab examples cover molecular graph classification, heterogeneous OGBN-MAG training and shortest-path prediction.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install TensorFlow GNN in a TensorFlow environment
Install the stable TensorFlow GNN package after preparing its documented TensorFlow and Keras requirements.
Before you start
- Python package installation with pip.
- TensorFlow 2.12 or higher and Keras v2.
- For TensorFlow 2.16 or higher, install tf-keras and set TF_USE_LEGACY_KERAS=1.
Steps
Prepare an environment with TensorFlow 2.12 or higher and Keras v2.
Install the package with pip install tensorflow-gnn.
If using TensorFlow 2.16 or higher, install tf-keras and set TF_USE_LEGACY_KERAS=1.
Expected outcome
The TensorFlow GNN package is installed in the prepared environment.
Guide limitations
- TensorFlow GNN does not work with multi-backend Keras v3.
- Apache Beam is needed for distributed graph sampling.
- The project is developed and tested on Linux; other TensorFlow-supported platforms may work.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 13 October 2026
- Original website title
- tensorflow/gnn · Official homepage title · retained in its source language

