molecular-bayesian-eval
A benchmark study on reliable molecular supervised learning via Bayesian learning — Hwang et al. (2020) (arXiv:2006.07021, 2020)
What this evaluates
Evaluates the reliability and predictive performance of Graph Neural Networks (GNNs) trained with Bayesian inference methods on molecular property prediction tasks. It specifically probes how well these models calibrate their uncertainty and generalize to out-of-distribution molecular scaffolds compared to standard maximum a posteriori (MAP) training.
Datasets
- BBBP — total ?; splits: train (-1), val (-1), test (-1)
- BACE — total ?; splits: train (-1), val (-1), test (-1)
- HIV — total ?; splits: train (-1), val (-1), test (-1)
- Tox21 — total ?; splits: train (-1), val (-1), test (-1)
Metrics
ECE (primary) — range: percent
- Expected Calibration Error. Computed by binning predictions by confidence, then calculating the weighted average of the absolute difference between accuracy and mean confidence per bin. Lower values indicate better calibration.
AUROC — range: percent
- Area Under the Receiver Operating Characteristic curve. Measures the probability that a randomly chosen positive instance ranks higher than a randomly chosen negative instance across all classification thresholds. Higher values indicate better discriminative performance.
Input / output format
Input: Molecular graphs represented as node features (atomic properties) and edge features (bond types/properties) for binary classification tasks.
Output: A scalar predictive probability (between 0 and 1) indicating the likelihood of the molecule belonging to the positive class.
Scoring recipe
def compute_ece(predictions, labels, n_bins=15):
bin_boundaries = np.linspace(0, 1, n_bins + 1)
ece = 0.0
for i in range(n_bins):
mask = (predictions >= bin_boundaries[i]) & (predictions < bin_boundaries[i+1])
if mask.sum() == 0: continue
bin_acc = labels[mask].mean()
bin_conf = predictions[mask].mean()
ece += (mask.sum() / len(labels)) * abs(bin_acc - bin_conf)
return ece * 100
Common pitfalls
- Using random data splits instead of scaffold-based splits, which fails to properly evaluate out-of-distribution generalization on molecular graphs.
- Interpreting ECE as a performance metric where higher values are better; ECE measures miscalibration, so lower values indicate better reliability.
- Comparing single Bayesian models directly against ensembles without accounting for the computational overhead or the specific ensemble configuration.
Evidence (verbatim from paper)
In Table 1 and 2, we show the prediction results for the four different prediction tasks – BACE, BBBP, HIV, and Tox21 predictions – where GIN is set as the baseline model architecture and various Bayesian learning methods (Ensemble, MC-DO, BBB, SGLD, SWA, and SWAG) are used. We observe that all Bayesian methods are helpful for improving both prediction reliability (lower ECE) and performance (higher AUROC).
Citation
@misc{hwang2020benchmark,
title={A benchmark study on reliable molecular supervised learning via Bayesian learning},
author={Hwang et al. (2020)},
year={2020},
note={arXiv:2006.07021}
}
1---2name: molecular-bayesian-eval3description: Evaluates the reliability and predictive performance of Graph Neural Networks (GNNs) trained with Bayesian inference methods on molecular property prediction tasks. It specifically probes how well these models calibrate their uncertainty and generalize to out-of-distribution molecular scaffolds compared to standard maximum a posteriori (MAP) training. Use when the user wants to benchmark on BBBP, BACE, HIV, Tox21, or asks about evaluating this task. Reports ECE.4---56# molecular-bayesian-eval78> A benchmark study on reliable molecular supervised learning via Bayesian learning — Hwang et al. (2020) (arXiv:2006.07021, 2020)910## What this evaluates1112Evaluates the reliability and predictive performance of Graph Neural Networks (GNNs) trained with Bayesian inference methods on molecular property prediction tasks. It specifically probes how well these models calibrate their uncertainty and generalize to out-of-distribution molecular scaffolds compared to standard maximum a posteriori (MAP) training.1314## Datasets1516- **BBBP** — total ?; splits: train (-1), val (-1), test (-1)17- **BACE** — total ?; splits: train (-1), val (-1), test (-1)18- **HIV** — total ?; splits: train (-1), val (-1), test (-1)19- **Tox21** — total ?; splits: train (-1), val (-1), test (-1)2021## Metrics2223- `ECE` **(primary)** — range: percent24 - Expected Calibration Error. Computed by binning predictions by confidence, then calculating the weighted average of the absolute difference between accuracy and mean confidence per bin. Lower values indicate better calibration.25- `AUROC` — range: percent26 - Area Under the Receiver Operating Characteristic curve. Measures the probability that a randomly chosen positive instance ranks higher than a randomly chosen negative instance across all classification thresholds. Higher values indicate better discriminative performance.2728## Input / output format2930**Input**: Molecular graphs represented as node features (atomic properties) and edge features (bond types/properties) for binary classification tasks.3132**Output**: A scalar predictive probability (between 0 and 1) indicating the likelihood of the molecule belonging to the positive class.3334## Scoring recipe3536```python37def compute_ece(predictions, labels, n_bins=15):38 bin_boundaries = np.linspace(0, 1, n_bins + 1)39 ece = 0.040 for i in range(n_bins):41 mask = (predictions >= bin_boundaries[i]) & (predictions < bin_boundaries[i+1])42 if mask.sum() == 0: continue43 bin_acc = labels[mask].mean()44 bin_conf = predictions[mask].mean()45 ece += (mask.sum() / len(labels)) * abs(bin_acc - bin_conf)46 return ece * 10047```4849## Common pitfalls5051- Using random data splits instead of scaffold-based splits, which fails to properly evaluate out-of-distribution generalization on molecular graphs.52- Interpreting ECE as a performance metric where higher values are better; ECE measures miscalibration, so lower values indicate better reliability.53- Comparing single Bayesian models directly against ensembles without accounting for the computational overhead or the specific ensemble configuration.5455## Evidence (verbatim from paper)5657> In Table 1 and 2, we show the prediction results for the four different prediction tasks – BACE, BBBP, HIV, and Tox21 predictions – where GIN is set as the baseline model architecture and various Bayesian learning methods (Ensemble, MC-DO, BBB, SGLD, SWA, and SWAG) are used. We observe that all Bayesian methods are helpful for improving both prediction reliability (lower ECE) and performance (higher AUROC).5859## Citation6061```bibtex62@misc{hwang2020benchmark,63 title={A benchmark study on reliable molecular supervised learning via Bayesian learning},64 author={Hwang et al. (2020)},65 year={2020},66 note={arXiv:2006.07021}67}68```6970- arXiv: 2006.07021