NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

edge2vec: Representation learning using edge semantics for biomedical knowledge discovery

Zheng Gao, Gang Fu, Chunping Ouyang, Satoshi Tsutsui, Xiaozhong Liu, Jeremy J. Yang, Christopher Gessner, Brian Foote, David J. Wild, Ying Ding, Qi Yu

Abstract

Biomedical knowledge graphs (KGs) are characterized by a high degree of heterogeneity, featuring various entity types and complex semantic relationships. Traditional embedding methods like DeepWalk or node2vec often treat these graphs as homogeneous, failing to capture the rich information embedded in edge types. We introduce edge2vec, a novel framework that utilizes an Expectation-Maximization (EM) approach to automatically learn transition weights between different edge types. This allows for the generation of semantically-aware random walks without requiring manually defined metapaths. Our results on the Chem2Bio2RDF dataset show that edge2vec provides substantial improvements in entity classification and compound-gene bioactivity prediction over existing methods.

Introduction

In the biomedical domain, data is rarely uniform. Knowledge Graphs (KGs) integrate a "plethora of entity and association types"—where nodes represent drugs, genes, or diseases, and edges signify interactions like "inhibits," "is associated with," or "is a member of a pathway."

Most popular graph embedding methods are designed for homogeneous graphs, treating all edges as identical. While heterogeneous methods like metapath2vec exist, they rely on manually defined "metapaths" (sequences of node types). This approach is labor-intensive, requires deep domain expertise, and often fails to capture the full complexity of the network. The edge2vec framework addresses this by providing an automated way to learn edge semantics.

Methods

The edge2vec model operates in two primary phases: an EM-based framework for learning edge transitions and a skip-gram model for node embedding.

Overview of the edge2vec framework: (a) input heterogeneous graph, (b) EM-based transition matrix optimization and random walk generation, (c) skip-gram model for node embedding.

1. The EM Framework for Edge Transitions

The core innovation is the iterative learning of an Edge-Type Transition Matrix ($M$):

  • Expectation (E-step): The model performs random walks across the graph. Initially, these walks are unbiased.
  • Maximization (M-step): The model analyzes these walks to identify which edge types frequently co-occur. It uses Pearson correlation to measure these relationships and updates the transition matrix. If two edge types (e.g., "binds to" and "is expressed in") are statistically related in successful paths, their transition weight increases.
  • Sigmoid Transformation: A Sigmoid function is used to transform correlation scores into transition probabilities, ensuring weights remain between 0 and 1 and facilitating model convergence.

2. Node Embedding via Skip-gram

Once the transition matrix is optimized, the model generates a final set of biased random walks. These walks are treated as "sentences" of nodes. A standard skip-gram model (the architecture behind word2vec) is then employed to transform these sequences into low-dimensional vector embeddings.

Datasets

The model was evaluated using Chem2Bio2RDF, a massive, richly heterogeneous biomedical dataset.

The structure of the Chem2Bio2RDF medical data graph, illustrating the variety of node types (e.g., gene, compound, disease) and edge types (e.g., hprd, tissue, drug).
  • Composition: Integrates over 25 datasets, featuring 10 node types and 12 edge types.
  • Scale: Approximately 295,911 nodes and 727,997 edges.
  • Ground Truth: For bioactivity prediction, a separate dataset of 600,000 negative and 1.45 million positive compound-gene pairs was used.

Key Results

edge2vec was compared against four major baselines (DeepWalk, LINE, node2vec, and metapath2vec) across several critical tasks:

  • Entity Multi-classification: edge2vec achieved an F1-score of 0.7544, a significant improvement over the best baseline, LINE (~0.62).
  • Compound-Gene Bioactivity Prediction: In this drug discovery use case, edge2vec reached an AUROC of 0.8914, outperforming LINE (0.8058) and DeepWalk (0.7660).
  • Information Retrieval: For ranking potential drug-target bindings, edge2vec showed a ~10% improvement in precision and Mean Reciprocal Rank (MRR) compared to standard node2vec.

Discussion and Future Work

A key advantage of edge2vec is its ability to "discover" statistically significant relationships automatically, avoiding the "dilution" effect where high-frequency, low-information edges (like general protein-protein interactions) drown out rare, high-value data (like specific drug-target bindings).

Future improvements could include:

  • Refined Negative Sampling: Implementing node-type based sampling to increase embedding precision.
  • Hub Node Mitigation: Adding restriction rules to random walks to reduce bias from highly connected "hub" nodes.
  • Semi-Supervised Integration: Incorporating external node attributes, such as chemical structures or gene sequences, directly into the embedding process.

Summary updated

BibTeX
@article{gao2019edge,
  author = {Zheng Gao and Gang Fu and Chunping Ouyang and Satoshi Tsutsui and Xiaozhong Liu and Jeremy J. Yang and Christopher Gessner and Brian Foote and David J. Wild and Ying Ding and Qi Yu},
  title = {{edge2vec: Representation learning using edge semantics for biomedical knowledge discovery}},
  journal = {BMC Bioinformatics},
  year = {2019},
  doi = {10.1186/s12859-019-2914-2},
}
Figure