Learn
TGraphX is an open-source PyTorch package for graph learning where node and edge
features can be multi-dimensional tensors rather than flat vectors. Its central data
object is the tgx.Graph (a "TGX graph"), and it ships shape validation,
PyTorch Geometric interoperability, and reproducibility tooling for research workflows.
This page is a map, not a tutorial. Pick the reading path that matches where you are. Every link below points to a published article, the documentation, or the source — nothing here is a substitute for the package's own docs.
A standard graph neural network represents each node as a flat vector, so a batch of
nodes is an [N, D] matrix. That assumption works well for citation
networks and tabular node attributes. It works less well when a node is itself
something structured — an image patch of shape [C, H, W], a volumetric
block, or a short sequence — because flattening it into a vector discards the spatial
layout the model might want to use. A TGX graph keeps node features at their natural
rank and checks shapes when you build the graph, so a mismatch surfaces early instead
of failing deep inside a forward pass. Whether that property helps depends on your
data; for flat features, an ordinary GNN framework is simpler and usually the better
fit.
TGraphX groups its functionality into a few subsystems. The core is the
tgx.Graph container plus tensor-aware message-passing layers and graph
samplers (NeighborLoader, GraphSAINT, and cluster-based loaders) for
larger graphs. Around that core sit research modules — knowledge-graph embedding,
graph reinforcement learning, graph generation, and graph mining — and a set of
research-engineering utilities for seeded runs, run artifacts, and a local dashboard.
Stability is labeled honestly: the core is Beta, and several of the surrounding
modules are Experimental. The reading paths below start from the parts that are most
settled.
Start with what the framework is and run something small before going deeper.
pip install tgraphx — version 1.4.2.If PyG is your default, these explain where a tensor-native design changes things — and where it does not. The short version: keep PyG for standard tasks, and look at TGraphX when your nodes carry tensors.
Most GNN bugs are shape bugs. These cover why node shape matters and how to catch mismatches early.
validate_graph to fail fast on bad inputs.For work that has to be defensible, start with the sources of non-determinism and how to report results honestly.
TGraphX is published on PyPI and installs with pip install tgraphx. The
current version is 1.4.2, it is MIT-licensed, and it runs on CPU, CUDA, and Apple
Silicon (MPS). It depends on PyTorch; PyTorch Geometric is an optional extra used only
for the dataset adapters. The package is developed at the University of Saskatchewan
and is accompanied by a preprint, arXiv:2504.03953
(Sajjadi & Eramian, 2025). If you want to verify any claim about the framework, the
source repository and that preprint are the authoritative references — this hub only
points you toward them.
Browse every published piece in Insights, read the package source and documentation on GitHub, or read the preprint, arXiv:2504.03953. TGraphX is research-oriented: its core graph containers, layers, and samplers are labeled Beta, and several subsystems are Experimental. Treat stability labels as part of the documentation when you plan a project.