Retrieval as Attention: End-to-end Learning of Retrieval and Reading within a Single Transformer

Zhengbao Jiang, Luyu Gao, Jun Araki, Haibo Ding, Zhiruo Wang +2 more
12/5/2022
cs.CLcs.LG
transformer-attention

Official code: jzbjyb/ReAtt (82 stars, Python, last commit 2022-12-16).

Abstract

Systems for knowledge-intensive tasks such as open-domain question answering (QA) usually consist of two stages: efficient retrieval of relevant documents from a large corpus and detailed reading of the selected documents to generate answers. Retrievers and readers are usually modeled separately, which necessitates a cumbersome implementation and is hard to train and adapt in an end-to-end fashion.

Show full abstract

In this paper, we revisit this design and eschew the separate architecture and training in favor of a single Transformer that performs Retrieval as Attention (ReAtt), and end-to-end training solely based on supervision from the end QA task. We demonstrate for the first time that a single model trained end-to-end can achieve both competitive retrieval and QA performance, matching or slightly outperforming state-of-the-art separately trained retrievers and readers. Moreover, end-to-end adaptation significantly boosts its performance on out-of-domain datasets in both supervised and unsupervised settings, making our model a simple and adaptable solution for knowledge-intensive tasks. Code and models are available at https://github.com/jzbjyb/ReAtt.

View on arXivView PDF

Code Implementations(1)

jzbjyb/ReAttOfficial100%

Retrieval as Attention

824Python, ShellOct 28, 20223 years ago

Similar Papers

Cite this paper

@article{jiang2022retrieval,
  title  = {Retrieval as Attention: End-to-end Learning of Retrieval and Reading within a Single Transformer},
  author = {Zhengbao Jiang and Luyu Gao and Jun Araki and Haibo Ding and Zhiruo Wang and Jamie Callan and Graham Neubig},
  year   = {2022},
  eprint = {2212.02027},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.02027}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2212.02027.svg)](https://codeofpaper.com/paper/2212.02027)

Discussion