- Type
- Structured knowledge representation pipeline
What does it do?
Knowledge graph construction is a text-mining pipeline that turns unstructured text into a graph of entities (nodes) and the relations between them (labelled edges).
Hogan et al. (2021) survey knowledge graphs in general, and Nickel et al. (2016) review relational machine learning over them, including how such models can be combined with text-based information extraction to build graphs. Graphs of this kind are used for applications such as semantic search, recommendation, and reasoning.
The intuition behind the method
Text describes a web of things and how they relate, but that web is locked inside prose a machine cannot navigate. A knowledge graph makes the web explicit: each thing becomes a node and each relationship becomes a labelled link between two nodes. Once the facts buried in text are laid out as a connected graph, a system can follow links to answer questions, recommend related items, or reason over chains of facts that no single sentence states directly.
History
Hogan et al. (2021) survey knowledge graphs, covering graph-based data models, the languages used to query and validate them, and how knowledge can be represented and extracted using deductive and inductive techniques. Nickel et al. (2016) review relational machine learning on knowledge graphs, including statistical models that predict new edges and the combination of such models with text-based extraction for constructing graphs.
When to use it
Use knowledge graph construction when you have a text corpus with many entities and relations, and you need them as a structure that can be queried by following links between entities. The method requires named-entity-recognition and relation-extraction components, either existing or built for your domain, and their output should be checked before use. An entity-linking component is recommended, because without it the same entity may appear as several nodes. Do not use this pipeline when you only need keyword or document retrieval, when the text contains few entities or relations, or when extraction quality on a sample of your text is too low to trust the edges. No validated minimum sample size is established for this pipeline, so judge whether your corpus is large enough by checking extraction accuracy on your own text. The pipeline also assumes a predefined schema of entity and relation types, that extraction is only as complete as the recognisers and relation classifiers behind it, that errors in upstream steps propagate into edges and into any chains of facts inferred from them, and that graph validity depends on the linking decisions made. Hogan et al. (2021) describe how knowledge is represented and extracted through deductive and inductive techniques, which is why the choice of schema and extraction method shapes what the graph can contain.
Limitations and considerations
- Quality depends on the upstream named-entity-recognition and relation-extraction components; an error in entity boundaries creates a wrong node, and an error in relation identification creates a wrong edge.
- Without entity linking, mentions of the same entity remain separate nodes and the evidence about it is split across them.
- The graph contains only the entity types and relation types the extraction components were set up to recognise, so facts outside that schema are not captured.
- A graph built from a snapshot of text must be rebuilt or incrementally updated when the source text changes.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Makes the entities and relations in text explicit, so they can be queried and traversed rather than only searched by keyword.
- Once entities are linked, relations found in different documents can connect through a shared node, which lets the graph surface links that no single document states.
- The constructed graph can serve as input to relational machine learning models that predict missing edges, as discussed by Nickel et al. (2016).
Applications
- Semantic search, where retrieval can draw on meaning and connected facts rather than keyword match alone.
- Recommendation, where traversing entity-relation links can suggest related items.
- Reasoning and question answering over chains of facts drawn from text, where the graph links facts that sit in different sentences or documents.
- Integrating and exploring knowledge extracted from diverse, multi-source document collections.
How it works
How it works
Named entities such as people, places, and organisations are recognised in the text and become the candidate nodes of the graph. This step depends on a named-entity-recognition component, either an existing tool or one built for the target domain, and its output determines which nodes can exist.
Relations between the recognised entities are extracted from the same text and stored as subject-relation-object triples, which become the labelled edges. The edges are only as reliable as this step's identification of how two entities are connected, so errors here carry directly into the graph.
Mentions are disambiguated and resolved to a single identifier, so that different surface forms of the same real-world thing map to one node. Without this step the graph splits one entity across several nodes; an entity-linking component is recommended for it.
The linked entities and their relations are combined into one graph of nodes joined by labelled edges. Formally, the result is a set of nodes and a set of labelled edges, each edge being a triple that links two nodes through a relation type. Downstream tasks such as semantic search, recommendation, and reasoning query this structure.
Common pitfalls
- Skipping entity linking leaves several nodes for the same real-world thing, which splits evidence across duplicates.
- Linking that merges different entities with the same name, which over-merges nodes and creates false connections between unrelated facts.
- Accepting extraction output without checking a sample of nodes and edges against the source text, so that systematic extraction errors spread into the connected paths that pass through them.
- Building a graph from a very small corpus, which yields too few connections to support reasoning across chains of facts.
Frequently asked questions
What is a knowledge graph?
It is a structured representation of knowledge as a graph: entities such as people, places, and organisations are nodes, and the relations between them are labelled edges. It captures facts as connected subject-relation-object structures rather than as free text.
What inputs does the construction pipeline need?
It needs named-entity-recognition and relation-extraction components, which supply the nodes and edges. These can be existing tools or components built for your domain. An entity-linking component is recommended so that different mentions of the same thing map to one node.
Why is entity linking important?
Entity linking disambiguates mentions and merges duplicates so that every reference to the same real-world entity collapses onto a single node. Without it, the graph fragments into duplicate and ambiguous nodes that weaken search, recommendation, and reasoning.
What is a knowledge graph used for?
Graphs of this kind are used for semantic search, recommendation, and reasoning. They let a system follow links between entities to answer questions and surface relationships that no single sentence states directly.
Related methods
Sources
Hogan, A. et al. (2021). Knowledge Graphs. ACM Computing Surveys, 54(4), 1-37.
Open DOI referenceNickel, M. et al. (2016). A Review of Relational Machine Learning for Knowledge Graphs. Proceedings of the IEEE, 104(1), 11-33.
Open DOI reference