Abstract
Traditional entity retrieval systems treat the task as a massive multi-class classification problem, often relying on bi-encoders and large vector indices. This approach suffers from high memory requirements, coarse-grained interactions, and difficulties with new entities. This paper introduces GENRE (Generative ENtity REtrieval), a novel system that retrieves entities by generating their unique names token-by-token in an autoregressive manner. By leveraging constrained beam search with a prefix tree (trie), GENRE ensures the generation of valid entity names while significantly reducing memory overhead. Experimental results across 20+ datasets demonstrate that GENRE achieves state-of-the-art performance, particularly on the KILT benchmark, while using up to 34x less memory than existing bi-encoder systems.
Introduction
Retrieving specific entities—people, places, or concepts—from massive knowledge bases like Wikipedia is fundamental to many AI applications. Whether linking a name in a news article to a database entry or answering a complex question, accuracy is paramount. Current state-of-the-art systems typically use bi-encoders to map queries and entities into a shared vector space. However, these systems face significant challenges: they require massive amounts of RAM (often exceeding 30GB) to store millions of entity vectors, they rely on simple dot products that miss fine-grained semantic interactions, and they struggle with "cold start" scenarios for new entities.
Methodology
GENRE shifts the retrieval paradigm from classification to generation. Based on the BART architecture, the model is trained to "write down" the name of the target entity conditioned on the input context.
To prevent the model from hallucinating non-existent names, the authors implement Constrained Beam Search. All valid entity names are stored in a prefix tree (trie). At each decoding step, the model is restricted to tokens that form a valid path in the trie. For end-to-end entity linking, GENRE employs a "markup" strategy. It learns to output the original text while inserting entity names in brackets next to identified mentions. This allows the model to perform mention detection and disambiguation simultaneously.
Key Insights
- Structural Compositionality: Entity names (e.g., "Metropolis (comics)") are highly structured. GENRE exploits this to better understand the relationships between entities.
- Implicit Cross-Encoding: The autoregressive decoder naturally performs cross-encoding between the input context and the generated entity name, capturing deeper semantic nuances than bi-encoders.
- Efficiency: The model's footprint scales with vocabulary size rather than the total number of entities. GENRE requires only 2.1GB of disk space, a 14x to 34x reduction compared to systems like BLINK or DPR.
Results and Discussion
GENRE was evaluated on over 20 datasets, including the KILT benchmark. It achieved a +13.7 precision point improvement on average for retrieval tasks compared to previous benchmarks. The system proved robust even when entity names were replaced with random IDs, though meaningful names provided a significant performance boost (+20 points), confirming that the semantics of titles matter.
While highly effective, GENRE faces limitations with very long entity titles (over 10 tokens) and complex coreference resolution (e.g., linking pronouns). Future work may explore trie compression for even larger knowledge bases like Wikidata, which contains over 90 million entities.
Conclusion
GENRE demonstrates that generative retrieval is a powerful and efficient alternative to traditional classification-based methods. By "writing" the answer, AI systems can achieve higher accuracy with a fraction of the memory footprint, paving the way for more accessible and scalable knowledge retrieval.
Summary updated