NEExT

NEExT (Network Embedding Experimentation Toolkit) is an open-source Python framework for network science and graph machine learning. It turns a collection of graphs into graph-level vector representations you can classify, compare, and interrogate — with a clean, composable API and reproducible results.

The library is built around a single linear pipeline. Each stage takes the output of the previous one, so you can stop, inspect, or swap any step.

quickstart.py
from NEExT import NEExT

nxt = NEExT()

# 1. Load a collection of graphs
graphs = nxt.read_from_csv(
  edges_path="edges.csv",
  node_graph_mapping_path="node_graph_mapping.csv",
  graph_label_path="graph_labels.csv",
)

# 2. Compute structural node features
features = nxt.compute_node_features(graphs, feature_list=["all"])

# 3. Roll node features up into graph-level embeddings
embeddings = nxt.compute_graph_embeddings(
  graphs,
  features,
  embedding_algorithm="approx_wasserstein",
  embedding_dimension=16,
)

# 4. Train and evaluate a model
results = nxt.train_ml_model(graphs, embeddings, model_type="classifier")

The pipeline

NEExT models every workflow as the same sequence of stages:

StageWhat it producesEntry point
LoadA GraphCollection (NetworkX or iGraph backend)read_from_csv, load_from_networkx
FeaturesA Features table of per-node structural metricscompute_node_features
EmbeddingsAn Embeddings table of one vector per graphcompute_graph_embeddings
ModelCross-validated metrics for a classifier or regressortrain_ml_model

For node-level problems (such as outlier detection), NEExT adds an egonet branch: it decomposes each graph into one subgraph per node, then runs the same feature → embedding pipeline so every embedding represents a single node’s neighborhood. See Egonets.

What’s in the box

  • 11 structural node features — PageRank, four centralities, clustering coefficient, local efficiency, LSME, load centrality, basic expansion, and the community-aware βstar metric. Computed with k-hop neighborhood aggregation. See Structural features.
  • Four graph-embedding algorithmsapprox_wasserstein, wasserstein, sinkhornvectorizer, and a pure-PyTorch gnn (GCN / GraphSAGE / GIN). See Embeddings.
  • Supervised models — XGBoost-backed classifiers and regressors with optional dataset balancing. See ML models.
  • Feature importance — three algorithms for ranking which structural features drive a task. See Feature importance.
  • Synthetic graph generation — presets, generators, and a fluent builder for crafting benchmark datasets. See Synthetic graphs.
  • NEExT Workbench — an optional local FastAPI + React desktop-style UI over the same capabilities, with a token-gated MCP endpoint for agents. See Workbench.

Design principles

  • Dual backends. Every graph wraps either NetworkX (flexible) or iGraph (fast), switchable per load with graph_type.
  • Composable containers. Features and Embeddings are thin DataFrame wrappers that support normalization and concatenation, so you can mix feature sets and embeddings.
  • Reproducible by default. Random seeds are explicit (random_state), and model evaluation averages over multiple train/test splits.

Ready to install? Head to Installation, then walk the Quickstart.

Citing NEExT

If you use NEExT in your research, please cite it. The primary, open-access reference is the arXiv paper Network Embedding Exploration Tool (NEExT) by Ashkan Dehghan, Paweł Prałat, and François Théberge.

citation.bib
@article{dehghan2025neext,
title   = {Network Embedding Exploration Tool (NEExT)},
author  = {Dehghan, Ashkan and Pra{\l}at, Pawe{\l} and Th{\'e}berge, Fran{\c{c}}ois},
journal = {arXiv preprint arXiv:2503.15853},
year    = {2025},
url     = {https://arxiv.org/abs/2503.15853}
}

A peer-reviewed version appeared at the 19th Workshop on Algorithms and Models for the Web Graph (WAW 2024), published by Springer: doi:10.1007/978-3-031-59205-8_5.