When a drug turns out to help patients for an unexpected reason, the mechanism usually stays a guess. Aspirin looked protective for COVID-19 patients in a large health-record cohort but did nothing to the virus in cell culture. Simvastatin slowed disability in progressive multiple sclerosis, yet not through lowering cholesterol. Computational tools for finding a drug's mechanism of action, meaning the molecular target and pathway through which it produces its effect, can propose dozens of candidate targets per drug. They work entirely from cell lines, literature graphs, and docking, so they cannot say which candidate produces the effect seen in people. Retrospective cohort studies, which reuse routinely collected patient records, can measure that effect. They are normally run one drug at a time, so they report that a drug works, never through which target.
This note proposes using the records to test the mechanisms directly. Each candidate mechanism predicts a pattern across many drugs. Drugs that hit the same target should share the clinical effect. Drugs with the same indication but a different target should not. We turn each candidate mechanism into a set of head-to-head comparisons between drugs used for the same purpose, estimate all of them in one cohort, and keep the mechanism whose predicted pattern matches. The records then act as a filter on computationally proposed targets, applied before any wet-lab work.
Core Claim
A target hypothesis can be tested in observational data if it is turned into predictions about differences between drugs rather than about a single drug versus non-users. Comparisons between two drugs prescribed for the same indication (an "active-comparator new-user" design) largely remove confounding by indication. That confounding, where doctors choose treatments based on prognosis, is the main weakness the file identifies for retrospective cohorts. If the drug pairs are chosen so they differ mainly in their engagement of one candidate target, each comparison becomes informative about that target. We claim that a set of such contrasts, scored jointly against each candidate mechanism, identifies the responsible target better than two alternatives. The first is ranking targets from cell-line data alone. The second is running separate per-drug cohort studies and then looking for target enrichment among the drugs that showed an effect.
Write $c_k(d) \in [0,1]$ for the engagement of drug $d$ on candidate target $k$, taken from curated annotations or predicted by a pharmacogenomic model. Write $\hat\tau_{dd'}$ for the estimated effect of drug $d$ versus comparator $d'$ on the outcome, with standard error $s_{dd'}$. Each mechanism $k$ is scored by how well a single effect size $\beta_k$ explains all contrasts:
$$ S_k = \min_{\beta_k} \sum_{(d,d')} \frac{\big(\hat\tau_{dd'} - \beta_k\,[c_k(d) - c_k(d')]\big)^2}{s_{dd'}^2 + \sigma^2_{\text{sys}}}, $$
Here $\sigma^2_{\text{sys}}$ is residual systematic bias. We estimate it from negative-control outcomes, which are outcomes no candidate mechanism should affect, so that confounding-driven noise does not look like signal. Lower $S_k$ means the mechanism fits better. When a laboratory measurement sits on the hypothesized pathway, such as platelet counts, D-dimer, or LDL cholesterol, we add a second check: the mediated share of each contrast should scale with the same engagement difference.
Relation to Prior Work
The closest work is the integrated COVID-19 pipeline in Drug Repurposing for COVID-19 using Graph Neural Network with Genetic, Mechanistic, and Epidemiological Validation. It ranks drugs with a graph neural network over a virus–host knowledge graph and then checks the top candidates in an Optum record cohort of more than 140,000 patients. That paper motivates this proposal. It surfaced the aspirin conflict and called such conflicts "features, not bugs." It used the cohort only as a yes/no filter per drug and never asked which target explained the clinical effect. We keep its two ingredients and change how the cohort is used: instead of confirming drugs, it adjudicates between targets.
The second motivating paper is Applying causal models to explore the mechanism of action of simvastatin in progressive multiple sclerosis. It compared a cholesterol-mediated and a cholesterol-independent causal model in 140 trial patients. The independent model was more than 42 times more probable by Akaike weights, and the direct effect explained 69% of the delay in disability worsening. That work shows mechanism comparison is possible in human data. It also shows the limit: mediation through one biomarker can reject the canonical pathway but cannot name the alternative target. Our multi-drug contrasts are designed to name it. A Bayesian approach to mediation analysis predicts 206 causal target genes in Alzheimer's disease supplies a useful framing. It separates true mediation from horizontal pleiotropy by modeling all candidates in a region jointly with sparsity. We borrow that idea by scoring candidate targets jointly rather than one at a time, but our "instruments" are drug choices rather than genetic variants.
The candidate-target generators come from methods we reuse rather than compete with. Large-scale integration of heterogeneous pharmacogenomic data for identifying drug mechanism of action (Mania) embeds drugs from chemical fingerprints, L1000 expression responses, and cancer cell-line sensitivity. It reports an area under the precision-recall curve of 0.892 and top-1 recall of 0.350 for mechanism-class prediction against the Drug Repurposing Hub. A novel approach for target deconvolution from phenotype-based screening using knowledge graph narrows 1,088 proteins to 35 using graph structure and docking. Both are the "proposal" stage. Both inherit cell-culture artifacts and the bias toward heavily studied proteins that the file highlights. Our cohort stage is meant to prune their lists. DrugCLIP: Contrastive Drug-Disease Interaction For Drug Repurposing maps molecules directly to disease codes, reaching 57.8% Hit@10% on a 2018–2020 temporal split. It deliberately skips targets, so it constrains rather than competes: it shows strong drug–disease retrieval is possible without mechanism, which is why our evaluation must reward naming the target, not predicting the indication. Finally, Therapeutics Data Commons reports drug–target interaction correlation dropping from about 0.7 to about 0.4 under temporal splits. That is a warning that computational target scores, our $c_k(d)$, will be noisy. The scoring must tolerate noise in engagement values.
Research Program
The work has three parts.
The first part is a contrast designer. For each drug–outcome association of interest, it takes the candidate targets from Mania and the knowledge-graph sieve, together with curated targets from the Drug Repurposing Hub. It then searches the formulary for comparator drugs that share the index drug's indication but differ in engagement of each candidate. In the aspirin case, the competing hypotheses are irreversible platelet COX-1 inhibition, general COX-mediated anti-inflammation, and the graph network's predicted host-protein targets. Clopidogrel shares antiplatelet action through a different receptor. Ibuprofen shares COX inhibition with weaker sustained antiplatelet effect. Acetaminophen shares the analgesic indication with little of either. Each hypothesis predicts a different sign pattern across these pairs. The designer favors pairs where the hypotheses disagree, because those pairs carry the most information.
The second part is the cohort engine. It estimates each contrast with an active-comparator new-user design. Propensity scores are fit on baseline covariates within each pair, as in standard practice such as Tewari et al.. Every pair is run against a shared panel of negative-control outcomes, which calibrates $\sigma^2_{\text{sys}}$. Where a pathway lab is recorded, a mediation estimate is added.
The third part is the scorer. It computes $S_k$ and the mediator-consistency check for every candidate. It reports a ranked list with calibrated uncertainty, and it can report "no candidate fits" when the true mechanism is missing from the list.
Baselines
The naive reference point is the computational ranking alone: the candidate order produced by Mania embeddings plus knowledge-graph scores, with no patient data. This is what a target-deconvolution study would hand to a wet lab today. For the related mechanism-class task, the strongest reported number is Mania's top-1 recall of 0.350 on Drug Repurposing Hub mechanism classes, from Large-scale integration of heterogeneous pharmacogenomic data for identifying drug mechanism of action. That task is not ours, so we rerun Mania on our benchmark with the same candidate sets. No reported result was found on Lacuna for ranking targets of a clinical effect using cohort data. Beating the naive baseline means a higher top-1 recall of the true target on the benchmark below, with a paired bootstrap interval excluding zero.
The strongest competitor is per-drug cohorts followed by enrichment. We estimate each drug's effect separately, against non-users with propensity matching and against the same comparator pool. We then rank targets by how enriched they are among drugs with significant protective estimates. This uses exactly the same records, covariates, and drugs as our method, and it is what an experienced pharmacoepidemiologist would do. To keep the comparison fair, both methods get identical propensity models, the same negative-control calibration, and the same tuning budget for any thresholds. The only difference is that our method uses designed pairs and joint scoring. Beating it means higher top-1 recall and better calibration of the "true target" probability on the benchmark.
Two ablations isolate the key ingredient. The first replaces designed comparator pairs with randomly chosen same-indication pairs of equal number. This tests whether the contrast design, not just the joint scoring, matters. The second drops the negative-control variance term. This tests whether calibration is what keeps confounded contrasts from producing false mechanism calls. A third ablation removes the mediator check, which shows whether lab data add anything beyond the contrasts.
Why not just…?
Why not just run mediation through a pathway biomarker, as the simvastatin study did? That approach is strong when the hypothesis is "canonical biomarker or not." Applying causal models to explore the mechanism of action of simvastatin in progressive multiple sclerosis used it to rule out cholesterol. Once the canonical pathway is rejected, it has nothing left to test, because the alternative targets usually have no routinely measured biomarker. Mediation also assumes no unmeasured confounding of the mediator–outcome link, which health records rarely support. We keep mediation as a secondary check. The ablation without the mediator will show how much the contrasts carry on their own. If mediation alone matches our method on targets that have measured biomarkers, we will say so and restrict the claim to targets without such biomarkers.
Why not just run separate cohort studies per drug and look for shared targets? This is the real threat. It uses the same data, and with enough drugs it could recover the same signal. It falls short in two ways. Per-drug comparisons against non-users inherit confounding by indication, and that confounding differs by drug, so enrichment can reflect which drug classes are prescribed to healthier patients. It also does not choose drugs where the hypotheses disagree, so many estimates carry no mechanism information. The fair head-to-head baseline above is built to settle this. If enrichment matches us, the contribution shrinks to the calibration step, and we would reframe the paper around that.
Why not just trust in vitro and in silico deconvolution and skip messy records? The pipeline in Drug Repurposing for COVID-19 using Graph Neural Network with Genetic, Mechanistic, and Epidemiological Validation already found that cell assays miss host-mediated effects such as aspirin's. The temporal-split collapse in Therapeutics Data Commons shows that computational target scores generalize poorly. The naive baseline measures this directly on our benchmark.
Why not just predict the clinical outcome end to end, as DrugCLIP or tabular models do? These models answer a different question. DrugCLIP's 57.8% Hit@10% is drug–disease retrieval, with no target. Tabular models on clinical features plateau: in A Machine Learning Approach to Predicting Heterogeneous Lipid Responses to Statins in Type 2 Diabetes, the explained variance in cholesterol change was 0.040 for HDL and 0.188 for triglycerides. Good prediction does not identify a mechanism, and our metric scores only mechanism identification.
Proposed Experiments
The central experiment is a known-mechanism benchmark in which the answer is fixed in advance. We assemble drug–lab-effect pairs whose responsible target is textbook and annotated in the Drug Repurposing Hub. Examples are rises in potassium from drugs acting on the renin–angiotensin–aldosterone axis versus from sodium-channel blockade, INR changes on anticoagulants, and LDL reduction on statins. For each pair, the true target is hidden inside the candidate list that Mania and the knowledge-graph sieve generate. We run all methods on MIMIC-IV, the public record set behind Revisiting Clinical Outcome Prediction for MIMIC-IV. Lab outcomes avoid the rare-label precision-recall collapse that paper documents, where an area under the ROC curve of 86.86% came with a PR-AUC of 17.24%. The metrics are top-1 recall and mean reciprocal rank of the true target, plus calibration of the scorer's posterior.
A semi-synthetic version adds a planted target effect on real covariates and prescriptions, with injected unmeasured confounding of known strength. This maps out when the negative-control term rescues the method and when it does not.
The application experiment returns to the open conflict in the COVID-19 pipeline. In Optum or a comparable record set, we estimate the aspirin–clopidogrel–ibuprofen–acetaminophen contrasts, along with comparators matched to the graph network's predicted host targets. We then report which hypothesis fits. A secondary analysis applies the same design to statin pleiotropy. Lipophilic and hydrophilic statins with matched LDL lowering separate the cholesterol-independent mechanism suggested by the MS-STAT analysis from potency effects.
The decisive check is pre-registered. If designed contrasts do not beat per-drug enrichment on top-1 recall in the known-mechanism benchmark, or if the random-pair ablation performs as well as designed pairs, then the design idea has failed. We would report the calibrated enrichment pipeline as the result instead.
References
- Drug Repurposing for COVID-19 using Graph Neural Network with Genetic, Mechanistic, and Epidemiological Validation
- Applying causal models to explore the mechanism of action of simvastatin in progressive multiple sclerosis
- A Bayesian approach to mediation analysis predicts 206 causal target genes in Alzheimer’s disease
- Large-scale integration of heterogeneous pharmacogenomic data for identifying drug mechanism of action
- A novel approach for target deconvolution from phenotype-based screening using knowledge graph
- DrugCLIP: Contrastive Drug-Disease Interaction For Drug Repurposing
- Therapeutics Data Commons: Machine Learning Datasets and Tasks for Therapeutics
- Long-Term Survival in Men With High Grade Prostate Cancer: A Comparison Between Conservative Treatment, Radiation Therapy and Radical Prostatectomy—A Propensity Scoring Approach
- A Machine Learning Approach to Predicting Heterogeneous Lipid Responses to Statins in Type 2 Diabetes
- Revisiting Clinical Outcome Prediction for MIMIC-IV