Similarity search in knowledge graphs using meta paths

Relational data in biological systems – such as the cellular interactome, single cell similarity graphs, gene co-expression networks, and patient interaction networks – can be represented by graph structures. Biological networks are often comprised of diverse data modalities; thus, they are poorly modeled by homogenously typed networks. Instead, interconnected objects from various modalities can be represented as a single multigraph with heterogeneous knowledge-informed node and edge types. We develop metapaths, an R software package to implement meta paths and perform meta path-based similarity search in biological knowledge graphs.

Meta paths are a general graph-theoretic approach for flexible similarity search in large networks. While they are widely used in biomedical network analysis, there is currently no package available in R that would offer a wide range of support for meta paths.

Meta paths are sequences of node types that define a walk from the origin node to the destination node. Informative metapaths in knowledge graphs (KGs) are often engineered by hand based on domain knowledge or expertise (e.g., the meta path DRS is clinically meaningful, since it describes associations between a disease and the side effects of its treatments, whereas the meta path PSF would not be). Alternatively, optimal meta paths can be discovered in an unsupervised fashion by feature selection metrics (e.g., maximal spanning tree, Laplacian score, or ranking based on meta path frequency or uniqueness), among other approaches. Once informative meta paths for a given KG have been defined, these meta paths define the semantics of the relationships between nodes in the KG, enabling down-stream machine learning analyses such as link prediction, node classification, and subgraph prediction.

Although various algorithms exist to model meta path-based node simi-larities in a KG, a unifying framework is lacking to compute and compare these similarity scores. We introduce metapaths/ which introduces meta paths in the R ecosystem. The metapaths package enables the computation of meta-path-based similarity search in heterogeneous KGs.

Publication

metapaths: similarity search in heterogene-ous knowledge graphs via meta paths
Ayush Noori, Amelia L.M. Tan, Michelle M. Li, and Marinka Zitnik
Bioinformatics 2023

@article{noori2023metapaths,
  title={metapaths: similarity search in heterogeneous knowledge graphs via meta paths},
  author={Noori, Ayush and Li, Michelle M and Tan, Amelia LM and Zitnik, Marinka},
  journal={Bioinformatics},
  pages={btad297},
  year={2023},
  publisher={Oxford University Press}
}

Code

Implementation in R together with documentation and examples of usage is available in the GitHub repository.

Authors

Latest News

Mar 2025:   On Biomedical AI in Harvard Gazette

Read about AI in medicine in the latest Harvard Gazette and New York Times.

Mar 2025:   TxAgent: AI Agent for Therapeutic Reasoning

TxAgent is an AI agent for therapeutic reasoning that consolidates 211 tools from trusted sources, including all US FDA-approved drugs since 1939 and validated clinical insights. [Project website] [TxAgent] [ToolUniverse]

Mar 2025:   Multimodal AI predicts clinical outcomes of drug combinations from preclinical data

Mar 2025:   KGARevion: AI Agent for Knowledge-Intensive Biomedical QA

KGARevion is an AI agent designed for complex biomedical QA that integrates the non-codified knowledge of LLMs with the structured, codified knowledge found in knowledge graphs. [ICLR 2025 publication]

Feb 2025:   MedTok: Unlocking Medical Codes for GenAI

Meet MedTok, a multimodal medical code tokenizer that transforms how AI understands structured medical data. By integrating textual descriptions and relational contexts, MedTok enhances tokenization for transformer-based models—powering everything from EHR foundation models to medical QA. [Project website]

Feb 2025:   What If You Could Rewrite Biology? Meet CLEF

What if we could anticipate molecular and medical changes before they happen? Introducing CLEF, an approach for counterfactual generation in biological and medical sequence models. [Project website]

Feb 2025:   Digital Twins as Global Health and Disease Models

Jan 2025:   LLM and KG+LLM agent papers at ICLR

Jan 2025:   Artificial Intelligence in Medicine 2

Excited to share our new graduate course on Artificial Intelligence in Medicine 2.

Jan 2025:   ProCyon AI Highlighted by Kempner

Thanks to Kempner Institute for highlighting our latest research, ProCyon, our protein-text foundation model for modeling protein functions.

Jan 2025:   AI Design of Proteins for Therapeutics

Dec 2024:   Unified Clinical Vocabulary Embeddings

New paper: A unified resource provides a new representation of clinical knowledge by unifying medical vocabularies. (1) Phenotype risk score analysis across 4.57 million patients, (2) Inter-institutional clinician panels evaluate alignment with clinical knowledge across 90 diseases and 3,000 clinical codes.

Dec 2024:   SPECTRA in Nature Machine Intelligence

Are biomedical AI models truly as smart as they seem? SPECTRA is a framework that evaluates models by considering the full spectrum of cross-split overlap: train-test similarity. SPECTRA reveals gaps in benchmarks for molecular sequence data across 19 models, including LLMs, GNNs, diffusion models, and conv nets.

Nov 2024:   Ayush Noori Selected as a Rhodes Scholar

Congratulations to Ayush Noori on being named a Rhodes Scholar! Such an incredible achievement!

Nov 2024:   PocketGen in Nature Machine Intelligence

Oct 2024:   Activity Cliffs in Molecular Properties

Oct 2024:   Knowledge Graph Agent for Medical Reasoning

Sep 2024:   Three Papers Accepted to NeurIPS

Exciting projects include a unified multi-task time series model, a flow-matching approach for generating protein pockets using geometric priors, and a tokenization method that produces invariant molecular representations for integration into large language models.

Zitnik Lab  ·  Artificial Intelligence in Medicine and Science  ·  Harvard  ·  Department of Biomedical Informatics