FastFiD: Improve Inference Efficiency of Open Domain Question Answering via Sentence Selection (2024)

Abstract: Open Domain Question Answering (ODQA) has been advancing rapidly in recent times, driven by significant developments in dense passage retrieval and pretrained language models. Current models typically incorporate the FiD framework, which is composed by a neural retriever alongside an encoder-decoder neural reader. In the answer generation process, the retriever will retrieve numerous passages (around 100 for instance), each of which is then individually encoded by the encoder. Subsequently, the decoder makes predictions based on these encoded passages. Nevertheless, this framework can be relatively time-consuming, particularly due to the extensive length of the gathered passages. To address this, we introduce FastFiD in this paper, a novel approach that executes sentence selection on the encoded passages. This aids in retaining valuable sentences while reducing the context length required for generating answers. Experiments on three commonly used datasets (Natural Questions, TriviaQA and ASQA) demonstrate that our method can enhance the inference speed by 2.3X-5.7X, while simultaneously maintaining the model’s performance. Moreover, an in-depth analysis of the model’s attention reveals that the selected sentences indeed hold a substantial contribution towards the final answer. The codes are publicly available at https://github.com/thunlp/FastFiD.

heading: 1 Introduction
text: Open Domain Question Answering(ODQA) is a longstanding task in Natural Language Processing that involves generating an answer solely based on a given question. Recent advancements in this field have typically adopted the Retriever-Reader framework (Chen et al., 2017; Karpukhin et al., 2020; Lewis et al., 2020; Izacard and Grave, 2021b), which breaks down the task into two distinct stages.
†Corresponding author.

heading: 25 50 100
text: Initially, a retriever retrieves a set of relevant passages from a high-quality collection of open domain documents, such as Wikipedia. Subsequently, a reader model generates an answer by considering the question and the retrieved passages. Thanks to advancements in neural models, the retriever has transitioned from traditional search methods like TF-IDF (Chen et al., 2017) to dense passage retrieval (Karpukhin et al., 2020), resulting in improved retrieval performance. Furthermore, driven by the progress of Pretrained Language Models (PLMs) (Devlin et al., 2019; Raffel et al., 2020; Brown et al., 2020), the reader has evolved from extracting answers from a single passage to generating answers from multiple passages (Izacard and Grave, 2021b). This approach enables the model to leverage information from various passages more effectively, thereby producing more accurate answers.
A recently successful model is Fuse-in-Decoder (FiD) (Izacard and Grave, 2021b), which utilizes
6262
Dense Passage Retrieval and a generative reader based on T5 (Raffel et al., 2020), an encoderdecoder model. FiD is capable of encoding each retrieved passage independently and subsequently concatenating these encoded passages to form an extensive context. The concatenated context is then used by the decoder to generate a response. Owing to its straightforward and extensible architecture, numerous subsequent works have introduced modifications based on this framework (Sachan et al., 2021b; Yu et al., 2022; Wen et al., 2022). However, as the decoder must generate a response based on all retrieved passages, it can be time-consuming to enhance performance through the retrieval of additional passages. Moreover, in real-world scenarios, the latency in generating an answer is a significant factor. As larger language models continue to be developed and demonstrate superior performance, this issue may become more pronounced.
To address this issue, we introduce FastFiD, a novel approach that performs sentence selection post the encoder’s output and maintains only the essential sentences as references for the decoder, thereby significantly reducing the inference time for each query.
To demonstrate the effectiveness of our approach, we first carry out experiments to ascertain that the multi-task training, which involves sentence selection and answer generation, does not conflict with one another during the model’s learning process. This is achieved by seamlessly incorporating a selection loss on the encoder outputs with a language modelling loss on answer generation, enabling the model to simultaneously handle both sentence selection and answer generation tasks. An in-depth analysis of the decoder’s cross-attention reveals that tokens from the chosen sentences yield a higher average attention score compared to those unchosen. This finding provides compelling evidence that the selected sentences significantly contribute more to the model’s predictions. Guided by this insight, we execute a secondary training phase, obliging the model to solely anchor to the selected encoder outputs when making the final prediction.
The experimental results obtained from two widely used ODQA datasets, namely Natural Questions (NQ) (Kwiatkowski et al., 2019) and TriviaQA (Joshi et al., 2017), along with a long-form QA dataset called ASQA (Hofstätter et al., 2023), demonstrate that FastFiD can achieve performance metrics comparable to the original FiD. Notably,
it can reduce the context length by up to 38X and accelerate the inference time by 2.3X-5.7X on different datasets. To validate the effectiveness of sentence selection, we also compare its performance with passage reranking after the encoder outputs. The results show that sentence selection yields better performance while maintaining a similar context length. This comparison indicates that sentence selection is a more effective strategy for compressing information across multiple passages.
In summary, our contributions can be encapsulated within the following three key points:
• We implement a multi-task training approach, demonstrating that a singular reader model can concurrently perform sentence selection and answer generation.
• We introduce a novel technique to enhance the inference efficiency of FiD while preserving its question-answering capabilities.
• We carry out plenty of experiments to validate and analyze the effectiveness of our method.

