Skip to main content
QUICK REVIEW

[Paper Review] Efficient Passage Retrieval with Hashing for Open-domain Question Answering

Ikuya Yamada, Akari Asai|arXiv (Cornell University)|Jun 2, 2021
Topic ModelingComputer Science12 references9 citations
TL;DR

This paper proposes Binary Passage Retriever (BPR), a memory-efficient neural retrieval model that replaces dense vector indexing in Dense Passage Retriever (DPR) with compact binary codes via end-to-end learning-to-hash. BPR achieves near-SOTA open-domain QA accuracy with a 97% reduction in index size (from 65GB to 2GB) and faster query inference, using a multi-task objective for both Hamming-based candidate generation and inner-product-based reranking.

ABSTRACT

Most state-of-the-art open-domain question answering systems use a neural retrieval model to encode passages into continuous vectors and extract them from a knowledge source. However, such retrieval models often require large memory to run because of the massive size of their passage index. In this paper, we introduce Binary Passage Retriever (BPR), a memory-efficient neural retrieval model that integrates a learning-to-hash technique into the state-of-the-art Dense Passage Retriever (DPR) to represent the passage index using compact binary codes rather than continuous vectors. BPR is trained with a multi-task objective over two tasks: efficient candidate generation based on binary codes and accurate reranking based on continuous vectors. Compared with DPR, BPR substantially reduces the memory cost from 65GB to 2GB without a loss of accuracy on two standard open-domain question answering benchmarks: Natural Questions and TriviaQA. Our code and trained models are available at https://github.com/studio-ousia/bpr.

Motivation & Objective

  • To reduce the high memory cost of dense passage retrieval models like DPR, which require 65GB for indexing 21M Wikipedia passages.
  • To enable efficient, scalable open-domain question answering on large knowledge sources such as PubMed and Common Crawl.
  • To maintain high retrieval and QA accuracy while drastically compressing the passage index using binary codes.
  • To develop a two-stage retrieval pipeline that combines fast Hamming distance-based candidate generation with accurate continuous-vector reranking.
  • To demonstrate that end-to-end learning-to-hash can compress retrieval indexes without accuracy degradation, unlike post-hoc quantization methods.

Proposed method

  • BPR extends DPR by learning to hash continuous passage embeddings into compact binary codes using a sign function approximation via scaled tanh during backpropagation.
  • The model uses a multi-task loss combining two objectives: (1) Hamming distance-based candidate generation using binary codes, and (2) inner product-based reranking using continuous embeddings.
  • Binary codes are generated by applying the sign function to continuous embeddings, with the non-differentiable sign function approximated using a scaled tanh in training.
  • Candidate generation is performed via linear scan using efficient Hamming distance computation or via hash table lookup with increasing Hamming radius.
  • The retrieval pipeline operates in two stages: (1) fast candidate retrieval using binary codes, (2) accurate reranking using continuous vectors.
  • The model is trained end-to-end on the same data and with the same optimization setup as DPR, using the same reader architecture for evaluation.

Experimental results

Research questions

  • RQ1Can learning-to-hash be effectively integrated into dense passage retrieval to reduce index size without sacrificing retrieval accuracy?
  • RQ2Does a two-stage retrieval pipeline—using binary codes for fast candidate generation and continuous vectors for accurate reranking—maintain or improve performance compared to full dense retrieval?
  • RQ3How does end-to-end training of hash functions and encoders compare to post-hoc quantization techniques like LSH and product quantization in terms of accuracy and efficiency?
  • RQ4Can the memory cost of dense retrieval be reduced from 65GB to under 5GB while preserving SOTA open-domain QA performance?
  • RQ5What is the trade-off between retrieval speed and accuracy when using binary codes versus continuous vectors in passage retrieval?

Key findings

  • BPR reduces the passage index size from 65GB (DPR) to 2GB, achieving a 97% reduction in memory usage.
  • On the Natural Questions and TriviaQA benchmarks, BPR matches or slightly exceeds DPR’s top-20 recall and exact match (EM) QA accuracy.
  • BPR achieves faster query inference than DPR, with hash table lookup being more efficient than linear scan and significantly faster than HNSW-based retrieval.
  • Post-hoc quantization methods (LSH and product quantization) degrade in performance compared to BPR, which maintains accuracy through end-to-end training.
  • Disabling the reranking head in BPR leads to a significant drop in performance, confirming the importance of the two-stage design.
  • With an improved ELECTRA-large reader, BPR achieves competitive EM accuracy, outperforming all models except the larger FiD model with over twice as many parameters.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.