Knowledge Graph

A knowledge graph is a graph of data whose nodes stand for entities and whose edges stand for named relations, used to link trial, drug and coding data.

Status
Published, version 1.0.2
Last reviewed
2 Nov 2026, by Dr Darrin Baines
Report a problem
Tell us if something is wrong or out of date

Concept Architecture

Knowledge Graph for Linking Health Economic Evidence

A knowledge graph is a form of graph data in which every link carries a named meaning, so that a drug can belong to a class, a trial can have a placebo arm and a diagnosis code can map to a clinical concept. Evidence for a cost-effectiveness model usually sits in separate places, such as trial registries, systematic reviews, coding systems for claims and health records, and lists of unit costs, and a knowledge graph lets one query follow links across all of them. For a health economist the gain is practical, because the same structure can find every trial that connects two treatments and every code that belongs under a condition, with the source of each fact kept beside it. A graph stores and links evidence, though, and does not itself estimate effects.

Nodes, edges and triples

Hogan and colleagues, in a survey for newcomers, note that the definition of a knowledge graph is still disputed and adopt an inclusive one, a graph of data meant to accumulate and convey knowledge of the real world, with nodes for entities and edges for the relations between them. Simple statements, such as a drug treating a condition, become edges. Statements about whole classes need a richer layer of ontology or rules, from which further facts can be deduced.

The W3C's Resource Description Framework (RDF) gives a standard form, a set of triples, each made of a subject, a predicate and an object, where the predicate is an identifier (an IRI) for a binary relation. IRIs have global scope, so the same IRI in two datasets denotes the same thing, and RDF graphs can be combined easily. A trial registry and a drug dictionary can then be joined without a shared table design.

Property graphs, used by graph databases such as Neo4j, also let nodes and edges carry property-value pairs, and the survey notes that the two forms translate into each other without loss. The choice matters for trial results, because the RDF specification states that relations among more than two things can only be expressed indirectly, so a result involving an intervention, a comparator, an outcome and an effect estimate needs its own node, or attributes on an edge, rather than one triple.

What a missing link means

A relational database fixes its schema in advance, whereas a graph can postpone it and add sources and relations as they arrive, with incomplete information represented by leaving an edge out. The survey sets out the rule for reading that gap. Under the closed world assumption used by many classical databases, anything not recorded is false, while under the open world assumption a missing edge means only that the relation is not known.

For evidence work the open world reading is the safe one. A graph with no edge between a new drug and its main comparator shows only that no such trial is recorded there, so it cannot replace the searches of a systematic review. The meaning of each relation also has to be written down, since an edge called "treats" might record a licensed indication, a tested use or a predicted one, and an input drawn from the wrong kind of edge carries that error into the economic evaluation.

Queries that follow paths

Graph query languages add path expressions that match chains of edges of any length. SPARQL 1.1, the W3C query language for RDF, provides "zero or more" and "one or more" path operators, so one pattern can find every type of a resource, including its supertypes.

Two path questions recur in health economics. One runs up and down a hierarchy, for example all claims records for any drug in a class. The other runs across an evidence network and asks whether two treatments never compared head to head are linked through common comparators, which decides whether an indirect treatment comparison or a network meta-analysis is possible.

Documented uses in health economic evidence

Published projects show knowledge graphs in four roles close to health economics. They are named examples, and none of them shows the approach to be standard practice.

Systematic reviews and trial results

Mavergames and colleagues at Cochrane described reviews locked in PDFs and proposed PICO (population, intervention, comparison, outcome) as an ontology for evidence synthesis. Their demonstrator on asthma drug reviews linked to DrugBank so that brand and generic names found the same reviews, at a time when a Cochrane Library search for "Prozac" returned nothing while "fluoxetine" returned 30. Cochrane now reports an ontology with a linked data triple store, and PICO annotation of its reviews by AI and human curation.

Shi and Du built a knowledge graph of arm-level results from ClinicalTrials.gov to support evidence synthesis and health technology assessment. From 8,665 studies it holds 119,968 efficacy and 803,052 safety relationships, with the comparator arm and parameter value stored on each efficacy edge. Efficacy edges are labelled positive or negative by a rule based on a p-value of 0.05 or less, or a confidence interval excluding the null value, and the authors list unadjusted multiple testing and the exclusion of multi-arm trials among the limitations.

Coding vocabularies for real-world data

Real-world data studies, such as a cost-of-illness study from claims or electronic health record data, depend on deciding which codes count. The OMOP Common Data Model used by the OHDSI community organises its vocabularies as concepts joined by named relationships, the structure of a knowledge graph. ICD-9-CM 427.31, Read code G573000 and SNOMED 49436004 all denote atrial fibrillation, but only the SNOMED concept is Standard and records the condition, and the others reach it through a "Maps to" relationship.

