4 From simple networks to multi-source integration
This chapter advances the journey from a single, ontology-derived graph to building and integrating knowledge graphs from multiple structured and semi-structured sources. It emphasizes modeling choices, schema harmonization, identifier reconciliation, and post-processing to merge entities and relationships into a coherent, queryable graph. Biomedical data is used as a unifying domain due to its rich relationship types, high-quality public datasets, and real-world complexity, but the techniques generalize to other sectors. Large Language Models play a supportive role during construction—assisting with entity resolution and semantic validation—while their most impactful uses (natural language querying, reasoning, and interpretation) are reserved for later parts of the book.
Through progressively more complex examples, the chapter shows how to assemble and analyze graphs such as protein–protein interaction (PPI) networks combined with disease–protein associations, then assess structure with weakly connected components and Louvain community detection. It introduces domain-aware subgraph measures—largest component fraction, density, and conductance—to characterize disease pathways and guide downstream analytics. The Hetionet case demonstrates multi-source integration at scale and motivates metagraph/metapath thinking. Degree-weighted path count (DWPC) is presented as a robust path-based metric that prioritizes biologically meaningful connections over naive path counts, enabling tasks like GO process enrichment and tissue-specific interactomics (e.g., for celiac disease) with concise, performant queries.
Finally, the chapter explores clinical applications, where integrating EHRs with omics and ontologies supports precision medicine but raises privacy and data quality challenges. It outlines strategies such as deidentification, statistical aggregation, on-demand use of sensitive data, and patient journey mapping, and showcases the Clinical Knowledge Graph (CKG) as a practical platform for discovery (e.g., protein–disease associations relevant to cardiomyopathies). Throughout, LLMs are positioned as interpreters that translate graph analytics (DWPC scores, topology measures, enriched pathways) into coherent narratives and decision support. The overarching message is a transferable toolkit for multi-source integration, graph modeling, and analysis that scales from simple networks to complex, cross-domain knowledge systems.
The main types of biomedical applications of knowledge graphs. The classification uses the business goal to group them, while they have many data sources in common.
The three primary 'omics' data types used in biomedical knowledge graphs. The diagram illustrates how genome (DNA), transcriptome (RNA), and proteome (protein) data are biologically connected through transcription and translation processes. Understanding these relationships is crucial for modeling multi-omic knowledge graphs that integrate genetic, expression, and functional protein data.
An extract of an image from Yang et al. [9] that shows, in a simplified way, how the researchers combined multiple data sources to obtain a holistic knowledge graph that could serve their purposes.
Disease pathway is then a subgraph of the PPI network defined by the set of disease-associated proteins.
A small portion of the knowledge graph built by Agrawal [12]. Here we started from the Celiac Disease, and we found all the associated genes. On the top, slightly on the right, we see HLA-DGA1 and HLA-DGB1. These are very well-known genes since they are used to identify people susceptible to celiac disease.
The discovery process of proteins related to diseases. The result of this task provides a better understanding of the disease and the proteins involved.
The distribution of the three key measures for the disease’s pathways: Largest connected component, density, conductance.
The distribution of the three key measures for the clusters obtained via Louvain algorithm: Largest connected components, density and conductance.
Het.io knowledge graph schema. The details of the nodes and relationships are available in the source link[15].
Metagraph (A) and metapapths (B) excerpts for Hetionet database. Metagraph describes the structure of the database indicating the type of nodes and the type of relationships. Metapaths describe paths indicating the type of nodes and the type of relationships inside interested paths.
Example of how to extract paths based on a defined metapaths and how to compute the PDP and DWPC. (A) is a sample graph, (B) shows how the computation is working.
Result of the query in Listing 4.19 showing the paths between celiac disease and the positive regulation of biosynthetic process.
A single patient’s clinical oncology journey (courtesy of David Hughes)
The schema for the Clinical Knowledge Graph (from: https://www.nature.com/articles/s41587-021-01145-6)
Reference
- David N. Nicholson, Casey S. Greene, Constructing knowledge graphs and their biomedical applications, Computational and Structural Biotechnology Journal, Volume 18, 2020, Pages 1414-1428, ISSN 2001-0370, https://doi.org/10.1016/j.csbj.2020.05.017.
- Systematic integration of biomedical knowledge prioritizes drugs for repurposing Daniel Scott Himmelstein, Antoine Lizee, Christine Hessler, Leo Brueggeman, Sabrina L Chen, Dexter Hadley, Ari Green, Pouya Khankhanian, Sergio E BaranzinieLife (2017-09-22) https://doi.org/cdfk DOI: 10.7554/ elife.26726 PMID: 28936969 PMCID: PMC5640425
- GRAM: Graph-based Attention Model for Healthcare Representation Learning Edward Choi, Mohammad Taha Bahadori, Le Song, Walter F. Stewart, Jimeng Sun arXiv (2016-11-21) https://arxiv.org/abs/1611.07012v3
- miRNA-Disease Association Prediction with Collaborative Matrix Factorization Zhen Shen, You-Hua Zhang, Kyungsook Han, Asoke K. Nandi, Barry Honig, De-Shuang Huang Complexity (2017) https://doi.org/ggmrpm DOI: 10.1155/2017/2498957
- Neural networks for link prediction in realistic biomedical graphs: a multidimensional evaluation of graph embedding-based approaches Gamal Crichton, Yufan Guo, Sampo Pyysalo, Anna Korhonen BMC Bioinformatics (2018-05-21) https://doi.org/ggkm7q DOI: 10.1186/s12859-018-2163-9 PMID: 29783926 PMCID: PMC5963080
- Network-based integration of multi-omics data for prioritizing cancer genes Christos Dimitrakopoulos, Sravanth Kumar Hindupur, Luca Häfliger, Jonas Behr, Hesam Montazeri, Michael N Hall, Niko Beerenwinkel Bioinformatics (2018-03-14) https://doi.org/gc6953 DOI: 10.1093/bioinformatics/bty148 PMID: 29547932 PMCID: PMC6041755
- Safe Medicine Recommendation via Medical Knowledge Graph Embedding Meng Wang, Mengyue Liu, Jun Liu, Sen Wang, Guodong Long, Buyue Qian arXiv (2017-10-16) https://arxiv.org/abs/1710.05980v2
- GAMENet: Graph Augmented MEmory Networks for Recommending Medication Combination Junyuan Shang, Cao Xiao, Tengfei Ma, Hongyan Li, Jimeng Sun Proceedings of the AAAI Conference on Artificial Intelligence (2019-07-17) https://doi.org/ggkm7r DOI: 10.1609/aaai.v33i01.33011126
- Heterogeneous network embedding for identifying symptom candidate genes Kuo Yang, Ning Wang, Guangming Liu, Ruyu Wang, Jian Yu, Runshun Zhang, Jianxin Chen, Xuezhong Zhou Journal of the American Medical Informatics Association (2018-10-23) https://doi.org/gfg6nr DOI: 10.1093/jamia/ocy117 PMID: 30357378
- Predicting Protein–Protein Interactions from Multimodal Biological Data Sources via Nonnegative Matrix Tri-Factorization Hua Wang, Heng Huang, Chris Ding, Feiping Nie Journal of Computational Biology (2013-04) https://doi.org/f4thrx DOI: 10.1089/cmb.2012.0273 PMID: 23509857
- Protein functional properties prediction in sparsely-label PPI networks through regularized non-negative matrix factorization Qingyao Wu, Zhenyu Wang, Chunshan Li, Yunming Ye, Yueping Li, Ning Sun BMC Systems Biology (2015) https://doi.org/gb5tvr DOI: 10.1186/1752-0509-9-s1-s9 PMID: 25708164 PMCID: PMC4331684
- Large-scale analysis of disease pathways in the human interactome. Monica Agrawal, Marinka Zitnik, and Jure Leskovec. Pacific Symposium on Biocomputing. 2018.
- J. Menche et al., Science 347, p. 1257601 (2015).
- A. Chatr-Aryamontri et al., Nucleic Acids Research 43, D470 (2015).
- Blondel, Vincent D; Guillaume, Jean-Loup; Lambiotte, Renaud; Lefebvre, Etienne (9 October 2008). "Fast unfolding of communities in large networks". Journal of Statistical Mechanics: Theory and Experiment. 2008 (10)
- S. E. Schaeffer, Computer Science Review 1, 27 (2007).
- DiMasi JA, Grabowski HG, Hansen RW. 2016. Innovation in the pharmaceutical industry: New estimates of R&D costs. Journal of Health Economics 47:20–33. DOI: https://doi.org/10.1016/j.jhealeco.2016.01.012, PMID: 2692 8437
- Reichert JM. 2003. Trends in development and approval times for new therapeutics in the United States. Nature Reviews Drug Discovery 2:695–702. DOI: https://doi.org/10.1038/nrd1178, PMID: 12951576
- Hay M, Thomas DW, Craighead JL, Economides C, Rosenthal J. 2014. Clinical development success rates for investigational drugs. Nature Biotechnology 32:40–51. DOI: https://doi.org/10.1038/nbt.2786, PMID: 24406927
- Large-scale structural and textual similarity-based mining of knowledge graph to predict drug–drug interactions Ibrahim Abdelaziz, Achille Fokoue, Oktie Hassanzadeh, Ping Zhang, Mohammad Sadoghi Journal of Web Semantics (2017-05) https://doi.org/gcrwk3 DOI: 10.1016/j. websem.2017.06.002.
- Matrix Factorization-Based Prediction of Novel Drug Indications by Integrating Genomic Space Wen Dai, Xi Liu, Yibo Gao, Lin Chen, Jianglong Song, Di Chen, Kuo Gao, Yongshi Jiang, Yiping Yang, Jianxin Chen, Peng Lu Computational and Mathematical Methods in Medicine (2015) https://doi.org/gb58g8 DOI: 10.1155/2015/275045 PMID: 26078775 PMCID: PMC4452507
- Daniel Scott Himmelstein, Antoine Lizee, Christine Hessler, Leo Brueggeman, Sabrina L Chen, Dexter Hadley, Ari Green, Pouya Khankhanian, Sergio E Baranzini (2017) Systematic integration of biomedical knowledge prioritizes drugs for repurposing eLife 6:e26726 https://doi.org/10.7554/eLife.26726
- Drug-Target Interaction Prediction with Graph Regularized Matrix Factorization Ali Ezzat, Peilin Zhao, Min Wu, Xiao-Li Li, Chee-Keong Kwoh IEEE/ACM Transactions on Computational Biology and Bioinformatics (2017-05-01) https://doi.org/ggmrrp DOI: 10.1109/tcbb.2016.2530062 PMID: 26890921
- Predicting Drug-Target Interaction Using Deep Matrix Factorization Hafez Eslami Manoochehri, Mehrdad Nourani 2018 IEEE Biomedical Circuits and Systems Conference (BioCAS) (2018-10) https://doi.org/ggmrrn DOI: 10.1109/biocas.2018.8584817
- DrPOCS: Drug Repositioning Based on Projection Onto Convex Sets Yin-Ying Wang, Chunfeng Cui, Liqun Qi, Hong Yan, Xing-Ming Zhao IEEE/ACM Transactions on Computational Biology and Bioinformatics (2019-01-01) https://doi.org/ggmrrq DOI: 10.1109/tcbb.2018.2830384 PMID: 29993698
- Neighborhood Regularized Logistic Matrix Factorization for Drug-Target Interaction Prediction Yong Liu, Min Wu, Chunyan Miao, Peilin Zhao, Xiao-Li Li PLOS Computational Biology (2016-02-12) https://doi.org/ggmrrw DOI: 10.1371/journal.pcbi.1004760 PMID: 26872142 PMCID: PMC4752318.
- Heterogeneous Network Edge Prediction: A Data Integration Approach to Prioritize Disease-Associated Genes Daniel S. Himmelstein, Sergio E. Baranzini https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004259
- Co-Author Relationship Prediction in Heterogeneous Bibliographic Networks* Yizhou Sun† Rick Barber† Manish Gupta† Charu C. Aggarwal‡ Jiawei Han†Stephens M, Balding DJ. 2009. Bayesian statistical methods for genetic association studies. Nature Reviews Genetics 10:681–690. DOI: https://doi.org/10.1038/nrg2615, PMID: 19763151
- Sawcer S. 2008. The complex genetics of multiple sclerosis: pitfalls and prospects. Brain 131:3118–3131. DOI: https://doi.org/10.1093/brain/awn081, PMID: 18490360
- Alberto Santos, Ana R. Colaço, Annelaura B. Nielsen, Lili Niu, Maximilian Strauss, Philipp E. Geyer, Fabian Coscia, Nicolai J. Wewer Albrechtsen, Filip Mundt, Lars Juhl Jensen and Matthias Mann. A knowledge graph to interpret clinical proteomics data.
- Maya Rotmensch, Yoni Halpern, Abdulhakim Tlimat, Steven Horng & David Sontag, Learning a Health Knowledge Graph from Electronic Medical Records, 2017
- Barton, E., Freeman, T., Baum, F., Javanparast, S., & Lawless, A. (2019). The feasibility and potential use of case-tracked client journeys in primary healthcare: A pilot study. BMJ Open, 9(5), e024419. https://doi.org/10.1136/bmjopen-2018-024419 https://pubmed.ncbi.nlm.nih.gov/31154293/
- Rachel Hipp, PharmD, BCPS, Erik Abel, PharmD, BCPS, and Robert J. Weber, PharmD, MS, BCPS, FASHP. A Primer on Clinical Pathways Hosp Pharm. 2016 May; 51(5): 416–421. doi: 10.1310/hpj5105-416
- J. Morris Chang, Di Zhuang, and G. Dumindu Samaraweera, Privacy-Preserving Machine Learning. Manning, 2023
FAQ
What is the core focus of Chapter 4, and how does it differ from the previous chapter?
Chapter 4 moves from a single, well-organized ontology-driven graph to building and analyzing knowledge graphs created from multiple structured sources. It emphasizes schema integration, entity reconciliation, cleaning/merging, and analytical techniques (from component/community analysis to path-based measures). LLMs play a supporting role for integration QA and interpretation, while traditional data integration and graph analytics remain primary.Why does the chapter use biomedical data, and are the techniques transferable to other domains?
- Biomedical data offers rich, diverse relationships (genes, proteins, diseases, drugs) and high-quality public datasets that embody real integration challenges.
- It enables end-to-end demonstrations: from simple networks (PPIs) to complex multi-source KGs (e.g., Hetionet, CKG).
- The techniques are domain-agnostic and transfer directly to areas like law enforcement, finance, and retail, where multi-source integration and entity resolution are also critical.
What are the practical steps to build the PPI + disease knowledge graph in Neo4j?
- Create node key constraints for Protein and Disease (unique id).
- Import the human PPI network (INTERACTS_WITH between Protein nodes).
- Import disease–protein associations (ASSOCIATED_WITH from Disease to Protein).
- Attach disease classes (from Disease Ontology mappings).
- Improve readability by enriching Protein ids with gene symbols/descriptions (NIH gene_info).
- Optionally seed a ready-made database via Neo4j 5 seedUri to reproduce results quickly.
How do we reconcile names and identifiers across sources and improve graph readability?
- Map heterogeneous identifiers to common vocabularies (e.g., UMLS for diseases; Disease Ontology categories).
- Normalize protein/gene identifiers and add human-friendly labels (e.g., map GeneID to Symbol via NIH gene_info).
- Post-process to merge duplicates, harmonize properties, and clean relationships for a coherent KG.
Which initial graph analytics help validate the structure of the integrated graph?
- Weakly Connected Components (WCC): deterministic; shows how many disconnected subgraphs exist (typically a large giant component in PPI).
- Louvain community detection: fast, non-deterministic modularity-based clustering; reveals mesoscale communities and provides modularity scores.
- These baselines characterize connectivity and community structure before advanced ML tasks.
What are disease pathway subgraphs and how are they evaluated?
- A disease pathway is the PPI subgraph induced by proteins associated with a disease (monopartite Protein–Protein subgraph).
- Key measures per disease: relative size of largest connected component, density (internal cohesion), and conductance (separation from the rest of the PPI network via boundary edges Bd).
- Findings typically show fragmented, low-density pathways with high conductance—very different from Louvain clusters.
What graph slicing strategies are used to analyze multipartite knowledge graphs?
- Filtering: select specific node/edge types (e.g., Protein + INTERACTS_WITH).
- Projection: convert bipartite/multipartite structures into monopartite views (e.g., connect diseases sharing proteins).
- Partitioning/fragmentation: build overlapping or disjoint subgraphs by criteria (e.g., disease pathways).
- Combine these to create focused analytical “perspectives” on the KG.
What is DWPC, and why is it preferred over simple path count (PC)?
- DWPC (Degree-Weighted Path Count) sums path-degree products (PDPs) across all paths conforming to a metapath, downweighting high-degree nodes via a damping exponent (e.g., w ≈ 0.4).
- It reduces hub bias inherent in PC, prioritizing more informative, specific paths.
- Used in Hetionet to rank biologically relevant GO processes, outperforming PC in surfacing disease-specific signals.
How are LLMs positioned in this chapter’s workflow?
- During structured integration: assist with entity resolution, identifier/name reconciliation, and semantic consistency checks.
- Post-analysis: synthesize quantitative outputs (e.g., DWPC-ranked pathways) into domain narratives, hypotheses, and clinical context.
- They augment but do not replace domain experts; core construction and analytics use traditional KG/GDS methods.
What are key considerations for clinical knowledge graphs and EHR data privacy?
- EHRs are rich but sensitive, with unstructured notes, subjectivity, and privacy constraints.
- Mitigations: de-identification, aggregation into statistical relationships, or on-demand use of identifiable data with consent.
- Clinical KGs (e.g., CKG) integrate multi-omics, ontologies, and clinical facts; support use cases like patient journey mapping, safety signals, and cohort design.
Knowledge Graphs and LLMs in Action ebook for free