maggn-rule-extraction-eval
Sound Logical Explanations for Mean Aggregation Graph Neural Networks — Morris et al. (2025) (arXiv:2511.11593, 2025)
What this evaluates
Evaluates the predictive performance of mean-aggregation GNNs with non-negative weights on link prediction and node classification tasks, while assessing the soundness, monotonicity, and logical complexity of the extracted explanatory rules.
Datasets
- WN18RRv1 — total ?; splits: train (-1), val (-1), test (-1)
- FB237v1 — total ?; splits: train (-1), val (-1), test (-1)
- NELLv1 — total ?; splits: train (-1), val (-1), test (-1)
- LUBM — total ?; splits: train (-1), test (-1)
- LogInfer-WN-hier — total ?; splits: train (-1), val (-1), test (-1)
- LogInfer-WN-sym — total ?; splits: train (-1), val (-1), test (-1)
- LogInfer-WN-hier_nmhier — total ?; splits: train (-1), val (-1), test (-1)
Metrics
accuracy (primary) — range: percent
- Accuracy = (True Positives + True Negatives) / Total Instances. Used to select the optimal classification threshold across 108 values on the validation set.
precision — range: percent
- Precision = True Positives / (True Positives + False Positives). Measures the proportion of predicted positive links/nodes that are actually positive.
recall — range: percent
- Recall = True Positives / (True Positives + False Negatives). Measures the proportion of actual positive links/nodes that are correctly predicted.
F1 score — range: percent
- F1 = 2 * (Precision * Recall) / (Precision + Recall). Harmonic mean of precision and recall.
Input / output format
Input: Graph-structured data with entities and relations for link prediction or node classification. For LogInfer datasets, 10% of input facts are randomly set aside per epoch as ground truth positive targets.
Output: Binary predictions or probabilities for links/nodes, and extracted monotonic first-order logic rules (e.g., A(X) ∧ B(Y) → C(X,Y) or ⊤ ⊑ Concept) that soundly explain the model's predictions.
Scoring recipe
def compute_metrics(preds, gold, threshold):
preds_bin = (preds >= threshold).astype(int)
tp = np.sum((preds_bin == 1) & (gold == 1))
fp = np.sum((preds_bin == 1) & (gold == 0))
fn = np.sum((preds_bin == 0) & (gold == 1))
tn = np.sum((preds_bin == 0) & (gold == 0))
acc = (tp + tn) / len(gold)
prec = tp / (tp + fp) if (tp + fp) > 0 else 0.0
rec = tp / (tp + fn) if (tp + fn) > 0 else 0.0
f1 = 2 * prec * rec / (prec + rec) if (prec + rec) > 0 else 0.0
return acc, prec, rec, f1
Common pitfalls
- Threshold is not fixed at 0.5; it is selected on the validation set across 108 values to maximize accuracy.
- Non-negative weight constraint is applied via post-step clamping, which may regularize the model but differs from standard unconstrained training.
- Rule extraction search space is truncated by dataset-specific limits on body concept counts (1 to 15), meaning longer rules are never evaluated.
Evidence (verbatim from paper)
For all trained models, we compute standard classification metrics, such as precision, recall, accuracy, and F1 score. For each model, we choose the classification threshold by computing the accuracy on the validation set across a range of 108 thresholds between 0 and 1, selecting the one which maximises accuracy.
Citation
@misc{morris2025soundlogical,
title={Sound Logical Explanations for Mean Aggregation Graph Neural Networks},
author={Morris et al. (2025)},
year={2025},
note={arXiv:2511.11593}
}
1---2name: maggn-rule-extraction-eval3description: Evaluates the predictive performance of mean-aggregation GNNs with non-negative weights on link prediction and node classification tasks, while assessing the soundness, monotonicity, and logical complexity of the extracted explanatory rules. Use when the user wants to benchmark on WN18RRv1, FB237v1, NELLv1, LUBM, LogInfer-WN-hier, LogInfer-WN-sym, LogInfer-WN-hier_nmhier, or asks about evaluating this task. Reports accuracy.4---56# maggn-rule-extraction-eval78> Sound Logical Explanations for Mean Aggregation Graph Neural Networks — Morris et al. (2025) (arXiv:2511.11593, 2025)910## What this evaluates1112Evaluates the predictive performance of mean-aggregation GNNs with non-negative weights on link prediction and node classification tasks, while assessing the soundness, monotonicity, and logical complexity of the extracted explanatory rules.1314## Datasets1516- **WN18RRv1** — total ?; splits: train (-1), val (-1), test (-1)17- **FB237v1** — total ?; splits: train (-1), val (-1), test (-1)18- **NELLv1** — total ?; splits: train (-1), val (-1), test (-1)19- **LUBM** — total ?; splits: train (-1), test (-1)20- **LogInfer-WN-hier** — total ?; splits: train (-1), val (-1), test (-1)21- **LogInfer-WN-sym** — total ?; splits: train (-1), val (-1), test (-1)22- **LogInfer-WN-hier_nmhier** — total ?; splits: train (-1), val (-1), test (-1)2324## Metrics2526- `accuracy` **(primary)** — range: percent27 - Accuracy = (True Positives + True Negatives) / Total Instances. Used to select the optimal classification threshold across 108 values on the validation set.28- `precision` — range: percent29 - Precision = True Positives / (True Positives + False Positives). Measures the proportion of predicted positive links/nodes that are actually positive.30- `recall` — range: percent31 - Recall = True Positives / (True Positives + False Negatives). Measures the proportion of actual positive links/nodes that are correctly predicted.32- `F1 score` — range: percent33 - F1 = 2 * (Precision * Recall) / (Precision + Recall). Harmonic mean of precision and recall.3435## Input / output format3637**Input**: Graph-structured data with entities and relations for link prediction or node classification. For LogInfer datasets, 10% of input facts are randomly set aside per epoch as ground truth positive targets.3839**Output**: Binary predictions or probabilities for links/nodes, and extracted monotonic first-order logic rules (e.g., `A(X) ∧ B(Y) → C(X,Y)` or `⊤ ⊑ Concept`) that soundly explain the model's predictions.4041## Scoring recipe4243```python44def compute_metrics(preds, gold, threshold):45 preds_bin = (preds >= threshold).astype(int)46 tp = np.sum((preds_bin == 1) & (gold == 1))47 fp = np.sum((preds_bin == 1) & (gold == 0))48 fn = np.sum((preds_bin == 0) & (gold == 1))49 tn = np.sum((preds_bin == 0) & (gold == 0))50 acc = (tp + tn) / len(gold)51 prec = tp / (tp + fp) if (tp + fp) > 0 else 0.052 rec = tp / (tp + fn) if (tp + fn) > 0 else 0.053 f1 = 2 * prec * rec / (prec + rec) if (prec + rec) > 0 else 0.054 return acc, prec, rec, f155```5657## Common pitfalls5859- Threshold is not fixed at 0.5; it is selected on the validation set across 108 values to maximize accuracy.60- Non-negative weight constraint is applied via post-step clamping, which may regularize the model but differs from standard unconstrained training.61- Rule extraction search space is truncated by dataset-specific limits on body concept counts (1 to 15), meaning longer rules are never evaluated.6263## Evidence (verbatim from paper)6465> For all trained models, we compute standard classification metrics, such as precision, recall, accuracy, and F1 score. For each model, we choose the classification threshold by computing the accuracy on the validation set across a range of 108 thresholds between 0 and 1, selecting the one which maximises accuracy.6667## Citation6869```bibtex70@misc{morris2025soundlogical,71 title={Sound Logical Explanations for Mean Aggregation Graph Neural Networks},72 author={Morris et al. (2025)},73 year={2025},74 note={arXiv:2511.11593}75}76```7778- arXiv: 2511.11593