File size: 6,150 Bytes
2b8523d
5f0bfe6
 
2b8523d
5f0bfe6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2b8523d
5f0bfe6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
---
language:
- en
license: mit
library_name: pytorch
tags:
- chemistry
- graph-neural-networks
- drug-discovery
- rdkit
- pytorch-geometric
- moleculenet
- cheminformatics
- toxicology
- admet
- mpnn
- gin
- gcn
- gat
datasets:
- esol
- bbbp
- tox21
metrics:
- rmse
- roc_auc
model-index:
- name: BioGraph-AI-MPNN-ESOL
  results:
  - task:
      type: tabular-regression
      name: Aqueous Solubility Prediction
    dataset:
      name: ESOL Delaney
      type: esol
    metrics:
    - type: rmse
      value: 1.010
      name: Test RMSE
- name: BioGraph-AI-MPNN-Tox21
  results:
  - task:
      type: tabular-classification
      name: Multi-Task Nuclear Receptor & Stress Pathway Toxicity
    dataset:
      name: Tox21
      type: tox21
    metrics:
    - type: roc_auc
      value: 0.757
      name: Test ROC-AUC
- name: BioGraph-AI-RF-BBBP
  results:
  - task:
      type: tabular-classification
      name: Blood-Brain Barrier Penetration
    dataset:
      name: BBBP
      type: bbbp
    metrics:
    - type: roc_auc
      value: 0.853
      name: Test ROC-AUC
---

# BioGraph AI: Deep Graph Neural Networks for Molecular Property Prediction & ADMET Profiling

