Abstract
We show that it is feasible to perform entity linking by training a dual encoder (two-tower) model that encodes mentions and entities in the same dense vector space, where candidate entities are retrieved by approximate nearest neighbor search. Unlike prior work, this setup does not rely on an alias table followed by a re-ranker, and is thus the first fully learned entity retrieval model. We show that our dual encoder, trained using only anchor-text links in Wikipedia, outperforms discrete alias table and BM25 baselines, and is competitive with the best comparable results on the standard TACKBP-2010 dataset. In addition, it can retrieve candidates extremely fast, and generalizes well to a new dataset derived from Wikinews. On the modeling side, we demonstrate the dramatic value of an unsupervised negative mining algorithm for this task.
Introduction
Entity Resolution (ER) is the critical task of linking a textual mention (e.g., "Costa") to its corresponding entry in a knowledge base (KB), such as Wikipedia. Traditionally, this has been a two-stage process: first, candidate generation using a heuristic "alias table" (a dictionary of names and their potential entities), followed by a complex re-ranking stage.
This pipeline has significant drawbacks. Alias tables are often context-blind and fail if a name variant is missing or if the correct entity has a low prior probability. Furthermore, these tables require manual curation and do not generalize easily to new domains. We propose DEER (Dual Encoder for Entity Retrieval), a fully learned model that replaces the discrete alias table with a dense vector retrieval system.
The DEER Architecture
The core of DEER is a dual encoder architecture, often referred to as a "two-tower" model. One tower encodes the mention and its local context, while the other encodes the entity's metadata from the KB.
As shown in Figure 1, the mention tower processes the mention span, its immediate left and right context, and the full sentence. The entity tower processes the entity's title, the first paragraph of its Wikipedia entry, and its categories. Both towers produce a fixed-length dense vector. The similarity between a mention and an entity is computed as the cosine distance between their respective vectors. This decoupled design allows entity vectors to be pre-computed and indexed for efficient retrieval.
Training with Hard Negative Mining
A key challenge in training dense retrieval models is the selection of negative examples. Simple random negatives are often too easy to distinguish, leading the model to rely on shallow keyword matching. To address this, we employ an iterative hard negative mining strategy. We use the current state of the model to retrieve the top "nearest neighbors" for a given mention. Those that are incorrect are used as "hard negatives" in the next training round, forcing the model to learn subtle contextual nuances.
Experimental Results
We evaluated DEER on two primary datasets: the standard TACKBP-2010 benchmark and a newly introduced Wikinews dataset consisting of 2018 news articles.
As shown in Figure 3, DEER achieves a Recall@1 of 87.0% on TACKBP-2010, significantly outperforming traditional alias-table baselines (AT-Prior and AT-Ext) and remaining competitive with complex re-ranking systems. On the Wikinews dataset, DEER demonstrated strong generalization, achieving a Recall@100 of 97.9%.
Beyond accuracy, DEER offers massive improvements in efficiency. By utilizing Approximate Nearest Neighbor (ANN) search with asymmetric hashing, the system can retrieve the correct entity from a pool of 5.7 million candidates in approximately 3 milliseconds. This is a 100x speedup over brute-force search, making it suitable for real-time applications.
Conclusion
DEER represents a shift from heuristic-based entity retrieval to a fully learned, context-aware dense representation approach. By leveraging dual encoders and hard negative mining, we achieve state-of-the-art retrieval performance with sub-millisecond latency. Future work includes exploring more complex encoders like BERT and incorporating global document coherence into the resolution process.
Summary updated