Relation Extraction
Named entity recognition tells you that a sentence mentions "Satya Nadella" and "Microsoft". It does not tell you that he runs the company. Relation extraction supplies the missing verb: given a text and the entities in it, decide which relation — if any — holds between a pair of them.
How it is done
- Patterns — hand-written lexical or dependency rules such as "X, the chief executive of Y". Precise, cheap, and endlessly incomplete, because language has more ways to say a thing than you have patience.
- Supervised classification — the entity pair is marked up in the sentence and a classifier assigns one label from a fixed schema. A fine-tuned encoder with entity markers is the standard approach; TACRED and SemEval-2010 Task 8 are the usual benchmarks.
- Distant supervision — align an existing knowledge base against a corpus and treat every sentence containing a known pair as a labelled example. It buys training data in bulk and pays in noise, since a sentence can mention both entities without stating the relation at all.
Why it is harder than it looks
Most candidate pairs stand in no relation, so that class dominates the data and precision, not accuracy, is the number that matters. Direction is half the label: "Oracle acquired Sun" and "Sun acquired Oracle" share every token. And the evidence often spans sentences, with the subject named in the headline and the relation stated three paragraphs down — which is why document-level datasets exist.
Why it matters
This is the step that turns prose into a knowledge graph you can query: drug-gene interactions out of papers, ownership chains out of filings, dependencies out of incident reports. Errors here do not stay local — they land in a table, where a wrong fact looks as authoritative as a right one.
Relation extraction assigns a labelled relation to a pair of entities mentioned in a text — "Nadella" and "Microsoft" becoming an employment relation — choosing from a fixed schema or deciding that no relation holds. It takes the entities named entity recognition found and turns them into structured facts, which is how prose becomes a queryable knowledge graph. Most candidate pairs are unrelated, so precision against a dominant negative class is the real difficulty.
An index tells you that a report mentions a company and a person. It does not tell you that she founded it. Relation extraction is software filling in that missing link: it reads the sentence and works out how two things mentioned in it are connected — who works for whom, which firm bought which, which drug affects which gene. That is what turns a pile of documents into a table you can actually search, instead of pages someone has to read. The skill is restraint. Most pairs of names in a sentence have nothing to do with each other, and inventing a connection puts a wrong fact into the table, where it looks just as confident as a right one.