Abstract
Dense retrieval (DR) methods conduct text retrieval by first encoding texts in the embedding space and then matching them by nearest neighbor search. This requires strong locality properties from the representation space, e.g., close allocations of each small group of relevant texts, which are hard to generalize to domains without sufficient training data. In this paper, we aim to improve the generalization ability of DR models from source training domains with rich supervision signals to target domains without any relevance label, in the zero-shot setting. To achieve that, we propose Momentum adversarial Domain Invariant Representation learning (MoDIR), which introduces a momentum method to train a domain classifier that distinguishes source versus target domains, and then adversarially updates the DR encoder to learn domain invariant representations. Our experiments show that MoDIR robustly outperforms its baselines on 10+ ranking datasets collected in the BEIR benchmark in the zero-shot setup, with more than 10% relative gains on datasets with enough sensitivity for DR models’ evaluation.
Introduction: The Challenge of Zero-Shot Dense Retrieval
Dense Retrieval (DR) has significantly advanced information retrieval by utilizing neural encoders to map queries and documents into a high-dimensional embedding space. In this space, relevance is determined by vector proximity. However, these models often exhibit brittleness when applied to domains outside their training distribution. For instance, a model optimized for general web search (like MS MARCO) frequently fails when tasked with retrieving specialized medical or financial documents.
The primary cause of this failure is the "domain gap." While rerankers only need to identify a decision boundary between relevant and irrelevant pairs, dense retrievers must maintain a highly structured local neighborhood across the entire embedding space. In zero-shot scenarios, target domain data tends to cluster far from the source data, causing nearest-neighbor search to break down. MoDIR addresses this by forcing the model to learn domain-invariant representations, effectively bridging the gap between source and target distributions without requiring target-domain labels.
Methodology: Momentum Adversarial Learning (MoDIR)
MoDIR employs an adversarial framework to align the representation spaces of different domains. The architecture consists of two main components: a DR Encoder and a Domain Classifier.
- Adversarial Training: The Domain Classifier is trained to distinguish whether an embedding originates from the source domain or the target domain. Simultaneously, the DR Encoder is trained to "confuse" the classifier, incentivizing the generation of representations that are indistinguishable across domains.
- The Momentum Queue: Adversarial training is notoriously unstable, particularly in high-dimensional embedding spaces. MoDIR introduces a momentum queue that stores embeddings from previous training batches. This provides the domain classifier with a stable, global view of the domain boundary without requiring the computationally expensive encoder to re-process large volumes of data at every step.
- Stop-Gradient Mechanism: To maintain efficiency, embeddings in the momentum queue are detached from the gradient flow. This allows the domain classifier to update rapidly while the transformer-based encoder focuses on the adversarial task of domain alignment.
Experimental Evaluation
Datasets and Setup
The model was trained on the MS MARCO passage dataset (source) and evaluated in a zero-shot manner on the BEIR benchmark. BEIR includes 15 diverse datasets spanning bio-medical (TREC-COVID, BioASQ), finance (FiQA), and scientific (SciFact) domains.
Key Results
- Consistent Performance Gains: MoDIR outperformed standard baselines, such as DPR and ANCE, on over 10 datasets within the BEIR benchmark.
- High-Sensitivity Improvements: On datasets with low "hole rates" (where label coverage is more complete), MoDIR achieved relative gains in nDCG@10 exceeding 10%.
- State-of-the-Art (SOTA): On the TREC-COVID dataset, MoDIR reached an nDCG@10 of 0.724, setting a new benchmark for first-stage dense retrievers at the time of publication.
Analysis and Discussion
The "Hole" Problem
The authors identify that many retrieval benchmarks suffer from a "hole" problem—a high percentage of unlabeled documents appearing in top results because labels were originally generated using keyword-based methods (BM25). MoDIR's performance is most reliable on datasets where this bias is minimized, suggesting that the model discovers relevant documents that traditional keyword search misses.
Semantic Alignment
Qualitative analysis reveals that MoDIR successfully aligns underlying intent across domains. For example, medical queries regarding "transmission routes" were mapped near source queries about "cellular travel," indicating that the model learned to generalize the concept of movement/transmission beyond specific vocabulary.
Limitations
MoDIR's effectiveness depends on a degree of conceptual overlap between the source and target domains. In cases where the target domain is entirely alien to the source data, adversarial alignment may struggle to find meaningful correspondences. Future work may explore combining MoDIR with query generation techniques (e.g., doc2query) to further enhance performance in extremely low-resource settings.
Conclusion
MoDIR demonstrates that adversarial training, stabilized by a momentum queue, is a powerful tool for improving the zero-shot generalization of dense retrieval models. By learning domain-invariant representations, MoDIR overcomes the spatial separation of domain embeddings, providing a robust solution for neural search in specialized, unlabeled domains.
Summary updated