NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DUQGen: Effective Unsupervised Domain Adaptation of Neural Rankers by Diversifying Synthetic Query Generation

Ramraj Chandradevan, Kaustubh D. Dhole, Eugene Agichtein

TL;DR

DUQGen (Diversified Unsupervised Query Generation) is a highly efficient framework for adapting neural text rankers to new domains without requiring labeled target data. By clustering the target corpus and using probabilistic sampling with Maximal Marginal Relevance (MMR), it generates a small but highly diverse set of synthetic training queries via an LLM. Remarkably, DUQGen outperforms state-of-the-art unsupervised domain adaptation methods on the BEIR benchmark while requiring up to 1,000x less synthetic training data.

What Problem Does This Paper Address?

State-of-the-art neural rankers (like MonoT5 or ColBERT) are typically trained on massive, general-purpose datasets like MS-MARCO. While they show impressive "zero-shot" performance on new datasets, their accuracy drops significantly when deployed in specialized domains like finance, law, or medicine.

To bridge this gap, researchers use Unsupervised Domain Adaptation (UDA), often by using Large Language Models (LLMs) to generate synthetic queries for the target documents. However, existing UDA methods suffer from two major flaws:

  1. Poor Domain Representation: They select documents randomly to generate queries, ignoring the underlying topical distribution of the target corpus.
  2. Extreme Inefficiency: Methods like Promptagator++ require generating millions of synthetic queries and applying complex filtering steps, which is computationally exorbitant.

DUQGen addresses these challenges by answering a fundamental question: How can we automatically select a small, yet optimally diverse and representative set of target documents to generate high-quality training data?

Methods

The DUQGen pipeline consists of four main stages, moving from a raw target corpus to a fully fine-tuned ranker:

DUQGen framework overview
  1. Domain Document Selection:
  2. Clustering: The target documents are encoded into dense vectors using Contriever and grouped into $K$ topical clusters using $K$-Means.
  3. Probabilistic Sampling: To handle imbalanced cluster sizes, a stratified sampling strategy ensures larger clusters contribute proportionally more documents. Documents closer to their cluster centroids are given higher selection probabilities.
  4. Diversified Selection (MMR): To avoid redundancy, Maximal Marginal Relevance (MMR) is applied to the sampled documents, maximizing both their relevance to the cluster topic and their diversity relative to each other.
  5. Synthetic Query Generation: Instead of using generic out-of-domain examples, DUQGen uses Llama-2-7B-Chat prompted with just three human-curated, in-domain query-document pairs to generate highly contextual, specialized queries.
  6. Hard Negative Mining: For each synthetic positive query-document pair, BM25 or dense retrievers are used to mine "hard negatives" (documents that look relevant but are incorrect) to challenge the ranker during training.
  7. Fine-tuning: The pre-trained neural ranker is sequentially fine-tuned on this compact, high-quality synthetic dataset.

Datasets

The authors evaluated DUQGen across all 18 datasets in the BEIR benchmark, a standard suite for testing zero-shot information retrieval models across diverse domains (e.g., BioASQ, NFCorpus, FiQA, TREC-COVID, and HotpotQA). The development and hyperparameter tuning were conducted specifically on the FiQA (finance) and NQ (natural questions) datasets.

Key Insights and Ideas

  • Quality and Diversity Trump Quantity: Previous SOTA methods like Promptagator++ generated up to 8 million queries to filter down to 1 million training pairs. DUQGen proves that by carefully selecting topically diverse documents, you can achieve better performance using only 1,000 to 5,000 training pairs—a 1,000x reduction in LLM generation costs.
  • The Danger of Flat Sampling: Fine-tuning a model on randomly sampled documents ($K=1$, meaning no clustering) often causes performance to degrade below the zero-shot baseline due to overfitting on dominant topics or catastrophic forgetting. Clustering acts as a regularizer by forcing the model to learn features across the entire breadth of the domain.
  • In-Domain Few-Shotting is Crucial: Providing the LLM with just three human-generated examples from the target domain significantly bridges the domain gap compared to using standard MS-MARCO examples in the prompt template.

Key Results

DUQGen consistently outperformed both zero-shot baselines and existing UDA methods across the board:

  • Main Benchmarks: DUQGen outperformed SOTA unsupervised domain adaptation baselines on 16 out of 18 BEIR datasets, yielding an average of 4% relative improvement.
  • Re-ranking Performance: When evaluating DUQGen-reranker (built on MonoT5-3B), it achieved an average nDCG@10 of 0.537 with just 1,000 training examples, comfortably beating the zero-shot baseline (0.515) and outperforming InPars and DocGen-RL.
  • Dense Retrieval: DUQGen-retriever (built on ColBERT) improved the average zero-shot R@100 score from 0.589 to 0.610, showing particularly massive gains on large domain shifts like TREC-COVID (+7.1% absolute improvement).

Limitations and Future Work

  • Encoder Dependency: The document clustering step relies heavily on the quality of the initial text encoder (Contriever). The authors did not experiment with how different embedding models might impact clustering quality.
  • Clustering Scalability: While K-Means via the Faiss library is fast, scaling to billions of documents forces Faiss to sub-sample the collection, which could introduce information loss and downstream retrieval errors.
  • LLM Prompt Sensitivity: Like most LLM-based pipelines, the query generation component remains sensitive to minor prompt variations, indicating a need for automated prompt calibration techniques in future iterations.

Summary updated

BibTeX
@inproceedings{chandradevan2024duqgen,
  author = {Ramraj Chandradevan and Kaustubh D. Dhole and Eugene Agichtein},
  title = {{DUQGen: Effective Unsupervised Domain Adaptation of Neural Rankers by Diversifying Synthetic Query Generation}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.naacl-long.413},
}
Figure