C-MORE: Pretraining to Answer Open-Domain Questions by Consulting Millions of References

We consider the problem of pretraining a two-stage open-domain question answering (QA) system (retriever + reader) with strong transfer capabilities. The key challenge is how to construct a large amount of high-quality question-answer-context triplets without task-specific annotations. Specifically, the triplets should align well with downstream tasks by: (i) covering a wide range of domains (for open-domain applications), (ii) linking a question to its semantically relevant context with supporting evidence (for training the retriever), and (iii) identifying the correct answer in the context (for training the reader). Previous pretraining approaches generally fall short of one or more of these requirements. In this work, we automatically construct a large-scale corpus that meets all three criteria by consulting millions of references cited within Wikipedia. The well-aligned pretraining signals benefit both the retriever and the reader significantly. Our pretrained retriever leads to 2%-10% absolute gains in top-20 accuracy. And with our pretrained reader, the entire system improves by up to 4% in exact match.


Introduction
Open-domain question answering (QA) aims to extract the answer to a question from a large set of passages. A simple yet powerful approach adopts a two-stage framework (Chen et al., 2017;Karpukhin et al., 2020), which first employs a retriever to fetch a small subset of relevant passages from large corpora (i.e., retriever) and then feeds them into a reader to extract an answer (text span) from them. Due to its simplicity, a sparse retriever such as TF-IDF/BM25 is generally used together with a trainable reader (Min et al., 2019). However, recent advances show that transformer-based dense retrievers trained on supervised data (Karpukhin et al., 2020) can greatly boost the performance, which better captures the semantic relevance between the question and the correct passages. Such approaches, albeit promising, are restricted by the limited amount of human annotated training data.
Inspired by the recent progresses of language models pretraining Guu et al., 2020;Sachan et al., 2021), we would like to address the following central question: can we pretrain a two-stage open-domain QA system (retriever + reader) without task-specific human annotations? Unlike general language models, pretraining such a system that has strong transfer capabilities to downstream open-domain QA tasks is challenging. This is mainly due to the lack of well-aligned pretraining supervision signals. In particular, we need the constructed pretraining dataset (in the form of question-answer-context triplets) to: (i) cover a wide range of domains (for open-domain applications), (ii) link a question to its semantically relevant context with supporting evidence (for training the retriever), and (iii) identify the correct answer in the context (for training the reader).
There have been several recent attempts in addressing these challenges. ORQA  creates pseudo query-passage pairs by randomly sampling a sentence from a paragraph and treating the sampled sentence as the question while the rest sentences as the context. REALM (Guu et al., 2020) adopts a retrieve-then-predict approach, where the context is dynamically retrieved during training and an encoder (reader) predicts Question: The boarding crew freed 14 Iranian and Pakistani fishermen who had been held as hostages for over two months.

Pretraining Data Instance
On 7 January 2012, Absalon intercepted and boarded a Somali pirate mother ship in the Indian Ocean. The boarding crew freed 14 Iranian and Pakistani fishermen who had been held as hostages for over two months.  the masked token in the question based on the retrieved context. The retriever pretraining signals constructed in these approaches are not aligned with question-context pairs in open-domain QA settings. For example, as shown in Figure 1, the context (in blue color) of ORQA pretraining data instance does not contain direct supporting evidence to the question. Likewise, the dynamically retrieved context in REALM cannot be guaranteed to contain direct supporting evidence either. In addition, existing pretraining methods Guu et al., 2020) mostly focus on the retriever and do not jointly provide direct pretraining signals for the reader (Figure 1).
To meet all three aforementioned criteria, we propose a pretraining approach named Consulting Millions Of REferences (C-MORE), which automatically constructs pretraining data with wellaligned supervision signals ( Figure 1). Specifically, we first extract three million statement-reference pairs from Wikipedia along with its cited references. Then, we transform them into questionanswer-context triplets by replacing a potential answer span in the statement (e.g., "14" in the Figure 1) by an interrogative phrase (e.g, "how many"). Such kind of pseudo triplets are in the exact same form as human-annotated ones, and the question is linked to the context that contains the most direct-supporting evidence, a highly desirable feature for open-domain QA tasks. We experiment the pretraining with a widely-adopted open-domain QA system, Dense Passage Retriever (DPR) (Karpukhin et al., 2020). The experimental results show that our pretrained retriever not only outperforms both sparse and dense retrieval baselines in the zero-shot retrieval setting (2%-10% absolute gain in top-20 accuracy), but also leads to further improvement in the downstream task finetuning. By integrating with our pretrained reader, the entire open-domain pretraining improves the end-to-end QA performance by 4% in exact match.

