TGraphX
where graphs
carry tensors.
Tensor-native graph intelligence for PyTorch research.
A broad research framework for graph learning workflows where nodes, edges, relations, entities, triples, and graph-level states can carry real tensor structure — not only flat vectors.
A node can be more than a flat vector.
In TGraphX, every graph element — nodes, edges, relations, entities, triples, and even graph-level states — can carry real tensor structure. That means images, volumetric blocks, sequences, multimodal embeddings, and KG features all retain their shape through the graph.
Image patches
A node holds (C, H, W) tensors. CNN-style operators stay valid through message passing.
Volumetric blocks
3D tensors carried per node — useful for medical imaging, voxel fields, and CFD.
Sequence embeddings
A Graph can store per-node (T, D) sequences; the built-in tensor layers cover [C, H, W] and [C, D, H, W], so sequences need your own encoder.
Multimodal entities
Mix modality-specific tensors on different node types within one graph (heterogeneous graph support is experimental).
KG entities & triples
Entities and relations carry structured tensors; triple-level features supported.
Graph-level state
A whole graph can carry tensor state — handy for RL observations and dashboards.
From GNNs to KGs to graph RL — all in one shape system.
tensor-aware GNNs
ConvMessagePassing and tensor GraphSAGE, GAT and GIN layers operate on shaped node features.
knowledge graphs
TransE, DistMult, RESCAL, SimplE (beta); ComplEx and RotatE (experimental).
graph generation
Erdős–Rényi, Barabási–Albert, Watts–Strogatz, SBM, with optional tensor node features.
evolutionary optimization
GA, NSGA-II, simulated annealing, hill climbing, random search (experimental).
graph reinforcement learning
Environments such as max-cut, coloring, navigation, shortest path and vertex cover (experimental).
graph mining
Motif counts, structural features, exploratory frequent-pattern primitives.
sampling
Neighbor sampling, GraphSAINT, cluster, and seed-node sampling.
dashboards & artifacts
Run dashboard, audit reports, and .tgx files for graphs and knowledge graphs.
reproducibility
Seeds, deterministic flags, audit utilities and run metadata.
Common workflows as one explicit call.
TGraphX collapses the typical setup — graphs, masks, loaders, models, training loops, seed-node loss, artifact saving — into composable, named operations.
Aliases, helpful errors, canonical APIs.
TGraphX accepts some aliases (for example x/labels on Graph, "ba" for barabasi_albert) and many errors include a suggested fix.
No silent flattening. Auditable runs.
- Validation utilities that catch shape and device mismatches early.
- Seeds and run configuration returned with each workflow result, written to disk when you pass out_dir.
- Benchmark disclaimers and dashboard audit reports.
- Native
.tgxsave/load for tensor graphs (a torch.save bundle; load only trusted files).
Five advanced notebooks to read end-to-end.
MNIST class graph membership
Tensor-native node classification with per-node (1,28,28) features and class-membership edges.
CIFAR-10 patch graph
Construct image-patch graphs and run shape-aware message passing for vision workflows.
Cora sampling / dashboard
Neighbor sampling plus a dashboard audit on Cora, end to end.
MovieLens KG recommendation
Triple-based recommendation with TransE, DistMult and RotatE; tensor-valued entity features.
MUTAG molecular graph classification
Small-graph classification with per-node feature tensors and run-level audit.
Complementary to mature graph tools — not a replacement.
PyG and DGL excel at industrial GNN ecosystems. NetworkX is the reference for classical algorithms. PyKEEN owns KG specialization. SB3 and RLlib lead RL infrastructure. TGraphX is aimed at research code where graph elements carry tensors.
Read, compare, and see related projects.
Learn TGraphX
Compare and browse
Related projects
Separate tools by the same author; they are not TGraphX features.