summaries: The paper introduces a new method to retrieve entity by auto regressively generating unique entity name as a sequence of word pieces, instead of pinpointing the ID representing an entity. This method stands out in novelty compared to existing various entity retrieval methods, which always assigns a single ID to each entity. Practically, the proposed method has two nice properties: (1) When the entity vocabulary is very large, this approach requires less parameter space and memory compared to other methods (as shown clearly in Table 4) (2) The model can address novel entities, which was unseen during the training. The paper is clearly written and extensively evaluated on three relevant tasks, entity disambiguation, entity linking, and entity retrieval. This paper proposes to tackle the entity linking task using a sequence-to-sequence neural model, trained by producing unique entity names, in autoregressive fashion. The paper makes a case that this approach can scale better with larger entity vocabularies than previous methods with dedicated entity representations both in terms of memory as well as computation costs. The model is studied under a number of tasks including entity disambiguation, entity linking and document retrieval for question answering. The paper proposed to use autoregressive approach to solve entity-based problems. They proposed a uniform framework and showed that their model achieved the state of the art performance on 3 different types of tasks (~20 datasets). The GENRE model also significantly reduced the memory usage compared to previous models that stored a big memory table. It's also capable of linking novel entities at inference time. This paper is clearly written. The experiment results are convincing.
abstractText: Entities are at the center of how we represent and aggregate knowledge. For instance, Encyclopedias such as Wikipedia are structured by entities (e.g., one per Wikipedia article). The ability to retrieve such entities given a query is fundamental for knowledge-intensive tasks such as entity linking and open-domain question answering. One way to understand current approaches is as classifiers among atomic labels, one for each entity. Their weight vectors are dense entity representations produced by encoding entity meta information such as their descriptions. This approach leads to several shortcomings: (i) context and entity affinity is mainly captured through a vector dot product, potentially missing fine-grained interactions between the two; (ii) a large memory footprint is needed to store dense representations when considering large entity sets; (iii) an appropriately hard set of negative data has to be subsampled at training time. In this work, we propose GENRE, the first system that retrieves entities by generating their unique names, left to right, token-by-token in an autoregressive fashion and conditioned on the context. This enables us to mitigate the aforementioned technical issues since: (i) the autoregressive formulation allows us to directly capture relations between context and entity name, effectively cross encoding both; (ii) the memory footprint is greatly reduced because the parameters of our encoder-decoder architecture scale with vocabulary size, not entity count; (iii) the exact softmax loss can be efficiently computed without the need to subsample negative data. We show the efficacy of the approach, experimenting with more than 20 datasets on entity disambiguation, end-to-end entity linking and document retrieval tasks, achieving new state-of-the-art or very competitive results while using a tiny fraction of the memory footprint of competing systems. Finally, we demonstrate that new entities can be added by simply specifying their unambiguous name. Code and pre-trained models at https://github.com/facebookresearch/GENRE.
authors.name: ENTITY RETRIEVAL
authors.name: Nicola De Cao
authors.name: Gautier Izacard
authors.name: Sebastian Riedel
authors.name: Fabio Petroni
references.authors: Alan Akbik Tanja Bergmann Duncan Blythe Kashif Rasul Stefan Schweter Roland Vollgraf
references.title: FLAIR: An easy-to-use framework for state-of-the-art NLP
references.venue: In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations),
references.authors: Peter Anderson Basura Fernando Mark Johnson Stephen Gould
references.title: Guided open vocabulary image captioning with constrained beam search
references.venue: In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing,
references.authors: Anusha Balakrishnan Jinfeng Rao Kartikeya Upasani Michael White Rajen Subba
references.title: Constrained decoding for neural NLG from compositional representations in task-oriented dialogue
references.venue: In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics,
references.authors: Steven M. Beitzel Eric C. Jensen Ophir Frieder
references.title: Average R-Precision, pp. 195–195
references.venue: ISBN 978-0-387-39940-9
references.authors: Samuel Broscheit
references.title: Investigating entity knowledge in BERT with simple neural end-to-end entity linking
references.venue: In Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL),
references.authors: Danqi Chen Adam Fisch Jason Weston Antoine Bordes
references.title: Reading Wikipedia to answer open-domain questions. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
references.authors: Shuang Chen Jinpeng Wang Feng Jiang Chin-Yew Lin
references.title: Improving entity linking by modeling latent entity type information
references.venue: In Proceedings of the AAAI Conference on Artificial Intelligence,
references.authors: Thomas H Cormen Charles E Leiserson Ronald L Rivest Clifford Stein
references.title: Introduction to algorithms
references.venue: MIT press,
references.authors: Angel Daza Anette Frank
references.title: A sequence-to-sequence model for semantic role labeling
references.venue: In Proceedings of The Third Workshop on Representation Learning for NLP,
references.authors: Leon Derczynski Diana Maynard Giuseppe Rizzo Marieke Van Erp Genevieve Gorrell Raphaël Troncy Johann Petrak Kalina Bontcheva
references.title: Analysis of named entity recognition and linking for tweets
references.venue: Information Processing & Management,
references.authors: Jacob Devlin Ming-Wei Chang Kenton Lee Kristina Toutanova
references.title: BERT: Pre-training of deep bidirectional transformers for language understanding
references.authors: Emily Dinan Stephen Roller Kurt Shuster Angela Fan Michael Auli Jason Weston
references.title: Wizard of wikipedia: Knowledge-powered conversational agents
references.venue: Proceedings of the International Conference on Learning Representations (ICLR),
references.authors: Hady Elsahar Pavlos Vougiouklis Arslen Remaci Christophe Gravier Jonathon Hare Elena Simperl Frederique Laforest
references.title: T-rex: A large scale alignment of natural language with knowledge base triples
references.authors: Angela Fan Yacine Jernite Ethan Perez David Grangier Jason Weston Michael Auli
references.title: ELI5: long form question answering
references.venue: Proceedings of the 57th Conference of the Association for Computational Linguistics,
references.authors: Zheng Fang Yanan Cao Qian Li Dongjie Zhang Zhenyu Zhang Yanbing Liu
references.title: Joint entity linking with deep reinforcement learning
references.venue: In The World Wide Web Conference,
references.authors: David A Ferrucci
references.title: Introduction to “this is watson
references.venue: IBM Journal of Research and Development,
references.authors: Evgeniy Gabrilovich Michael Ringgaard Amarnag Subramanya
references.title: Facc1: Freebase annotation of clueweb corpora, version 1 (release date 2013-06-26, format version 1, correction level 0). Note: http://lemurproject
references.venue: org/clueweb09/FACC1/Cited by,
references.authors: Octavian-Eugen Ganea Thomas Hofmann
references.title: Deep joint entity disambiguation with local neural attention
references.venue: In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing,
references.authors: Zhaochen Guo Denilson Barbosa
references.title: Robust named entity disambiguation with random walks
references.venue: Semantic Web,
references.authors: Johannes Hoffart Mohamed Amir Yosef Ilaria Bordino Hagen Fürstenau Manfred Pinkal Marc Spaniol Bilyana Taneva Stefan Thater Gerhard Weikum
references.title: Robust disambiguation of named entities in text
references.venue: In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing,
references.authors: Johannes Hoffart Stephan Seufert Dat Ba Nguyen Martin Theobald Gerhard Weikum
references.title: KORE: Keyphrase Overlap Relatedness for Entity Disambiguation
references.venue: In Proceedings of the 21st ACM International Conference on Information and Knowledge Management,
references.authors: Chris Hokamp Qun Liu
references.title: Lexically constrained decoding for sequence generation using grid beam search. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
references.venue: URL https://www.aclweb. org/anthology/P17-1141
references.authors: Hongzhao Huang Larry Heck Heng Ji
references.title: Leveraging deep neural networks and knowledge graphs for entity disambiguation
references.venue: arXiv preprint arXiv:1504.07678,
references.authors: Samuel Humeau Kurt Shuster Marie-Anne Lachaux Jason Weston
references.title: Poly-encoders: Architectures and pre-training strategies for fast and accurate multi-sentence scoring
references.venue: In International Conference on Learning Representations,
references.authors: Jeff Johnson Matthijs Douze Hervé Jégou
references.title: Billion-scale similarity search with gpus
references.venue: IEEE Transactions on Big Data,
references.authors: Vladimir Karpukhin Barlas Oguz Sewon Min Patrick Lewis Ledell Wu Sergey Edunov Danqi Chen Wen-tau Yih
references.title: Dense passage retrieval for open-domain question answering
references.venue: In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 6769–6781,
references.authors: Diederik P Kingma Jimmy Ba
references.title: Adam: A method for stochastic optimization
references.venue: Proceedings of the 3rd International Conference on Learning Representations (ICLR),
references.authors: Nikolaos Kolitsas Octavian-Eugen Ganea Thomas Hofmann
references.title: End-to-end neural entity linking
references.venue: In Proceedings of the 22nd Conference on Computational Natural Language Learning,
references.authors: Ioannis Konstas Srinivasan Iyer Mark Yatskar Yejin Choi Luke Zettlemoyer
references.title: Neural AMR: Sequence-to-sequence models for parsing and generation
references.venue: In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers),
references.authors: Tom Kwiatkowski Jennimaria Palomaki Olivia Redfield Michael Collins Ankur Parikh Chris Alberti Danielle Epstein Illia Polosukhin Jacob Devlin Kenton Lee Kristina Toutanova Llion Jones Matthew Kelcey Ming-Wei Chang Andrew M. Dai Jakob Uszkoreit Quoc Le Slav Petrov
references.title: Natural questions: A benchmark for question answering research
references.venue: Transactions of the Association for Computational Linguistics,
references.authors: Phong Le Ivan Titov
references.title: Improving entity linking by modeling latent relations between mentions
references.venue: In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers),
references.authors: Phong Le Ivan Titov
references.title: Boosting entity linking performance by leveraging unlabeled documents
references.venue: In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics,
references.authors: Jure Leskovec Anand Rajaraman Jeffrey David Ullman
references.title: Mining of Massive Datasets
references.authors: Omer Levy Minjoon Seo Eunsol Choi Luke Zettlemoyer
references.title: Zero-shot relation extraction via reading comprehension
references.venue: In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL
references.authors: Mike Lewis Yinhan Liu Naman Goyal Marjan Ghazvininejad Abdelrahman Mohamed Omer Levy Veselin Stoyanov Luke Zettlemoyer
references.title: BART: Denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension
references.venue: In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics,
references.authors: Patrick Lewis Ethan Perez Aleksandara Piktus Fabio Petroni Vladimir Karpukhin Naman Goyal Heinrich Küttler Mike Lewis Wen-tau Yih Tim Rocktäschel
references.title: Retrieval-augmented generation for knowledge-intensive NLP tasks
references.venue: arXiv preprint arXiv:2005.11401,
references.authors: Jiangming Liu Shay B. Cohen Mirella Lapata
references.title: Discourse representation structure parsing. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
references.authors: Lajanugen Logeswaran Ming-Wei Chang Kenton Lee Kristina Toutanova Jacob Devlin Honglak Lee
references.title: Zero-shot entity linking by reading entity descriptions
references.venue: In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics,
references.authors: Pedro Henrique Martins Zita Marinho André F.T. Martins
references.title: Joint learning of named entity recognition and entity linking
references.venue: In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: Student Research Workshop,
references.authors: Luca Massarelli Fabio Petroni Aleksandra Piktus Myle Ott Tim Rocktäschel Vassilis Plachouras Fabrizio Silvestri Sebastian Riedel
references.title: How decoding strategies affect the verifiability of generated text
references.authors: Andrea Moro Alessandro Raganato Roberto Navigli
references.title: Entity linking meets word sense disambiguation: a unified approach
references.venue: Transactions of the Association for Computational Linguistics,
references.authors: Isaiah Onando Mulang Kuldeep Singh Chaitali Prabhu Abhishek Nadgeri Johannes Hoffart Jens Lehmann
references.title: Evaluating the impact of knowledge graph context on entity disambiguation models
references.venue: In Proceedings of the 29th ACM International Conference on Information & Knowledge Management,
references.authors: Rodrigo Nogueira Zhiying Jiang Ronak Pradeep Jimmy Lin
references.title: Document ranking with a pretrained sequence-to-sequence model. In Findings of the Association for Computational Linguistics: EMNLP 2020
references.venue: pp. 708–718,
references.authors: Andrea Giovanni Nuzzolese Anna Lisa Gentile Valentina Presutti Aldo Gangemi Darı́o Garigliotti Roberto Navigli
references.title: Open knowledge extraction challenge
references.venue: In Semantic Web Evaluation Challenges,
references.authors: Yasumasa Onoe Greg Durrett
references.title: Fine-grained entity typing for domain independent entity linking
references.venue: In AAAI,
references.authors: Myle Ott Sergey Edunov Alexei Baevski Angela Fan Sam Gross Nathan Ng David Grangier Michael Auli
references.title: fairseq: A fast, extensible toolkit for sequence modeling
references.venue: In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations),
references.authors: Fabio Petroni Tim Rocktäschel Sebastian Riedel Patrick Lewis Anton Bakhtin Yuxiang Wu Alexander Miller
references.title: Language models as knowledge bases
references.venue: In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP),
references.authors: Fabio Petroni Patrick Lewis Aleksandra Piktus Tim Rocktäschel Yuxiang Wu Alexander H. Miller Sebastian Riedel
references.title: How context affects language models’ factual predictions
references.venue: In Automated Knowledge Base Construction,
references.authors: Fabio Petroni Aleksandra Piktus Angela Fan Patrick Lewis Majid Yazdani Nicola De Cao James Thorne Yacine Jernite Vassilis Plachouras Tim Rocktäschel
references.title: KILT: a Benchmark for Knowledge Intensive Language Tasks
references.venue: arXiv preprint arXiv:2009.02252,
references.authors: Francesco Piccinno Paolo Ferragina
references.title: From tagme to wat: A new entity annotator
references.venue: In Proceedings of the First International Workshop on Entity Recognition and Disambiguation,
references.authors: Matt Post David Vilar
references.title: Fast lexically constrained decoding with dynamic beam allocation for neural machine translation
references.venue: In Proceedings of the 2018 Conference of the North American Chapter of the Association
references.authors: A. Radford Jeffrey Wu R. Child David Luan Dario Amodei Ilya Sutskever
references.title: Language models are unsupervised multitask learners
references.venue: In Technical report,
references.authors: Jonathan Raiman Olivier Raiman
references.title: Deeptype: multilingual entity linking by neural type system evolution
references.venue: In Proceedings of the AAAI Conference on Artificial Intelligence,
references.authors: Michael Röder Ricardo Usbeck Axel-Cyrille Ngonga Ngomo
references.title: Gerbil–benchmarking named entity recognition and linking consistently
references.venue: Semantic Web,
references.authors: Stephen Roller Emily Dinan Naman Goyal Da Ju Mary Williamson Yinhan Liu Jing Xu Myle Ott Kurt Shuster Eric M Smith
references.title: Recipes for building an open-domain chatbot
references.authors: Subendhu Rongali Luca Soldaini Emilio Monti Wael Hamza
references.title: Don’t parse, generate! a sequence to sequence architecture for task-oriented semantic parsing
references.venue: In Proceedings of The Web Conference
references.authors: Hamed Shahbazi Xiaoli Z Fern Reza Ghaeini Rasha Obeidat Prasad Tadepalli
references.title: Entity-aware ELMo: Learning Contextual Entity Representation for Entity Disambiguation
references.authors: Nitish Srivastava Geoffrey Hinton Alex Krizhevsky Ilya Sutskever Ruslan Salakhutdinov
references.title: Dropout: A simple way to prevent neural networks from overfitting
references.venue: Journal of Machine Learning Research,
references.authors: Nadine Steinmetz Harald Sack
references.title: Semantic multimedia information retrieval based on contextual descriptions
references.venue: The Semantic Web: Semantics and Big Data,
references.authors: Ilya Sutskever James Martens Geoffrey E Hinton
references.title: Generating text with recurrent neural networks
references.venue: In Proceedings of the 28th International Conference on Machine Learning (ICML),,
references.authors: Ilya Sutskever Oriol Vinyals Quoc V Le
references.title: Sequence to sequence learning with neural networks. In Advances in neural information processing
references.authors: June
references.title: Association for Computational Linguistics
references.venue: doi: 10.18653/v1/N18-1074. URL
references.authors: 2016. Ikuya Yamada Hiroyuki Shindo Hideaki Takeda Yoshiyasu Takefuji
references.title: Joint learning
references.authors: E êiK
references.title: Training We pre-trained GENRE on BLINK data for 200k steps and then we do model selection on the validation set. Afterward, we fine-tuned on AIDA without resetting the learning rate nor the optimizer statistics for 10k steps and we do model selection on the validation
references.venue: set. Following previous works (Yamada et al.,
sections.heading: 1 INTRODUCTION
sections.text: The ability to retrieve the correct entity from large Knowledge Bases (KBs) given a textual input is a fundamental building block for several applications (Ferrucci, 2012; Slawski, 2015; Yang et al., 2018a). Most commercial recommendation systems, for instance, include in their pipelines components to detect and disambiguate entity mentions in open text, in order to isolate relevant concepts from non-meaningful data (Slawski, 2015; Yang et al., 2018a). Another example are chat-bots and question answering systems, that are often equipped with retrieval components to surface specific KB entries (e.g., Wikipedia articles) to find knowledge for sustaining a conversation or answering a question (Ferrucci, 2012; Chen et al., 2017; Lewis et al., 2020b; Roller et al., 2020).
  Although there has been extensive previous work on entity retrieval (e.g. Hoffart et al., 2011; Piccinno & Ferragina, 2014; Huang et al., 2015; Le & Titov, 2018; Logeswaran et al., 2019; Broscheit, 2019; Wu et al., 2020, to name just a few) there is a common design choice to most current solutions: entities are associated with a unique atomic label and the retrieval problem can be interpreted as multi-class classification across these labels. The match between input and label is calculated through a bi-encoder (Wu et al., 2020; Karpukhin et al., 2020): a dot product between dense vector encodings of the input and the entity’s meta information (such as title and description). ∗ Work done during internship with Facebook AI Research.
  Critically, this formulation enables sub-linear search using modern maximum-inner-product-search libraries (Johnson et al., 2019) and hence supports retrieving from large entity databases.
  Unfortunately, the classifier approach to entity retrieval also has several shortcomings. First, unless a costly cross-encoder is used for re-ranking (Wu et al., 2020), the dot-product can miss fine-grained interactions between input and entity meta information (Humeau et al., 2020). Second, storing dense vectors for the whole KB requires a large memory footprint, especially in real-world scenarios (i.e., ∼24GB to store 1024-dimensional vectors for all of the∼6M Wikipedia pages), and the size linearly grows with the addition of new entities. Third, computing an exact softmax over all entities is very expensive, hence current solutions need to subsample negative data (Logeswaran et al., 2019; Karpukhin et al., 2020) at training time. Tuning an appropriately hard set of negative instances can be challenging and time-consuming. Finally, existing systems can suffer from a cold-start problem since they cannot represent entities about which they have not yet gathered sufficient information, in the form, for instance, of a textual description or a set of relations with the existing entities.
  The treatment of entity identifiers as atomic labels in a classifier ignores the fact that we often have unambiguous, highly structured and compositional entity names. Wikipedia, for instance, associates unique titles to articles,1 that may be the name of the subject or a description of its topic, as well as potential distinctive information to disambiguate 2 (see Figure 1 for some examples). These entity names often interact with mention contexts in a predictable and regular fashion. For example, often entity names are identical with the mention strings that refer to them (e.g., Fig. 1f). When this is not possible, they might be composed of tokens in the context (e.g., Fig. 1b), include a type specification that can inferred (e.g., Fig. 1a), be the translation of the string mention (e.g., Fig. 1c), require ‘normalization’ such as referring to the correct alias of a mention (e.g., Fig. 1d), or require factual knowledge that might be stored in the parameters of a model (e.g., Fig. 1e). These observations suggest that inputs could be translated into unique entity names, word by word, instead of being classified among a huge set of options.
  In this paper, we propose GENRE (for Generative ENtity REtrieval), the first entity retriever that exploits a sequence-to-sequence architecture to generate entity names in an autoregressive fashion conditioned on the context. Concretely, GENRE uses a transformer-based architecture, pre-trained with a language modeling objective (i.e., we use BART weights from Lewis et al. (2020a)) and fine-tuned to generate entity names. This architecture has been shown to retain factual knowledge
  1We use entity name to refer to the corresponding Wikipedia article title throughout the rest of the paper. 2often in the form of a description in parentheses after the name. Wikipedia naming conventions are de-
  scribed in https://en.wikipedia.org/wiki/Wikipedia:Article_titles.
  to some extent (Petroni et al., 2019) and language translation skills (Radford et al., 2019) among other things, both desirable properties for an entity retriever. Naturally, the generated output might not always be a valid entity name. To solve this problem, GENRE employs a constrained decoding strategy that forces each generated name to be in a predefined candidate set.
  The autoregressive formulation allows us to directly capture the aforementioned relations between context and entity name, effectively cross encoding both. Also, the memory footprint required is orders of magnitude smaller than current systems, since the parameters of a sequence-to-sequence model scale linearly with the vocabulary size, not entity count. Moreover, the exact softmax can be computed efficiently for each output token (i.e., all non-gold tokens are considered negative), thereby eliminating the need for negative data downsampling. Finally, our model never accesses any explicit meta-information about the entity beyond their title, hence new entities can be added by simply appending their unambiguous name to the candidate set (e.g., Fig. 1b refers to an entity added after training).
  We empirically evaluate the performance of GENRE on more than 20 datasets, spanning three families of tasks: (i) entity disambiguation, using popular datasets and settings (both in and out-of– domain); (ii) end-to-end entity linking, with the GERBIL benchmarking tool (Röder et al., 2018), by using a novel dynamically markup-constrained decoding strategy; (iii) document retrieval, with the recently proposed KILT benchmark (Petroni et al., 2020b) which spans 5 different sub-tasks. Our models achieve state-of-the-art or very competitive results on nearly all datasets, often with substantial improvement (+13.7 precision points on KILT for retrieval on average). Further, we show that compared with recent models, GENRE requires substantially less memory (∼20 times smaller footprint on average). Finally, we demonstrate that our model can be applied in scenarios where the only entity information available is its name.
  We organize the paper as follows: in Section 2 we describe our problem formulation. Then, in Section 3 we present GENRE and eventually in Section 4 we extensively evaluate our method on the aforementioned settings. We will release code and pre-processed data to reproduce our experiments.
sections.heading: 2 ENTITY RETRIEVAL
sections.text: We assume to have a collection of entities E (e.g., Wikipedia articles) where each entity is an entry in a Knowledge Base (KB) such as Wikipedia. We want to approach the following retrieval problem: given a textual input source x (e.g., question), a model has to return the most relevant entities from E with respect to x. We assume that each e ∈ E is uniquely assigned to a textual representation (i.e., its name): a sequence of tokens y (e.g., Wikipedia pages are identified by their titles).
  A particular instance of this problem is Entity Disambiguation (ED) (see Figure 1 for an example) where an input x is annotated with a mention and a system has to select either its corresponding entity from E , or to predict that there is no corresponding entry in the KB. Another instance is pagelevel Document Retrieval (DR) where the input x is intended as a query and E as a collection of documents identified by their unique titles (e.g., Wikipedia articles).
sections.heading: 3 METHOD
sections.text: We address the retrieval problem with an sequence-to-sequence model that generates textual entity identifiers (i.e., entity names). Concretely, GENRE ranks each e ∈ E by computing a score with an autoregressive formulation: score(e|x) = pθ(y|x) = ∏N i=1 pθ(yi|y<i, x) where y is the set of N tokens in the identifier of e, and θ the parameters of the model. We take advantage of fine-tuning the BART (Lewis et al., 2020a) pre-trained language model. We train GENRE using a standard seq2seq objective, i.e., maximizing the output sequence likelihood with teacher forcing (Sutskever et al., 2011; 2014) and regularized with dropout (Srivastava et al., 2014) and label smoothing (Szegedy et al., 2016). Concretely, we use the objective that is typically used for neural machine translation (NMT, Wu et al., 2016), that is maximizing log pθ(y|x) with respect to model’s parameters θ which, due to the factorized formulation, can be calculated exactly. We do not need negative sampling to approximate the loss normalizer.
sections.heading: 3.1 INFERENCE WITH CONSTRAINED BEAM SEARCH
sections.text: Naturally, at test time, we could compute a score for every element in E and then sort them. Unfortunately, this might be prohibitively expensive when E is very large (e.g., Wikipedia has ∼6M entities). Hence, we exploit Beam Search (BS, Sutskever et al., 2014), an established approximate decoding strategies to efficiently navigate the search space. Instead of explicitly scoring all entities in E , we search for the top-k entities in E decoding from our model using BS with k beams. Note that using BS implies that the time cost of our retriever does not depend on the size of E , but only on the size of the beams and the average length of entity representations as we do autoregressive generation. The average length of entity representations is tractable (e.g., Wikipedia titles have 6 BPE tokens on average) and we follow standard NMT settings where k is small (e.g., 10).
  Since we want to output only entities from E we cannot use traditional BS while decoding. Indeed, allowing to generate any token from the vocabulary at every decoding step might lead the model to generate output strings that are not valid identifiers. Hence, we resort to Constrained BS, forcing to only decode valid entity identifiers. BS only considers one step ahead during decoding so we can only constrain the generation of a single next token conditioned on the previous ones. Thus, we define our constrain in terms of a prefix tree T (aka trie) (Cormen et al., 2009) where nodes are annotated with tokens from the vocabulary. For each node t ∈ T , its children indicate all the allowed continuations from the prefix defined traversing the trie from the root to t.
  See Figure 9 in Appendix C for an exampled of a trie. When the number of allowed outputs is tractable (e.g., generating a Wikipedia title among ∼6M) the trie is relatively small it can be precomputed and stored into memory (e.g., constraining on Wikipedia titles using the BART tokenizer produces a trie with ∼6M leaves, ∼17M internal nodes that occupied ∼600MB of disk space). We employed the constraints masking the log-probabilities of the invalid tokens and not their logits (i.e., we do not re-normalize the probability over the vocabulary).3
sections.heading: 3.2 AUTOREGRESSIVE END-TO-END ENTITY LINKING
sections.text: We additionally extend our autoregressive framework to address end-to-end Entity Linking (EL) where, given a document, a system has to both detect entity mentions and link those mentions to their respective KB entities. In this setting, we train the model to predict the source input again but with annotated spans. We use a Markup annotation where spans boundaries are flagged with special tokens and accompanied by their corresponding entity identifiers.
  Differently from a setting where the output space is relatively small (e.g., a pre-defined set E), the space of annotated outputs is exponentially large. Hence, it is intractable to pre-compute a trie for decoding, and we compute it dynamically instead. In Figure 2 we show an example. At each generation step, the decoder is either generating a mention span, generating a link to a mention, or continuing from the input source. When outside a mention/entity step the decoder has only two options: (i) to continue by copying the next token from the input source, or (ii) to generate the start of mention token (i.e., ‘[’) which makes the decoder enter the mention generating phase. While
  3We experimented with both versions and we find masking the log-probability more effective.
  generating a mention, the decoder has either to continue with the next token in the input source or to generate the end of mention token (i.e., ‘]’) which makes the decoder enter the entity generating phase. Finally, when generating an entity, the decoder employs the entities trie such that it can only output a valid entity identifier as in Constrained Beam Search explained above.
sections.heading: 4 EXPERIMENTS
sections.text: We extensively evaluate GENRE on more than 20 datasets across 3 tasks: Entity Disambiguation, end-to-end Entity Linking (EL), and page-level Document Retrieval. We describe the experimental settings in Section 4.1 where we discuss results in Section 4.2. All experiments are in English.
sections.heading: 4.1 SETTINGS
sections.text: Entity Disambiguation (ED) We reproduce the setting of Le & Titov (2018) using the same candidate sets, in-domain and out-of-domain datasets, and evaluating using the InKB micro-F1. We train GENRE feeding each document where a single mention is flagged with two special start and end tokens and the target output is the textual representation of the corresponding entity. At test time, we decode using constrained beam search with a trie obtained using the provided candidate set (i.e., a subset of E). As large generative models benefit from large amount of data, we first pre-train GENRE on the BLINK data (Wu et al., 2020), i.e., 9M unique triples document-mention-entity from Wikipedia. Then, for the in-domain scenario, we fine-tune using the AIDA-CoNLL dataset (Hoffart et al., 2011). For the out-of-domain scenario, we evaluate on five test sets: MSNBC, AQUAINT, ACE2004, WNED-CWEB (CWEB) and WNED-WIKI (WIKI) (Gabrilovich et al., 2013; Guo & Barbosa, 2018). More task details and hyperparameters setting are reported in Appendix A.1.
  End-to-End Entity Linking (EL) For EL, we reproduce the setting of Kolitsas et al. (2018) using the same in-domain and out-of-domain datasets as well as evaluating the InKB micro-F1 on the GERBIL benchmark platform (Röder et al., 2018). Similarly to the ED setting, we first pre-traine our model on all abstract sections from Wikipedia4 enriched by a string matching heuristic to solve co-references (i.e., if there is a string that matches exactly with another hyperlink we also add it to the dataset as a mention/entity pairs). Then, for the in-domain scenario, we fine-tune using the AIDACoNLL dataset. We evaluate on seven out-of-domain test sets: MSNBC, Derczynski (Der) (Derczynski et al., 2015), KORE 50 (K50) (Hoffart et al., 2012), N3-Reuters-128 (R128), N3-RSS-500 (R500) (Röder et al., 2014), and OKE challenge 2015 and 2016 (OKE15 and OKE16) (Nuzzolese et al., 2015). More task details and hyperparameters setting are reported in Appendix A.2.
  Page-level Document Retrieval (DR) For this setting, we test GENRE on all the KILT benchmark tasks (Petroni et al., 2020b). Here, whole Wikipedia is used as the candidate set and we evaluate using R-precision (Beitzel et al., 2009). KILT consists of five tasks that use the same Wikipedia dump as a knowledge source: fact checking with FEVER (Thorne et al., 2018); open domain question answering using Natural Questions (Kwiatkowski et al., 2019), HotpotQA (Yang et al., 2018b), TriviaQA (Joshi et al., 2017), ELI5 (Fan et al., 2019); slot filling with T-REx (Elsahar et al., 2018), Zero Shot RE (Levy et al., 2017); entity disambiguation on AIDA CoNLL-YAGO, WNED-WIKI and WNED-CWEB; dialogue with Wizard of Wikipedia (Dinan et al., 2019). We train GENRE on BLINK and all KILT data simultaneously with a single model.5 More details on the hyperparameter setting are reported in Appendix A.3.
sections.heading: 4.2 RESULTS
sections.text: Overall, GENRE achieves very competitive results in all of the three settings being the best performing system on average across all of them. See Appendix C for examples of inputs, ground truth and model predictions for all of the three tasks. In the following, we discuss how GENRE compares to SOTA systems as well as showing some quantitative analysis on its memory footprint, how
  4It is based on the 2019/08/01 Wikipedia dump pre-processed by Petroni et al. (2020b). 5Note that not all dataset available in KILT have a training set. Concretely, we train on FEVER, Natural
  Questions, HotpotQA, TriviaQA, T-REx, Zero Shot RE, AIDA CoNLL-YAGO, and Wizard of Wikipedia.
  it exploits the structured of the entity name space, and how it behaves on a cold-start scenario where new unseen entities are added to the KB (descriptions of those entities are unobserved).
  Comparing GENRE to SOTA systems In ED the difference in average F1 score between GENRE and the second best performing system is small (i.e., +0.8) however, ED is an established task with more than a decade of research that benchmarked on those datasets. Indeed all systems reported in Table 1 achieved high and similar results even if they were taken from three years back.
  The improvements on EL are instead more evident. GENRE is the best in-domain system for AIDA while performing remarkably well also on the out-of-domain setting (e.g., +13 F1 points on Derczynski, and +4.7 on KORE50). Noticeably, in two datasets (OKE15 and OKE16) our model performs poorly. However, these datasets are annotated with coreference (pronouns and common nouns are linked to entities) while our model was not specifically trained for that. Conversely, most of the other systems, have a mention detection component in their pipelines that can be trained or biased to also solve these cases. We considered out of the aim of this work to additional train and evaluate on coreference and we leave it for future work.
  On page-level DR, the superiority of GENRE is remarkable. Our model is the best performing system across all 5 KILT tasks and all datasets except on Natural Questions where it is the second best. We achieve +13.7 R-precision points on average with respect to the best performing baseline. In Table 3 we compare GENRE against all methods reported in the public leaderboard: DPR (Karpukhin et al., 2020), DPR+BERT (Devlin et al., 2019), DPR+BART, tf-idf (Leskovec et al., 2014), RAG (Lewis et al., 2020b), and BLINK+flair (Wu et al., 2020; Akbik et al., 2019). No model except ours was trained on the entire KILT dataset at the same time. A RAG model was trained for every single task as well as for DPR+BERT. Note that this gives and advantage to RAG and DPR+BERT to specialize on single tasks where we have only a single model to solve all of them which still performs better. We speculate that multi-task training could have helped since the all tasks share a common objective to retrieve entities. Both DPR and BLINK+flair were not trained specifically on KILT. However, DPR was trained using several QA datasets which include Natural Question and TriviaQA. In Appendix B we report additional results where we do not pre-train or fine-tune our models for both the ED and retrieval setting in Table 1 and 8 respectively. When we train GENRE only in the DPR or BLINK data, our model still outperforms them.
  Memory Footprint GENRE is not only performing better than other SOTA models on DR but it has a significant reduction of memory footprint (disk space). In Figure 4 we compare the number of model/index parameter against DPR, RAG, and BLINK. GENRE uses an order of magnitude less parameters (millions instead of billions) to store the entity index because it just has to use a prefix tree of the entity names as opposed to a dense vector for each entity. Concretely, GENRE occupied 14 times less memory than BLINK and 34 times less memory than DPR.
  Exploiting the Structured Name Space We investigated some properties of GENRE, comparing two variants of our model to BLINK on the ED task (using WNED-KILT validation set): one trained to generate entity names and another to generate numerical identifiers (IDs). All models are trained on the same data and we report results in Figure 5. When there is an exact match between a mention and its entity name, both BLINK and GENRE almost always make an accurate prediction. Different is the case of partial and no match: GENRE performance is much higher suggesting that our model uses the context more effectively, as the autoregressive formulation allows to cross-encode mention context and entity candidates directly capturing fine-grained interactions between the two. Moreover, when we switch to predicting IDs, the performance drops drastically (-20.3 points on average) indicating that it is important that entity names are meaningful, structured and compositional (as they are in Wikipedia) conversely to atomic IDs. Surprisingly, when there is no overlap between a mention-entity pair, performance are still relatively high by using IDs. This suggests that the model is good at memorizing and recalling identifiers even if numeric.
  Ablation study We here discuss an ablation study on the entity disambiguation task (see Table 1). Due to space limitation, we discuss an ablation study on document retrieval in Appendix B.2. In Table 1, GENRE only AIDA or BLINK data indicates the ablation for which we only train on one of the two datasets (i.e., only fine-tuning). GENRE (full) is also used with constrained decoding (see Section 3) and in combination with a candidate set (as provided by Le & Titov, 2018). GENRE without candidate set denotes ablating the provided (and small) candidate set and therefore using all the entities in the KB (in our case Wikipedia) as candidates. GENRE without constraints indicates ablating constrained decoding which implies no use of the provided candidates set but also unconstrained generation (i.e., the model may generate entity names that are not in the KB). Eventually, using constrained generation and exploiting the candidate sets proved useful. Training only on AIDA data is insufficient to get high F1 (but AIDA is quite small compared to the 9M datapoints of BLINK data).
  Entity frequency The performance of a model naturally depends on how many times entities appear in the training data. We show the data distribution of the mention-entity frequency in Figure 3. Most of the pairs appears in Wikipedia (10931 / 13354) where 2423 do not (first bin). The average accuracy is 82.5% but noticeable it is higher for mention-entity pairs that are more frequent (right side of the plot). The accuracy for pairs that do not appear in Wikipedia is substantially lower than the average suggesting that those are harder cases (the very end tail of the distribution). The degradation in performance is minimal indicating that our model is good at predicting rare entities.
  Cold-start We manually collect 50 Wikipedia articles that were created in 20206 to simulate a cold-start setting where new entities are added to the KB and the only entity information available is their names. To create ED instances we resort to hyperlinks pointing to those entities in other Wikipedia articles. 19 out of 50 mentions have an exact match with their respective entity names and all of them were correctly classified by GENRE. In combination with the results from Table 5 we can conclude that GENRE has a bias on exactly copying the mention, and this helps on unseen data. GENRE also correctly classified 14/31 of the remaining mentions (45.2%). This demonstrates the ability of our solution to be applied in scenarios where entity metadata is unavailable (apart his name), a setting where, to the best of our knowledge, no existing system is capable to operate.
  We additionally test how GENRE performs on unseen mention-entity pairs on WikilinksNED Unseen-Mentions data (Onoe & Durrett, 2020) and we report all results in Table 6 in Appendix B.1. Surprisingly, GENRE performs almost the same for seen and unseen entity pairs (64.4 vs 63.2 accuracy) However, in the Onoe & Durrett (2020) setting we cannot guarantee entity descriptions have not been seen by BART during pre-training (given his training data contains Wikipedia).
sections.heading: 5 RELATED WORKS
sections.text: Casting NLP tasks with a structured input or output into sequence-to-sequence problems has been explored for different problems, including semantic parsing (Rongali et al., 2020), semantic role labelling (Daza & Frank, 2018), discourse representation structure parsing (Liu et al., 2018), generation of fluent natural language responses from structured semantic representations (Balakrishnan et al., 2019), generation and parsing of abstract meaning representation (Konstas et al., 2017). In these works a structured representation, a tree or a graph for instance, is linearized into a sequence of symbols compatible with a seq2seq architecture. To the best of our knowledge, we are the first to cast entity retrieval as a sequence-to-sequence problem while decoding with an autoregressive formulation during inference.
  Related to our constrained generation mechanism, Daza & Frank (2018); Rongali et al. (2020) use a copying mechanism in order to limit lexical deviations between the input and output strings. In these tasks, as well as for our problem, it is natural to promote a copying mechanism due to the input and the output proximity. A different type of constraint, a structural constraint, is used in Bal-
  6Note that both pre-training and fine-tuning use dumps from 2019.
  akrishnan et al. (2019) to maintain a valid tree structure. Our constrained beam search encompasses both aspects, a copying mechanism that restrains the vocabulary and a structural constraint to obtain a well-formed annotated output. In addition to these tasks with close input and output, the integration of a mechanism to guide the output of neural networks has been explored in various settings. Lexically constrained decoding has been used to force the inclusion of pre-specified words for machine translation (Hokamp & Liu, 2017; Post & Vilar, 2018), and image captioning (Anderson et al., 2017). To the best of our knowledge, we are the first to exploit constrained generation for entity disambiguation, end-to-end entity linking, and query-based entity retrieval.
  Nogueira et al. (2020) propose to use a sequence-to-sequence model to re-rank document. Given a query and a document the model is trained to output the words ”true” or ”false” depending on whether the document is relevant or not. Differently from our approach for entity retrieval, it requires a limited list of candidates documents, obtained with BM25 for instance, in order to be computationally possible. Massarelli et al. (2019); Petroni et al. (2020a) explore the idea of using an autoregressive language model as neural retriever, by exploiting the implicit knowledge stored in their parameters to generate relevant sentences given a query. While intriguing, such solutions still lag behind retrievers with an explicit knowledge access (e.g., an explicit Wikipedia index). The idea of using a generative model for entity disambiguation was proposed in Petroni et al. (2020b) as they trained both BART and T5 in a seq2seq fashion on all KILT tasks (including ED). We expanded that intuition generalizing on multiple tasks (end-to-end EL and page-level retrieval) as well as introducing constrained decoding for an efficient and effective search.
sections.heading: 6 CONCLUSIONS
sections.text: In this work, we propose GENRE, a novel paradigm to addresses entity retrieval: generate entity names autoregressively. Entity names have several properties that might help (even humans) retrieving them, including a compositional structure and a predictable interaction with the context. The autoregressive formulation allows us to directly capture some of these properties, leading to several advantages with respect to current solutions, including an efficient way to cross encode mention context and entity candidates, a much smaller memory footprint, and the ability to compute an exact softmax without the need to subsample negative data. We empirically show that these characteristics, combined with constrained decoding strategies, led to state-of-the-art performance on a plethora of entity retrieval datasets, spanning entity disambiguation, end-to-end entity linking, and page-level document retrieval, while resulting in systems with a remarkably contained memory footprint, a space reduction by a factor of twenty on average. We additionally demonstrate that new entities can be effectively considered in our system by simply appending their unambiguous name to the candidate set.
sections.heading: ACKNOWLEDGMENTS
sections.text: Authors thank Patrick Lewis, Aleksandra Piktus, Michael Schlichtkrull, Ivan Titov, Jean Maillard, Edouard Grave, Sergio De Cao, Luisa Quarta for helpful discussions and technical support.
sections.heading: A EXPERIMENTAL DETAILS
sections.text: We implemented, trained, and evaluate our model using the fariseq library (Ott et al., 2019). We trained GENRE for every task using Adam (Kingma & Ba, 2014) with a learning rate 3 · 10−5 with a linear warm-up for 500 steps and then liner decay. The objective is sequence-to-sequence categorical cross-entropy loss with 0.1 of label smoothing.
  A.1 NAMED ENTITY DISAMBIGUATION
  Setting Given a document dj (e.g., a sentence) containing a set of entity mentions m1, . . . ,mN , a system either has to assign, to each mention mi, either a KB entity (i.e., ei ∈ E), or predicts that there is no corresponding entry in the KB (i.e., ei = NIL). Moreover, a restricted candidates set Ci = {êi1, . . . , êiK} ⊆ E ∪ {NIL} for each mention mi is provided.
  Training We pre-trained GENRE on BLINK data for 200k steps and then we do model selection on the validation set. Afterward, we fine-tuned on AIDA without resetting the learning rate nor the optimizer statistics for 10k steps and we do model selection on the validation set. Following previous works (Yamada et al., 2016; Ganea & Hofmann, 2017; Le & Titov, 2018), we considered only mentions that have entities in the KB (i.e., Wikipedia). Training was done on 32 GPUs (with 32GB of memory) and it completed in ∼24h for a total of ∼32 GPU/day.
  Inference At test time, we use Constrained Beam Search with 10 beams, and maximum decoding steps of 15. We restrict the input sequence to be at most 384 tokens cutting the left, right, or both parts of the context around a mention. We normalize the log-probabilities by sequence length.
  A.2 ENTITY LINKING
  Setting Given a document dj (e.g., a sentence) a system has to return a set of tuples 〈mi, ei〉 where mi is a entity mentions (a span contained in dj) and ei ∈ E its corresponding entity in the KB. Following Kolitsas et al. (2018), we considered only mentions that have entities in the KB (i.e., Wikipedia) and we used their candidate sets with the additions of the table computed by Hoffart et al. (2011).
  Training We pre-trained GENRE on all abstract sections from Wikipedia7 enriched by a string matching heuristic to solve co-references (i.e., if there is a string that matches exactly with another hyperlink we also add it to the dataset as a mention/entity pairs) data for 200k steps. Then we do model selection on the validation set. Afterward, we fine-tuned on AIDA resetting the learning rate and the optimizer statistics for 10k steps and we do model selection on the validation set. Again, following previous works (Kolitsas et al., 2018), we considered only mentions that have entities in Wikipedia. Training was done on 64 GPUs (with 32GB of memory) and it completed in ∼30h for a total of ∼80 GPU/day.
  Inference At test time, we use Constrained Beam Search with 6 beams, and a maximum decoding step of 384. When the input sequence is too long, we split the input into multiple chunks of equal size. We normalize the log-probabilities by sequence length.
  A.3 PAGE-LEVEL DOCUMENT RETRIEVAL
  Setting Given a query q (e.g., a question) and a collection of documentsD (in KILT are Wikipedia pages), a system has to rank documents in D based on their relevance to q.
  Training We trained GENRE on all KILT data simultaneously for 200k steps and we do model selection on the validation set averaging the score across tasks. Training was done on 128 GPUs (with 32GB of memory) and it completed in ∼33h for a total of ∼176 GPU/day.
  7It is based on the 2019/08/01 Wikipedia dump pre-processed by Petroni et al. (2020b).
  Inference At test time, we use Constrained Beam Search with 10 beams. For the ED sub-task, we restrict the input sequence to be at most 384 tokens cutting the left, right, or both parts of the context around a mention. We normalize the log-probabilities by sequence length.
sections.heading: B ADDITIONAL RESULTS
sections.text: B.1 NAMED ENTITY DISAMBIGUATION
  Table 6 reports evaluation of GENRE on on WikilinksNED Unseen-Mentions data (Onoe & Durrett, 2020). We also report additional results on AIDA from the literature in Table 7.
  B.2 DOCUMENT RETRIEVAL
  Table 8 extends Table 3 with additional results (i.e., training GENRE on the numerical identifiers) and an ablation study on the document retrieval task. The purpose of the experiment is to see whether GENRE benefits from the entity names to be meaningful as well as compositional. Numerical IDs do not have that property. In both cases, the model uses its memorizing capabilities but when using IDs the performance is significantly low. Indeed, with IDs the model has no way to generalize nor to use “implicit knowledge” acquired during the unsupervised pre-training. We also ablate the training data. DPR data corresponds to training only on Natural Questions (NQ) and TriviaQA (TQA) as DPR was trained only for QA tasks on those datasets and two extra ones. Note that training on BLINK data corresponds to only training for entity disambiguation. However, every other task share similarities with entity disambiguation and thus the model is also capable to address the other tasks with non-zero performance. For the ablations, underlined cells indicate what are the results on the respective task on which a model was trained for (i.e., GENRE only BLINK data was trained only for ED where GENRE only DPR data was trained only for QA). The ablation on data suggests that it is beneficial to train on all tasks simultaneously. GENRE without constraints indicates ablating
  constrained decoding which implies unconstrained generation (i.e., the model may generate entity names that are not in the KB).
sections.heading: C EXAMPLES