English

Domain2Vec: Vectorizing Datasets to Find the Optimal Data Mixture without Training

Computation and Language 2025-06-13 v1 Artificial Intelligence Machine Learning

Abstract

We introduce~\textsc{Domain2Vec}, a novel approach that decomposes any dataset into a linear combination of several \emph{meta-domains}, a new concept designed to capture the key underlying features of datasets. \textsc{Domain2Vec} maintains a vocabulary of meta-domains and uses a classifier to decompose any given dataset into a domain vector that corresponds to a distribution over this vocabulary. These domain vectors enable the identification of the optimal data mixture for language model (LM) pretraining in a training-free manner under the \emph{\textbf{D}istribution \textbf{A}lignment \textbf{A}ssumption} (DA2^{2}), which suggests that when the data distributions of the training set and the validation set are better aligned, a lower validation loss is achieved. Moreover, \textsc{Domain2vec} can be seamlessly integrated into previous works to model the relationship between domain vectors and LM performance, greatly enhancing the efficiency and scalability of previous methods. Extensive experiments demonstrate that \textsc{Domain2Vec} helps find the data mixture that enhances downstream task performance with minimal computational overhead. Specifically, \textsc{Domain2Vec} achieves the same validation loss on Pile-CC using only 51.5%51.5\% of the computation required when training on the original mixture of The Pile dataset. Under equivalent compute budget, \textsc{Domain2Vec} improves downstream performance by an average of 2.83%2.83\%.

Keywords

Cite

@article{arxiv.2506.10952,
  title  = {Domain2Vec: Vectorizing Datasets to Find the Optimal Data Mixture without Training},
  author = {Mozhi Zhang and Howe Tissue and Lu Wang and Xipeng Qiu},
  journal= {arXiv preprint arXiv:2506.10952},
  year   = {2025}
}

Comments

Accepted to ICML2025

R2 v1 2026-07-01T03:13:59.918Z