Hierarchy comes from "Is a" and "Subsumes" pairs, and a concept can have more than one parent, as SNOMED atrial fibrillation "Is a" atrial arrhythmia and also "Is a" fibrillation. A table built automatically by traversing these relationships lets an analyst retrieve a concept with all its descendants. The OHDSI authors warn that mappings are not perfect and that a code with no equivalent is mapped to a broader concept, so ICD-10-CM W61.51, bitten by goose, becomes SNOMED peck by bird. In a costing study these choices decide which records, and so which costs, are counted.

A vocabulary of health economics concepts

HealthEconomics.wiki publishes its own concept vocabulary, the Health Economics Ontology (HEO), on NCBO BioPortal. Each concept has a stable URI, concepts are SKOS concepts arranged by broader terms under a single root, Health Economics, and six relationships, among them part of, measures and used to calculate, are OWL object properties with named inverses. HEO identifies concepts, while companion ontologies such as RHEO, OHEO and HETO define types classified within BFO 2020, and a concept and a type never share an identifier. The split matters for evidence graphs, because a link saying that one concept measures another is a statement about meaning, while a link saying that a trial measured an outcome is a statement about the world.

Drug repurposing

Himmelstein and colleagues built Hetionet v1.0 from 29 public resources, with 47,031 nodes of 11 types, such as compounds and diseases, joined by 2,250,197 relationships of 24 types. The team learned which compound-to-disease paths separate known treatments from non-treatments and predicted the probability of treatment for 209,168 compound-disease pairs. Such predictions can rank candidates for an early economic model, but they remain hypotheses, and the paper's digest states that further studies are needed to test them.

Worked example with a drug class and an evidence network

All products, numbers and costs here are hypothetical and illustrative. An analyst wants annual NHS spending on a fictional drug class K and needs to know whether a new extended-release product can be compared with an older one. The graph holds the triples in the table.

SubjectPredicateObject
Alvorexis aClass K
Brenatideis aClass K
Celmarin XRis aExtended-release class K
Extended-release class Kis aClass K
Trial T1has armAlvorex; Placebo
Trial T2has armBrenatide; Placebo
Trial T3has armCelmarin XR; Brenatide

Alvorex has 1,200 prescriptions at GBP 45 each, Brenatide 800 at GBP 60 and Celmarin XR 500 at GBP 90.

Step 1. A query for products with a direct "is a" edge to Class K returns Alvorex and Brenatide, since the extended-release node is a subclass rather than a product, giving GBP 54,000 plus GBP 48,000, or GBP 102,000.

Step 2. Following "is a" edges one or more times also reaches Celmarin XR through the extended-release subclass. Annual spending is

CK=∑d∈DKnd cdC_K = \sum_{d \in D_K} n_d \, c_d

where CKC_K is annual spending on class K in GBP, DKD_K is the set of products linked to class K by one or more "is a" edges, ndn_d is the number of prescriptions for product dd and cdc_d is its cost per prescription in GBP. With the three products,

CK=1200×45+800×60+500×90=54000+48000+45000=147000C_K = 1200 \times 45 + 800 \times 60 + 500 \times 90 = 54000 + 48000 + 45000 = 147000

where each term is prescriptions multiplied by cost per prescription. The direct-edge query misses GBP 45,000, or 30.6% of the true total of GBP 147,000.

Step 3. No trial has both Celmarin XR and Alvorex as arms. A path query that follows "has arm" edges in either direction finds a chain that starts at Celmarin XR and passes through T3, Brenatide, T2, placebo and T1 before reaching Alvorex, so the three trials form a connected network with Brenatide and placebo as common comparators, and an indirect comparison is feasible.

Step 4. The graph answered two structural questions, which products belong in the cost total and whether the evidence network is connected. It said nothing about whether T1, T2 and T3 enrolled similar patients, measured outcomes in the same way or produced the relative effects a model needs, which belong to the synthesis.

Choices that change what the graph returns

Design choices sit between the source data and the answers a graph gives. When a graph supplies model inputs or a search, each should be reported.

  • Relation definitions. The meaning of "treats", "is a" or "maps to" has to be fixed, usually in an ontology, before sources are combined.
  • Mapping and hierarchy. Mappings to broader concepts lose detail, and a concept with two parents is counted under both, so summing spending across overlapping classes counts some products twice.
  • Timeliness. Hogan and colleagues note that an accurate graph goes out of date without procedures to keep it current, so a model built on a snapshot should state its date.
  • Automated extraction. Shi and Du used a language model, BioBERT, to separate arm labels, and the survey lists imprecise extraction among the causes of inaccurate facts.

Knowledge graphs beside related ideas