[![GitHub Stars](https://img.shields.io/badge/GitHub-BioGraph--AI-10b981?logo=github)](https://github.com/VSRAJHAVEL/BioGraph-AI)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![PyTorch](https://img.shields.io/badge/PyTorch-2.0+-ee4c2c?logo=pytorch)](https://pytorch.org/)
[![PyG](https://img.shields.io/badge/PyG-PyTorch_Geometric-3b82f6)](https://pyg.org/)
[![RDKit](https://img.shields.io/badge/Cheminformatics-RDKit-green)](https://www.rdkit.org/)

**BioGraph AI** is an enterprise-grade Computer-Aided Drug Design (CADD) and Molecular Machine Learning platform. This repository hosts pre-trained model weights for **15 state-of-the-art graph architectures and classical baselines** evaluated under strict Bemis-Murcko scaffold splitting across three canonical MoleculeNet benchmarks (**ESOL, BBBP, Tox21**).

> **Handcrafted by [RAJHAVEL V S](https://vsrajhavel.github.io)**  
> **Portfolio:** [vsrajhavel.github.io](https://vsrajhavel.github.io) | **LinkedIn:** [in/rajhavelvs](https://in.linkedin.com/in/rajhavelvs) | **GitHub:** [@VSRAJHAVEL](https://github.com/VSRAJHAVEL)

---

## πŸ”¬ Benchmark Performance (Bemis-Murcko Scaffold Split 80/10/10)

All models were trained, validated, and evaluated on local Intel CPU physical threads. Zero scaffold leakage was mathematically confirmed across all training and test partitions.

### 1. Aqueous Solubility (ESOL β€” Delaney Regression, $\log S$ in $\text{mol/L}$)
| Model Architecture | Test RMSE ↓ | Test MAE ↓ | Test $R^2$ ↑ | Checkpoint File |
| :--- | :---: | :---: | :---: | :--- |
| **MPNN (Edge-Aware)** | **1.010** | **0.777** | **0.784** | `checkpoints/esol_mpnn_best.pt` |
| **GIN (Weisfeiler-Lehman)** | 1.054 | 0.812 | 0.764 | `checkpoints/esol_gin_best.pt` |
| **GCN (Kipf-Welling)** | 1.080 | 0.811 | 0.753 | `checkpoints/esol_gcn_best.pt` |
| **Baseline (RF + Morgan)** | 1.109 | 0.859 | 0.739 | `checkpoints/esol_baseline_best.pkl` |
| **GAT (Multi-Head)** | 1.208 | 0.938 | 0.691 | `checkpoints/esol_gat_best.pt` |

### 2. Blood-Brain Barrier Penetration (BBBP β€” Binary Classification)
| Model Architecture | Test ROC-AUC ↑ | Test PR-AUC ↑ | Checkpoint File |
| :--- | :---: | :---: | :--- |
| **Baseline (RF + Morgan)** | **0.853** | **0.978** | `checkpoints/bbbp_baseline_best.pkl` |
| **GIN** | 0.723 | 0.936 | `checkpoints/bbbp_gin_best.pt` |
| **GCN** | 0.719 | 0.951 | `checkpoints/bbbp_gcn_best.pt` |
| **MPNN** | 0.665 | 0.944 | `checkpoints/bbbp_mpnn_best.pt` |
| **GAT** | 0.624 | 0.928 | `checkpoints/bbbp_gat_best.pt` |

### 3. Toxicity Profiling (Tox21 β€” 12 Multi-Task Toxicity Pathways)
*Evaluated across 12 nuclear receptor (NR) and stress response (SR) pathways with missing label masking.*
| Model Architecture | Test ROC-AUC ↑ | Test PR-AUC ↑ | Checkpoint File |
| :--- | :---: | :---: | :--- |
| **MPNN (Edge-Aware)** | **0.757** | 0.304 | `checkpoints/tox21_mpnn_best.pt` |
| **GCN** | 0.754 | 0.310 | `checkpoints/tox21_gcn_best.pt` |
| **GIN** | 0.747 | 0.306 | `checkpoints/tox21_gin_best.pt` |
| **Baseline (RF)** | 0.730 | **0.349** | `checkpoints/tox21_baseline_best.pkl` |
| **GAT** | 0.711 | 0.264 | `checkpoints/tox21_gat_best.pt` |

---

## πŸš€ Quickstart: Loading Checkpoints in Python

### Installation
```bash
pip install torch torch-geometric rdkit huggingface_hub
```

### Download Pretrained Weights
```python
from huggingface_hub import hf_hub_download
import torch

# Download best ESOL MPNN checkpoint
checkpoint_path = hf_hub_download(
    repo_id="VSRAJHAVEL/BioGraph-AI-Models",
    filename="checkpoints/esol_mpnn_best.pt"
)

state_dict = torch.load(checkpoint_path, map_location="cpu")
print("Successfully loaded BioGraph AI MPNN checkpoint:", len(state_dict), "weight tensors")
```

---

## 🧬 Architectural Overview

1. **Message Passing Neural Networks (MPNN)**: Formulated with edge-network conditioned message functions $M(h_v, h_w, e_{vw})$ incorporating bond stereo, conjugation, and aromaticity. Top performer for steric-dependent thermodynamic properties.
2. **Graph Isomorphism Network (GIN)**: Employs sum-aggregation with multi-layer perceptrons approximating the 1-Weisfeiler-Lehman topological graph isomorphism test.
3. **Graph Convolutional Networks (GCN)**: First-order localized spectral convolutions with symmetric normalized Laplacian aggregations.
4. **Graph Attention Networks (GAT)**: LeakyReLU-parameterized multi-head attention over bonded neighborhoods.
5. **Random Forest Baselines**: 500-estimator ensembles trained on 2048-bit ECFP4 (Morgan radius 2) fingerprints.

---

## πŸ”— Project Resources

- **Full Application Repository**: [https://github.com/VSRAJHAVEL/BioGraph-AI](https://github.com/VSRAJHAVEL/BioGraph-AI)
- **Interactive Web App**: Includes 3D Mol* Conformer Studio, ADMET Spider Radar, MMP Bioisosteric Optimization, PCA Chemical Space Explorer, and GNNExplainer Attribution.
- **License**: MIT License (Copyright 2026 RAJHAVEL V S)