TL;DR
PromptDSI introduces a rehearsal-free, prompt-based continual learning framework for Differentiable Search Indexes (DSIs) in document retrieval. By eliminating the need to store past user queries or use heavy generative replay models, it protects data privacy and slashes memory overhead. Furthermore, it introduces a single-pass architecture for low latency and utilizes fixed neural topic embeddings to stabilize prompt selection.
What Problem Does This Paper Address?
Traditional document retrieval relies on a "retrieve-then-rank" pipeline using external inverted indices or vector databases. Differentiable Search Indexes (DSIs) flip this script by training a single Transformer model to map queries directly to document identifiers (docids) via end-to-end learning, effectively encoding the entire corpus into the model's parameters.
However, real-world document collections are dynamic. When new documents are added, standard DSIs suffer from catastrophic forgetting—they forget how to retrieve old documents unless they are fully retrained from scratch, which is computationally prohibitive. Existing continual learning (CL) fixes either require caching previous queries (raising serious data privacy concerns and high memory overhead) or using generative models to replay pseudo-queries (incurring massive training overhead).
While prompt-based continual learning (PCL) has emerged in the vision domain as a rehearsal-free alternative, adapting it to document retrieval introduces two major roadblocks:
- High Latency: Standard PCL requires two forward passes through the network (one to select the prompt, one to compute the prediction), which is too slow for real-time retrieval systems.
- Prompt Collapse: Text corpora often lack distinct semantic boundaries, causing learnable prompt selection mechanisms to destabilize and underutilize the available prompt pool.
Methods
The authors propose PromptDSI, which freezes the core DSI backbone and uses a pool of learnable prompts to index new documents incrementally. To make PCL viable for document retrieval, they introduce three key modifications:
- Single-pass PCL: Instead of performing an initial forward pass to extract the final layer's
[CLS]token for prompt selection, PromptDSI uses the average token embeddings ([AVG]) from an intermediate layer. This allows prompt selection and query processing to happen in a single streamlined forward pass. - Topic-aware Prompt Keys (PromptDSI<sub>Topic</sub>): To prevent prompt selection from collapsing into a tiny subset of prompts, the authors use BERTopic to mine fixed neural topic embeddings from the initial corpus. These embeddings serve as static keys in the prompt pool, stabilizing the query-key matching process and improving interpretability.
- Layer-wise Prompting Optimization: Through a comprehensive stability-plasticity study, the authors determined that single-layer prefix-tuning at Layer 2 provides the optimal trade-off between efficiency and performance, challenging the multi-layer prompting standard used in vision PCL.
Datasets
The approach was evaluated using BERT and SBERT backbones across two widely recognized document retrieval benchmarks, adapted into sequential continual learning setups (90% initial corpus $D_0$, followed by five sequential 2% increments $D_1$ to $D_5$):
- NQ320k: A title-de-duplicated version of the Natural Questions dataset containing roughly 320k query-document pairs across 108k documents.
- MSMARCO 300k: A subset of the MS MARCO Document Ranking dataset containing 300k documents.
Key Insights and Ideas
- Text Queries are Semantically Simpler Than Images: The success of the single-pass architecture hinges on the realization that shallow, intermediate token representations are rich enough for prompt selection in text retrieval. This contrasts sharply with computer vision, where deep features are typically required.
- Static Keys Beat Learnable Keys for Text: Because different text corpora share overlapping topics, optimizing prompt keys dynamically causes them to become highly similar, leading to parameter underutilization. Using fixed, pre-computed neural topic embeddings as keys bypasses this training instability entirely.
- Enhanced Interpretability: By mapping prompts directly to neural topics (e.g., "Football", "Movies", "Human Biology"), the system provides clear visibility into why a specific prompt was selected during inference.
Key Results
- Zero Forgetting & Superior Plasticity: PromptDSI variants consistently outperformed rehearsal-based baselines (like DSI++) and matched the performance of strong cache-based baselines (IncDSI) in mitigating forgetting, while significantly improving retrieval performance on newly added corpora ($A_5$).
- Massive Speedups: The single-pass mechanism achieved up to a 4.3x speedup during inference compared to the naive two-pass PCL adaptation, with a negligible performance trade-off (less than 0.9% drop in MRR@10).
- Minimal Memory Footprint: While cache-based methods scale linearly and require hundreds of megabytes (or gigabytes on full datasets) to store past query embeddings, PromptDSI's prompt pool requires only ~315 KiB—a reduction of three orders of magnitude.
Limitations and Future Work
- Scaling Atomic Docids: This work focuses on classification-based DSI using atomic docids, where each document acts as a unique class. This paradigm faces inherent scaling challenges when moving to millions of documents.
- Advanced Backbones: The experiments were restricted to standard BERT and SBERT models. The authors note that evaluating PromptDSI on state-of-the-art dense encoders (like BGE or NV-Embed) remains an open direction.
- LLM-based Topic Modeling: While BERTopic proved effective, leveraging Large Language Models (LLMs) for generating more contextualized and robust neural topic keys could further enhance prompt utilization.
Summary updated