jsf3467v commited on
Commit
937d35f
Β·
verified Β·
1 Parent(s): 516f7ab

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +136 -0
README.md CHANGED
@@ -1,3 +1,139 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ library_name: pytorch
4
+ tags:
5
+ - drug-drug-interaction
6
+ - ddi
7
+ - graph-neural-network
8
+ - gatv2
9
+ - multi-task-learning
10
+ - pharmacokinetics
11
+ - healthcare
12
+ - tuberculosis
13
+ - hiv
14
+ - audit
15
+ - benchmark-analysis
16
+ - not-for-deployment
17
+ datasets:
18
+ - drugbank
19
+ - ddinter
20
+ metrics:
21
+ - accuracy
22
+ - f1
23
+ - auroc
24
+ - auprc
25
+ - ece
26
  ---
27
+
28
+ # Multi-task DDI Prediction Model (Research Artifact)
29
+
30
+ > **Do not deploy this model in any clinical context.** This is a research artifact from a methodology audit. A simpler MLP baseline on the same features outperforms it by 9.3 accuracy points and 14.8 macro-F1 points. The checkpoints are released solely so the audit results can be reproduced. See the [GitHub repository](https://github.com/jsf3467v/multi-task-ddi-audit) and the [manuscript](./manuscript.pdf) for full context.
31
+
32
+ ## What this is
33
+
34
+ Multi-task graph neural network for drug-drug interaction prediction, trained on a benchmark constructed from DrugBank 5.1.15 and DDInter. Predicts:
35
+
36
+ - **Severity** β€” 4 classes: `none`, `Minor`, `Moderate`, `Major`
37
+ - **Mechanism** β€” 7 binary heads: CYP induction, CYP inhibition, QT prolongation, additive toxicity, absorption interference, protein binding, renal excretion
38
+
39
+ Architecture: GATv2 encoder (3 layers, 4 heads, hidden 128) + JumpingKnowledge max-pooling + mean-max readout, plus a 2-layer MLP branch over a 10-dimensional leakage-corrected pharmacokinetic vector. Per-drug embeddings are concatenated, fed into an interaction trunk over `[h_a; h_b; h_a βŠ™ h_b; |h_a βˆ’ h_b|]`, then split into severity (4 logits) and mechanism (7 logits) heads. Full architectural details in Section 3.1 of the manuscript.
40
+
41
+ ## Why this exists
42
+
43
+ This model was trained as one of seven variants serving as **instruments** for a benchmark validation audit, not as a DDI screening tool. The audit found three patterns by which standard benchmark assembly choices systematically disadvantage drugs central to global health:
44
+
45
+ 1. **Cross-database name resolution silently drops drugs.** An exact-string DrugBank ↔ DDInter merge initially excluded 1,825 documented interactions (including all 284 rifampin pairs) because DDInter uses WHO INN (`rifampicin`) and DrugBank uses American generic names (`rifampin`). Alias correction recovers them.
46
+ 2. **Random pair splits make cold-start evaluation structurally impossible.** 99.96% of test pairs share both drugs with the training set. The benchmark cannot tell you whether the model generalizes to novel agents.
47
+ 3. **Aggregate accuracy masks architecture-specific failure modes.** This GNN over-alerts on the rare `Minor` severity class (precision 0.36, recall 0.88); the MLP baseline under-alerts (precision 0.87, recall 0.68). Bootstrap CIs on per-class precision don't overlap. Both have similar F1 but qualitatively different clinical alert behavior.
48
+
49
+ A bonus contribution surfaced during the audit: **indirect label leakage in the pharmacokinetic features.** CYP-inducer flags carried 2.5Γ— lift on CYP-induction labels (both originate from the same DrugBank curation). 20 of 30 PK columns were dropped to fix this. **All checkpoints here use the leakage-corrected 10-column vector.**
50
+
51
+ ## Intended use
52
+
53
+ **Primary use:** Reproducing the audit results in the accompanying paper. The checkpoints exist so reviewers can rerun the evaluation suite (`evaluate.py`, ablation eval, agreement analysis, cold-start partitioning, statistical tests, TB-tier breakdown) without retraining from scratch β€” full retraining takes 5–8 hours on Apple M4 Max.
54
+
55
+ **Out of scope (do not do any of this):**
56
+
57
+ - Clinical decision support
58
+ - Patient-facing DDI alerts
59
+ - Prescription validation
60
+ - Pharmacy software integration
61
+ - Any downstream task where false negatives could harm patients
62
+ - Generalization to drugs not in the training distribution (the cold-start evaluation is structurally empty; see finding 2)
63
+
64
+ ## Training data
65
+
66
+ | Source | Used for |
67
+ | --- | --- |
68
+ | DrugBank 5.1.15 | Drug structures (SMILES), enzyme/transporter annotations, free-text interaction descriptions (mechanism regex extraction) |
69
+ | DDInter | Severity labels (Major/Moderate/Minor) |
70
+ | Sampled negatives | The `none` class β€” 1:1 ratio against documented positives, sampled from valid drug combinations absent from DrugBank |
71
+
72
+ Final dataset: 130,014 pairs (65,007 documented positive + 65,007 sampled negative), severity-stratified 80/10/10 split with seed 42.
73
+
74
+ **Positive-unlabeled caveat:** any pair not recorded in DrugBank is treated as non-interacting during training. This may underestimate false negatives, especially for less-studied drug pairs.
75
+
76
+ **Mechanism label provenance:** mechanism labels come from regex pattern-matching over DrugBank free-text descriptions. 19.1% of positive pairs match no mechanism keyword and are excluded from the mechanism head's training signal. Reported mechanism-head performance reflects the regex labels, not ground-truth pharmacology.
77
+
78
+ ## Evaluation
79
+
80
+ Single fixed test set (n = 13,002). GNN rows are this checkpoint; MLP row is the 5-fold CV ensemble (Morgan FP + PK) which **outperforms this model on every aggregate metric except calibration**.
81
+
82
+ | Model | Accuracy | Macro-F1 | Sev AUROC | Mech AUROC | ECE |
83
+ | --- | --- | --- | --- | --- | --- |
84
+ | **GNN+PK (this model)** | 0.862 | 0.748 | 0.973 | 0.948 | **0.008** |
85
+ | MLP baseline (5-fold ensemble) | **0.955** | **0.896** | **0.991** | **0.984** | 0.011 |
86
+
87
+ McNemar p < 10⁻⁢ for the MLP-vs-GNN comparison; paired-bootstrap 95% CI of the accuracy gap is [0.087, 0.099]. The GNN's only edge over the MLP is on rare-class Minor recall (0.88 vs 0.68) and overall calibration (ECE 0.008 vs 0.011) β€” both at the cost of severe over-alerting (Minor precision 0.36 vs 0.87).
88
+
89
+ On TB-relevant subsets (Section 5.5 of the manuscript), all models degrade. GNN+PK calibration jumps from 0.008 on the full test set to 0.091 on first-line TB pairs and 0.135 on ARV co-administration pairs. The model that looks well-calibrated overall is poorly calibrated on the specific subgroups most relevant for TB-HIV prescribing.
90
+
91
+ A perfect (16/16) rifampin CYP-induction precision/recall was obtained on the rifampin pairs that survived alias correction β€” but n=16 is far too small to validate the model for clinical use.
92
+
93
+ ## Files
94
+
95
+ | File | Description |
96
+ | --- | --- |
97
+ | `ddi_best.pt` | Full multi-task GNN+PK, best validation checkpoint |
98
+ | `ablation_gnn_only.pt` | Same architecture without the PK branch (severity acc 0.849) |
99
+ | `ablation_pk_only.pt` | PK branch only, no molecular graph (severity acc 0.635) |
100
+ | `ablation_single_task.pt` | Full architecture trained on severity only, mechanism loss disabled (severity acc 0.851) |
101
+ | `manuscript.pdf` | Full audit write-up (Section 3 has architecture; Section 4 has data pipeline including the leakage correction; Section 5 has full results) |
102
+
103
+ The baseline (RF, MLP, XGB) checkpoints live in the GitHub repository's `models/` directory if regenerated locally; they are not mirrored here because they're sklearn `.pkl` files and not the focus of the model card.
104
+
105
+ ## How to load
106
+
107
+ ```python
108
+ import torch
109
+ from gnn import DDIModel # from the GitHub repo
110
+ from config import ProjectConfig
111
+
112
+ cfg = ProjectConfig()
113
+ model = DDIModel(cfg.atom, cfg.gnn)
114
+ state = torch.load("ddi_best.pt", map_location="cpu", weights_only=True)
115
+ model.load_state_dict(state)
116
+ model.eval()
117
+ ```
118
+
119
+ You will need the code from the [GitHub repository](https://github.com/jsf3467v/multi-task-ddi-audit) β€” the checkpoint is a `state_dict` that requires the `DDIModel` class to instantiate.
120
+
121
+ ## Limitations
122
+
123
+ Single-benchmark audit; cross-benchmark validation is needed before generalizing the three findings. Mechanism labels are regex-derived from DrugBank free text. Positive-unlabeled assumption on negatives may underestimate false negatives. Cold-start evaluation is structurally empty on this benchmark (finding 2). The TB cohort includes only 18 drugs that passed the alias-corrected merge with sufficient test coverage; newer agents (delamanid, pretomanid, dolutegravir) lack test pairs. Encoder is a moderate-depth GATv2 without pretraining; pretrained encoders may shift absolute metrics but are unlikely to overturn the audit's conclusions, since the fundamental asymmetry β€” Morgan fingerprints encode 2,048 bits of substructural information directly while the GNN must learn it from 104,011 pairs β€” remains.
124
+
125
+ ## Citation
126
+
127
+ ```bibtex
128
+ @misc{keith_ddi_audit_2026,
129
+ author = {Arlene Keith},
130
+ title = {Validation Gaps in Drug-Drug Interaction Prediction Benchmarks for Tuberculosis-HIV Pharmacotherapy},
131
+ year = {2026},
132
+ note = {Capstone project, AI in Healthcare, Johns Hopkins University, Spring 2026, unpublished},
133
+ url = {https://github.com/jsf3467v/multi-task-ddi-audit}
134
+ }
135
+ ```
136
+
137
+ ## Acknowledgements
138
+
139
+ DrugBank (Wishart et al., 2018) and DDInter (Xiong et al., 2022) are the data sources. The audit framing builds on prior clinical ML benchmark critiques by Wong et al. (2021), Kapoor and Narayanan (2023), Huang et al. (2021), and Shen et al. (2025). Full references are in the manuscript.