DDIAgents: Mechanism-Conditioned Context Flow for Drug-Drug Interaction Prediction

Zhenqian Shen, Yu Liu, Xiaoyi Fu, Quanming YaoarXiv 2026

TL;DR

DDIAgents is a novel multi-agent LLM framework that treats Drug-Drug Interaction (DDI) prediction as a dynamic knowledge orchestration problem. By dynamically instantiating specialized expert agents and routing mechanism-specific biomedical evidence to them, it significantly improves prediction accuracy—especially for rare, long-tail interactions—while providing transparent, human-readable clinical rationales.

What Problem Does This Paper Address?

Predicting drug-drug interactions (DDIs) is vital for patient safety and drug discovery, but it is an incredibly complex task. DDIs are driven by highly diverse biological mechanisms. For instance, one drug might alter how the body metabolizes another (a pharmacokinetic change), or two drugs might interfere with the same biological pathway (a pharmacodynamic effect).

Three DDI examples with different mechanisms requiring distinct knowledge and expertise.

Because the underlying mechanism changes from one drug pair to the next, the decisive evidence required to predict an interaction also changes. It might look like a molecular substructure, a path in a biomedical network, or a textual description in a medical journal.

Existing computational methods (whether feature-based, graph-based, or standard LLM approaches) rely on static reasoning patterns. They feed the exact same types of data into a fixed pipeline regardless of the drug pair. This rigidity leads to two major failure modes:

  1. Information dilution: Critical evidence gets buried under a mountain of irrelevant context.
  2. Cross-domain distraction: Specialized models or prompts are forced to process data outside their scope, degrading overall reasoning quality.

Methods

The authors introduce DDIAgents, a mechanism-conditioned multi-agent framework that dynamically adapts its team of "experts" and its data flow for every single drug pair query.

The overall framework of DDIAgents, illustrating the iterative three-stage process.

The framework operates in three iterative stages:

  1. Expert Agent Instantiation: Given a DDI query, a planner agent assembles a team of specialized LLM experts. In the first round, it defaults to a core team: a Pharmacist, a Pharmacokineticist, and a Pharmacologist.
  2. Dynamic Context Flow: Instead of broadcasting all available data to every agent, the planner strategically routes specific subsets of heterogeneous knowledge (Molecular Structural, Biomedical Relational, or Semantic Contextual) to the agents whose expertise matches that data.
  3. Analysis and Decision Making: The expert agents generate domain-specific analyses, which a conclusion agent attempts to synthesize into a final prediction.

If the conclusion agent detects unresolved contradictions or high uncertainty, it triggers a feedback loop. It generates guidance for the next iteration, prompting the planner to instantiate new, highly specific experts (e.g., a Toxicologist or a Hepatologist) and reroute the context flow to resolve the ambiguity.

Datasets

The framework was evaluated on two widely used public DDI benchmarks, split using a realistic approval-time-based protocol to simulate real-world deployment (separating known drugs from newly approved ones):

  • DrugBank: A multiclass dataset featuring 86 distinct interaction types. Evaluated using Accuracy and Macro F1-Score.
  • TWOSIDES: A multilabel dataset recording 209 possible side effects. Evaluated as a recommendation/ranking task using Hit@5 and NDCG@5.

The evaluation focused on the hardest scenarios: S1 (known–new) and S2 (new–new) drug interactions.

Key Insights and Ideas

  • DDI Prediction is Knowledge Orchestration: The core "aha moment" is that DDI prediction shouldn't be treated as a single-pattern learning problem. Performance gains in multi-agent systems come from how information is allocated, not just agent collaboration.
  • Dynamic over Static Broadcast: Traditional multi-agent systems broadcast all information to all agents. DDIAgents proves that restricting an agent's context to role-aligned data yields deeper, more accurate reasoning.
  • Exceptional Long-Tail Performance: Because DDIAgents relies on collaborative, rule-based agent reasoning rather than just memorizing high-frequency data patterns, it scales remarkably well on rare, data-sparse drug interactions where traditional machine learning models completely fail.

Key Results

DDIAgents consistently outperformed feature-based, graph-based, single-LLM, and static multi-agent baselines across all tasks.

  • DrugBank (S2 Task): DDIAgents achieved a 13.77% relative improvement in F1-Score over the best-performing baseline, demonstrating its strength on newly introduced drugs.
  • TWOSIDES (S2 Task): It increased NDCG@5 by 7.15%, showing superior capability in ranking multiple potential side effects.
  • Ablation Studies: Removing the dynamic context flow component (w/o DynKnow) caused the largest drop in performance, validating that selective data routing is the framework's most critical innovation.
DDI prediction performance across frequency bins, highlighting strong performance on long-tail types.

Qualitatively, evaluations judged by GPT-4o showed that DDIAgents provided significantly more thorough, diverse, and rational explanations than generic multi-agent frameworks.

Limitations and Future Work

While powerful, the current implementation of DDIAgents relies on a fixed collaboration protocol (the sequence of planner $\rightarrow$ experts $\rightarrow$ conclusion agent is predetermined). The authors note that true adaptability would involve allowing the agents to dynamically alter their interaction patterns based on the context. Additionally, the framework is currently limited by the types of knowledge sources it can ingest; future work aims to integrate a broader array of biomedical modalities to prevent omitting clinically decisive evidence.

Summary updated

BibTeX
@misc{shen2026ddiagents,
  author = {Zhenqian Shen and Yu Liu and Xiaoyi Fu and Quanming Yao},
  title = {{DDIAgents: Mechanism-Conditioned Context Flow for Drug-Drug Interaction Prediction}},
  year = {2026},
  eprint = {2606.31085},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.31085},
}
Figure