OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Graph2Vec

Graph2Vec is a parallel Python implementation of a method for learning unsupervised, fixed-length vector representations of whole graphs. It produces graph-level embeddings for downstream tasks such as classification and clustering.

Independent OpenViST project profile, based on linked sources.

Graph2Vec — Unsupervised graph-level feature generation
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Graph2Vec when a machine-learning workflow needs fixed-length representations of entire graphs rather than representations limited to nodes or subgraphs.

Who it is for

  • Researchers working on graph representation learning.
  • Machine-learning practitioners preparing graph-level features for classification, clustering or supervised learning experiments.

Documented uses

  • Convert a collection of graph JSON files into graph-level vector embeddings.
  • Use the resulting vectors as inputs to graph classification or clustering.
  • Experiment with embedding dimensions and other documented model parameters.
Before you choose

Requirements & limits

The public GitHub repository specifies a GPL-3.0 license.

  • The implementation uses node degree when a graph JSON file does not include node features.
  • Embedding dimensions, worker count, epochs and other model settings are configurable through command-line arguments.
  • The README documents Python 3.5.2 with Anaconda 4.2.0 and specific development package versions; it does not establish compatibility with other environments.
  • The repository identifies the model as also available in the Karate Club package.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Create graph embeddings from a JSON dataset

Use the documented command-line script to write graph embeddings to a chosen output path.

Before you start

  • Python 3.5.2 with Anaconda 4.2.0 is the documented environment.
  • The README lists development package versions, including jsonschema 2.6.0, NumPy 1.15.4, pandas 0.23.4, Gensim 3.6.0, NetworkX 2.4 and Joblib 0.13.0.
  • A folder of graph JSON files, each named with a numeric index and containing an edges key; an optional features key contains node features. If omitted, node degree is used as the feature.
  • The repository includes a sample dataset in dataset/.

Steps

  1. Prepare the graph JSON files in an input folder.

  2. Run the command below to select the input and output locations.

    Documented command
    python src/graph2vec.py --input-path new_data/ --output-path features/nci2.csv
  3. Use the documented model options, such as --dimensions 32, when changing the embedding dimension.

Expected outcome

The script learns graph embeddings and writes them to the selected output path; the documented default output is features/nci1.csv.

Guide limitations

  • The README documents the listed environment and package versions used for development; it does not establish compatibility with other versions.
  • The guide covers the documented command-line invocation and output, not evaluation of the resulting embeddings in a downstream model.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
5 November 2026
Original website title
benedekrozemberczki/graph2vec · Official homepage title · retained in its source language

Related options

Karate Club — The repository says the Graph2Vec model is also available in the Karate Club package.

Original TensorFlow graph2vec implementation — The repository links to a separate implementation of the method.