Method
Recall that we want to automatically construct a large-scale open-domain QA pretraining dataset that satisfies three criteria: (i) The dataset should cover a wide range of domains for the open-domain QA purpose. (ii) The context passage is semantically relevant to the question and contains direct supporting evidence for answering the question. (iii) The correct answer span in the context passage for answering the question should also be identified for training the reader. This section first discusses how to extract a large amount of statementreference pairs from the Wikipedia and then explain how to construct pseudo question-answer-context triplets for pretraining open-domain QA systems.

Statement-Reference Pairs Collection
Wikipedia articles usually contain a list of knowledge sources (references) at the end that are verified by human editors to support the statements in the articles (Li et al., 2020). And the reference documents always consist of strong supporting evidence to the statements. For example, as shown in Figure  1, the document (in green color) contains the direct evidence "...rescued 14 people who were being held hostage on it..." to support the query (red text) "The boarding crew freed 14 Iranian and Pakistani fishermen who had been held as hostages over two months". Additionally, such knowledge sources are often organized in a good structure and can be automatically extracted and processed. Moreover, the statement-reference pairs in Wikipedia cover  a wide range of topics and domains. Thus, when converted into question-context pairs, they satisfy the first two criteria and are suitable for training an accurate dense retriever at a large scale.
In our study, we extract around six million statement-reference pairs from Wikipedia. We filter the pairs whose reference documents are not reachable and finally obtain around three million statement-reference pairs (see statistics in Appendix Table 1). The data collection method we proposed is very general and therefore can be easily extended to other domains, e.g., WikiEM (wikem.org) for medical domain or other languages, e.g., Baidu Baike (baike.baidu.com) for Chinese.

QAC Triplets Construction
We now explain how to further convert the statement-reference pairs into question-answercontext pairs. Inspired by previous unsupervised extractive QA work (Lewis et al., 2019), we extract entities as potential answers to construct pseudo question-answer-context pairs where an answer span is extracted from the context given an question to accommodate the extractive QA setting. Specifically, we first adopt an off-the-shelf named entity recognition tool spaCy (Honnibal and Montani, 2017) to identify entities in each query. Next, we filter the entities that do not appear in the evidence based on string matching. If multiple entities are found, we sample one of them as the potential answer to the query. The sampled entity in the query is replaced by an interrogative phrase based on the entity type (e.g., a [DATE] entity will be replaced by phrases such as "when", "what date". In this way, we can construct question-answer-context triplets to train open-domain QA models. See more question reformation rules in Appendix Table 5).

Experimental Setup
Pretraining Model Architecture. Since conceptually the construed triplets is in the same format as the annotated QA data, they can be used to pretrain any existing neural open-domain QA model. Here, we adopt DPR (Karpukhin et al., 2020), which consists of a dual-encoder as the retriever and a BERT reader, considering its effectiveness and popularity. Specifically, the retriever first retrieves top-k (up to 400 in our experiment) passages, and the reader assigns a passage score to each retrieved passage and extracts an answer with a span score. The span with the highest passage selection score is regarded as the final answer. The reader and retriever can be instantiated with different models and we use BERT-base-uncased for both of them following (Karpukhin et al., 2020). Pretraining Data Processing. For our extracted pseudo question-answer-context triplets, sometimes the context (reference document) is too long to fit into a standard BERT (maximum 512 tokens) in the DPR model. Thus, we chunk a long document into n-word text blocks with a stride of m. Without loss of generality, we use multiple combinations of n and m: n = {128, 256, 512}, n = {64, 128, 256}. Then we calculate relevance scores (using BM25) of the derived blocks with the question and select the most relevant block as the context. Note that the retrieval step is done within the single document (usually less than 20 text blocks). In contrast, the baseline model (Section 3.2) -sparse retriever BM25 -looks up the entire knowledge corpus (20M text blocks). In this way, we can automatically collect the most relevant context that supports the query from a long article. Finetuning QA Datasets. We consider three popular open-domain QA datasets for finetuning: Nat-uralQuestions (NQ) (Kwiatkowski et al., 2019), TriviaQA (TQA) (Joshi et al., 2017), and WebQuestions (WebQ) (Berant et al., 2013), whose statistics are shown in Table 1.
Following the setting of DPR (Karpukhin et al., 2020), we use the Wikipedia as the knowledge source and split Wikipedia articles into 100-word units for retrieval. All the datasets we use are the processed versions from the DPR implementation. Overlap between Pretraining and Finetuning Datasets. Though both C-MORE and downstream QA data are constructed based on Wikipedia, the overlap between them would be very little. C-MORE extracts queries from Wikipedia while the queries of downstream QA data are annotated by human. C-MORE extracts contexts from the external referenced pages (general Web) while the downstream QA data extract contexts from Wikipedia. Implementation Details. For pretraining, we set   training epochs to 3, batch size to 56 for retrievers and 16 for readers, and learning rate to 2e-5. We select the best checkpoint based on the pretraining dev set. For finetuning, we use the same set of hyperparameters as the original DPR paper. The comparing baselines ORQA  and REALM (Guu et al., 2020) use 288-token truncation over Wikipedia, which are not directly comparable to our results. To enable a fair comparison, we report the retrieval results from a recent paper (Sachan et al., 2021), which uses the same retrieval corpus as ours.

