Skip to main content
QUICK REVIEW

[Paper Review] Transformer Memory as a Differentiable Search Index

Yi Tay, Vinh Q. Tran|arXiv (Cornell University)|Feb 14, 2022
Topic ModelingComputer Science82 citations
TL;DR

DSI trains a single Transformer to map queries directly to docids, encoding the entire corpus in the model parameters and enabling end-to-end retrieval with strong gains over baselines, including zero-shot performance.

ABSTRACT

In this paper, we demonstrate that information retrieval can be accomplished with a single Transformer, in which all information about the corpus is encoded in the parameters of the model. To this end, we introduce the Differentiable Search Index (DSI), a new paradigm that learns a text-to-text model that maps string queries directly to relevant docids; in other words, a DSI model answers queries directly using only its parameters, dramatically simplifying the whole retrieval process. We study variations in how documents and their identifiers are represented, variations in training procedures, and the interplay between models and corpus sizes. Experiments demonstrate that given appropriate design choices, DSI significantly outperforms strong baselines such as dual encoder models. Moreover, DSI demonstrates strong generalization capabilities, outperforming a BM25 baseline in a zero-shot setup.

Motivation & Objective

  • Motivate a retrieval model that encodes corpus content entirely in model parameters.
  • Explore how to represent documents and docids within a seq2seq Transformer for indexing and retrieval.
  • Evaluate DSI across model and corpus scales on Natural Questions data.

Proposed method

  • Formulate Differentiable Search Index (DSI) as a seq2seq model that learns document-to-docid associations (indexing) and query-to-docid mappings (retrieval).
  • Investigate multiple document representations (direct, set/inverted indexing) and several docid representations (unstructured atomic, naive strings, semantically structured).
  • Train using multi-task learning combining indexing and retrieval tasks with a T5-based backbone.
  • Employ various indexing strategies (Inputs2Targets, Targets2Inputs, Bidirectional, Span Corruption) and document representations; identify direct indexing as effective.
  • Explore semantic docid construction via hierarchical clustering to produce semantically structured identifiers.
  • Compare against BM25 and dual encoders, and test zero-shot performance against unsupervised baselines.

Experimental results

Research questions

  • RQ1Can a single Transformer store corpus information and perform retrieval end-to-end without a separate index?
  • RQ2How do different document representations and docid representations affect retrieval performance and scalability?
  • RQ3What is the impact of model size and corpus size on DSI performance, and how does multi-task training influence results?
  • RQ4How does DSI perform in zero-shot retrieval compared to BM25 and unsupervised baselines?

Key findings

  • DSI outperforms BM25 and dual encoder baselines on NQ across all dataset scales in supervised finetuning (Hits@1 gains up to +66% relative on large datasets for semantic identifiers).
  • Semantic structured docids yield the best overall performance among docid representations, with atomic docids performing strongest in zero-shot settings.
  • Direct document indexing (32 tokens) with Inputs2Targets indexing generally provides strong results, while some other indexing strategies perform poorly or fail.
  • Model scale improves DSI performance more consistently than it does for dual encoders, with semantic docids showing especially favorable scaling.
  • Zero-shot results show DSI surpassing SentenceT5 and BM25 on several configurations, notably with atomic docids.

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.