A Logic Tensor Network (LTN) regression model predicting DPP-4 pIC50
from molecular structure. The deployed weights are the tuning winner
b256 of a 7-configuration search — the evaluated artifact, trained on
the 80% training split only (8,068 rows), best-validation snapshot,
FDA-12 gliptins excluded from training.
| Split | RMSE | MAE | R² |
|---|---|---|---|
| Validation (n=1,009) | 0.3907 | 0.1767 | 0.9053 |
| Test (n=1,009) | 0.4457 | 0.1870 | 0.8739 |
| FDA-12 external vs wet-lab (n=11) | 0.8348 | 0.6498 | — |
Derived classification (paper scheme, from predicted pIC50), test: accuracy 0.9007 · F1 macro 0.8923 · MCC 0.7866 · ROC-AUC macro 0.9948. ExtraTrees comparison: test RMSE 0.4449 · FDA wet-lab RMSE 0.9637 — the LTN ties it on the internal test and is clearly better on the FDA drugs.
Why not a full-data retrain? Retraining this configuration on all 10,097 rows (curated set + FDA-12) was attempted three times with stability fixes (gradient clipping 1.0; learning rate halved to 5e-5); all three runs diverged mid-training (epochs 49 / 68 / 25) and produced no usable weights. The evaluated tuned model is therefore the deployed one — its scores above are measured, not fit checks.
.npz; infer.py rebuilds
the network with TensorFlow, and a NumPy-only forward pass reproduces
the predictions to <1e-5 (that is how the web app serves this model).10,085 compounds stacked from ChEMBL, BindingDB, PubChem, the ChEMBL-2024 set and DTC; censored IC50 ≥ 100,000 nM dropped; duplicate SMILES resolved by median (conflicts > 1 log dropped). Split 80/10/10, seed 42, stratified by pIC50 band, FDA-12 excluded from all splits.
Caveat: curation deduplicated by SMILES string; the 10,085 strings are 7,327 unique canonical compounds, so internal scores may be mildly optimistic. The tuning was run on this set deliberately, for comparability with the project's other models.
pip install -r requirements.txt
python infer.py "Cn1c(=O)cc(N2CCC[C@@H](N)C2)n(Cc2ccccc2C#N)c1=O"
# Alogliptin → predicted pIC50 7.74
ltn_model.npz + ltn_config.json — tuned weights + configmetrics_ltn.csv — validation/test metrics ·
ltn_fda12.csv — FDA-12 predictions vs wet-lab valuesinfer.py — standalone inference · train_ltn_dpp4.py — the tuning
training script (provenance)