TL;DR
GENRE (Generative ENtity REtrieval) reimagines entity retrieval—traditionally framed as a massive classification task—as a sequence generation problem. By generating unique entity names token-by-token using a constrained transformer, it achieves state-of-the-art performance across over 20 datasets while utilizing a tiny fraction of the memory required by traditional systems.
The Problem: The Bottleneck of Dense Retrieval
In fields like Open-Domain Question Answering and Entity Linking, systems must retrieve a specific entity (like a Wikipedia page) from a Knowledge Base (KB) containing millions of entries.
The standard approach treats this as a multi-class classification problem, where every entity is an atomic label. Systems typically use "bi-encoders" to represent both the query and the entity as dense vectors, then find the best match via a dot product. This leads to three major headaches:
- Memory Bloat: Storing 1024-dimensional vectors for 6 million Wikipedia pages requires ~24GB of RAM, which grows linearly with every new entity.
- Coarse Interactions: A simple dot product often misses fine-grained relationships between the context and the entity's specific details.
- The Cold-Start Problem: It is difficult to add new entities to the system if they lack a rich textual description to encode.
The GENRE Approach: Retrieval as Generation
The authors introduce GENRE, which treats retrieval as a sequence-to-sequence (seq2seq) task. Instead of picking a label ID, the model literally "writes out" the name of the entity (e.g., “Metropolis (comics)”).
Key Components
- Autoregressive Architecture: GENRE uses BART, a pre-trained transformer encoder-decoder. The encoder processes the context, and the decoder generates the entity name token-by-token, conditioned on that context. This allows for "cross-encoding," where the model captures deep interactions between the query and the entity name.
- Constrained Beam Search: A naive generative model might hallucinate names that don't exist in the KB. To prevent this, GENRE uses a prefix tree (trie). At every step of generation, the decoder is forced to only pick tokens that lead to a valid entity name in the database.
- Markup Decoding: For end-to-end entity linking (where the system must find the mention and link it), the model is trained to output the original sentence with added annotations.
Datasets and Evaluation
The researchers evaluated GENRE on over 20 datasets spanning three main tasks:
- Entity Disambiguation (ED): AIDA-CoNLL, MSNBC, AQUAINT, ACE2004, and WNED (CWEB/WIKI).
- End-to-End Entity Linking (EL): The GERBIL benchmark (including KORE 50 and Derczynski).
- Document Retrieval (DR): The KILT benchmark, which includes 11 datasets across tasks like fact-checking (FEVER), slot filling (T-REx), and question answering (Natural Questions, HotpotQA, TriviaQA).
Key Insights and Results
- Names are Structured Data: Entity names aren't just strings; they often contain disambiguation cues (e.g., "Metropolis (1927 film)" vs. "Metropolis (comics)"). GENRE exploits this internal structure effectively.
- Efficiency through Vocabulary: Because the model's parameters scale with the vocabulary size (~50k tokens) rather than the entity count (6M+), the memory footprint is drastically reduced. GENRE’s index (the trie) and model parameters occupy only 2.1GB, compared to 30.1GB for BLINK or 70.9GB for DPR. That is a 14x to 34x reduction in disk/memory usage.
- Exact Loss Calculation: In traditional classification, you have to "subsample" negative examples because you can't compute a softmax over 6 million labels. In GENRE, the softmax is only over the 50k tokens in the vocabulary, allowing for exact, more efficient training.
- State-of-the-Art Performance: GENRE achieved new SOTA or highly competitive results on nearly all 20+ datasets. On the KILT retrieval benchmark, it improved R-precision by +13.7 points on average over existing baselines.
- Zero-Shot and Cold-Start Potential: GENRE can retrieve entities it has never seen during training as long as it knows their unambiguous name. In a "cold-start" experiment with 50 new Wikipedia entities created in 2020, GENRE correctly retrieved 100% of the entities that exactly matched the mention and 45% of those that required more complex normalization.
Limitations and Future Work
- Coreference Issues: The model struggled with datasets requiring coreference resolution (linking pronouns like "he" or "it" to entities), as it wasn't specifically trained for that task.
- Inference Speed: While memory-efficient, autoregressive generation (generating tokens one by one) can be computationally slower than a single optimized vector search, though the authors note it remains tractable for real-world use.
- Trie Scaling: While 600MB for 6 million entities is manageable, the authors suggest that for even larger KBs, more sophisticated trie management might be necessary.
Summary updated