Repository navigation
TGraphX v1.0.0
TGraphX v1.0.0
Release date: 2026-05-09
Author: Arash Sajjadi, PhD Candidate, University of Saskatchewan
Preprint: arXiv:2504.03953 · Sajjadi & Eramian, 2025
Highlights
TGraphX v1.0.0 is the first stable research release of the tensor-native graph intelligence framework. It ships a broad, validated set of tools for graph learning, mining, generation, evolutionary optimization, graph reinforcement learning, knowledge graphs, multimodal entity features, dashboard-ready reporting, and reproducibility — all in a single PyTorch package with no mandatory external dependencies.
Every major subsystem has passed a full test-suite (217 generation/RL/evolutionary tests + existing 2000+ tests), benchmark validation (--small --json on all 13 benchmark scripts), example/tutorial execution, CPU + CUDA device validation, and wheel smoke testing.
Graph generation
Classical generators with tensor features:
FeatureAwareERGraph(Erdős-Rényi),FeatureAwareBAGraph(Barabási-Albert)- Stochastic block model (SBM), Watts-Strogatz, grid, path, cycle, star, complete, random geometric
- Temporal evolving, typed, anomaly-injected, motif-injected
Neural generators:
VGAEGraphGenerator— samples from VGAE latent spaceAutoregressiveEdgeGenerator— sequential edge generation with GRU/LSTMGraphTransformerGenerator— transformer-based autoregressive generation
Quality metrics:
- validity, uniqueness, novelty, diversity
- degree distribution distance, MMD-degree, MMD-clustering, WL-hash
- constraint satisfaction rate, spectral distance
One-liner API:
from tgraphx.generation import run_graph_generation
result = run_graph_generation(method="barabasi_albert", num_graphs=32, num_nodes=50, seed=42)
print(result.metrics) # validity, uniqueness, diversity, ...Evolutionary graph optimization
Algorithms:
- Genetic Algorithm (GA) with crossover, mutation, elitism, tournament selection
- Simulated Annealing (SA) with Metropolis criterion
- NSGA-II multi-objective optimization with non-dominated sort and crowding distance
- Hill climbing (1+1)-ES and random search baselines
Operators: 9 mutation operators, 3 crossover operators, 5 selection strategies
Fitness functions: connectivity, density, clustering coefficient, motif count, composite
Multi-objective: Pareto dominance, ParetoFront tracking, 2D hypervolume
One-liner API:
from tgraphx.evolutionary import run_evolutionary_optimization
result = run_evolutionary_optimization(
algorithm="nsga2",
objective=["connectivity", "density"],
population_size=20,
generations=30,
seed=42,
)
print(result.best_fitness, len(result.pareto_front.genomes))Graph reinforcement learning
13 algorithms across discrete and continuous action spaces:
Discrete: Random, Greedy, REINFORCE, Actor-Critic, A2C + GAE, DQN, Double DQN, Dueling DQN, PPO
Continuous: DDPG, Delayed DDPG, TD3, SAC
9 environments:
GraphNavigationEnv,ShortestPathEnv,GraphColoringEnv,MaxCutEnv,VertexCoverEnvGraphGenerationEnv,KGPathReasoningEnv,ContinuousNavigationEnv,ContinuousGraphEditEnv
Auto-routing: continuous algorithms (TD3/SAC/DDPG) on a discrete environment name are automatically redirected to ContinuousNavigationEnv.
One-liner API:
from tgraphx.rl import run_graph_rl, list_graph_rl_algorithms
result = run_graph_rl(env="graph_navigation", algorithm="ppo", episodes=50, seed=42)
print(result.metrics["mean_return"], result.metrics["success_rate"])Scope limitation: All RL algorithms are small-scale research tools. For production RL, use dedicated libraries (stable-baselines3, RLlib, etc.).
Tensor-native feature support
TGraphX preserves multi-dimensional node/edge features through every message-passing step:
| Feature shape | Supported by |
|---|---|
[N, D] vector |
all GNN layers |
[N, C, H, W] image |
ConvMessagePassing, TensorGATLayer, TensorGraphSAGELayer, TensorGINLayer |
[N, C, D, H, W] volume |
same layers with spatial_rank=3 |
[E, F] edge features |
EdgeFeatureProjector, all GNN layers where applicable |
[B, F] graph-level |
GraphFeatureProjector |
For generation/evolution/RL:
VectorNodeProjector,ImageNodeEncoder,VolumeNodeEncoder,EdgeFeatureProjector,GraphFeatureProjector— all differentiable; gradients flow through projectors.- No silent flattening; no raw tensors in dashboard JSON.
Knowledge graphs and multimodal KG
- TransE, DistMult, ComplEx, RotatE scoring
- Filtered rank evaluation (hits@k, MRR)
- RGCN with basis decomposition
- Multimodal entity features: image
[C, H, W], user vectors, text embeddings — all differentiable - Temporal KG, KG path reasoning environment
Dashboard, benchmarks, and tutorials
Dashboard:
- Local HTTP server with offline HTML export
- No external CDN, no telemetry, no background threads unless explicitly launched
- Artifact writers for generation, evolution, and RL results
Benchmarks:
- 13 benchmark scripts in
benchmarks/generation/,benchmarks/evolution/,benchmarks/rl/ - All support
--small --jsonfor CI-friendly validation - Every JSON output includes
package_version,seed,device,status,limitations
Tutorials:
tutorials/graph_generation_quickstart.py— ~5 s, CPU, deterministictutorials/evolutionary_optimization_quickstart.py— ~10 s, CPU, deterministictutorials/graph_rl_quickstart.py— ~30 s, CPU, deterministic
Maturity and scope
Research-focused, not production. v1.0.0 is appropriate for:
- research prototyping and benchmarking,
- method comparison on small/medium graphs,
- graph RL environments for algorithm development,
- dashboard-ready experiment reporting.
Out of scope:
- Production-scale RL or distributed RL (no multi-agent, no Ray/RLlib integration)
- Molecular graph generation with chemical validity checks
- Billion-edge graph processing
- SOTA claims on public benchmarks
Installation
pip install tgraphxOptional extras:
pip install "tgraphx[tracking]" # TensorBoard
pip install "tgraphx[monitoring]" # psutil + pynvml (dashboard hardware panel)
pip install "tgraphx[dev]" # pytest + build + twineUpgrade notes
v1.0.0 is the first formal release. If upgrading from v0.6.0:
run_evolutionary_optimization()now accepts bothgenerations=andn_generations=(alias).OptimizationResultnow has a.metricsdict in addition to.best_fitnessand.fitness_history.list_graph_rl_algorithms()now returns a dict (not a list). Use.keys()for names.- Benchmark JSON outputs now include
package_version,seed,device,status,limitations.