Wiki › Project

Graph classification experiments

Article
From Chaipat's knowledge graph

Graph classification experiments is a research codebase from early 2025 that compares neural networks on graphs with a classical algorithm. It works on two standard benchmarks, MUTAG and PROTEINS, using PyTorch Geometric and NetworkX.

The question

Can a graph neural network tell whether two graphs have the same structure as well as an exact algorithm can, and how much faster? The datasets come from the TU Dortmund graph collection:

  • MUTAG: small molecules labelled by whether they are mutagenic;
  • PROTEINS: proteins labelled as enzymes or not.

What's in it

  • Three graph neural models, each with its own training and prediction code:
    • a graph matching network built from graph convolution (GCN) layers and mean pooling;
    • a graph attention network (GAT);
    • a simplified graph convolution (SGC).
  • A classical baseline that uses NetworkX's GraphMatcher to check exact isomorphism and compute a structural similarity score.
  • A benchmark script that converts NetworkX graphs into PyTorch Geometric data and times each model against the baseline on the same pairs.

See also