heading: 2 Related Work
text: Open Domain Question Answering serves a crucial role in natural language processing, with its primary function being to respond to factoid questions. Followed by Chen et al. (2017), current ODQA systems usually use a large collection of documents like Wikipedia as the knowledge source to answer questions. Since the document collection usually contains millions of documents, the system always adds a retriever to retrieve some most relevant passages for the reader to make predictions. To get better retriever performance, Karpukhin et al. (2020) proposed a shift from sparse retrieval systems like TF-IDF to dense retrieval to enhance the efficiency of the retriever. Subsequent research (Lewis et al., 2020; Sachan et al., 2021b; Jiang et al., 2022; Lee et al., 2022) has investigated the use of end-to-end training methodologies to further boost the performance of the retriever, bypassing the need for pair-wise questiondocument data. Izacard and Grave (2021a) demonstrated an improvement in performance through the distillation of knowledge from the reader to the retriever. The idea of pretraining both the retriever and the reader on a vast, unlabeled corpus has been explored by Guu et al. (2020) and Sachan et al. (2021a). A different research trajectory has aimed to augment the reader’s capacity to better
utilize retrieved passages. With the advancement of PLMs, the reader has evolved from RNN-based models (Chen et al., 2017) to BERT-based extractive readers (Karpukhin et al., 2020) and T5 or BART-based generative readers (Lewis et al., 2020; Izacard and Grave, 2021b). Recent studies (Cheng et al., 2021; Fajcik et al., 2021; Wen et al., 2022) have pivoted towards a hybrid approach, exploring the integration of both generative and extractive readers to further enhance system performance.
Efficient ODQA The majority of contemporary Open-Domain Question Answering (ODQA) systems face efficiency challenges, primarily due to the large-scale document processing and the use of sizable pre-trained language models. These efficiency challenges arise in two stages.
The first stage is retrieval efficiency. Given the potentially massive number of passages, dense retrieval can be extremely slow. Instead of relying solely on brute force search methods, alternative algorithms such as Approximate Nearest Neighbor (ANN) (Johnson et al., 2021) and Hierarchical Navigable Small World (HNSW) (Malkov and Yashunin, 2020) can be employed to expedite the retrieval process.
The second efficiency challenge lies in the reading process, which involves handling multiple passages for each query. To address this, Hofstätter et al. (2023) propose FiD-Light, which limits the decoder’s attention to the first k tokens of each passage to reduce the context length. FiDO (de Jong et al., 2023) explores reducing the number of cross attention layers in FiD’s decoder to increase efficiency, but this comes at the cost of re-pretraining the base model. Other complementary strategies explore to identify and stop processing less relevant passages early on by utilizing adaptive computation (Wu et al., 2020, 2021) or knowledge graph
with GNN network (Yu et al., 2022). Additionally, some research has focused on directly retrieving answers to questions without the need for passage processing (Seo et al., 2019; Lee et al., 2021; Lewis et al., 2021), or using language models to generate answers directly by finetuning and fewshot prompting (Roberts et al., 2020; Brown et al., 2020).
Answer Sentence Selection Answer Sentence Selection (AS2) is a long-standing task that has been extensively explored. Dense Neural Networks (DNNs) have been widely employed in this task (Severyn and Moschitti, 2015; Shen et al., 2017). Garg et al. (2020) further advanced the field by utilizing transformer-based pre-trained language models (PLMs) to achieve better results. Recent studies have investigated methods such as generating answer sentences (Hsu et al., 2021) and implementing complex ranking pipelines (Matsubara et al., 2020). Unlike these approaches, our work aims to predict the exact answer span from retrieved passages, using answer sentence selection only for enhancing inference speed.

