Overview

Appendix C. Build knowledge graphs from structured sources

This appendix demonstrates how to build a fit-for-purpose knowledge graph from structured and semi-structured sources, using a biomedical use case that predicts associations between microRNAs and diseases. It follows a CRISP-DM-inspired approach: clarify goals and domain concepts, select minimally sufficient data, iterate on a pragmatic schema, and keep the graph simple enough to reason about while enabling downstream link prediction. Rather than “ingest everything,” it advocates a targeted, incremental strategy that preserves provenance and semantic nuances so that later modeling and analysis are both explainable and extensible.

The construction begins by importing complementary datasets that encode known miRNA–disease links (e.g., HMDD, dbDEMC, miR2Disease), modeling them with distinct relationship types to retain meaning and source traceability. A central challenge—heterogeneous disease naming—is handled through entity normalization with UMLS-driven NLP (via scispaCy), creating dedicated NormalizedDisease nodes to reconcile synonyms without losing original data. The appendix evaluates normalization effects with graph algorithms, showing improved connectivity patterns and shorter miRNA-to-miRNA paths (via WCC and all-pairs shortest paths), which are beneficial for message-passing embeddings and link prediction. It also discusses large language models as an alternative for entity reconciliation, noting their flexibility alongside reproducibility and cost trade-offs.

After establishing a high-quality backbone, the graph is enriched with miRNA-centric knowledge: references and intra-miRNA relations (miRBase), predicted targets with confidence scores (miRDB), and functional similarity scores (MISIM). These additions provide both direct and induced similarity signals that can be probed with Neo4j GDS algorithms (node similarity, filtered similarity) and weighed path metrics such as DWPC to surface plausible disease–target connections (illustrated on celiac disease). The appendix closes with practical guidance: combine multiple curated sources, reconcile and clean entities early, preserve provenance, and validate with lightweight analytics before deploying more complex graph machine learning.

Figure C.1 An example of relationships between a disease, the celiac disease, and the miRNA. Many of these connections are known, but the vast majority must be discovered by clinicians and researchers. Our work in this chapter aims at helping this process.
Figure C.2 CRISP-DM Model adapted to Knolwedge Graphs
Figure C.3 Information encoded into DNA portions get transcribed into messenger RNA (mRNA) and then translated into amino acid chains that make up the synthesized protein.
Figure C.4 MiRNA sequences are too small to translate into protein but big enough to target a specific mRNA. When this appends the mRNA cannot flow through the ribosome and the protein synthesis cannot take place.
Figure C.5 Datasets A is more balanced and includes reference publications, Datasets B is focused on fewer diseases but includes more miRNA. After the ingestion the information coming from different sources is unified in a single source of truth.
Figure C.6 First iteration target Schema. It contains the type of relationships – REGULATES or RELATED_TO – we would like to predict.
Figure C.7 Record as a graph portion stored in the database.
Figure C.8 Merging datasets allows information fusion. We are using two types of relationships for the two databases: RELATED_TO for the HMDD dataset, REGULATES for dbDEMC.
Figure C.9 Venn diagram representing the unique miRNA distribution. It clearly shows the overlapping miRNAs among 2 or three of the datasets.
Figure C.10 miRNAs apparently referring to different diseases.
Figure C.11 Update target schema containing normalized Disease.
Figure C.12 miRNAs now connected to the through the NormalizedDisease node “Burkitt Lymphoma”.
Figure C.13 Chain of miRNAs connected through Disease nodes
Figure C.14 The same chain of miRNAs in Figure C.13 after the connection through NormalizedDisease nodes.
Figure C.15 Updated version of the target schema.
Figure C.16 Example of direct similarity and similarity induced by shared nodes. The model will learn which similarity is most relevant for the link prediction task.
Figure C.17 Same record from miRDB as it is stored in the graph.
Figure C.18 Same record as it is stored in the graph.
Figure C.19 MiRNA2 is more similar to MiRNA3 as it is to MiRNA1. The thicker the arrow lines, the stronger targets connections
Figure C.20 The topmost result from the similarity computation as it appears in the graph.
Figure C.21 Paths between the celiac disease and the target NM_080601 that is the first in the results.

