# Pgexplainer Gnn Eval

> Evaluates the predictive accuracy of GNN models and the effectiveness of post-hoc explanation methods on synthetic and real-world graph classification and node classification tasks. It probes whether a parameterized explainer can learn global explanatory motifs end-to-end and generalize inductively without retraining. Use when the user wants to benchmark on BA-Shapes, BA-Community, Tree-Cycles, Tree-Grid, BA-2motifs, MUTAG, or asks about evaluating this task. Reports Accuracy.

- Skill: `qhjqhj00/pgexplainer-gnn-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/pgexplainer-gnn-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/pgexplainer-gnn-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/pgexplainer-gnn-eval

---


# pgexplainer-gnn-eval

> Parameterized Explainer for Graph Neural Network — Luo et al. (2020) (arXiv:2011.04573, 2020)

## What this evaluates

Evaluates the predictive accuracy of GNN models and the effectiveness of post-hoc explanation methods on synthetic and real-world graph classification and node classification tasks. It probes whether a parameterized explainer can learn global explanatory motifs end-to-end and generalize inductively without retraining.

## Datasets

- **BA-Shapes** — total ?; splits: train (-1), val (-1), test (-1)
- **BA-Community** — total ?; splits: train (-1), val (-1), test (-1)
- **Tree-Cycles** — total ?; splits: train (-1), val (-1), test (-1)
- **Tree-Grid** — total ?; splits: train (-1), val (-1), test (-1)
- **BA-2motifs** — total ?; splits: train (-1), val (-1), test (-1)
- **MUTAG** — total ?; splits: train (-1), val (-1), test (-1)

## Metrics

- `Accuracy` **(primary)** — range: percent
  - Standard classification accuracy: the proportion of correctly predicted labels out of the total number of instances.

## Input / output format

**Input**: Graph-structured data containing node features, adjacency matrices, and node or graph-level labels for classification tasks.

**Output**: Predicted class labels for nodes or graphs, and binary edge/node importance scores for explanation methods.

## Scoring recipe

```python
def compute_accuracy(predictions, gold_labels):
    correct = sum(1 for p, g in zip(predictions, gold_labels) if p == g)
    return correct / len(gold_labels) * 100
```

## Common pitfalls

- GNN models must be fully trained first and then shared with all post-hoc explanation methods rather than training them jointly.
- The dataset split is fixed at 80/10/10 for train/validation/test across all datasets.
- PGExplainer requires careful temperature annealing (tau0=5.0 to tauT=2.0) to balance discrete sampling and backpropagation optimization.

## Evidence (verbatim from paper)

> We follow GNNExplainer to split train/validation/test with 80/10/10% for all datasets. Each model is trained for 1000 epochs. The accuracy performances of GNN models are shown in Table 3.

## Citation

```bibtex
@misc{luo2020pgexplainer,
  title={Parameterized Explainer for Graph Neural Network},
  author={Luo et al. (2020)},
  year={2020},
  note={arXiv:2011.04573}
}
```

- arXiv: 2011.04573

