MolGraphormer: An Interpretable GNN-Transformer for Uncertainty-Aware Molecular Toxicity Prediction

24 October 2025, Version 1
This content is an early or alternative research output and has not been peer-reviewed by Cambridge University Press at the time of posting.

Abstract

Accurate and Interpretable toxicity prediction remains fundamental in computational chemistry and drug discovery. We propose MolGraphormer, a Transformer-GNN hybrid architecture integrating Graph Neural Network message passing with self-attention mechanisms for molecular property prediction. Our model incorporates substructure-aware embeddings via multi-head attention, edge-conditioned message passing, and hierarchical graph aggregation, enabling both local and global molecular reasoning. Evaluated on the Tox21 benchmark dataset, MolGraphormer achieves competitive performance with F1-Score of 0.6697 and AUC-ROC of 0.7806, while maintaining strong recall (0.7787) for identifying toxic compounds. We employ Monte Carlo Dropout and Temperature Scaling for uncertainty quantification, Combined with uncertainty quantification and attention-based interpretability, MolGraphormer offers a practical framework for drug safety assessment and regulatory toxicology.

Keywords

Graph Neural Networks
Molecular Toxicity
ransformer attention
uncertainty quantification
drug discovery
interpretable AI

Supplementary materials

Title
Description
Actions
Title
Calibration Curve Graph
Description
Graph showing model calibration of predicted probabilities versus fraction of positives for baseline, temperature scaled, and MC dropout methods.
Actions
Title
Calibration Metrics Comparison
Description
Bar chart comparing Expected Calibration Error (ECE) and Brier scores for baseline, temperature scaled, and MC dropout models.
Actions
Title
Performance Comparison of Graph-Based Models
Description
Comparison of GCN, GAT, GraphSAGE, GIN, and MolGraphormer on molecular prediction tasks using five metrics: Accuracy, Precision, Recall, F1-Score , and AUC-ROC. Demonstrating MolGraphormer's superior balance between precision and recall across benchmarks.
Actions

Supplementary weblinks

Comments

Comments are not moderated before they are posted, but they can be removed by the site moderators if they are found to be in contravention of our Commenting and Discussion Policy [opens in a new tab] - please read this policy before you post. Comments should be used for scholarly discussion of the content in question. You can find more information about how to use the commenting feature here [opens in a new tab] .
This site is protected by reCAPTCHA and the Google Privacy Policy [opens in a new tab] and Terms of Service [opens in a new tab] apply.