arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.06333cs.CL
收藏

FastFiD:通过句子选择提升开放域问答的推理效率

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

Tsinghua University(清华大学);Beijing National Research Center for Information Science and Technology(北京信息科学与技术国家研究中心)

Yufei Huang, Xu Han, Maosong Sun

AI总结:

针对开放域问答中FiD框架因段落过长导致推理耗时的问题,提出FastFiD方法对编码后段落做句子选择以缩短上下文,在三个常用数据集上实现2.3X-5.7X的推理提速且保持性能。

摘要:

近年来,在稠密段落检索与预训练语言模型的重大发展推动下,开放域问答(ODQA)发展迅速。当前模型通常采用FiD(Fusion-in-Decoder,解码器融合)框架,该框架由神经检索器与编码器-解码器结构的神经阅读器组成。在答案生成过程中,检索器会检索大量段落(例如约100个),每个段落随后由编码器单独编码,之后解码器基于这些编码后的段落进行预测。然而,该框架的耗时相对较长,这主要是由于收集到的段落总长度过大。为解决这一问题,本文提出FastFiD——一种在编码后的段落上执行句子选择的新方法,该方法有助于保留有价值的句子,同时缩短生成答案所需的上下文长度。在三个常用数据集(Natural Questions、TriviaQA和ASQA)上的实验表明,我们的方法可将推理速度提升2.3倍至5.7倍,同时保持模型性能。此外,对模型注意力的深入分析显示,所选句子确实对最终答案有显著贡献。代码已公开于https://github.com/thunlp/FastFiD。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