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

Task-level Distributionally Robust Optimization for Large Language Model-based Dense Retrieval

Guangyuan Ma, Yongliang Ma, Xing Wu, Zhenpeng Su, Ming Zhou, Songlin Hu

Introduction

Dense retrieval has been significantly advanced by Large Language Models (LLMs), which transform documents and queries into vector embeddings for efficient matching. However, the performance of these models heavily depends on the mixture of training data. Current practices often rely on uniform sampling or heuristic "gut feelings" to balance diverse datasets like Wikipedia, web crawls, and news. This approach is suboptimal due to domain imbalances, loss incompatibility across different tasks, and conflicts between batching requirements for contrastive learning and robustness algorithms.

To address these challenges, we present tDRO (task-level Distributionally Robust Optimization). tDRO is an algorithm designed to automatically determine the optimal data mixture for fine-tuning LLM-based Dense Retrievers (LLM-DR). By leveraging a small proxy model and a novel "relative loss" metric, tDRO enhances retrieval performance while potentially reducing the amount of training data required.

Methodology: The tDRO Framework

The tDRO framework operates in two distinct stages to decouple the computationally expensive weight optimization from the final large-scale model training.

Overview of the tDRO framework for weight learning and model optimization.

Stage 1: Weight Learning

Instead of optimizing weights directly on a massive 7B+ parameter model, tDRO employs a tiny Proxy Model (e.g., Qwen-0.5B). This proxy model learns the importance of each dataset through Exponential Gradient Ascent.

A key innovation is the Relative Loss Measurement. Standard optimization often fails because different datasets have naturally different loss scales; a high loss might indicate a difficult task rather than poor model performance. tDRO solves this by comparing the proxy model's loss against a frozen Reference Model. By measuring "improvement headroom"—the ratio of current loss to reference loss—the algorithm focuses on datasets where the model has the most potential to improve.

Stage 2: LLM-DR Fine-tuning

The weights learned by the proxy model are then transferred to the full-scale training of larger models, such as Llama-3 or Mistral. Two primary strategies are utilized:

  • Sample Ratio Reweighting: Training with the exact learned weights.
  • Top-rated Selection: Discarding the bottom-performing datasets (e.g., the bottom 30%) to focus on the most informative data.

Data and Evaluation

The study utilizes a comprehensive collection of 25 datasets spanning various domains including Wikipedia, GitHub, Reddit, and multilingual web collections. Models are evaluated across three major benchmarks:

  • MIRACL: A large-scale multilingual retrieval benchmark (18 languages).
  • MKQA: A cross-lingual benchmark covering 25 languages.
  • BeIR: A diverse English-only benchmark with 15 retrieval tasks.

Results and Discussion

tDRO-optimized models demonstrate consistent performance gains. On the MIRACL benchmark, tDRO provided an average improvement of +2.6 nDCG@10 across various model sizes. Notably, a Llama3-8B model trained with tDRO outperformed specialized models like E5-Mistral on multilingual tasks.

Comparison of learned domain weights across different datasets using tDRO and proxy-based methods.

Key Insights

  • Multilingual Priority: As shown in the weight distribution, tDRO consistently assigns higher weights to multilingual datasets (e.g., MIRACL, T2-Ranking), suggesting these provide a stronger signal for universal retrieval capabilities.
  • Efficiency through Selection: Discarding the bottom 30% of datasets often yielded better results than using the full set, indicating that low-weight datasets can act as noise. This allowed for peak performance using 30% less data than uniform baselines.
  • Proxy Effectiveness: The success of the 0.5B proxy model in guiding an 8B model proves that data distribution can be effectively "scouted" with minimal compute.

Conclusion and Future Work

tDRO offers a robust, automated solution for the data mixture problem in LLM-based dense retrieval. By "grading on a curve" with relative loss, it identifies high-value training data more effectively than standard methods. While currently a two-stage process dependent on a reference model, future iterations could explore online weight adjustment during the final fine-tuning stage.

Summary updated

BibTeX
@inproceedings{ma2025task,
  author = {Guangyuan Ma and Yongliang Ma and Xing Wu and Zhenpeng Su and Ming Zhou and Songlin Hu},
  title = {{Task-level Distributionally Robust Optimization for Large Language Model-based Dense Retrieval}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i23.34657},
}
Figure