Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Mega Benchmark: 500 Queries Across 10 Knowledge Graphs

500 queries. 10 knowledge graphs. 138 million nodes. 1.22 billion edges. One graph, one query language, one server.

Samyama Graph Enterprise v1.0.0 runs the full 500-query mega benchmark across ten independently-sourced knowledge graphs loaded into a single federated graph — on a single commodity EC2 spot instance.

Headline

455 / 500 pass (91.0%) — up from 414/500 (82.8%) on v0.8.0.

  • +41 queries passing vs v0.8.0 baseline
  • Engine errors cut from 28 → 9 (−68%)
  • 13 of 14 previously-failing IS NOT NULL AND queries now pass (Cypher three-valued logic fix, PR #188)
  • Zero regressions — all 9 remaining errors are pre-existing timeout/query-bug categories
  • Load time 37 min (−43% vs v0.8’s 65 min)

The Dataset

Knowledge GraphSourceNodesEdgesKey Entities
PubMed/MEDLINENLM66.2M1.04BArticle, Author, MeSHTerm, Chemical, Journal, Grant
Clinical TrialsAACT/ClinicalTrials.gov7.8M27MClinicalTrial, Intervention, AdverseEvent, Site, Sponsor
PathwaysReactome119K835KProtein, Pathway, Complex, Reaction, GOTerm
Drug InteractionsDrugBank, ChEMBL, SIDER, DGIdb245K388KDrug, Gene, SideEffect, Indication, Bioactivity
FAERSFDA Adverse Events10.4M90MAdverseEventCase, Reaction, Drug, Outcome
UniProtEBI618K3.9MProtein, Organism, GOTerm
OMOPMIMIC-IV (115K patients)51.9M54MPerson, Visit, ConditionOccurrence, DrugExposure, Measurement
SurveillanceWHO SPAR217K241KCountry, CapacityIndicator
Health DeterminantsWorld Bank + WHO286K286KCountry, SocioeconomicIndicator, EnvironmentalFactor
Health SystemsWHO20K19KCountry, HealthWorkforce, VaccineCoverage
NCT BridgeAACT study_references747KREFERENCED_IN (Article → ClinicalTrial)
Total137.7M1.22B

Results by Prefix

PrefixKnowledge GraphQueriesPassEmptyErrorRate
PMPubMed35341097.1%
CTClinical Trials20191095.0%
PWPathways151500100%
DIDrug Interactions15141093.3%
XKCross-KG joins151500100%
HDHealth Determinants202000100%
HSHealth Systems101000100%
PHPublic Health (cross-KG)101000100%
EXExpanded (PubMed-heavy)60561393.3%
UPUniProt252500100%
FAFAERS30281193.3%
OMOMOP30281193.3%
MBMega Benchmark (multi-KG)21518130484.2%
Total50045536991.0%

Six prefixes hit 100% including all three cross-KG categories (XK, PH, and the public-health cross-KG set).

The Cypher 3VL Fix

Fourteen queries in v0.8.0 errored on patterns like:

MATCH (p:Protein)
WHERE p.gene_name IS NOT NULL AND p.gene_name CONTAINS "kinase"
RETURN p

Prior to v1.0.0, the IS NOT NULL AND <bool> combination failed type-checking because NULL AND false was not short-circuited per Cypher’s three-valued logic spec. The fix (PR #188) implements proper three-valued logic for AND/OR:

Queryv0.8.0v1.0.0
UP11, UP13, UP14, UP22, UP23, UP24errorpass
MB060, MB117, MB157, MB158, MB159, MB160, MB182errorpass
MB153errorempty (data artifact, query runs clean)

Remaining 9 Errors

All 9 errors are pre-existing v0.8 categories — no new failure modes introduced in v1.0:

QueriesCategory
EX05, EX06, EX49, FA14, MB049, MB053, MB054, MB111Query timeout (>120s) on PubMed/FAERS full-scans
OM27NOT requires boolean — query-side null-guard bug

The 8 timeouts are candidates for parallel-scan or query-rewrite fixes in v1.1.

Infrastructure

Instancer7i.16xlarge (64 vCPU, 495 GB RAM)
RegionAWS ap-south-1 (Mumbai), spot pricing
Disk500 GB gp3
Peak memory~299 GB (60% utilization)
Load time36.8 min (10 snapshots + NCT bridge + 43 indexes)
Query runtime32 min
Total runtime130 min
BuildSGE main @ 0a6fe7b (post PR #169 / #188)

Version Progression

VersionPassRateΔKey Improvements
v0.7.x383/50076.6%baseline
v0.8.0414/50082.8%+31WITH push-down, DS-07c edge arena removal
v1.0.0455/50091.0%+41MVCC, Cypher 3VL, version GC, edge COW

Reproducing

# On r7i.16xlarge ap-south-1, AMI ami-0d219aaceb19e2c84
./target/release/examples/unified_benchmark \
  --pubmed-snap ~/snapshots/pubmed-v2.sgsnap \
  --ct-snap ~/snapshots/clinical-trials.sgsnap \
  --pw-snap ~/snapshots/pathways.sgsnap \
  --faers-snap ~/snapshots/faers-full.sgsnap \
  --uniprot-snap ~/snapshots/uniprot.sgsnap \
  --omop-snap ~/snapshots/omop-115k.sgsnap \
  --di-snap ~/snapshots/druginteractions.sgsnap \
  --surv-snap ~/snapshots/surveillance.sgsnap \
  --hd-snap ~/snapshots/health-determinants.sgsnap \
  --hs-snap ~/snapshots/health-systems.sgsnap \
  --study-refs ~/study_references.txt \
  --queries ~/benchmark-queries

Snapshots are public at s3://samyama-data/snapshots/. Query CSVs live in this repo under src/data/benchmark/. Raw run output: benchmark-v100-results.csv.


Run: 2026-04-12. Instance stopped post-run.