A knowledge graph is the store of facts, while an ontology supplies the definitions of classes and relations and the rules for deducing new facts, and a graph that holds statements about whole classes needs both. RDF, SPARQL, property graphs, graph databases and entity resolution are standards and techniques used to build and query one. On this wiki the Linked Data entry means patient-level record linkage across datasets, a different idea from semantic web linked data. Shared code systems such as SNOMED, the subject of digital interoperability work, make graph joins more reliable.

Pan and colleagues describe large language models as black-box models that often fall short of capturing factual knowledge and can hallucinate, while knowledge graphs store knowledge explicitly but are incomplete. One approach they review retrieves knowledge from a graph while the model generates text, part of the wider field of artificial intelligence in health.

Misreadings that lead to wrong model inputs

These errors come from treating the graph as evidence rather than as statements about evidence. Four recur.

  1. Reading a missing edge as a negative finding. No recorded trial is not the same as no trial.
  2. Reading an edge as an effect estimate. A positive label from a p-value rule, or a predicted probability of treatment, gives none of the effect size and uncertainty a decision model needs.
  3. Assuming the graph is complete and correct. Hogan and colleagues note that a new graph is usually incomplete and holds duplicate, contradictory or incorrect statements.
  4. Treating code mappings as lossless. Broader mappings and concepts with several parents change which records a cost-of-illness or budget impact analysis query counts.

Sources

Frequently Asked Questions (6)

  • What is a knowledge graph?

    A knowledge graph is a graph of data whose nodes stand for entities and whose edges stand for named relations, used to link trial, drug and coding data.

    Source: Hogan et al. 2021

  • How does a knowledge graph differ from an ontology in health economics work?

    Hogan and colleagues note that simple statements, such as a drug treating a condition, can be held as edges in a graph, while statements about whole classes need a more expressive layer such as an ontology or rules. The knowledge graph is the store of facts, for example which product belongs to which drug class or which trial has which arms. The ontology supplies the definitions of the classes and relations used in those facts, along with rules from which further facts can be deduced. A graph that joins trial records to a drug dictionary therefore needs both, so that a relation such as "treats" has one fixed meaning before the sources are combined.

    Source: Hogan et al. 2021

  • How can a knowledge graph show whether an indirect treatment comparison is feasible?

    Trials can be stored as nodes joined by named edges to the treatments in each arm, and graph query languages provide path expressions that match chains of edges of any length. When two treatments have never been compared head to head, a path query looks for a chain through common comparators, such as a shared active drug or placebo. If such a chain exists, the trials form a connected network and an indirect treatment comparison or network meta-analysis is possible. The graph settles only this structural question. Whether the trials enrolled similar patients and measured outcomes in the same way still has to be judged in the evidence synthesis.

    Source: Hogan et al. 2021

  • Why does a missing edge in a knowledge graph not show that no trial exists?

    Hogan and colleagues set out two ways of reading a gap in a graph. Under the closed world assumption used by many classical databases, anything not recorded is treated as false, while under the open world assumption a missing edge means only that the relation is not known. For evidence work the open world reading is the safe one, because a graph with no edge between a new drug and its main comparator shows only that no such trial is recorded there. A knowledge graph therefore cannot replace the searches of a systematic review, and a newly built graph is usually incomplete.

    Source: Hogan et al. 2021

  • How does a knowledge graph of coding vocabularies change which records a cost-of-illness study counts?

    The OMOP Common Data Model used by the OHDSI community organises its vocabularies as concepts joined by named relationships, which is the structure of a knowledge graph. Source codes such as ICD-9-CM 427.31 and Read code G573000 reach the Standard SNOMED concept for atrial fibrillation through a "Maps to" relationship, and "Is a" relationships form a hierarchy that lets an analyst retrieve a concept with all its descendants. The OHDSI authors warn that mappings are not perfect and that a code with no equivalent is mapped to a broader concept. In a cost-of-illness study from claims or health records, these choices decide which records, and so which costs, are counted.

    Source: OHDSI 2021

  • Can a knowledge graph supply the effect estimates for a cost-effectiveness model?

    In the knowledge graph that Shi and Du built from ClinicalTrials.gov results, each efficacy edge stores the comparator arm and the reported parameter value. Each efficacy result also carries a positive or negative label, set by a rule based on a p-value of 0.05 or less or a confidence interval that excludes the null value. Such a label gives none of the effect size and uncertainty that a decision model needs, and the authors list unadjusted multiple testing and the exclusion of multi-arm trials among their limitations. The graph stores and links evidence but does not itself estimate effects, so relative effects for the model still come from a synthesis of the trials it helps to find.

    Source: Shi & Du 2024

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 2 Nov 2026

Content version: 1.0.2

Canonical Identity

Term code
HS-HP-DH-045

Stable URI · Machine-readable · Resolvable · CC BY 4.0