Zero-Shot Dense Retrieval with Momentum Adversarial Domain Invariant Representations

Ji Xin, Chenyan Xiong, Ashwin Srinivasan, Ankita Sharma, Damien Jose, Paul N. Bennett

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, i.e, the 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 relevant labels, in the zero-shot setting. To achieve that, we propose Momentum adversarial Domain Invariant Representation learning (MoDIR), which introduces a momentum method in the DR training process to train a domain classifier distinguishing source versus target, 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 from the BEIR benchmark in the zero-shot setup, with more than 10% relative gains on datasets with enough sensitivity for DR models' evaluation. Source code of this paper will be released.

Introduction

Dense Retrieval (DR) has revolutionized information retrieval by encoding text into high-dimensional vectors and utilizing nearest-neighbor search. While models like ANCE and DPR excel on source domains with abundant training data (e.g., MS MARCO), they often exhibit "brittleness" when applied to specialized target domains (e.g., medical or legal) where labels are scarce. In these zero-shot scenarios, DR models frequently underperform compared to traditional sparse retrieval methods like BM25.

The primary challenge lies in "local alignment"—the requirement that relevant queries and documents cluster closely in the embedding space. Standard DR models often map new domains to isolated regions of the embedding space, creating a "domain gap" that prevents effective retrieval.

Methodology: MoDIR

To bridge this gap, we introduce MoDIR (Momentum adversarial Domain Invariant Representations). MoDIR builds upon the ANCE framework and incorporates two key components:

1. Adversarial Domain Adaptation

We employ an auxiliary domain classifier trained to distinguish between embeddings from the source domain (labeled) and the target domain (unlabeled). Simultaneously, the text encoder is optimized to "confuse" this classifier. This adversarial process forces the encoder to discard domain-specific features in favor of universal semantic features, creating a domain-invariant representation space.

2. The Momentum Queue

Adversarial training in DR is inherently unstable because the embedding space is scattered and high-variance. Updating the domain classifier based solely on the current mini-batch leads to a wildly fluctuating domain boundary. MoDIR addresses this by maintaining a momentum queue of embeddings from previous batches. This provides the classifier with a stable "memory" of both domains, ensuring a robust estimation of the domain boundary.

The MoDIR training process: using a momentum queue to stabilize the domain boundary and guide adversarial domain mixing.

Key Insights

The success of MoDIR hinges on two main factors:

  • Stability via Momentum: Standard adversarial training often fails in DR due to the fine-grained nature of the locality properties. The momentum queue prevents the adversarial process from collapsing by providing a consistent global view of the domain distributions.
  • Alignment by Proxy: By making representations domain-invariant, MoDIR effectively aligns target queries with source queries that share similar information needs. For instance, a specialized medical query is pushed toward semantically related web search queries, allowing the model to leverage its pre-existing knowledge.
t-SNE visualization comparing baseline (left) with MoDIR (right). MoDIR successfully mixes source and target embeddings into a single domain-invariant space.

Experimental Results

MoDIR was evaluated on the BEIR benchmark, using MS MARCO as the source domain. The model demonstrated robust improvements across 15 diverse retrieval tasks:

  • TREC-COVID: Achieved an nDCG@10 of 0.676, significantly surpassing the ANCE baseline (0.654).
  • Touché: Observed a 10.9% relative gain in accuracy.
  • Generalization: The model outperformed baselines on over 10 datasets, particularly those where evaluation labels were comprehensive enough to measure dense model improvements.

Importantly, achieving domain invariance did not degrade performance on the original source domain, suggesting the high-dimensional embedding space has sufficient capacity to maintain relevance boundaries while being domain-agnostic.

Conclusion

MoDIR provides a powerful framework for zero-shot domain adaptation in dense retrieval. By stabilizing adversarial training with a momentum queue, it creates a shared representation space that facilitates cross-domain knowledge transfer. Future work will explore the limits of information coverage—as the model still requires some conceptual overlap between domains—and the application of these techniques to larger-scale language models.

Summary updated

BibTeX
@inproceedings{xin2022zero,
  author = {Ji Xin and Chenyan Xiong and Ashwin Srinivasan and Ankita Sharma and Damien Jose and Paul N. Bennett},
  title = {{Zero-Shot Dense Retrieval with Momentum Adversarial Domain Invariant Representations}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  url = {https://openreview.net/forum?id=AtCLSvO5AG},
}
Figure