heading: 3 Methods
text: In this section, we propose FastFiD, which is based on FiD (Izacard and Grave, 2021b) to reduce its inference time and make it more efficient. FastFiD contains a two-stage training procedure. Initially, in the first stage, we introduce a multi-task training objective that allows for simultaneous training of sentence selection and answer generation (Section 3.1). Then, in the second stage, we use the model trained in the first stage as the base model and perform continuous training on generating answers with reference to the selected tokens. (Section 3.2). Finally, in the inference stage, the encoder transcodes each passage into context embed-
dings and curates a selection of valuable sentences, which are then employed in the decoder generation process to expedite inference time (Section 3.3). The overall framework is shown in Figure 2.

heading: 3.1 Multi-Task Training
text: In this section, we present our multi-task training approach. Following FiD, we utilize T5, an encoder-decoder based PLM, as our base model. Given a question-answer pair (q, a), we initially retrieve K relevant passages p1, p2, ..., pK , with their respective titles t1, t2, ..., tK from an extensive knowledge base, predicated on the question q. Subsequently, the question q and each corresponding passage pk are combined to generate a comprehensive input in the following structure:
Ik = Question: q Title: tk Context: pk (1)
After this, the model’s encoder transcodes each input Ik into context embeddings hk1, h k 2, ..., h k N ∈ Rd, where N represents the max sequence length of the input text. Our multi-task training objective, which encompasses sentence selection and answer generation, is built upon these encoded context embeddings.

heading: 3.1.1 Sentence Selection
text: In the context of a given retrieved passage pk, there exist Mk key sentences, represented as Sk = sk1, s k 2, ..., s k Mk
, that are crucial for answering the question. As established in prior extractive reader works (Chen et al., 2017; Kwiatkowski et al., 2019; Min et al., 2019; Cheng et al., 2021), we implement a classification head to anticipate the begin and end positions of each key sentence. Taking into account the conclusions of Cheng et al. (2020) and Cheng et al. (2021), we employ a multi-objective approach to enhance sentence selection performance.
In formal terms, the probability of a span (ik, jk) being a selected sentence can be broken down into the product of the probabilities of the ik-th token being the start token and the jk-th token being the end token. We integrate some learned parameters, namely wb, we, bb, be, to calculate the start and end score:
Sb(i k) = wTb h k i + bb; Se(j k) = wTe h k j + be
(2)
By calculating the probability based on different normalizing factors, we can derive the local passage-level probability and the global multipassage-level probability. With local probability,
the probability of each token in different retrieved passages will not affect one another. By normalizing the start and end probabilities by the total scores of all tokens in input Ik, we derive the probability as follows:
PLb (i k) =
exp(Sb(i k))∑
n exp(Sb(n k))
;
PLe (j k) =
exp(Se(j k))∑
n exp(Se(n k))
(3)
In the case of global probability, we calculate the probability taking into account all the tokens in the top-K passages from the retriever. Therefore, the probability of each token being the start or end of the selected sentence will be jointly optimized across different passages:
PGb (i k) =
exp(Sb(i k))∑
k ∑ n exp(Sb(n k)) ;
PGe (j k) =
exp(Se(j k))∑
k ∑ n exp(Se(n k))
(4)
We then obtain the local and global probabilities of a span being the supported sentence as follows:
P {L,G}s (i k, jk) = P {L,G} b (i k)× P {L,G}e (jk) (5)
Following the methodology of Cheng et al. (2021), we utilize a multi-objective formulation to merge the HardEM (Min et al., 2019) and MML (Karpukhin et al., 2020) objectives for more efficient training. In the multi-objective formulation, we calculate the HardEM loss on global probability and the MML loss on local probability. The final sentence selection loss is calculated as follows:
LS =− log max (i,j)∈S PGs (i, j)−
1
K
K∑
k
log ∑
(ik,jk)∈Sk PLs (i
k, jk) (6)
where S = S1 ∪ S2 ∪ ... ∪ SK is the set of all crucial sentences in the top-K retrieved passages. Since ODQA datasets usually only contain question-answer pairs without annotated valuable sentences, we consider the sentences that include the short span answer in each retrieved passage as the crucial sentences.