C.5 Reference

  1. Lee, Rosalind C., Rhonda L. Feinbaum, and Victor Ambros. "The C. elegans heterochronic gene lin-4 encodes small RNAs with antisense complementarity to lin-14." cell 75.5 (1993): 843-854.
  2. Jonas, Stefanie, and Elisa Izaurralde. "Towards a molecular understanding of microRNA-mediated gene silencing." Nature reviews genetics 16.7 (2015): 421-433.
  3. Chen, Xing, et al. "RBMMMDA: predicting multiple types of disease-microRNA associations." Scientific reports 5.1 (2015): 13877.
  4. Bartel, David P. "MicroRNAs: target recognition and regulatory functions." cell 136.2 (2009): 215-233.
  5. Miska, Eric A. "How microRNAs control cell division, differentiation and death." Current opinion in genetics & development 15.5 (2005): 563-568.
  6. Cheng, Angie M., et al. "Antisense inhibition of human miRNAs and indications for an involvement of miRNA in cell growth and apoptosis." Nucleic acids research 33.4 (2005): 1290-1297.
  7. Cui, Qinghua, et al. "Principles of microRNA regulation of a human cellular signaling network." Molecular systems biology 2.1 (2006): 46.
  8. Chen, Xing, Ming-Xi Liu, and Gui-Ying Yan. "RWRMDA: predicting novel human microRNA–disease associations." Molecular BioSystems 8.10 (2012): 2792-2798.
  9. Chen, Xing, and Gui-Ying Yan. "Semi-supervised learning for potential human microRNA-disease associations inference." Scientific reports 4.1 (2014): 5501.
  10. Li, Jingjing, et al. "Evidence for positive selection on a number of microRNA regulatory interactions during recent human evolution." PLoS genetics 8.3 (2012): e1002578.
  11. Chen, Kevin, and Nikolaus Rajewsky. "Natural selection on human microRNA binding sites inferred from SNP data." Nature genetics 38.12 (2006): 1452-1456.
  12. Saunders, Matthew A., Han Liang, and Wen-Hsiung Li. "Human polymorphism at microRNAs and microRNA target sites." Proceedings of the National Academy of Sciences 104.9 (2007): 3300-3305.
  13. Sethupathy, Praveen, and Francis S. Collins. "MicroRNA target site polymorphisms and human disease." Trends in genetics 24.10 (2008): 489-497.
  14. Deng, Su-Ping, Lin Zhu, and De-Shuang Huang. "Predicting hub genes associated with cervical cancer through gene co-expression networks." IEEE/ACM Transactions on Computational Biology and Bioinformatics 13.1 (2015): 27-35.
  15. Deng, Su-Ping, Lin Zhu, and De-Shuang Huang. "Mining the bladder cancer-associated genes by an integrated strategy for the construction and analysis of differential co-expression networks." BMC genomics. Vol. 16. No. 3. BioMed Central, 2015.
  16. Eulalio, Ana, Eric Huntzinger, and Elisa Izaurralde. "Getting to the root of miRNA-mediated gene silencing." Cell 132.1 (2008): 9-14.
  17. Ambros, Victor. "The functions of animal microRNAs." Nature 431.7006 (2004): 350-355.
  18. Chen, Xing, et al. "MicroRNAs and complex diseases: from experimental results to computational models." Briefings in bioinformatics 20.2 (2019): 515-539.5.1.3
  19. Lukasik, Anna, Maciej Wójcikowski, and Piotr Zielenkiewicz. "Tools4miRs–one place to gather all the tools for miRNA analysis." Bioinformatics 32.17 (2016): 2722-2724.
  20. Lu, Ming, et al. "An analysis of human microRNA and disease associations." PloS one 3.10 (2008): e3420.
  21. Li, Yang, et al. "HMDD v2. 0: a database for experimentally supported human microRNA and disease associations." Nucleic acids research 42.D1 (2014): D1070-D1074.
  22. Huang, Zhou, et al. "HMDD v3. 0: a database for experimentally supported human microRNA–disease associations." Nucleic acids research 47.D1 (2019): D1013-D1017.
  23. Xu, Feng, et al. "dbDEMC 3.0: functional exploration of differentially expressed miRNAs in cancers of human and model organisms." Genomics, Proteomics & Bioinformatics 20.3 (2022): 446-454.
  24. Jiang, Qinghua, et al. "miR2Disease: a manually curated database for microRNA deregulation in human disease." Nucleic acids research 37.suppl_1 (2009): D98-D104.5.2.2
  25. Bodenreider, Olivier. "The unified medical language system (UMLS): integrating biomedical terminology." Nucleic acids research 32.suppl_1 (2004): D267-D270.
  26. Kozomara, Ana, Maria Birgaoanu, and Sam Griffiths-Jones. "miRBase: from microRNA sequences to function." Nucleic acids research 47.D1 (2019): D155-D162.
  27. Kozomara, Ana, and Sam Griffiths-Jones. "miRBase: annotating high confidence microRNAs using deep sequencing data." Nucleic acids research 42.D1 (2014): D68-D73.
  28. Kozomara, Ana, and Sam Griffiths-Jones. "miRBase: integrating microRNA annotation and deep-sequencing data." Nucleic acids research 39.suppl_1 (2010): D152-D157.
  29. Griffiths-Jones, Sam, et al. "miRBase: microRNA sequences, targets and gene nomenclature." Nucleic acids research 34.suppl_1 (2006): D140-D144.
  30. Chen, Yuhao, and Xiaowei Wang. "miRDB: an online database for prediction of functional microRNA targets." Nucleic acids research 48.D1 (2020): D127-D131.
  31. Liu, Weijun, and Xiaowei Wang. "Prediction of functional microRNA targets by integrative modeling of microRNA binding and target expression data." Genome biology 20 (2019): 1-10.
  32. Kern, Fabian, et al. "miRTargetLink 2.0—interactive miRNA target gene and target pathway networks." Nucleic acids research 49.W1 (2021): W409-W416.
  33. Li, Jianwei, et al. "MISIM v2. 0: a web server for inferring microRNA functional similarity based on microRNA-disease associations." Nucleic acids research 47.W1 (2019): W536-W541.
  34. Spalinger, Marianne R., et al. "Role of protein tyrosine phosphatases in regulating the immune system: implications for chronic intestinal inflammation." _Inflammatory bowel diseases_ 21.3 (2015): 645-655.
  35. Yao, Ying, et al. "Differential expression profile of gluten-specific T cells identified by single-cell RNA-seq." _Plos one_ 16.10 (2021): e0258029.

