Entity linking

Also known as: named entity linking

On this page 7

Entity linking is the natural language processing task of mapping each mentioned name in a text to a unique identifier in a knowledge base, such as an encyclopedia entry or a node in a knowledge graph. It answers not only that a span is a name, but which specific real-world entity the span refers to.

In speech & language AI, entity linking is also called named entity linking and is a core component of information extraction pipelines within artificial intelligence. It turns ambiguous strings such as “Jordan” or “Mercury” into grounded, machine-readable references that search engines, question answering systems and analytics tools can join with structured data.

How entity linking resolves a mention

Entity linking resolves a mention through a pipeline of mention detection, candidate generation and disambiguation. Each stage narrows the problem: the first finds spans worth linking, the second proposes a short list of plausible entities, and the third selects the best one or declares that none fits.

The table below summarizes what each stage consumes and produces.

StageInputOutputTypical technique
Mention detectionRaw textSpans of candidate namesNamed entity recognition or span classifier
Candidate generationMention stringTop 10 to 100 entitiesAlias tables, dense retrieval
DisambiguationMention, context, candidatesOne entity or NILCross-encoder ranking
NIL handlingLow-confidence resultsNew or unlinked entity labelThreshold or clustering
Stages of a typical entity linking pipeline

Candidate generation relies heavily on an alias dictionary built from redirects, anchor texts and alternative names, often weighted by a prior probability that a given string refers to a given entity. That prior alone resolves a large share of mentions correctly, which is why it is a strong baseline that every model should beat.

Signals used for disambiguation

Disambiguation combines local context, entity popularity and global coherence to choose among candidates. Local context compares the words around a mention with the description of each candidate, while global coherence prefers sets of entities that are related to each other within the same document.

SignalWhat it measuresWeakness
Mention priorHow often a string links to an entityFavors famous entities
Context similarityOverlap between text and entity descriptionFails on short inputs
Entity typeMatch with predicted person, place or organizationErrors propagate from tagging
Global coherenceRelatedness among linked entitiesCostly for long documents
Temporal cuesDates that fit an entity’s lifetimeRarely annotated
Disambiguation signals and their limits

Modern systems encode mentions and entities with bi-encoders for fast retrieval over millions of entries, then rerank the shortlist with a cross-encoder that reads mention and description together. Generative approaches instead produce the entity name token by token, constrained to valid titles, and large language models can perform linking through prompting, although they need a closed identifier list to avoid hallucinated entities.

Entity linking versus neighboring tasks

Entity linking differs from named entity recognition because recognition only labels a span with a type, whereas linking assigns an identity. It also differs from coreference resolution and word sense disambiguation, although all three resolve ambiguity in meaning. The table below applies each task to the mention “Paris”.

TaskQuestion answeredOutput for the mention
Named entity recognitionIs this span a name, and of what typeLocation
Entity linkingWhich entity is meantIdentifier of Paris, France, or Paris, Texas
Coreference resolutionWhich mentions refer to the same thingCluster with “the city” and “it”
Word sense disambiguationWhich dictionary sense appliesSense of a common word, not a name
Relation extractionHow two entities are connectedCapital of France
How entity linking relates to similar tasks

In practice these tasks support each other. Linked identifiers make relation extraction far more useful because extracted facts can be merged into a knowledge graph, and coreference chains let a linker propagate one confident decision to every pronoun and short form in the document.

Evaluating entity linking quality

Entity linking quality is measured with precision, recall and F1 over correctly linked mentions, reported either as micro averages across all mentions or macro averages across documents. Evaluation setups differ in whether gold mention spans are given, so scores from end-to-end linking and disambiguation-only settings are not directly comparable.

Results also depend strongly on domain. News text with famous entities is relatively easy, while biomedical, legal and social media text contains rare entities, abbreviations and misspellings. Spoken input adds speech recognition errors, so a misheard surname can make the correct candidate unreachable before disambiguation even starts.

Limitations and common failure modes

The main limitation of entity linking is its dependence on the target knowledge base: an entity that is missing, outdated or poorly described cannot be linked correctly. Systems also inherit a popularity bias, linking an obscure local person to a famous namesake because the prior strongly favors the well-known entry.

ErrorCauseRemedy
Wrong famous namesakeOver-reliance on mention priorWeight context and coherence higher
Correct entity never proposedMissing alias in dictionaryAdd aliases, use dense retrieval
Forced link for unknown entityNo NIL thresholdCalibrate a rejection score
Stale identifiersOutdated knowledge base snapshotRefresh index on a schedule
Drop on transcriptsSpeech recognition errorsPhonetic or fuzzy matching
Typical errors and practical remedies
  • Calibrate confidence so downstream systems can choose between precision and coverage.
  • Evaluate on in-domain samples, because benchmark scores rarely transfer unchanged.
  • Keep the knowledge base version recorded with every output for reproducibility.

The idea in brief

Many names point to more than one thing. “Amazon” can be a river or a company, and “Washington” can be a person, a state or a city. Entity linking decides which one a sentence actually means and attaches a precise label to it.

It works like a careful librarian who reads the surrounding sentence, checks the catalog and files each name under the right card. Once names carry those cards, computers can connect facts across many documents without confusing two different things that share a name.

A practical scenario

A pharmacovigilance team at a drug manufacturer monitors medical literature and patient forum posts for reports of side effects. Each week, roughly 20,000 new texts mention drugs, conditions and genes using brand names, abbreviations and frequent misspellings.

The team deploys an entity linking model that maps every mention to identifiers in a controlled medical vocabulary. Candidate generation uses an alias list with several hundred thousand synonyms, and a cross-encoder reranks the top 50 candidates using the surrounding sentence. Mentions scoring below a calibrated threshold are routed to human reviewers instead of being linked automatically.

Because a brand name and its generic ingredient now share one identifier, reports that previously appeared unrelated are aggregated under the same drug. Analysts detect signal clusters earlier, and the reviewers spend their time only on the ambiguous minority of uncertain mentions.