heading: 3.1.2 Answer Generation
text: As the pipeline in FiD, we employ the decoder to fuse the information of retrieved passages and make a prediction. More specifically, we first concatenate the context embeddings of all inputs:
H = (H1;H2; ...;HK) (7)
where Hk represents the context embeddings for input Ik, therefore H have an overall length of N ×K. Subsequently, the decoder conducts crossattention over the concatenated context embeddings to make generation.
For the training objective, it optimizes the language modelling loss of generating the golden answer a, a sequence of tokens represented as {a1, a2, ..., aNa}:
LG = − log Na∑
i
Pθd(ai|H, a1:i−1) (8)
where θd is parameters of the decoder. Finally, in the first-stage multi-task training, we integrate the sentence selection objective and answer generation objective in the following manner to simultaneously equip the model with these two capabilities. The variable λ is a hyper-parameter that balances these two objectives:
L1 = LG + λLS (9)

heading: 3.2 Select Generation Training
text: After completing the initial stage of training as outlined in Section 3.1, our preliminary experiments reveal that while the model possesses the capacity to select valuable sentences and make predictions at the same time, directly requiring the decoder to form predictions solely based on these selected sentences significantly hampers the performance of the model. We hypothesise that this is because of the gap in context length for decoder between training and inference. Therefore, we introduce a second stage of continuous training aimed at minimizing this discrepancy linked with context length.
More specifically, we initially obtain the context embeddings of the selected sentences, and this is done by the global multi-passage-level selection probability.
Hs = ⋃ hik:jk ; (ik, jk) ∈ TopK(PGs (i, j)) (10)
The resultant loss for answer generation can then be expressed as follows:
LsG = − log Na∑
i
Pθd(ai|Hs, a1:i−1) (11)
Throughout the second stage of training, we maintain the use of a multi-task training objective to keep both the sentence selection ability and answer generation ability, thereby facilitating better performance.
L2 = LsG + λLS (12)

heading: 3.3 Select Generation Inference
text: Following the two-stage training process, we acquire a model that is capable of dynamically selecting valuable sentences for the decoder to make generation. The inference process closely mirrors the second stage of training described in Section 3.2. Initially, valuable context embeddings are selected based on global selection probability. Subsequently, a greedy decoding strategy is employed to generate the answer based on the selected context embeddings denoted as Hs.

heading: 4 Experiments

