OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Capsgnn

Capsgnn is an open-source Python and PyTorch implementation of Capsule Graph Neural Network, a capsule-based model for graph classification. It uses node capsules, routing, and attention to create graph-level representations, and provides a command-line training script for labelled graph datasets.

Independent OpenViST project profile, based on linked sources.

Capsgnn — Graph classification experiments with node labels, edges, and integer class targets
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you have labelled graph data in the repository’s JSON format and want to experiment with capsule-based graph classification through a Python command-line workflow.

Who it is for

  • Researchers exploring capsule-based graph neural networks and graph classification.
  • Developers who want a research codebase for training on labelled graph-structured data.

Documented uses

  • Train CapsGNN using graph examples stored as JSON.
  • Set training parameters such as epochs, batch size, and model dimensions through command-line arguments.
  • Generate graph-level predictions and embeddings for test graphs.
Before you choose

Requirements & limits

The repository is public and specifies a GPL-3.0 license. The README documents command-line use and does not describe a hosted inference service.

  • Inputs require edges, node labels, and an integer target in each graph JSON file; node IDs and labels must be indexed from zero.
  • The README lists Python 3.5.2 and specific development dependency versions, including PyTorch 1.1.0 and PyTorch Geometric 1.3.2.
  • Training is handled by src/main.py, with documented options for dataset folders, prediction path, epochs, batch size, and model parameters.

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

Prepare graph JSON inputs and configure a training run

Structure graph data and identify the documented options for training and prediction with CapsGNN.

Before you start

  • The repository codebase and Python 3.5.2, the version listed by the README.
  • The development package versions listed by the README, including PyTorch 1.1.0 and PyTorch Geometric 1.3.2.
  • Training and test graph folders containing one JSON file per graph.

Steps

  1. Store each graph in a JSON file with an edges list, a labels dictionary, and an integer target.

  2. Index every node ID and node label from zero; use string keys for node IDs in the labels dictionary.

  3. Place training and test graph files in the configured folders, which default to input/train/ and input/test/.

  4. Use the documented src/main.py command-line options to set training and testing folders, prediction path, epochs, or batch size.

Expected outcome

A configured dataset and training run, with the README specifying that predictions and graph embeddings are saved under the output path.

Guide limitations

  • This guide covers input preparation and documented options; it does not verify a successful run.
  • The README's listed software versions are development versions and do not establish compatibility with other environments.
Evidence and transparency

Sources & review

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