This repository contains an implementation of a GNN-based framework to derive graph edit operations.
├── data
│ └── TUDataset
│ └── MUTAG
│ └── raw
│
├── gnnged
│ ├── assignment
│ ├── edit_cost
│ ├── evaluation
| ├── heuristics
│ ├── models
│ ├── training
│ └── utils
│
├── scripts
|
├── src
│ └── build
│
├── res
│ └── MUTAG
│ └── GIN
│ └── raw
│
├── tests
└── venv- Python >= 3.10
- PyTorch & torch-geometric (see installation below)
# 1. Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate
# 2. Install PyTorch and torch-geometric (CUDA 12.4 shown, adjust if needed)
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
pip3 install torch_geometric
# Install the package in editable/development mode
python3 -m pip install -e .{
"dataset_dir": "data/TUDataset",
"dataset_name": "MUTAG",
"output_dir": "./res/MUTAG/",
"use_attrs": false,
}# Split the data set
python3 scripts/run_preprocessing.py# Finetune the model
python3 scripts/run_finetuning.py
# Train the model
python3 scripts/run_training.py# Compute distances
python3 scripts/run_matching.py# Classify graphs
python3 scripts/run_evaluation.pyPlease refer to Graph Matching for a faster alternative.