Retrieval Performance
We consider three settings to demonstrate the usefulness of our pretrained retriever. Unsupervised. We assume no annotated training QA pairs are available. In this setting, We compare our method with existing unsupervised retrievers: a sparse retriever BM25 and two pretrained dense retrievers ORQA and REALM. Domain Adaptation. We consider the condition in which there are QA training pairs in the source domain but no training data in the target domain.
The task is to obtain good retrieval performance on the target test set only using source training data. We compare our method with two baselines: one is to directly train a dense retriever on the source domain while the other is to first pretrain a dense retriever on our constructed corpus and then finetune it on the source domain training set. Supervised. In this setting, all the annotated QA training instances are used. Similar to the previous setting, we compare a supervised retriever with and without our C-MORE pretraining. For all settings, we report the top-k retrieval accuracy (k ∈ {20, 100}) on the test set following (Karpukhin et al., 2020). See the overall retrieval performance of different models in each setting in Table 2. We have the following observations.
In the unsupervised setting, compared with the strong sparse retrieval baseline BM25, our pretrained dense retriever shows significant improvement. For example, we obtain around 7% absolute improvement in terms of both Top-20 and Top-100 accuracy on the WebQuestion dataset. Compared with pretrained dense retrievers (i.e., ORQA and REALM), our pretrained model outperforms them by a large margin. This is not surprising as our pretraining data contain better aligned retrieval su-pervision signals: reference documents often have supporting evidence for the question while their retrieval training signals are relatively indirect.
In the domain adaptation and supervised settings, our pretrained dense retriever provides a better finetuning initialization and leads to improvement compared with randomly initialized DPR models. Another surprising result is that our pretrained dense retriever even outperforms some DPR domain adaptation models. For example, on the TriviaQA testing set, our pretrained DPR model achieves 72.2% top-20 and 81.3% top-100 accuracy while the DPR-NQ model obtains 69.7% and 79.2% respectively. This indicates that our pretrained dense retriever can generalize well even without using any annotated QA instances.
All the results demonstrate the usefulness and generalization of our pretrained dense retriever for open-domain QA tasks.

End-to-End QA performance
We now examine how our pretrained retriever and reader improve the end-to-end QA performance, measured in exact match (EM). The results are shown in Table 3, from which we make the following observations. (i) Surprisingly, our fully-unsupervised system (pretrained retriever + pretrained reader) shows a certain level of opendomain QA ability (see row #3). For example, on TriviaQA, our fully-unsupervised system can answer around 25% of questions correctly. (ii) Compared to the system with BM25 retriever (row #4), the one with our pretrained dense retriever (line #5) retrieves more relevant passages, leading to better QA performance. (iii) Initializing either the retriever or the reader from our pretrained checkpoint can lead to further improvement (rows #6-#8). For example, on the TriviaQA and WebQuestion datasets, our entire pipeline pretrain leads to about 4% absolute gain in terms of EM. Note that on the WebQuestion dataset, all the DPR models perform worse than REALM, this is because of the limited training data of WebQuestion. The issue can be easily solved by adding Multi datasets for finetuning according to (Karpukhin et al., 2020).

Computational Resource Comparison
In addition to the performance gain, another benefit of C-MORE is its training scalability. We compare the C-MORE pretraining with ORQA and REALM in terms of computational resources they use in  reasonable GPU computational resources, which could be normally conducted on an academic-level computational platform. On the contrary, due to the lack of direct retrieval supervision, ORQA and REALM often needs more computational resources and requires more training steps to converge.

Conclusion
This paper proposes an effective approach for pretraining open-domain QA systems. Specifically, we automatically construct three million pseudo question-answer-context triplets from Wikipedia that align well with open-domain QA tasks. Extensive experiments show that pretraining a widelyused open-domain QA model (DPR) on our constructed data achieves promising performance gain in both retrieval and QA accuracies. Future work includes exploring the effectiveness of the constructed data on more open-domain QA models (e.g., REALM) and training strategies (e.g., joint optimizing the retriever and reader). "what", "what product", QUANTITY "how many", "how much", TIME "when", "what time", WORK_OF_ART "what", "what title"