Drug repurposing often starts as a hypothesis: a known compound might help treat a disease beyond its original indication. A good example is Minoxidil: It was initially prescribed to treat high blood pressure, but was later proven to be beneficial against hair loss. Knowledge graphs are a natural place to look for such hypotheses because they encode biomedical entities (drugs, genes, phenotypes, diseases) and their relationships. In kindergarten terminology, this reuse process can be framed as a triple (Minoxidil, treats hair loss). However, many association prediction methods trade interpretability for initial accuracy, making it difficult for scientists to know why a proposed drug works. We believe that for AI to function as a reliable scientific tool, it must provide scientifically grounded explanations, not just results. A good explanation connects the dots through well-established biology (eg, VEGF regulation promotes hair follicle survival).
From predictions to explanations
Submit our work Rexa reinforcement learning approach that not only predicts but also explains potentially promising drug-disease pairs Why. Instead of optimizing just for accuracy, REx trains an agent to traverse a biomedical knowledge graph while being rewarded for producing paths that combine the two. sincere To predict and Scientifically relevant.
A pathway is considered valid when it successfully links the drug to the disease under investigation, and is relevant when it includes specific, information-rich biomedical entities rather than generic entities. To measure this importance, we developed a new scale based on: Information content (IC)which favors more specific biological concepts such as “VEGF signaling pathway” over broad concepts such as “cancer.”
The reward mechanism encourages the model to search for concise and meaningful chains of reasoning, similar to the way a researcher can relate empirical evidence across different fields. As a result, REx shifts focus from… “Can we predict this connection?” to “Can we justify this connection scientifically?”
How does Rex work?
REx trains a reinforcement learning agent to explore the biomedical knowledge graph step by step, moving from the drug node towards the disease node. At each step, the agent decides whether to follow an outgoing relationship (e.g. interact_with or regulates) or stop if you reach a meaningful endpoint.
To encourage scientifically sound reasoning, the agent’s reward combines two signals:
- Fidelity: Whether the pathway successfully reaches the target disease.
- Relevance: How useful a path is, based on the average information content of its entities.
By multiplying these two rewards, REx ensures that the highest-scoring explanations are correct and useful. The model also includes an early stopping mechanism: once a disease node is reached, the agent stops rather than roaming through redundant connections.
Once relevant paths are found, REx groups them by metapath pattern: their type of structural inference (e.g. medicine → The gene → illness). It then combines the best representatives of each pattern into a combined annotation subgraph. To add biological context, REx enriches this subgraph with ontology terms from the National Cancer Institute (NCIT) Dictionary and Chemical Entities of Biological Interest (ChEBI), ensuring that each interpretation corresponds to well-defined biomedical concepts.

Why is this important?
REx not only makes predictions, it helps scientists understand them. By rewarding both accuracy and biological relevance, the REx system finds trains of thought that reflect scientific thinking. This makes it possible to verify the validity of hypotheses generated by artificial intelligence, and not just generate them. In drug repurposing, this distinction is crucial: a prediction is only useful if we can understand the reasons why it might be correct.
By turning explainability into a reward-worthy goal, REx shows that explainability and performance can mutually enhance, rather than compete.
Future trends
Like most systems built on knowledge graphs, the reach of REx depends on the completeness of the available data. As biomedical diagrams become richer, we expect interpretations to become more detailed and precise.
We are now working to expand the scope of REx beyond drug repurposing into related areas e.g Drug recommendation and Drug-target interaction prediction. In all of these areas, the goal remains the same: to create artificial intelligence systems capable of reasoning and explaining to scientists.
Available resources
This work was presented at IJCAI2025.
Susana Nunes
He is a PhD candidate in Computer Science at the Faculty of Sciences of the University of Lisbon.

Susana Nunes is a PhD candidate in Computer Science at the Faculty of Sciences of the University of Lisbon.
Katia Pisquita
He is an Associate Professor of Computer Science at the Department of Informatics, Faculty of Sciences, University of Lisbon.

Katia Pescetta is Associate Professor of Computer Science at the Department of Informatics at the Faculty of Sciences at the University of Lisbon.







