Predicting drug-gene relations via analogy tasks with word embeddings

Hiroaki Yamagiwa, Ryoma Hashimoto, Kiwamu Arakane, Ken Murakami, Shou Soeda, Momose Oyama, Yihua Zhu, Mariko Okada, Hidetoshi Shimodaira · DOI

TL;DR

This paper demonstrates that simple vector arithmetic on word embeddings trained on millions of PubMed abstracts can accurately predict drug-gene relations. By treating drug-target interactions as analogy tasks—similar to the classic "man is to king as woman is to queen"—the authors achieve performance comparable to state-of-the-art large language models (LLMs) like GPT-4o, proving that high-quality biological knowledge is spontaneously encoded in these high-dimensional spaces.

What Problem Does This Paper Address?

Identifying drug-gene relations (specifically drug-target interactions) is a cornerstone of drug discovery, but the sheer volume of biomedical literature makes manual extraction impossible. While modern Large Language Models (LLMs) are powerful, they are computationally expensive and can be "black boxes."

The authors wanted to see if "old-school" word embeddings—specifically the skip-gram model—could capture these complex biological relationships through simple linear algebra. The core question is: Does the "semantic direction" between a drug and its target gene remain consistent enough across an embedding space to allow for predictive analogies?

Methods

The researchers utilized skip-gram word embeddings (like Word2Vec) trained on approximately 35 million PubMed abstracts. They compared the pre-trained BioConceptVec (100 dimensions) with their own custom-trained embeddings (300 dimensions).

The key innovation is the application of the analogy task to biology. In standard NLP, you can find "queen" via the calculation $u_{king} - u_{man} + u_{woman} \approx u_{queen}$. The authors adapted this for drugs ($d$) and genes ($g$):

  1. Relation Estimation: They calculated a "mean relation vector" ($\hat{v}$) by averaging the vector differences ($u_g - u_d$) of known drug-gene pairs.
  2. Prediction: To find the target of a new drug, they simply added this relation vector to the drug's embedding ($u_d + \hat{v}$) and searched for the nearest gene vectors in the space.
Figure 1. Analogy computations by adding the relation vector. (a) Example of a basic analogy task. The question “If man corresponds to king, what does woman correspond to?” is solved by adding the relation vector vroyalty to uwoman. (b) Example of an analogy task in setting G. The target genes of the drug d are g1, g2, and g3, predicted by adding the relation estimator ˆv to the drug embedding ud.

They tested this in three settings:

  • Global: One relation vector for all drugs and genes.
  • Pathway-wise: Specific relation vectors for different biological pathways (e.g., the ErbB signaling pathway), acknowledging that "interaction" might mean different things in different biological contexts.
  • Chronological: Dividing the data by year to see if relations known in the past could predict "future" discoveries.

Datasets

  • Corpus: ~35 million PubMed abstracts (up to 2023).
  • Ground Truth Relations: Data from AsuratDB and the KEGG (Kyoto Encyclopedia of Genes and Genomes) database.
  • Pathways: Human biological pathways defined via the KEGG API.
  • Normalization: Used PubTator to ensure different names for the same gene or drug were mapped to a single unique ID.

Key Insights and Ideas

  • Spontaneous Relational Encoding: The embeddings were never explicitly taught drug-gene interactions; they acquired this relational structure spontaneously just by learning word co-occurrences in scientific text.
  • Context is King: Performance improved significantly when using pathway-wise relation vectors. This suggests that the "vector direction" of a drug-gene interaction is more consistent within a specific biological subsystem than across the entire genome.
  • Predicting the "Future": By training on abstracts published before a certain year, the model could predict drug-gene relations that were only discovered/published in later years. This highlights the model's potential for actual discovery rather than just retrieving known facts.
  • Linearity of Biology: The success of simple vector addition suggests that the underlying semantic space of biomedical concepts is surprisingly linear, at least for these specific types of relations.

Key Results

  • High Accuracy: In the pathway-wise setting, the custom 300-dimensional embeddings achieved a top-1 accuracy of approximately 0.60 and a top-10 accuracy of 0.88.
  • Comparison with LLMs: The simple vector addition method performed on par with GPT-4o and actually outperformed GPT-3.5 and GPT-4 in several metrics.
  • Robustness vs. KGE: Compared to Knowledge Graph Embedding (KGE) models like TransE, the analogy method was much more robust when training data was scarce. While TransE improves with more data, the analogy approach maintains consistent performance even with very few known pairs.
Comparison of Analogy and TransE performance

Limitations and Future Work

  • Static Embeddings: The study used static embeddings (one vector per word). This means a drug that acts differently in two different contexts is still represented by a single, averaged vector.
  • Out-of-Vocabulary (OOV) Issues: Skip-gram cannot handle words it hasn't seen during training.
  • Scope: The research focused exclusively on drug-gene relations. The authors suggest that future work should explore whether this analogy logic holds for other biological entities, such as disease-gene or mutation-drug relations.
  • Dynamic Embeddings: Moving toward transformer-based models (like BERT) that produce context-dependent embeddings could further refine these predictions.

Summary updated

BibTeX
@inproceedings{yamagiwa2025predicting,
  author = {Hiroaki Yamagiwa and Ryoma Hashimoto and Kiwamu Arakane and Ken Murakami and Shou Soeda and Momose Oyama and Yihua Zhu and Mariko Okada and Hidetoshi Shimodaira},
  title = {{Predicting drug-gene relations via analogy tasks with word embeddings}},
  booktitle = {Scientific},
  year = {2025},
  doi = {10.1038/s41598-025-01418-z},
}
Figure