FAQ

What is the main goal of this appendix?To build a high‑quality miRNA–disease knowledge graph from structured and semi‑structured sources, following a CRISP‑DM process adapted to knowledge graphs, so it can support downstream analysis and link prediction tasks.
Why not ingest every available dataset at once?Throwing everything into the graph amplifies noise, increases reconciliation errors, and adds complexity. Start with a focused set of relevant sources to create a baseline, then add new datasets incrementally and measure their impact.
Which datasets provide known miRNA–disease associations and how are they modeled?HMDD, dbDEMC, and miR2Disease. HMDD links are modeled as RELATED_TO with references; dbDEMC and miR2Disease use REGULATES relationships, carrying regulation direction (UP/DOWN) and experiment metadata where available. Nodes are merged by name with dataset‑specific labels for provenance.
How large is the graph after the initial and combined ingestions?After importing HMDD: 1,207 distinct miRNAs, 18,732 miRNA–disease links, 849 diseases. After adding dbDEMC and miR2Disease: 4,874 miRNAs, 118,806 links, 1,144 diseases.
How are inconsistent disease names reconciled across sources?Using scispaCy with the UMLS linker to detect disease entities, extract canonical names and CUIs, then creating NormalizedDisease nodes. Each original Disease is linked via REPRESENTS to its normalized counterpart, preserving the original nodes for auditing and rollback.
How do we verify that normalization improved the graph?By comparing graph structure before and after normalization with GDS algorithms: WCC to assess connectivity and APSP to measure miRNA–miRNA distances. After normalization, more miRNA pairs are at distance 1 (about +4.5%), with corresponding decreases at longer distances, indicating tighter cohesion.
What additional datasets enrich the graph and why?miRBase adds miRNA sequences, features, and literature references; miRDB adds HAS_TARGET links with confidence scores; MISIM adds miRNA–miRNA SIMILAR_TO links with similarity scores. These introduce both direct and indirect similarities the ML models can exploit.
How is similarity computed between miRNAs or between diseases and targets?Project in‑memory graphs with GDS and run node similarity: weighted nodeSimilarity over HAS_TARGET.value for miRNA–miRNA similarity; filtered nodeSimilarity between Disease (source) and Target (target) via shared miRNAs. Cypher projections are more flexible; label/relationship projections are faster.
How are duplicates avoided and provenance preserved during import?By creating uniqueness constraints (e.g., on Disease.name, MiRNA.name, Reference.pubmed_id, Target.name) and using MERGE to upsert nodes/relationships. Dataset‑specific labels on nodes and typed relationships preserve provenance and semantics.
Can large language models help with entity normalization?Yes. LLMs can recognize semantic equivalents and work zero‑/few‑shot across domains where specialized tools are unavailable. Limitations include non‑deterministic outputs (reproducibility risks) and higher compute costs compared to lightweight approaches like scispaCy.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Knowledge Graphs and LLMs in Action ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Knowledge Graphs and LLMs in Action ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Knowledge Graphs and LLMs in Action ebook for free