| --- |
| license: cc-by-4.0 |
| task_categories: |
| - graph-ml |
| language: |
| - en |
| pretty_name: Property-Driven GNN Benchmark |
| size_categories: |
| - 1M<n<10M |
| tags: |
| - graph-neural-networks |
| - benchmark |
| - gnn-expressiveness |
| - formal-methods |
| - alloy |
| - graph-classification |
| --- |
| |
| # Property-Driven GNN Benchmark |
|
|
| A large-scale benchmark for evaluating the expressive power of Graph Neural Networks (GNNs) across 16 fundamental graph properties. This dataset accompanies the paper *"Systematic Property-Driven Evaluation of |
| GNN Expressiveness"*. |
|
|
| ## Summary |
|
|
| The benchmark contains **352 graph-classification datasets** organized into two families: |
|
|
| - **GraphRandom** (176 datasets): graphs that either satisfy or randomly violate a given property. |
| - **GraphPerturb** (176 datasets): each positive graph is paired with a structurally similar negative counterpart that differs by only one or two edges. |
|
|
| All datasets were generated using **Alloy**, a relational-logic specification language and SAT-based analyzer, ensuring exhaustive enumeration of positive samples and verifiable negative samples. |
|
|
| ## Quick Start |
|
|
| ### Download the entire dataset |
|
|
| ```python |
| from huggingface_hub import snapshot_download |
| |
| snapshot_download( |
| repo_id="anonymousPaper5674/property-driven-gnn", |
| repo_type="dataset", |
| local_dir="./dataset", |
| ) |
| ``` |
|
|
| ### Load a single CSV file and reconstruct one graph |
|
|
| ```python |
| import pandas as pd |
| import numpy as np |
| |
| # Each row encodes one graph |
| df = pd.read_csv("./dataset/GraphRandom-Train/antisymmetric.csv", header=None) |
| |
| row = df.iloc[0].values |
| n = int(np.sqrt(len(row) - 1)) # graph size (number of nodes) |
| adj = row[:-1].reshape(n, n) # n x n adjacency matrix (directed) |
| label = int(row[-1]) # 1 if the graph satisfies the property, else 0 |
| |
| print(f"Graph with {n} nodes, label = {label}") |
| print(adj) |
| ``` |
|
|
| ## Data Format |
|
|
| Each CSV file represents one dataset. The format is: |
|
|
| - **No header row.** |
| - **Each row encodes one graph.** |
| - The **first n² values** are the entries of the n×n adjacency matrix, flattened in **row-major order**: `adj[i][j] = row[i * n + j]`. |
| - The **last value** is the binary label: `1` if the graph satisfies the property, `0` otherwise. |
| - Edges are **directed**: `adj[i][j] = 1` means there is an edge from node *i* to node *j*. |
| - **Self-loops are allowed** (diagonal entries can be `1`). |
| - Graph size *n* can be inferred from the row length: `n = sqrt(len(row) - 1)`. |
|
|
| ## Folder Structure |
|
|
| ```text |
| Property-Driven-GNN/ |
| ├── GraphRandom-Train/ |
| │ └── <property>.csv |
| ├── GraphRandom-Test/ |
| │ └── <property>/ |
| │ └── <property>_new<k>.csv |
| ├── GraphPerturb-Train/ |
| │ └── <property>.csv |
| └── GraphPerturb-Test/ |
| └── <property>/ |
| └── <property>_new<k>.csv |
| ``` |
|
|
| ## Code |
|
|
| The reference implementation, including data loading, training, and evaluation across nine global pooling methods, is available at: |
| `https://anonymous.4open.science/r/Property-Driven-GNN/README.md` |