rasayan-labs/rasayan-tox21
3
Rasayan Tox21 Classifier
<p align="center"> <img src="https://img.shields.io/badge/Tox21-Challenge-red" alt="Tox21"> <img src="https://img.shields.io/badge/Architecture-SNN-blue" alt="SNN"> <img src="https://img.shields.io/badge/Endpoints-12-green" alt="12 Endpoints"> <img src="https://img.shields.io/badge/License-Apache_2.0-yellow" alt="License"> </p>
A production-ready Self-Normalizing Neural Network (SNN) ensemble for predicting molecular toxicity across the 12 Tox21 Challenge endpoints. Built for the ml-jku Tox21 Leaderboard.
Model Overview
Molecular Features (11,377 total)
Training Details
- Loss Function: Focal Loss (γ=2.5, α=0.25) for class imbalance
- Regularization: Label smoothing (0.1), Mixup augmentation (α=0.2)
- Feature Selection: Variance-based selection per fold (ECFP, toxicophores)
- Normalization: SquashScaler (StandardScaler → tanh → StandardScaler)
- Ensemble Selection: Top-10 folds from 40-fold stratified CV
Tox21 Endpoints
Nuclear Receptor Panel
Stress Response Panel
API Endpoints
Usage
Python
import requests
response = requests.post(
"https://rasayan-labs-rasayan-tox21.hf.space/predict",
json={"smiles": ["CC(=O)Nc1ccc(O)cc1", "c1ccccc1"]}
)
predictions = response.json()["predictions"]
for smiles, scores in predictions.items():
print(f"{smiles}:")
for target, prob in sorted(scores.items(), key=lambda x: -x[1])[:3]:
print(f" {target}: {prob:.1%}")cURL
curl -X POST "https://rasayan-labs-rasayan-tox21.hf.space/predict" \
-H "Content-Type: application/json" \
-d '{"smiles": ["CCO", "c1ccccc1"]}'Response Format
{
"predictions": {
"CCO": {
"NR-AR": 0.041,
"NR-AR-LBD": 0.040,
"NR-AhR": 0.049,
"NR-Aromatase": 0.078,
"NR-ER": 0.133,
"NR-ER-LBD": 0.076,
"NR-PPAR-gamma": 0.058,
"SR-ARE": 0.100,
"SR-ATAD5": 0.038,
"SR-HSE": 0.066,
"SR-MMP": 0.082,
"SR-p53": 0.052
}
},
"model_info": {
"name": "Rasayan Tox21 SNN Ensemble",
"version": "1.0.0"
}
}Interpretation Guide
References
- Tox21 Challenge: NIH Tox21 Data Challenge
- SNN Architecture: Klambauer et al., 2017
- Leaderboard: ml-jku Tox21 Leaderboard
License
Apache 2.0
<p align="center"> Built by <a href="https://rasayan.ai">Rasayan Labs</a> </p>
