Haystack: Integrate Retriever from "Dense Passage Retrieval for Open-Domain Question Answering"

Created on 16 Apr 2020  路  2Comments  路  Source: deepset-ai/haystack

Interesting new paper proposing a dense retriever with two BERT encoders trained on question-passage-pairs from the most common QA datasets. I find their negative sampling approach (in-batch negatives) quite appealing.

In haystack, we already have basic support for "dense retrievers" using embeddings stored in elasticsearch. However, we would need to make sure to use two different encoder models here(one for questions, one for passages) and provide an easy way of loading the models.
Furthermore, they use dot product instead of cosine similarity.

Abstract: Open-domain question answering relies on efficient passage retrieval to select candidate contexts, where traditional sparse vector space models, such as TF-IDF or BM25, are the de facto method. In this work, we show that retrieval can be practically implemented using dense representations alone, where embeddings are learned from a small number of questions and passages by a simple dual-encoder framework. When evaluated on a wide range of open-domain QA datasets, our dense retriever outperforms a strong Lucene-BM25 system largely by 9%-19% absolute in terms of top-20 passage retrieval accuracy, and helps our end-to-end QA system establish new state-of-the-art on multiple open-domain QA benchmarks.

Paper: https://arxiv.org/abs/2004.04906
Code: https://fburl.com/qa-dpr (not yet online)

enhancement retriever

Most helpful comment

Just got noticed by the authors that code and models are published now :)
https://github.com/facebookresearch/DPR

All 2 comments

Just got noticed by the authors that code and models are published now :)
https://github.com/facebookresearch/DPR

Implemented the basic version in #167 .
We will improve it & extend the functionality in the following weeks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rshtirmer picture rshtirmer  路  3Comments

tobiasbj picture tobiasbj  路  6Comments

zshnhaque picture zshnhaque  路  3Comments

dany-nonstop picture dany-nonstop  路  7Comments

laifuchicago picture laifuchicago  路  3Comments