Query Embedding Pruning for Dense Retrieval

Nicola Tonellotto, Craig Macdonald
8/23/2021
cs.IR

Official code: terrierteam/pyterrier_colbert (89 stars, Jupyter Notebook, last commit 2026-09-01).

Abstract

Recent advances in dense retrieval techniques have offered the promise of being able not just to re-rank documents using contextualised language models such as BERT, but also to use such models to identify documents from the collection in the first place. However, when using dense retrieval approaches that use multiple embedded representations for each query, a large number of documents can be retrieved for each query, hindering the efficiency of the method.

Show full abstract

Hence, this work is the first to consider efficiency improvements in the context of a dense retrieval approach (namely ColBERT), by pruning query term embeddings that are estimated not to be useful for retrieving relevant documents. Our proposed query embeddings pruning reduces the cost of the dense retrieval operation, as well as reducing the number of documents that are retrieved and hence require to be fully scored. Experiments conducted on the MSMARCO passage ranking corpus demonstrate that, when reducing the number of query embeddings used from 32 to 3 based on the collection frequency of the corresponding tokens, query embedding pruning results in no statistically significant differences in effectiveness, while reducing the number of documents retrieved by 70%. In terms of mean response time for the end-to-end to end system, this results in a 2.65x speedup.

View on arXivView PDF

Code Implementations(1)

8935Jupyter Notebook, PythonFeb 18, 20213 months ago

Similar Papers

Cite this paper

@article{tonellotto2021query,
  title  = {Query Embedding Pruning for Dense Retrieval},
  author = {Nicola Tonellotto and Craig Macdonald},
  year   = {2021},
  eprint = {2108.10341},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.10341}
}

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/2108.10341.svg)](https://codeofpaper.com/paper/2108.10341)

Discussion