Bagging-Based Model Merging for Robust General Text Embeddings

Hengran Zhang, Keping Bi, Jiafeng Guo, Jiaming Zhang, Wenbo Yang, Daiting Shi, Xueqi ChengarXiv 2026

TL;DR

While batch-level shuffling is the gold standard for training multi-task text embedding models, it often suffers from suboptimal out-of-domain (OOD) generalization and high retraining costs when new data arrives. This paper introduces BOOM (Bagging-based rObust mOdel Merging), a framework that trains multiple embedding models on diverse data subsets and merges them into a single model. BOOM significantly boosts OOD robustness and enables efficient incremental learning without adding any inference latency.

What Problem Does This Paper Address?

Text embedding models map natural language into dense vectors, serving as the backbone for information retrieval, semantic similarity, and Retrieval-Augmented Generation (RAG) pipelines. To ensure broad capabilities, these models are typically trained on massive multi-task corpora. However, practitioners face two major hurdles:

  1. The Scaling vs. Robustness Paradox: Simply scaling up training data improves in-domain performance but can plateau or even degrade a model's ability to generalize to out-of-domain (OOD) tasks (such as specialized medical, legal, or code retrieval).
  2. The High Cost of Continuous Learning: As new domains and data types emerge, updating an embedding model traditionally requires full, expensive retraining on the entire expanded corpus to prevent the model from forgetting its previously acquired knowledge.

The authors investigate whether data scheduling strategies or parameter-space model merging can resolve these trade-offs.

Methods

The authors first systematically compare standard multi-task training strategies (like batch-level shuffling and sequential training) against static model merging. Finding that batch-level shuffling performs best but lacks OOD robustness, they propose BOOM (Bagging-based rObust mOdel Merging), which adapts the classic ensemble concept of bootstrap aggregating (bagging) to weight-space merging.

BOOM operates in two distinct settings:

  • Static Setting: Instead of training one model on the entire dataset, BOOM samples multiple distinct subsets at varying ratios (e.g., 20%, 40%, 60%, 80%, 100%). It trains separate models on these subsets in parallel and fuses their weights into a single model using Multi-SLERP (Spherical Linear Interpolation). This captures the variance-reduction benefits of bagging without the multi-model inference overhead.
  • Incremental Learning Setting: When new data arrives, BOOM avoids full retraining. It samples a small "core subset" (e.g., 40%) of historical data, mixes it with the new data to train a lightweight update model, and then merges this update model back into the original base model.

Datasets

The framework was trained and evaluated using the following datasets:

  • Training Data:
  • Eng-Text-Data: A curated collection of 31 public datasets (~2M data points) spanning retrieval (e.g., MSMARCO, Natural Questions), reranking, classification, clustering, and semantic textual similarity (STS).
  • General-Full-Data: An expanded version (~2.8M data points) adding multilingual retrieval datasets (DuReader, MIRACL, Mr. TyDi, T2-Ranking) and code retrieval datasets.
  • Evaluation Benchmarks: The models were rigorously tested on MTEB (English, v2), MTEB (Code, v1), and RTEB (beta) for domain-specific retrieval.

Key Insights and Ideas

  • Widespread Synergy, Minimal Conflict: By analyzing pairwise dataset interactions during training, the authors discovered that task conflicts are incredibly rare (affecting only ~2% of dataset pairs). Because most text embedding tasks share a foundational semantic matching objective, joint training almost always yields mutual improvements.
  • Data Saturation Hurts OOD Performance: As shown in Figure 1, scaling up the training data volume consistently improves in-domain scores but causes a noticeable performance drop on specialized OOD benchmarks like code retrieval.
Figure 1: Average performance (%) of general text embedding models trained with different proportions of the multi-task training set on in-domain and OOD evaluation sets.
  • Data Interleaving is Key: Hierarchical clustering experiments (Figure 2) revealed that dynamically interleaving data at a fine granularity (batch-level shuffling) during a single training phase is far more effective for representation learning than statically averaging parameters from separately trained task-specific models.
Figure 2: (a) Difference between average joint and individual training losses for dataset pairs; (b) hierarchical clustering results.

Key Results

  • Superior OOD Generalization: In static training, BOOM variants consistently outperformed standard batch-level shuffling across both Qwen3-0.4B and Qwen3-4B backbones. The {20, 40, 60, 80, 100} sampling configuration achieved the highest overall score of 69.56 on MTEB (English, v2) using the 4B backbone.
  • Efficient Continual Adaptation: In incremental learning scenarios, BOOM achieved substantial performance gains on new domains (multilingual and code) while using only a 40% historical core subset. It matched or exceeded full retraining baselines while drastically reducing GPU training hours, offering a highly sustainable approach to model maintenance.

Limitations and Future Work

  • Merging Algorithm Sensitivity: The authors noted that newer model merging techniques (such as Model Stock) performed poorly on embedding models compared to older methods like Multi-SLERP. This indicates that merging strategies developed for generative LLMs do not automatically translate well to representation learning tasks, highlighting a need for embedding-specific merging algorithms.
  • Downstream Impact: While BOOM improves benchmark embedding scores, the authors note that future work should explicitly evaluate how these robust embeddings impact downstream applications, particularly within complex RAG pipelines.

Summary updated

BibTeX
@misc{zhang2026bagging,
  author = {Hengran Zhang and Keping Bi and Jiafeng Guo and Jiaming Zhang and Wenbo Yang and Daiting Shi and Xueqi Cheng},
  title = {{Bagging-Based Model Merging for Robust General Text Embeddings}},
  year = {2026},
  eprint = {2602.05787},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.05787},
}
Figure