Computational Drug Repurposing Methodology and Case Studies
Algorithms now systematize the accidental discoveries that once defined drug repurposing.

The serendipitous cases that defined what success looks like before algorithms existed
Before there were graph neural networks, there was just noticing things. Sildenafil, originally developed for cardiovascular disease, found a far more prominent use after an unexpected side effect emerged during trials. Thalidomide, withdrawn due to serious adverse effects, later found a second life in oncology; the biological mechanism only got explained well after the clinical effect had already been observed and used. Minoxidil started as a blood pressure drug, and an unexpected side effect observed during its use pointed the way to an entirely different therapeutic application.
What ties these together is simple: none of them were found by searching. They were found by paying attention to something unexpected, then having the presence of mind to ask why. That's a fine way to get lucky once, but a bad way to run a drug pipeline, because there's no repeatable process for noticing the next thalidomide-to-myeloma connection before it happens by accident. An industry that needs thousands of new indications a decade can't keep waiting around for a rheumatologist to notice something odd in a side-effect report.
These cases still matter, and not just as trivia. They work today as benchmarks: when a research team builds a new computational method, one of the first tests is whether it can rediscover sildenafil, thalidomide, or minoxidil from the underlying data without being told the answer ahead of time. A knowledge graph that can't find the connections humans stumbled into by chance is hard to trust with the connections nobody has stumbled into yet. That's the real question the rest of this piece is chasing: what does a systematic version of that search actually look like?
Structure-based methods: reading the geometry of a drug-target interaction
Start with the most literal version of repurposing: if a disease depends on a protein whose three-dimensional shape is known, and an existing drug's molecular shape happens to fit into that protein's binding pocket, the drug might work on the disease even though nobody designed it for that purpose. This is molecular docking, and it's the closest thing in this field to reading a lock and checking which keys in a drawer might turn it.
The protein structure comes from crystallography, cryo-EM, or increasingly from computational prediction tools like AlphaFold and the models that followed it. A library of known compounds gets screened against the target's binding pocket, each one scored for how tightly it's predicted to fit. The top scorers move on to actual lab testing, where reality gets the final word.
Here's the part worth being blunt about: a high docking score is a hypothesis, and treating it as anything more is where a lot of weak repurposing claims start. Docking scores measure geometry, not biological effect, and false positives cluster near the top of ranked lists more often than anyone would like. Machine learning is replacing older physics-based scoring formulas with learned scoring functions that better predict which geometric fits actually translate to real binding. The appeal for repurposing specifically is that a compound already proven safe in humans, if it docks well against a disease-relevant target, skips a huge chunk of toxicity work a brand-new molecule would need. Structure-based methods work best where a single protein plausibly causes the disease on its own: viral entry proteins, enzyme active sites, the kind of clean one-target, one-disease relationship biology doesn't always offer. Ask it to explain something like Alzheimer's, where dozens of genes misbehave at once, and it runs out of runway fast. That limitation is the reason the next four sections exist.
Transcriptomic signature matching: finding drugs that reverse a disease's gene expression pattern
A different starting point: skip protein shape entirely and look at gene expression instead. Diseases tend to leave a signature, a pattern of genes turned up or down relative to healthy tissue, and drugs leave signatures too, since every compound shifts cellular gene expression somehow. The logic of signature matching is that a drug whose signature runs roughly opposite the disease's signature might correct the imbalance rather than just coexist with it.
Large perturbation databases now catalogue how thousands of compounds shift gene expression across many cell lines, which makes this searchable at scale. In practice, the workflow pulls the genes turned up or down specifically in the disease, checks them against the perturbation database for compounds whose profiles run strongly opposite, then filters the resulting hits by whether they're already approved and safe to prescribe.
Recent published guidelines have mapped distinct types of gene expression data to multiple strategies for mining these large transcriptome datasets, a decent sign the method has moved past the experimental stage into something with standardized sub-protocols. Its real strength is that it doesn't need to know which protein causes the disease; it works even when the mechanism is a mystery. The catch, and it's a real one, is that it tells you what corrects the signature without telling you why. Mechanistic interpretation has to happen afterward, as a separate step, usually by someone in a wet lab checking whether the computer's opposite-signature match actually does anything to living cells.
Network pharmacology and systems biology: mapping disease as a broken network, not a single broken gene
Most diseases don't come from one broken gene. They come from a whole neighborhood of genes and proteins nudged out of balance together, which means a drug that touches just one node in that neighborhood can still ripple outward and change the whole picture. Network pharmacology treats disease this way explicitly, as a broken network rather than a broken part, and that model deserves to win out over the single-target view whenever a disease is genuinely polygenic. Alzheimer's is a case in point: it involves dozens of genes misbehaving together, and any pitch that promises a single-target drug for a disease this tangled should be met with real suspicion.
This approach layers protein-protein interaction maps, metabolic pathways, and disease-associated gene sets on top of each other, then looks for drugs whose known targets sit close, topologically, to the genes tied to the disease. That closeness, often called network proximity, becomes the repurposing signal itself. It also opens the door to polypharmacology: compounds that nudge several disease-relevant nodes at once rather than hitting one clean target.
One interesting wrinkle: disease comorbidity itself becomes a clue. If two diseases share enough underlying network architecture, a drug that works for one has a real shot at working for the other, a pattern the Annual Review of Biomedical Data Science survey highlights directly. This matters most for conditions like Alzheimer's, cardiovascular disease, and metabolic disorders, where dysregulation spreads across many genes and a single-target docking search would miss most of what's actually going wrong. The weak point here is unglamorous but real: the whole method leans on how accurate the underlying interaction networks are, and one poorly annotated edge quietly drags uncertainty into every prediction built on top of it.
Knowledge graphs: encoding the full complexity of biomedical relationships in a queryable structure
A knowledge graph takes every relevant kind of biological fact, genes, proteins, drugs, diseases, symptoms, and stores them as nodes connected by labeled edges describing how they relate. TxGNN's underlying graph, for scale, holds 123,527 nodes and 8,063,026 edges across 10 node types and 29 edge types. Nobody is curating that by hand; the scale alone forces automation.
Repurposing inference on a graph like this runs through graph neural networks, which learn a numerical representation, called an embedding, of each node based on everything connected to it. The trained model then predicts edges that don't exist yet in the data but probably should: a "treats" connection between a drug node and a disease node nobody had recorded before. Explainer components can trace back the specific multi-hop path of connections that led to a given prediction, which matters enormously once clinicians are asked to trust the output.
There's a real trade-off still unresolved here, and it's the one the field keeps tripping over. Recent research has found that the more complex graph models, the ones with the best predictive accuracy, run too slowly for practical clinical use, while the faster models don't carry enough expressive power to capture biomedical relationships properly. Nobody's cracked both at once yet. A 2024 review catalogued the major biomedical knowledge graphs, their data sources, and the repurposing methods built on top of them, evidence this field is formalizing quickly rather than staying a niche technique. It isn't purely theoretical, either: graph-based approaches have been applied to produce concrete candidate repurposing drugs for neurodegenerative and oncological conditions, illustrating what a graph query actually spits out at the end.
EHR and real-world data methods: what patient records reveal that lab data cannot
None of the methods above touch actual patients until late in the process. Electronic health records flip that: if people taking drug X for condition A show unexpectedly low rates of condition B, that's a repurposing hypothesis built directly from human biology in the wild, drawn from lived patient history rather than a cell line or a docking simulation.
What EHR data offers that lab-based methods simply can't is years of patient history: drug exposure, coexisting conditions, and outcomes tracked over time, across populations far more varied than any cell line or animal model captures. Adverse events show up in the same dataset as therapeutic benefits, side by side, which lab studies rarely offer in one place. EHR datasets offer longitudinal, real-world detail that supports both generating new repurposing hypotheses and checking ones already proposed.
The catch is confounding, and it's a serious one. Patients prescribed drug X are often systematically different from patients who aren't, in ways that might fully explain an outcome difference that has nothing to do with the drug itself. Because of that, EHR evidence should sit at the back of the queue, confirming a candidate a knowledge graph or transcriptomic method already flagged, never leading the search on its own. Triangulating across methods this way builds confidence before anyone spends money on a clinical trial. Rare diseases are where this becomes especially important: with only a small fraction of the roughly 7,000 known rare diseases carrying an FDA-approved treatment, EHR data may be the only real-world longitudinal evidence that exists at all for a given condition.
How AI and deep learning synthesize across all these methods
Every method above works with one kind of data, and AI's real contribution is combining them: learning jointly from structural, transcriptomic, network, graph, and clinical data inside a single model, producing a picture of drug-disease relationships at a resolution no single-source method reaches on its own.
Natural language processing adds its own piece: mining unstructured sources, research papers, clinical notes, patent filings, for signals that never made it into a structured database in the first place, a contribution described in Advanced Science in 2024. Foundation models push this further, training on huge amounts of biomedical data upfront so the resulting model can generalize even to diseases where very few known examples exist, the zero-shot capability that TxGNN, covered in more depth below, demonstrates directly.
The market reflects how fast this is moving: the AI-specific segment of drug repurposing was estimated at $1.26 billion in 2025, projected to reach $8.12 billion by 2035, a compound annual growth rate of 20.44%, the fastest-growing slice of an already growing field. Deep learning models can rank candidates with strong accuracy while offering no mechanistic explanation for why a candidate ranked where it did, and that's a real problem when a regulatory submission demands exactly that explanation. Explainability tools, like the module built into TxGNN, are active research, not a finished answer. AI-generated candidates carry the most weight when they trace back to an actual biological hypothesis, not just a statistical pattern nobody can account for.
Baricitinib and COVID-19: how a knowledge graph identified a treatment in days
Early 2020 offered nothing: no approved treatment for COVID-19, and a genuine emergency need to find something, anything, that might work while formal trials for new compounds were still years away. BenevolentAI queried its knowledge graph of structured medical information looking for a very specific kind of compound: one that could block the SARS-CoV-2 virus from entering cells while also calming the cytokine storm driving a large share of the deaths in severe cases.
The graph returned baricitinib, a drug already approved as a JAK 1 and 2 inhibitor for rheumatoid arthritis, and it came back in a matter of days, a fraction of the months a traditional literature search would have taken sifting through the relevant biology by hand.
What followed mattered more than the prediction itself. Baricitinib went on to show a real mortality benefit in hospitalized COVID-19 patients and received emergency use authorization, becoming the first immune-modulating drug shown to reduce COVID-19 deaths. The case demonstrates something specific about knowledge graph reasoning: the dual-mechanism hypothesis, blocking viral entry and suppressing cytokine storm at once, required reasoning across a network of relationships, a different kind of evidence than a single docking score against a single target could provide. Because baricitinib was already an approved drug with a known safety profile, the distance between a computational hint and a clinical authorization shrank dramatically. Still, the graph only generated the hypothesis, and actual trials had to confirm it worked, which is the honest limit of every method in this piece: computation speeds up the guess, but the experiment still has to prove the guess right.
TxGNN: a graph foundation model that covers 17,080 diseases, including those with no existing treatment
Most repurposing algorithms need training data in the form of drug-disease pairs already known to work. For common diseases, that data exists in abundance. Rare and neglected diseases mostly lack it, which is exactly why, of the roughly 7,000 rare diseases recognized worldwide, only a small fraction currently have an FDA-approved drug. Standard methods trained on well-studied diseases have nothing to learn from when asked about the others, and that gap is the actual argument for why a model like TxGNN needs to exist at all.
TxGNN, developed at Stanford and published in Nature Medicine in 2024, tries to close that gap. It's a graph neural network trained on a large, heterogeneous medical knowledge graph that ranks candidate drugs as either likely treatments or likely contraindications across 17,080 diseases, including many with no existing treatment at all. Under a strict zero-shot evaluation, meaning the model was tested on diseases it had effectively never seen training examples for, TxGNN improved indication prediction accuracy by 49.2% and contraindication prediction accuracy by 35.1% compared to eight benchmark methods, according to the original paper.
TxGNN also ships with an Explainer module that produces the multi-hop reasoning path behind each prediction, aimed directly at the interpretability gap that keeps black-box models out of serious clinical consideration. The number 17,080 is worth sitting with for a second: it represents the long tail of conditions drug companies have historically ignored, not from lack of medical need but because the economics of building a drug from scratch for a few thousand patients worldwide never worked out. A model that can generate credible candidates for those diseases anyway is doing something the traditional pipeline was never built to do in the first place.