heading: 4.1 Experimental Setup
text: Same as FiD (Izacard and Grave, 2021b), we utilize T5 (Raffel et al., 2020) as our base model. For passage retrieval, we utilize the retriever demonstrated by Izacard and Grave (2021a) which has superior retrieval performance. Following previous work (Lee et al., 2019; Karpukhin et al., 2020), we use the preprocessed English Wikipedia Snapshot on 12-30-2018 as our knowledge source. And we use average time per question (TPQ) to measure model’s inference efficiency. We conduct experiments on two commonly used ODQA datasets and one long-form QA dataset. Their statistics are shown in Table 1. We use the original train/dev/test split to conduct our experiments.
Natural Questions (Kwiatkowski et al., 2019) is a large ODQA dataset where all questions are mined from Google Search real queries. The annotated answers are all created by human annotators based on Wikipedia documents. Lee et al. (2019) further filter out questions with short answers to construct the open domain version of NQ, which we used in our experiment. We evaluate the performance of our model on NQ using the Exact Match (EM) metric.
TriviaQA (Joshi et al., 2017) is collected from 14 trivia and quiz-league websites with humanannotated answers and a set of answer aliases gathered from Wikipedia. We use the unfiltered question-answer pairs and discard the distantly supervised documents as our open domain version. Similar to NQ, we assess our model’s performance on TriviaQA using the Exact Match (EM) metric.
ASQA (Stelmakh et al., 2023) is a long-form question answering dataset that builds upon the AmbigQA (Min et al., 2020) dataset. It consists of ambiguous questions with multiple short span answers and long-form answers from human annotators that coverage all possible short span answers. In line with Stelmakh et al. (2023), we evaluate the performance of our model on this dataset using the STR-EM (String Exact Match) metric. STR-EM measures the proportion of disambiguated short answers that are correctly identified within the long answer. Since the test set of ASQA is not publicly available, our evaluation is conducted solely on the development set of ASQA.
Baselines We mainly compare our method with vanilla FiD, aiming at enhancing its inference efficiency. Additionally, we contrast our approach with the model resulting from our first training stage, referred to as HybridFiD, a model that is capable of simultaneously performing answer generation and sentence selection. Besides, we also compare with FiD-Light (Hofstätter et al., 2023), which propose to select the first-k tokens from each passage as the context for decoder and improve efficiency.
Implementation Our method is implemented using PyTorch (Paszke et al., 2019) and Huggingface Transformers (Wolf et al., 2020), with training efficiency enhanced by DeepSpeed ZeRO-2 (Rajbhandari et al., 2020). Due to GPU limitations, we conduct experiments using T5-Base, which has 345M parameters. We employ the AdamW (Loshchilov and Hutter, 2019) optimizer for stable training.
More implementation details are shown in Appendix A.

heading: 4.2 Main Results
text: Answer Generation The performance and inference speed of our FastFiD and other baselines are presented in Table 2. Unlike FiD-Light, which sacrifices QA performance to accelerate the inference process, FastFiD achieves substantial acceleration while maintaining similar or even superior QA performance compared to vanilla FiD. Additionally, FastFiD demonstrates significantly greater inference speedup than FiD-Light on NQ and ASQA, and comparable acceleration on TriviaQA. This can be attributed to our context-aware compression methods, which extract more essential information with fewer tokens compared to the static method employed in FiD-Light. Among the three datasets, FastFiD achieves the highest acceleration on ASQA due to the longer answer format. This showcases the effectiveness of FastFiD in longform QA, which is a widely utilized task by modern LLM system like New Bing1 and ChatGPT2.
We also conducted experiments with varying numbers of retrieved passages on NQ, and the results are presented in Table 3. As observed, regardless of the number of retrieved passages, our FastFiD consistently matches or even surpasses FiD and HybridFiD in terms of EM, while significantly reducing the context length and inference time. Moreover, as the number of retrieved passages in-
1https://www.bing.com/ 2https://chat.openai.com/
creases, the speedup rate also expands. This evidence underscores the potential of our method for effective implementation with a larger number of passages or lengthy documents.
Sentence Selection Similar to the metrics employed in the retriever, we measure the performance of sentence selection utilizing the accuracy@k, which assesses whether the correct answer appears within the top-k sentences. As depicted in Figure 3, there is a positive correlation between the increase in selected sentence numbers and accuracy, eventually surpassing 95% of the retriever’s accuracy for both HybridFiD and FastFiD. This demonstrates their substantial capability to select valuable sentences. A comparative evaluation of FastFiD and HybridFiD indicates that the secondstage training has a minimal impact on the sentence selection performance. Its main contribution is to adapt the model to the reduced context length, as we anticipated.
Discussion The performance of HybridFiD, as presented in Table 2 and Figure 3, highlights that answer generation and sentence selection are not mutually exclusive, and a multi-task training ob-
jective enables both capabilities. To further explore the relationship between sentence selection and answer generation, we examined the average cross-attention scores for tokens within the top 200 sentences and the non-selected segments. This analysis was conducted using HybridFiD with 100 retrieved passages on NQ. Following the approach of Izacard and Grave (2021a), we calculated the cross-attention score of each token in the inputs by averaging across all decoder layers, attention heads per layer, and all generated tokens.
Table 4 shows that the selected sentences have significantly higher average cross-attention scores compared to the non-selected segments, indicating that they contribute more significantly to the final answer generation. Conversely, this suggests that the non-selected segments largely contain irrelevant information, contributing less to answer generation despite being present in the context, and can therefore be disregarded during the decoding process. This insight also served as a motivation for our second-stage training, as described in Section 3.2. Furthermore, for a more comprehensive understanding of the effectiveness of our FastFiD approach, we provide a detailed case study in Ap-
pendix B.

