Sparse, Dense, and Attentional Representations for Text Retrieval

Yi Luan, Jacob Eisenstein, Kristina Toutanova, Michael Collins
5/1/2020
cs.CL

Official code: google-research/language (1,828 stars, Python, Apache-2.0, last commit 2026-04-21).

Abstract

Dual encoders perform retrieval by encoding documents and queries into dense lowdimensional vectors, scoring each document by its inner product with the query. We investigate the capacity of this architecture relative to sparse bag-of-words models and attentional neural networks.

Show full abstract

Using both theoretical and empirical analysis, we establish connections between the encoding dimension, the margin between gold and lower-ranked documents, and the document length, suggesting limitations in the capacity of fixed-length encodings to support precise retrieval of long documents. Building on these insights, we propose a simple neural model that combines the efficiency of dual encoders with some of the expressiveness of more costly attentional architectures, and explore sparse-dense hybrids to capitalize on the precision of sparse retrieval. These models outperform strong alternatives in large-scale retrieval.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Shared repository for open-sourced projects from the Google AI Language team.

1,828363Python, Jupyter NotebookOct 16, 20187 months agoApache-2.0
machine-learningnatural-language-processingresearch

Similar Papers

Cite this paper

@article{luan2020sparse,
  title  = {Sparse, Dense, and Attentional Representations for Text Retrieval},
  author = {Yi Luan and Jacob Eisenstein and Kristina Toutanova and Michael Collins},
  year   = {2020},
  eprint = {2005.00181},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2005.00181}
}

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

Discussion