subgraph2vec-eval
subgraph2vec: Learning Distributed Representations of Rooted Sub-graphs from Large Graphs — Narayanan et al. (2016) (arXiv:1606.08928, 2016)
What this evaluates
Evaluates the quality of distributed subgraph representations learned by subgraph2vec on graph classification and clustering tasks. It probes the model's ability to capture structural and semantic similarities in chemical/biological graphs and Android application control-flow graphs.
Datasets
- MUTAG — total 188; splits: train (-1), test (-1)
- PTC — total 344; splits: train (-1), test (-1)
- PROTEINS — total ?; splits: train (-1), test (-1)
- NCI1 — total ?; splits: train (-1), test (-1)
- NCI109 — total ?; splits: train (-1), test (-1)
- CLONE260 — total 260; splits: all (260)
- TRAIN10K — total 10000; splits: train (10000)
- TEST10K — total 10000; splits: test (10000)
Metrics
Accuracy (primary) — range: [0, 1]
- Proportion of correctly classified graphs out of the total test set. Reported as mean ± standard deviation over 5 random train/test splits.
Adjusted Rand Index (ARI) — range: [-1, 1]
- Standard clustering evaluation metric measuring the similarity between predicted cluster assignments and ground-truth clusters, adjusted for chance.
Input / output format
Input: Graphs represented as adjacency structures or Inter-procedural Control Flow Graphs (ICFGs) with nodes labeled by Android APIs or chemical structures.
Output: Class labels (e.g., mutagenic/benign, enzyme/non-enzyme, malware/benign) or cluster assignments for each graph.
Scoring recipe
def compute_accuracy(preds, gold):
return sum(1 for p, g in zip(preds, gold) if p == g) / len(gold)
def compute_ari(pred_clusters, gold_clusters):
from sklearn.metrics import adjusted_rand_score
return adjusted_rand_score(gold_clusters, pred_clusters)
# For benchmarks: repeat 5 times with 90/10 split, average accuracy.
# For clone detection: compute ARI on full dataset clustering.
Common pitfalls
- Benchmark datasets like MUTAG/NCI can be solved with trivial features (e.g., node count), so they do not fully test real-world performance.
- Pre-training duration is reported alongside accuracy, but efficiency comparisons should account for different kernel computation costs and dataset sizes.
- The clone detection task is unsupervised clustering; ground-truth clusters must strictly match the 100 sets identified by the original dataset authors.
Evidence (verbatim from paper)
The experiment is repeated 5 times and the average accuracy (along with std. dev.) is used to determine the effectiveness of classification. A standard clustering evaluation metric, namely, Adjusted Rand Index (ARI) is used to determine clone detection accuracy. The ARI values lie in the range [-1, 1].
Citation
@misc{narayanan2016subgraph2vec,
title={subgraph2vec: Learning Distributed Representations of Rooted Sub-graphs from Large Graphs},
author={Narayanan et al. (2016)},
year={2016},
note={arXiv:1606.08928}
}
1---2name: subgraph2vec-eval3description: Evaluates the quality of distributed subgraph representations learned by subgraph2vec on graph classification and clustering tasks. It probes the model's ability to capture structural and semantic similarities in chemical/biological graphs and Android application control-flow graphs. Use when the user wants to benchmark on MUTAG, PTC, PROTEINS, NCI1, NCI109, CLONE260, TRAIN10K, TEST10K, or asks about evaluating this task. Reports Accuracy.4---56# subgraph2vec-eval78> subgraph2vec: Learning Distributed Representations of Rooted Sub-graphs from Large Graphs — Narayanan et al. (2016) (arXiv:1606.08928, 2016)910## What this evaluates1112Evaluates the quality of distributed subgraph representations learned by subgraph2vec on graph classification and clustering tasks. It probes the model's ability to capture structural and semantic similarities in chemical/biological graphs and Android application control-flow graphs.1314## Datasets1516- **MUTAG** — total 188; splits: train (-1), test (-1)17- **PTC** — total 344; splits: train (-1), test (-1)18- **PROTEINS** — total ?; splits: train (-1), test (-1)19- **NCI1** — total ?; splits: train (-1), test (-1)20- **NCI109** — total ?; splits: train (-1), test (-1)21- **CLONE260** — total 260; splits: all (260)22- **TRAIN10K** — total 10000; splits: train (10000)23- **TEST10K** — total 10000; splits: test (10000)2425## Metrics2627- `Accuracy` **(primary)** — range: [0, 1]28 - Proportion of correctly classified graphs out of the total test set. Reported as mean ± standard deviation over 5 random train/test splits.29- `Adjusted Rand Index (ARI)` — range: [-1, 1]30 - Standard clustering evaluation metric measuring the similarity between predicted cluster assignments and ground-truth clusters, adjusted for chance.3132## Input / output format3334**Input**: Graphs represented as adjacency structures or Inter-procedural Control Flow Graphs (ICFGs) with nodes labeled by Android APIs or chemical structures.3536**Output**: Class labels (e.g., mutagenic/benign, enzyme/non-enzyme, malware/benign) or cluster assignments for each graph.3738## Scoring recipe3940```python41def compute_accuracy(preds, gold):42 return sum(1 for p, g in zip(preds, gold) if p == g) / len(gold)4344def compute_ari(pred_clusters, gold_clusters):45 from sklearn.metrics import adjusted_rand_score46 return adjusted_rand_score(gold_clusters, pred_clusters)4748# For benchmarks: repeat 5 times with 90/10 split, average accuracy.49# For clone detection: compute ARI on full dataset clustering.50```5152## Common pitfalls5354- Benchmark datasets like MUTAG/NCI can be solved with trivial features (e.g., node count), so they do not fully test real-world performance.55- Pre-training duration is reported alongside accuracy, but efficiency comparisons should account for different kernel computation costs and dataset sizes.56- The clone detection task is unsupervised clustering; ground-truth clusters must strictly match the 100 sets identified by the original dataset authors.5758## Evidence (verbatim from paper)5960> The experiment is repeated 5 times and the average accuracy (along with std. dev.) is used to determine the effectiveness of classification. A standard clustering evaluation metric, namely, Adjusted Rand Index (ARI) is used to determine clone detection accuracy. The ARI values lie in the range [-1, 1].6162## Citation6364```bibtex65@misc{narayanan2016subgraph2vec,66 title={subgraph2vec: Learning Distributed Representations of Rooted Sub-graphs from Large Graphs},67 author={Narayanan et al. (2016)},68 year={2016},69 note={arXiv:1606.08928}70}71```7273- arXiv: 1606.08928