Taking two drugs can cause side effects that neither drug alone causes. With 1,000+ approved drugs, there are 500,000+ possible pairs — far too many to test in clinical trials. Decagon predicts them from a graph.
An elderly patient takes 8 drugs daily: for heart disease, diabetes, depression, and arthritis. This is polypharmacy — the simultaneous use of multiple medications. In the US, 40% of adults over 65 take 5+ drugs. For patients over 80, that number is over 50%.
The problem: drug combinations can cause polypharmacy side effects — adverse reactions that occur when drugs A and B are taken together, even when each is safe alone. Drug A might inhibit the enzyme that metabolizes Drug B, causing B to accumulate to toxic levels. Or both drugs might amplify each other's cardiac effects.
With n drugs, there are n(n-1)/2 possible pairs. Drag the slider to see how fast the number of pairs grows.
Existing databases (DrugBank, TWOSIDES) contain known interactions, but are vastly incomplete. The question is: can we predict which drug combinations are dangerous — and what side effects they cause — from the molecular mechanism of the drugs?
Decagon builds a multimodal, multirelational graph combining three types of information: how drugs work (molecular targets), how proteins interact (protein network), and what combinations cause what effects (known side effects).
| Edge Type | Meaning | Count |
|---|---|---|
| Drug–Protein | Drug targets this protein (binds, inhibits, activates) | 18,596 edges |
| Protein–Protein | Physical protein-protein interaction (PPI) | 719,402 edges |
| Drug–Drug (×964 types) | This pair causes this specific polypharmacy side effect | 4,649,441 edges |
The Decagon graph has two node types (drugs and proteins) and hundreds of edge types. Click a drug node to see its connections.
Decagon is a graph autoencoder built on R-GCN (Relational Graph Convolution). The encoder learns node embeddings from the heterogeneous graph. The decoder predicts new drug-drug interaction edges.
The encoder processes the drug-protein-protein graph using a multi-relational GCN. For each node v, at each layer, it aggregates messages from neighbors, but uses different weight matrices for different edge types:
Where R is the set of relation types, Nr(v) is the neighbors of v under relation r, and cr,v is a normalization constant. For Decagon, the relations are: drug-targets-protein, protein-interacts-protein (note: proteins don't aggregate from drug edges — the encoder respects the bipartite structure).
Follow the data flow from input features through R-GCN layers to the final side-effect-specific decoder. Click "Step" to advance through the pipeline.
Given drug embeddings zi, zj from the encoder, the probability that drug pair (i, j) causes polypharmacy side effect r is:
Where Dr is a diagonal matrix (per side effect, per drug) and Rr is a global matrix for side effect r. This is essentially a DistMult-style decoder with an extra per-relation diagonal scaling. The decoder has separate parameters for each of the 964 side effects.
At test time, Decagon answers questions like: "What is the probability that taking Warfarin (a blood thinner) together with Aspirin causes thrombocytopenia (low platelet count)?"
This is framed as a link prediction problem on the drug-drug multirelational graph. For each side effect type r, we want to predict which drug pairs (i, j) have the corresponding edge.
Modeling all side effects together (rather than 964 separate binary classifiers) is crucial for generalization. Side effects that share biological mechanisms are correlated — if drug pair (A,B) causes bradycardia, it's more likely to also cause hypotension (both are cardiovascular). The shared encoder zi, zj captures this correlation, improving prediction on rare side effects that have few training examples.
Decagon is trained as a graph autoencoder: maximize the likelihood of observed drug-drug interaction edges (positive examples), and minimize it for unobserved edges (negative examples). The loss is a cross-entropy over positive and negative drug pairs for each side effect type.
Where Er is the set of known drug pairs causing side effect r. For the negative samples, they use a fixed ratio of negative:positive pairs, sampling random drug pairs not known to have the interaction.
python (simplified) # R-GCN forward pass (encoder) def encode(x_drug, x_prot, adj_dp, adj_pp): # Layer 1: aggregate from neighbors by relation type h_drug = relu(W0_drug @ x_drug + W_dp @ (adj_dp @ x_prot)) # drug ← protein h_prot = relu(W0_prot @ x_prot + W_pd @ (adj_dp.T @ x_drug) + # prot ← drug W_pp @ (adj_pp @ x_prot)) # prot ← prot # Layer 2: repeat z_drug = W_out_drug @ h_drug return z_drug # (n_drugs, latent_dim) # Decoder for side effect r def decode(z_i, z_j, D_r, R_r): # DistMult-style with per-drug diagonal scaling score = z_i @ D_r @ R_r @ D_r @ z_j return sigmoid(score) # Training loss for side effect r def loss_r(z, positive_pairs, negative_pairs, D_r, R_r): pos_scores = [decode(z[i], z[j], D_r, R_r) for i,j in positive_pairs] neg_scores = [decode(z[i], z[j], D_r, R_r) for i,j in negative_pairs] return -sum(log(p) for p in pos_scores) \ -sum(log(1-p) for p in neg_scores)
Zitnik et al. evaluate Decagon on the TWOSIDES dataset, holding out 10% of drug-drug-sideeffect triples for testing. The primary metric is AUROC (area under the ROC curve) for distinguishing true drug-drug interactions from random pairs.
| Model | AUROC | AP (Avg Precision) | p@50 |
|---|---|---|---|
| DeepWalk (drug graph only) | 0.748 | 0.611 | 0.273 |
| Concatenation MLP | 0.793 | 0.697 | 0.311 |
| DistMult (KG baseline) | 0.782 | 0.671 | 0.295 |
| KGNN-LS | 0.822 | 0.724 | 0.358 |
| Decagon | 0.872 | 0.832 | 0.403 |
Decagon predicted that combining Simvastatin (a cholesterol drug) with Niacin would cause myopathy (muscle disease). This was not in TWOSIDES training data. A literature search confirmed: this combination is a known clinical concern — Niacin inhibits a transporter that normally exports Simvastatin from muscle cells, causing dangerous accumulation. The protein-level mechanism was correctly captured by the graph structure.
Decagon represents a new paradigm in computational pharmacology: using graph-based machine learning to prioritize safety testing for drug combinations. Instead of testing all pairs in the lab, use Decagon to predict the high-risk combinations, then validate those computationally and experimentally.
Decagon's graph structure encodes a key biological hypothesis: polypharmacy side effects arise when drugs affect overlapping parts of the protein interaction network. Two drugs that share protein targets, or whose targets are adjacent in the PPI network, are more likely to cause combination side effects. The R-GCN encoder propagates this network proximity into the drug embeddings.
Drug A targets proteins near Drug B's targets in the PPI network. Their combination perturbs the same biological pathway — causing a side effect neither causes alone. Move the slider to adjust protein network overlap.
The 964 side effects Decagon models span the major categories of drug-induced harm:
Decagon sits at the intersection of graph representation learning, knowledge graph completion, and computational biology. It opened a research area: graph neural networks for biomedical knowledge graphs.
| Method | Relation to Decagon |
|---|---|
| R-GCN (Schlichtkrull et al.) | The encoder architecture (published same year; Decagon independently extends it to bipartite setting) |
| DistMult | The decoder scoring function (extended with diagonal scaling) |
| DRKG (Drug Repurposing KG) | Extends Decagon's graph with disease, pathway, and genomic data |
| BioKG / KG4SL | Same paradigm applied to cancer synthetic lethality |
| Hetionet | Larger heterogeneous biomedical KG that inspired Decagon's design |
| COVID-19 drug repurposing (2020) | Multiple groups used Decagon-style models to predict COVID drug combinations |