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

Abstract

We introduce Domain2Vec, a novel approach that decomposes any dataset into a linear combination of several meta-domains, a new concept designed to capture the key underlying features of datasets. 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 optimal data mixture for language model (LM) pretraining in a training-free manner under the D*istribution Alignment Assumption (DA$^{2}$), which suggests that when the data distribution of the training set and the validation set is more aligned, a lower validation loss is achieved. Moreover, 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 Domain2Vec helps find the data mixture that enhances downstream task performance with minimal computational overhead. Specifically, Domain2Vec achieves the same validation loss on Pile-CC using only $51.5$% of the compute required when training on the original mixture of The Pile Dataset. Under equivalent compute budget, Domain2Vec* improves downstream performance by an average of $2.83$%.

Cite

Text

Zhang et al. "Domain2Vec: Vectorizing Datasets to Find the Optimal Data Mixture Without Training." Proceedings of the 42nd International Conference on Machine Learning, 2025.

Markdown

[Zhang et al. "Domain2Vec: Vectorizing Datasets to Find the Optimal Data Mixture Without Training." Proceedings of the 42nd International Conference on Machine Learning, 2025.](https://mlanthology.org/icml/2025/zhang2025icml-domain2vec/)

BibTeX

@inproceedings{zhang2025icml-domain2vec,
  title     = {{Domain2Vec: Vectorizing Datasets to Find the Optimal Data Mixture Without Training}},
  author    = {Zhang, Mozhi and Tissue, Howe and Wang, Lu and Qiu, Xipeng},
  booktitle = {Proceedings of the 42nd International Conference on Machine Learning},
  year      = {2025},
  pages     = {76139-76158},
  volume    = {267},
  url       = {https://mlanthology.org/icml/2025/zhang2025icml-domain2vec/}
}