Context-Aware Sentence/Passage Term Importance Estimation For First Stage Retrieval

Zhuyun Dai, Jamie CallanarXiv 2019

Abstract

Term frequency is a common method for identifying the importance of a term in a query or document. But it is a weak signal, especially when the frequency distribution is flat, such as in long queries or short documents where the text is of sentence/passage-length. This paper proposes a Deep Contextualized Term Weighting framework that learns to map BERT's contextualized text representations to context-aware term weights for sentences and passages. When applied to passages, DeepCT-Index produces term weights that can be stored in an ordinary inverted index for passage retrieval. When applied to query text, DeepCT-Query generates a weighted bag-of-words query. Both types of term weight can be used directly by typical first-stage retrieval algorithms. This is novel because most deep neural network based ranking models have higher computational costs, and thus are restricted to later-stage rankers. Experiments on four datasets demonstrate that DeepCT's deep contextualized text understanding greatly improves the accuracy of first-stage retrieval algorithms.

Introduction

Traditional search engines rely on a multi-stage retrieval pipeline. The first stage must be extremely efficient, typically scanning millions of documents to find a few hundred candidates. To achieve this speed, they usually employ simple "bag-of-words" models like BM25, which rely on term frequency ($tf$)—the raw count of a word's appearance.

However, $tf$ is a blunt instrument. In short passages or long, rambling queries, word counts are often uniform, making it difficult to distinguish central topics from trivial mentions. While deep learning models like BERT offer superior semantic understanding, they are too computationally expensive to run against every document in a collection during initial retrieval. DeepCT addresses this by "baking" BERT's intelligence directly into a standard search index.

The DeepCT Framework

The DeepCT framework maps BERT’s contextualized representations to term weights. By processing text through BERT, the representation of each word absorbs the meaning of its surrounding context via the attention mechanism. A linear regression layer then maps these embeddings to a single importance score for each token.

DeepCT distinguishes term importance based on context, assigning higher weights to terms central to the topic even when raw counts are similar.

The model is trained to predict "Query Term Recall," learning to identify words that frequently appear in user queries finding that document relevant. DeepCT can be deployed in two modes:

  1. DeepCT-Index (Offline): Weights for document terms are calculated once during indexing and stored in a standard inverted index. This allows for neural-level accuracy at classical search speeds.
  2. DeepCT-Query (Online): For long queries, the model identifies core terms to emphasize during the search process.

Experimental Results

The authors evaluated DeepCT on major benchmarks including MS MARCO and TREC-CAR. DeepCT-Index demonstrated substantial improvements over traditional $tf$ indexing and other document expansion methods like Doc2Query.

Performance comparison of DeepCT-Index against traditional indexing and neural baselines on MS MARCO and TREC-CAR datasets.

Key Findings

  • Accuracy Gains: DeepCT-Index improved BM25 retrieval accuracy (MRR@10) by 27% on MS MARCO and 46% on TREC-CAR compared to standard term frequency.
  • Pipeline Efficiency: By providing a higher-quality candidate pool in the first stage, DeepCT allowed BERT-based re-rankers to achieve the same final accuracy while processing 5x to 10x fewer documents, significantly reducing overall system latency.
  • Index Optimization: Because DeepCT assigns near-zero weights to "stop words" or off-topic terms, these can be pruned from the index, potentially reducing storage requirements without sacrificing quality.

Conclusion and Limitations

DeepCT successfully bridges the gap between deep learning and efficient first-stage retrieval. While it requires significant query-document relevance data for training and is subject to BERT's 512-token input limit, it offers a scalable way to improve search relevance. Future work may explore more aggressive index pruning and applications to diverse document types beyond short passages.

Summary updated

BibTeX
@misc{dai2019context,
  author = {Zhuyun Dai and Jamie Callan},
  title = {{Context-Aware Sentence/Passage Term Importance Estimation For First Stage Retrieval}},
  year = {2019},
  eprint = {1910.10687},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.10687},
}
Figure