heading: 5 Further Analysis
text: In this section, we present additional experiments to demonstrate the effectiveness of our method. First, we compare our sentence selection method with the passage reranking method in Section 5.1. Second, we evaluate the performance of our method with varying numbers of selected sentences in Section 5.2. Third, we conduct an ablation study to verify the importance of our two-stage training approach in Section 5.3. Finally, we assess the effectiveness of our method on decoder-only models in Section 5.4.

heading: 5.1 Sentence Selection vs Passage Rerank
text: Similar to conducting sentence selection after the encoder, another method is to conduct passage rerank after encoder’s outputs and thus reducing context length and inference time. In alignment with our two-stage training pipeline, we substitute the sentence selection loss with a passage reranking loss as utilized by Nogueira and Cho (2020), leading to a model we name RerankFiD. We evaluate the performance of FastFiD and RerankFiD under comparable context lengths, with the findings presented in Table 5. Consistently, our FastFiD method outperforms RerankFiD across a range of retrieved passage quantities. We hypothesize that this is due to the higher density of related information in the selected sentences compared to the reranked passages, as a passage often includes numerous irrelevant sentences even if it contains the correct answer.

heading: 5.2 Number of Selected Sentences
text: To evaluate the impact of varying the number of selected sentences, we conducted experiments on NQ with 100 retrieved passages. The results in Table 6 show that increasing the number of selected sentences leads to a nearly linear increase in the context length for the decoder. In terms of answer generation effectiveness, FastFiD performs well
even with only 50 selected sentences and improves gradually with more sentences selected. It is worth noting that performance reaches a plateau after a certain number of sentences, such as 200. Beyond this point, selecting additional sentences does not yield further improvement but only increases context length and inference time.

heading: 5.3 Two-Stage Training
text: To corroborate the efficacy of our two-stage training approach, we undertake experiments wherein each training stage is separately removed, with the outcomes displayed in Table 7. It is evident that the removal of either training stage results in a decrement in the final performance. Moreover, the second stage of training appears to be more consequential than the first stage, as demonstrated by the nearly 10-point drop in performance when the second stage is removed, compared to a decrease of less than 1-point when only the second stage is implemented.

heading: 5.4 Application on Decoder-Only LLM
text: With the success of ChatGPT and GPT-4 (OpenAI et al., 2024), most large language models (Touvron et al., 2023a,b) are currently built on a decoder-only architecture and demonstrate superior performance in ODQA. Consequently, we conducted additional experiments to evaluate the effectiveness of our method on decoder-only models. To adapt these
models, we made a single minor modification: the sentence selection head on top of the decoder now extracts the key-value caches of selected sentences instead of the final hidden states. These selected key-value caches are then utilized to accelerate the inference process.
Based on this, we conducted experiments on Llama2-7B (Touvron et al., 2023b) using the NQ dataset with 20 retrieved passages to verify our method, as shown in Table 8. The results demonstrate that our method can speed up Llama2-7B by 1.9 times, with only a minor decrease in performance. This acceleration is achieved by shortening the context length without losing important information, indicating potential for even greater speedup in future LLMs with longer sequences and more retrieved passages. Consequently, our method is well-suited to various architectures, providing a scalable way to enhance inference speed while maintaining performance.

