Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- toxicity
|
| 5 |
+
- dili
|
| 6 |
+
- liver-toxicity
|
| 7 |
+
- qsar
|
| 8 |
+
- graph-neural-network
|
| 9 |
+
- deployment-refit
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Liver toxicity (DILI) β GAT deployment model
|
| 13 |
+
|
| 14 |
+
Binary classifier for drug-induced liver injury (DILI) concern: the
|
| 15 |
+
probability that a compound belongs to the toxic class. This is the
|
| 16 |
+
**deployment refit** of the liver programme's Arch2 GAT (graph
|
| 17 |
+
attention network), one of the two winners selected on the locked
|
| 18 |
+
regulatory benchmark. It is deployed as a pair with the ExtraTrees
|
| 19 |
+
deployment model (`Delower/liver-extratrees-deployment`); a compound
|
| 20 |
+
flagged by **both** models is the highest-concern readout.
|
| 21 |
+
|
| 22 |
+
## Recipe
|
| 23 |
+
|
| 24 |
+
- Architecture: GAT over molecular graphs (atom features, in_dim 35),
|
| 25 |
+
hidden 128, dropout 0.2, lr 3e-3 β the locked run's winning
|
| 26 |
+
configuration (validation MCC 0.2131, best epoch 37), reused
|
| 27 |
+
unchanged with **no re-tuning**.
|
| 28 |
+
- Final refit: fixed 37 epochs on the full deployment set (the arm's
|
| 29 |
+
final-refit convention), positive-class weight 0.8853.
|
| 30 |
+
- Flag threshold: probability β₯ 0.5 (the arm's own convention).
|
| 31 |
+
|
| 32 |
+
## Deployment training set
|
| 33 |
+
|
| 34 |
+
All labeled liver data the programme holds, identity-deduped by
|
| 35 |
+
InChIKey connectivity of the standardized parent: **1,891 unique
|
| 36 |
+
compounds** (1,003 positive / 888 negative), composed of
|
| 37 |
+
train_locked.csv (1,769 rows) + train_enriched.csv additions +
|
| 38 |
+
internal_test.csv + **every regulatory benchmark compound**
|
| 39 |
+
(withdrawn, clinical failures, PASS), with benchmark labels governing
|
| 40 |
+
conflicts. 1,769 duplicate rows dropped; 42 label conflicts (all
|
| 41 |
+
inside train_locked, the groups the earlier merge had excluded) kept
|
| 42 |
+
at the first train_locked row's label and logged.
|
| 43 |
+
|
| 44 |
+
**Hard gate (passed before training):** every deduped regulatory
|
| 45 |
+
benchmark compound was verified compound-by-compound (InChIKey
|
| 46 |
+
connectivity) inside the actual training matrix, post-graph-building:
|
| 47 |
+
withdrawn **71/71**, clinical failures **10/10**, PASS **304/304**.
|
| 48 |
+
See `gate_verification.json`.
|
| 49 |
+
|
| 50 |
+
## Honest benchmark scores β benchmark version only
|
| 51 |
+
|
| 52 |
+
The deployment refit absorbed the regulatory benchmark and is
|
| 53 |
+
**never scored on it**. The frozen claim for this recipe comes from
|
| 54 |
+
the locked-wave benchmark model (benchmark locked out of training,
|
| 55 |
+
overlap verified 0; 385 scored compounds):
|
| 56 |
+
|
| 57 |
+
| Metric | Value |
|
| 58 |
+
|---|---|
|
| 59 |
+
| Pooled regulatory AUROC | 0.788 |
|
| 60 |
+
| Pooled balanced accuracy | 0.680 |
|
| 61 |
+
| Withdrawn drugs caught | 66/71 |
|
| 62 |
+
| Clinical failures caught | 10/10 |
|
| 63 |
+
| PASS compounds correct | 128/304 (0.421) |
|
| 64 |
+
|
| 65 |
+
This was the best pooled regulatory AUROC of any liver arm, ahead of
|
| 66 |
+
the leakage-cleaned external Claude ensemble (0.670).
|
| 67 |
+
|
| 68 |
+
## Deployment screen results
|
| 69 |
+
|
| 70 |
+
Applied to the DPP-4 programme's potent leads (flag = prob β₯ 0.5):
|
| 71 |
+
1,110/1,113 workbook leads scored, 1,027 flagged (92.5%); 4,891/4,898
|
| 72 |
+
of the full potent union scored, 4,496 flagged (91.9%). These flag
|
| 73 |
+
rates are high β every model in this programme is a high-sensitivity,
|
| 74 |
+
low-specificity screen, and the pair's discriminative readout is the
|
| 75 |
+
dual flag (1,003/1,110 leads flagged by both models; only 6 pass
|
| 76 |
+
both). Treat single-model flags as low-information on their own.
|
| 77 |
+
|
| 78 |
+
## Files
|
| 79 |
+
|
| 80 |
+
- `model.pt` β deployment weights: the epoch-37 training checkpoint
|
| 81 |
+
(keys: `state_dict` β the exact final weights β plus optimizer and
|
| 82 |
+
RNG state). The arm-format re-save of the deployment dict could not
|
| 83 |
+
be written in the build environment, so the checkpoint written
|
| 84 |
+
during training is the shipped artifact; `config.json` carries the
|
| 85 |
+
architecture config and `in_dim`.
|
| 86 |
+
- `config.json` β architecture, training composition, gate counts,
|
| 87 |
+
benchmark scores.
|
| 88 |
+
- `deployment_common.py` β the programme's shared featurization /
|
| 89 |
+
graph module (graph construction + `GATNet` definition).
|
| 90 |
+
- `infer.py` β prediction entry point (`predict(smiles)`).
|
| 91 |
+
- `validate.py` + `examples.json` β runnable validation: reproduces
|
| 92 |
+
this model's probabilities on 8 screened DPP-4 leads (tolerance
|
| 93 |
+
2e-3). Verified locally before upload: max deviation 4.8e-07.
|
| 94 |
+
- `gate_verification.json`, `training_manifest.json` β hard-gate
|
| 95 |
+
result and full training manifest.
|
| 96 |
+
- `absorbed_compounds.csv` β the 1,891-compound deployment training
|
| 97 |
+
set (the absorbed data, for audit).
|
| 98 |
+
|
| 99 |
+
## Limitations
|
| 100 |
+
|
| 101 |
+
CPU/GPU-agnostic PyTorch model; requires `torch`, `torch_geometric`
|
| 102 |
+
and `rdkit`. Probabilities are screening scores, not calibrated
|
| 103 |
+
clinical risks.
|