Skip to main content
QUICK REVIEW

[论文解读] DC-BERT: Decoupling Question and Document for Efficient Contextual Encoding

Yuyu Zhang, Ping Nie|arXiv (Cornell University)|Feb 28, 2020
Topic Modeling参考文献 23被引用 10
一句话总结

DC-BERT 提出了一种解耦的 BERT 框架,通过专用的在线和离线 BERT 模型分别编码问题和文档,并缓存文档编码以实现快速检索。通过用可学习的全局嵌入和基于 Transformer 的交互替代问题-文档拼接,它在保持标准 BERT 重排序器 98% 阅读理解性能的同时,将文档检索速度提升了 10 倍以上。

ABSTRACT

Recent studies on open-domain question answering have achieved prominent performance improvement using pre-trained language models such as BERT. State-of-the-art approaches typically follow the "retrieve and read" pipeline and employ BERT-based reranker to filter retrieved documents before feeding them into the reader module. The BERT retriever takes as input the concatenation of question and each retrieved document. Despite the success of these approaches in terms of QA accuracy, due to the concatenation, they can barely handle high-throughput of incoming questions each with a large collection of retrieved documents. To address the efficiency problem, we propose DC-BERT, a decoupled contextual encoding framework that has dual BERT models: an online BERT which encodes the question only once, and an offline BERT which pre-encodes all the documents and caches their encodings. On SQuAD Open and Natural Questions Open datasets, DC-BERT achieves 10x speedup on document retrieval, while retaining most (about 98%) of the QA performance compared to state-of-the-art approaches for open-domain question answering.

研究动机与目标

  • 解决基于 BERT 的文档重排序器在为每个检索到的文档重复编码同一问题时效率低下的问题。
  • 通过解耦问题和文档编码,实现高吞吐量的开放域问答。
  • 在大幅降低推理延迟的同时,保持高检索和答案准确率。
  • 探索一种新型架构,通过可学习嵌入和 Transformer 模型,结合局部上下文编码与全局问题-文档交互。

提出的方法

  • 将 BERT 分解为两个独立模型:用于单个问题编码的在线 BERT 和用于预编码并缓存所有文档的离线 BERT。
  • 使用局部 BERT 层独立编码问题和文档,以在低层保留句法和语义信息。
  • 引入可训练的全局位置和类型嵌入,以建模问题和文档表示之间的交叉注意力。
  • 在解耦编码的基础上应用多层 Transformer,以实现丰富的问题-文档交互。
  • 离线缓存文档嵌入,以消除推理过程中重复编码,实现即时检索。
  • 将该框架应用于文档重排序任务,由于每个查询对应大量文档,效率在此场景下最为关键。

实验结果

研究问题

  • RQ1在 BERT 中解耦问题和文档编码,是否能在不损失检索准确率的前提下降低推理延迟?
  • RQ2与拼接方法相比,可学习的全局嵌入和 Transformer 层在建模问题-文档交互方面有多高效?
  • RQ3在解耦框架中,模型深度(Transformer 层数量)与推理速度之间的权衡如何?
  • RQ4与模型压缩和蒸馏技术相比,该解耦方法在速度和性能方面的表现如何?

主要发现

  • 与标准的基于 BERT 的重排序器相比,DC-BERT 在文档检索中实现了超过 10 倍的速度提升,对实时推理的延迟影响极小。
  • 在 SQuAD Open 和 Natural Questions Open 数据集上,DC-BERT 保留了 BERT-base 基线模型 98% 的答案精确匹配(EM)性能。
  • 尽管模型容量更低,DC-BERT 在检索和答案准确率方面均优于量化 BERT 和 DistilBERT。
  • 消融实验证明,使用 Transformer 作为交互层相比线性或 LSTM 基础的替代方法,性能显著更优。
  • 增加交互 Transformer 层的数量可提升问答性能,但会降低加速比,清晰展示了模型容量与效率之间的权衡。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。