heading: 6 Conclusion
text: In this paper, we present FastFiD, a model based on the FiD framework, designed to accelerate the inference process for ODQA tasks. FastFiD utilizes a two-stage training technique to enable the selection of valuable sentences and focus its predictions exclusively on these sentences. Experimental results demonstrate that FastFiD substantially improves inference speed while maintaining its original answer generation performance. And our ablation study confirms the effectiveness of the two-stage training approach, showing a decrease in final performance
when any single training stage is omitted.
Limitations
The limitations of our FastFiD approach can be primarily summarized into the following two points:
• Firstly, the effectiveness of our method depends on the presence of correct answers in the retrieved passages, as our approach utilizes this information to identify supported sentences. This reliance may limit its direct applicability to more complex queries. To address this issue, several strategies can be explored. For example, we can leverage the cross-attention map from FiD to identify the most informative sentences for two-stage training.
• Secondly, while we focus solely on the ODQA task in this paper, many other knowledgeintensive tasks also require the retrieval of numerous passages and face inference efficiency challenges. Conducting further experiments on a broader range of tasks and general RAG system will be an important avenue for future research.

heading: Acknowledgements
text: This work is supported by the National Natural Science Foundation of China (No. 62236011) and Institute Guo Qiang at Tsinghua University.

heading: B Case Study
text: To demonstrate the effectiveness of our FastFiD approach, we present an example using the test set of NQ, as depicted in Figure 4. In this figure, the text highlighted in yellow represents the valuable sentences identified by FastFiD, which are subsequently utilized in the decoding process. It is evident that FastFiD possesses the capability to recognize valuable sentences that often contain the correct answer, even if they are not in the highlyranked documents. Additionally, these valuable sentences only constitute a small portion of all the retrieved passages which is important for us to accelerate inference. However, it is important to note that not all selected sentences are necessarily relevant to the given question. For instance, the second selected sentence in DOCUMENT [16] may not carry any meaningful information. Consequently, we need to select a specific number of sentences to retain all the pertinent information for achieving satisfactory performance, as demonstrated in Section 5.2.

heading: C Ablation Study of Selected Sentences Number on TriviaQA
text: In Section 5.2, we examine the impact of varying the number of selected sentences on the final performance using the NQ dataset. To determine if the optimal number of selected sentences varies across different datasets, we extend our experiments to TriviaQA.
The results, presented in Table 9, reveal a dif-
ferent trend compared to the NQ dataset findings in Table 6. In the case of TriviaQA, performance continually improves as the number of selected sentences increases. However, the marginal gains decrease with the inclusion of more sentences. For instance, increasing the number of sentences from 200 to 400 leads to a performance improvement of 0.64, while an increase from 400 to 800 sentences results in a smaller gain of 0.21.
The observed trend can be attributed to the fact that TriviaQA contains a greater average number of supportive sentences per question compared to NQ. As shown in Table 1, NQ has an average of 14.84 supportive sentences, whereas TriviaQA has 30.58, nearly double the amount. Consequently, selecting more sentences in TriviaQA provides additional supportive information that is beneficial for answering the questions. Conversely, in the
NQ dataset, increasing the number of selected sentences might introduce more noise, leading to incorrect answers. Therefore, we conclude that the optimal number of sentences to select may vary across datasets, depending on how concentrated the relevant information is within each dataset.
D Influence of Model Size
To verify the effectiveness of our method across different model scales, we conducted additional experiments using T5-Large, which consists of 770 million parameters. The performance of various methods on T5-Large is detailed in Table 10. Our results demonstrate that our method remains effective on larger models, achieving a speedup of 3.4X. Moreover, FastFiD-Large outperforms FiD-Base in both speed and the EM metric, indicating that
our method allows for the utilization of larger models to enhance QA performance without increasing inference time.

heading: Future Work
text: Conducting further experiments on a broader range of tasks and general RAG system will be an important avenue for future research