Conformer-Kernel with Query Term Independence for Document Retrieval

Bhaskar Mitra, Sebastian Hofstätter, Hamed Zamani, Nick CraswellarXiv 2020

Abstract

The Transformer-Kernel (TK) model has demonstrated strong reranking performance on the TREC Deep Learning benchmark—and can be considered to be an efficient (but slightly less effective) alternative to BERT-based ranking models. In this work, we extend the TK architecture to the full retrieval setting by incorporating the query term independence assumption. Furthermore, to reduce the memory complexity of the Transformer layers with respect to the input sequence length, we propose a new Conformer layer. We show that the Conformer's GPU memory requirement scales linearly with input sequence length, making it a more viable option when ranking long documents. Finally, we demonstrate that incorporating explicit term matching signal into the model can be particularly useful in the full retrieval setting. We present preliminary results from our work in this paper.

The Challenge of Full-Scale Retrieval

In modern Information Retrieval (IR), a significant gap exists between re-ranking and full retrieval. Most high-performance neural models, such as BERT, are designed as re-rankers. While highly accurate, they are computationally intensive, limiting their application to small subsets of documents (e.g., the top 100) pre-selected by simpler systems like BM25.

Searching millions of documents directly with these models is hindered by two primary obstacles:

  1. The Quadratic Bottleneck: Standard self-attention mechanisms possess a memory complexity of $O(n^2)$. As document length increases, memory requirements explode, often exceeding standard GPU limits.
  2. The Interaction Problem: Most neural models calculate complex interactions between every query word and every document word simultaneously. This prevents the "pre-calculation" of document scores, necessitating exhaustive and slow comparisons for every search.

The Conformer-Kernel (CK) Architecture

To address these issues, the researchers developed the Conformer-Kernel (CK) model. This architecture transforms the existing Transformer-Kernel (TK) model through three major shifts:

  • Separable Self-Attention: By splitting the attention operation—computing across the embedding dimension first and then the sequence dimension—the model reduces memory complexity from $O(n^2)$ to $O(n \times d_{key})$. This enables the processing of significantly longer documents.
  • Query Term Independence (QTI): The model treats the relevance of each query term to the document independently. This allows for the offline pre-computation of term-document scores, which can then be stored in an inverted index for rapid retrieval.
  • Hybrid Matching: Recognizing that latent conceptual matching and lexical (exact word) matching are complementary, the authors integrated a learnable lexical submodel based on the BM25 formula.
The Conformer-Kernel architecture utilizes Query Term Independence to enable efficient full-scale retrieval.

Efficiency and Scalability

The transition from quadratic to linear memory usage is a fundamental shift for document retrieval. As shown in the benchmarking of memory usage, the Conformer's linear scaling allows it to handle sequences of up to 4,000 terms on standard hardware, whereas standard Transformers typically fail due to memory errors after 512 terms.

Comparison of memory complexity: The Conformer maintains linear scaling as document length increases, unlike the quadratic growth of standard Transformers.

Key Results and Insights

The Conformer-Kernel model was evaluated using the TREC 2019 Deep Learning track benchmark (MS MARCO), which contains approximately 3.2 million documents. Key findings include:

  • Effectiveness: The full CK model, enhanced with learned BM25, achieved an MRR of 0.906 and NDCG@10 of 0.603, significantly outperforming the standard BM25+RM3 baseline (MRR 0.807).
  • Lexical Importance: Integrating a "learned BM25" component provided a substantial performance boost, confirming that exact keyword matching remains vital even in deep learning architectures.
  • Data Augmentation: Incorporating the ORCAS click-log dataset further improved the NDCG@10 to 0.620, demonstrating the model's ability to leverage auxiliary metadata effectively.

Limitations and Future Work

While the CK model represents a leap forward in retrieval efficiency, a performance gap remains compared to BERT-scale models in absolute ranking effectiveness. Future research will focus on incorporating pre-training into the Conformer-Kernel architecture to close this gap. Additionally, the authors identify the selection of "negative" training samples and the enforcement of index sparsity as critical areas for further optimization in full-retrieval settings.

Summary updated

BibTeX
@misc{mitra2020conformer,
  author = {Bhaskar Mitra and Sebastian Hofstätter and Hamed Zamani and Nick Craswell},
  title = {{Conformer-Kernel with Query Term Independence for Document Retrieval}},
  year = {2020},
  eprint = {2007.10434},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.10434},
}
Figure