Open Biomedical Knowledge Graphs at Scale: Construction, Federation, and AI Agent Access with Samyama Graph Database
Organizations: VaidhyaMegha Private Limited, India
Abstract
Biomedical knowledge is fragmented across siloed databases -- Reactome for pathways, STRING for protein interactions, ClinicalTrials.gov for study registries, DrugBank for drug vocabularies, DGIdb for drug-gene interactions, SIDER for side effects. We present three open-source biomedical knowledge graphs -- Pathways KG (118,686 nodes, 834,785 edges from 5 sources), Clinical Trials KG (7,774,446 nodes, 26,973,997 edges from 5 sources), and Drug Interactions KG (32,726 nodes, 191,970 edges from 3 sources) -- built on Samyama, a high-performance graph database written in Rust. Our contributions are threefold. First, we describe a reproducible ETL pattern for constructing large-scale KGs from heterogeneous public data sources, with cross-source deduplication, batch loading (Python Cypher and Rust native loaders), and portable snapshot export. Second, we demonstrate cross-KG federation: loading all three snapshots into a single graph tenant enables property-based joins across datasets. Third, we introduce schema-driven MCP server generation for LLM agent access, evaluated on a new BiomedQA benchmark (40 pharmacology questions): domain-specific MCP tools achieve 98% accuracy vs. 85% for schema-aware text-to-Cypher and 75% for standalone GPT-4o, with zero schema errors. All data sources are open-license. The combined federated graph (7.9M nodes, 28M edges) loads in approximately 3 minutes on commodity cloud hardware, with single-KG queries completing in 80-100ms and cross-KG federation joins in 1-4s
Figures & tables
| KG | Source | Content | License | Size |
| Pathways | Reactome | Pathways, reactions, complexes | CC BY 4.0 | 172 MB |
| STRING v12.0 | Protein–protein interactions | CC BY 4.0 | 900 MB | |
| Gene Ontology | GO terms & annotations | OBO | 265 MB | |
| WikiPathways | Community-curated pathways | CC0 | 336 KB | |
| UniProt | Protein metadata, gene/disease/drug links | CC BY 4.0 | 20 MB | |
| Clinical | ClinicalTrials.gov | Trial registry (575K studies) | Public domain | API |
| Node Label | Key Property | Count |
|---|---|---|
| GOTerm | go_id | 51,897 |
| Protein | uniprot_id | 37,990 |
| Complex | reactome_id | 15,963 |
| Reaction | reactome_id | 9,988 |
| Pathway | reactome_id | 2,848 |
| Total nodes | 118,686 | |
| Node Label | Key Property | Est. Count |
|---|---|---|
| ClinicalTrial | nct_id | 575,000+ |
| Condition | name, mesh_id | varies |
| Intervention | name, type | varies |
| Drug | rxnorm_cui, drugbank_id | varies |
| Protein | uniprot_id | varies |
| Gene | gene_id, symbol | varies |
| Node Label | Key Property | Count |
|---|---|---|
| Drug | drugbank_id | 19,842 |
| Gene | gene_name | 4,182 |
| SideEffect | meddra_id | 5,858 |
| Indication | meddra_id | 2,844 |
| Total nodes | 32,726 | |
| Entity | From KG | To KG | Join Property | Identifier |
|---|---|---|---|---|
| Gene/Protein | Drug Int. | Pathways | gene_name = name | Gene symbol |
| Drug | Drug Int. | Clin. Trials | name = Intervention.name | Drug name |
| Drug | Drug Int. | Clin. Trials | drugbank_id | DrugBank ID |
| Protein | Clin. Trials | Pathways | uniprot_id | UniProt accession |
| Pattern | From KG | Bridge | To KG |
|---|---|---|---|
| Drug Pathway | Drug Int. (Gene) | gene_name | Pathways (Protein) |
| Drug Trial | Drug Int. (Drug) | name | Clin. Trials (Intervention) |
| Drug GO terms | Drug Int. (Gene) | gene_name | Pathways (GOTerm) |
| Drug SE Pathway | Drug Int. (SE+Gene) | gene_name | Pathways (Protein) |
| Trial Side effects | Clin. Trials (Intervention) | name | Drug Int. (Drug) |
| Tool | Description |
|---|---|
| pathway_members | List proteins in a pathway (search by name) |
| interaction_partners | PPI neighbors above confidence threshold |
| shared_pathways | Pathways shared between two proteins |
| upstream_regulators | Multi-hop PPI traversal up to N steps |
| drug_pathway_impact | Pathways affected by a drug via protein targets |
| disease_pathways | Pathways associated with a disease through gene links |
| KG | Nodes | Edges | Snapshot | Import | Rust ETL |
|---|---|---|---|---|---|
| Pathways KG | 118,686 | 834,785 | 9 MB | 3.4 s | — |
| Drug Interactions KG | 32,726 | 191,970 | 1.9 MB | 0.7 s | 0.9 s |
| Clinical Trials KG | 7,774,446 | 26,973,997 | 711 MB | 177 s | — |
| Combined | 7,925,858 | 28,000,752 | 722 MB | 181 s | — |
| Query | KG | Results | Latency |
|---|---|---|---|
| Drug gene targets (Metformin) | Drug Int. | 5 rows | 83 ms |
| Shared gene targets (2 drugs) | Drug Int. | 1 row | 84 ms |
| Top pathways by protein count | Pathways | 10 rows | 97 ms |
| PPI partners (TP53: Q9UQ61) | Pathways | 10 rows | 96 ms |
| Side effects of Warfarin | Drug Int. | 10 rows | 82 ms |
| Diabetes drugs pathways | Drug Int.+Path | 5 rows | 3.9 s |
| Approach | Accuracy | Avg Latency | Avg Tokens |
|---|---|---|---|
| GPT-4o standalone | 30/40 (75%) | 2,805 ms | 195 |
| Text-to-Cypher (NLQ) | 34/40 (85%) | 1,846 ms | 0 † |
| MCP tools | 39/40 (98%) | 920 ms | 0 |
Biomedical KGs
Biomedical knowledge graphs organize evidence about genes, diseases, drugs, pathways, and patients for computational discovery and clinical reasoning.
See all 70 papers