Abstract
Differentiable Search Indices (DSI) have emerged as a powerful paradigm in Information Retrieval (IR), encoding document corpora directly into neural network parameters. However, their static nature and the high cost of retraining to incorporate new data have limited their practical application. This paper introduces IncDSI, a method for adding new documents to a DSI in milliseconds. By framing document addition as a constrained optimization problem, IncDSI achieves retrieval performance competitive with full retraining while operating orders of magnitude faster.
Introduction
In modern Information Retrieval, two primary architectures dominate. Dual Encoders (e.g., DPR) map queries and documents into a shared vector space; while easy to update, they often face performance bottlenecks. Differentiable Search Indices (DSI) represent the state-of-the-art, directly predicting document IDs from queries.
Despite their accuracy, DSI models are traditionally static. Adding a new document—such as a breaking news story or a new research paper—usually requires retraining the entire model on the full corpus to prevent "catastrophic forgetting." This computational overhead makes standard DSI impractical for dynamic, real-world search environments. IncDSI addresses this by enabling surgical, real-time updates to the index.
The IncDSI Methodology
IncDSI treats the addition of a new document as a local optimization task rather than a global retraining process. The architecture consists of a BERT-based encoder and a linear classification layer, where each row in the classification matrix serves as a unique "document vector."
Constrained Optimization
To add a document, IncDSI identifies a new vector ($v_{n+1}$) that satisfies two critical conditions:
- Retrieval Constraint: The new document must be the top-ranked result for its associated queries.
- Non-Interference Constraint: The new vector must not interfere with the query mappings of existing documents in the index.
These constraints are combined into an objective function using squared hinge losses. This ensures the new document is positioned in the embedding space where it is both distinct and correctly retrievable without "stealing" queries from the original corpus.
Efficient Optimization with L-BFGS
Rather than using standard stochastic gradient descent (SGD) or Adam, which are designed for batch-based training, IncDSI utilizes the L-BFGS optimizer. This approach is significantly faster for this specific constrained problem, allowing the system to calculate and integrate a new document vector in approximately 20–50 milliseconds.
Experimental Setup
The authors evaluated IncDSI using two major IR benchmarks: NQ320K (Natural Questions) and MS MARCO. To facilitate the indexing of new documents that lack historical user queries, the researchers employed docTTTTTquery to generate 15 synthetic questions per document.
The datasets were partitioned into a "streaming" setup: 90% for initial training, 9% for incremental updates (the "Live Stream"), and 1% for hyperparameter tuning.
Key Insights and Results
Performance and Speed
IncDSI demonstrates a massive leap in efficiency. It can process 1,000 new documents in just 16 seconds. In contrast, the baseline "DSI-Scratch" (continual retraining) requires over two hours to achieve comparable performance. This represents a speedup of approximately 513x.
Retrieval Accuracy
On the NQ320K dataset, IncDSI achieved a Hits@1 of 62.0 for new documents. This significantly outperforms the standard Dual Encoder (DPR) baseline, which managed only 48.0.
Stability
The non-interference constraint proved highly effective. While the Hits@1 metric for the original corpus degrades slightly as the index grows, the Hits@10 remains remarkably stable. This suggests that while the specific ranking of the top result might shift, the general "neighborhood" of the original documents remains intact within the embedding space.
Limitations and Future Directions
While IncDSI solves the immediate problem of document addition, it faces challenges with long-term "drift." As thousands of documents are added incrementally, the cumulative impact eventually necessitates a full re-indexing to maintain peak performance. Additionally, the method relies on a frozen query encoder; if new documents originate from a domain significantly different from the initial training set (e.g., moving from general web text to specialized medical journals), the encoder's effectiveness may diminish.
Future work may explore "document editing"—updating existing document information using similar constrained optimization techniques—to further enhance the flexibility of Differentiable Search Indices.
Summary updated