Abstract
Recent advances in Dense Retrieval (DR) techniques have significantly improved the effectiveness of first-stage retrieval. Trained with large-scale supervised data, DR models can encode queries and documents into a low-dimensional dense space and conduct effective semantic matching. However, previous studies have shown that the effectiveness of DR models drops by a large margin when adopted in a target domain different from the training data. To address this, we propose a novel framework named Disentangled Dense Retrieval (DDR) to support effective and flexible domain adaptation. DDR consists of a Relevance Estimation Module (REM) for modeling domain-invariant matching patterns and several Domain Adaption Modules (DAMs) for modeling domain-specific features. By disentangling these components, DDR enables a flexible training paradigm where the REM is trained with supervision once and DAMs are trained with unsupervised data. Experiments show that DDR significantly improves ranking performance compared to strong DR baselines and outperforms traditional retrieval methods in most scenarios.
Introduction
Dense Retrieval has revolutionized search by mapping queries and documents into a shared vector space to find semantic matches. However, these models suffer from domain shift. A model trained on general web snippets often fails when asked to search specialized technical or medical corpora.
The core issue is that standard DR models "entangle" two distinct types of information: general relevance patterns (how a query relates to a document) and domain-specific features (vocabulary, style, and structure). When a model is fine-tuned on a specific dataset, it learns both simultaneously. If moved to a new domain, the learned domain features become a liability, breaking the model's ability to estimate relevance accurately.
The DDR Framework
DDR addresses domain shift by splitting the model into two distinct parts:
- Domain Adaptation Modules (DAMs): This is the Transformer backbone responsible for modeling the "language" of the corpus. It can be updated using unsupervised data (Masked Language Modeling) on any new target corpus.
- Relevance Estimation Module (REM): These are small, lightweight networks (using LoRA and Parallel Adapters) inserted into the backbone. The REM is trained once on labeled data to learn domain-invariant matching patterns and then frozen.
The Training Recipe
To ensure these modules work together effectively, DDR employs a specific training workflow:
- Disentangled Finetuning: First, a DAM is trained on the source domain. Then, the DAM is frozen while the REM is trained on labeled data. This forces the REM to focus only on relevance logic that the DAM hasn't already captured.
- Sequential Initialization: When moving to a new target domain, the new target DAM is initialized using the source DAM's weights. This ensures the new DAM remains compatible with the pre-trained REM.
- Unsupervised Adaptation: The target DAM is further trained on the new corpus using Masked Language Modeling (predicting missing words), which requires no manual labels.
Experimental Results
The researchers evaluated DDR across multiple languages (English and Chinese) and specialized fields, including medical, science, and e-commerce domains. DDR consistently outperformed standard DR baselines and traditional lexical methods like BM25:
- Performance Gains: In some target domains, DDR showed a 20% to 50% relative improvement over standard DR models.
- Lexical Superiority: While standard DR models often lose to BM25 in out-of-domain settings, DDR reversed this, significantly outperforming BM25 in most scenarios (e.g., on the Lotte-Tech and Lotte-Sci datasets).
- Efficiency: By using LoRA and Parallel Adapters for the REM, the framework ensures that the relevance component adds almost zero computational overhead during inference.
Conclusion
DDR brings a modular philosophy to neural search, keeping the "relevance formula" constant while swapping the "domain statistics." This disentanglement allows for high-performance retrieval in new domains without the need for expensive, human-labeled data. Future work may extend this principle to other architectures like late-interaction models or explore more advanced unsupervised adaptation objectives.
Summary updated