DoGE: Domain Reweighting with Generalization Estimation

Simin Fan, Matteo Pagliardini, Martin Jaggi
2/12/2026

No official code found. Best implementation: Olivia-fsm/DoGE (21 stars, MIT, last commit 2024-02-29).

Abstract

The coverage and composition of the pretraining data significantly impacts the generalization ability of Large Language Models (LLMs). Despite its importance, recent LLMs still rely on heuristics and trial and error to increase or reduce the influence of data-domains. We propose DOmain reweighting with Generalization Estimation (DoGE), which optimizes the probability of sampling from each domain (domain weights) in a principled way. Our approach is a two-stage process consisting of (i) training a proxy model to obtain domain weights using a bi-level optimization algorithm; (ii) training a larger base model by sampling training domains according to the learned domain weights. In our experiments, we extensively show how DoGE improves the generalization of the base model to any target data mixture. On the SlimPajama dataset, our base model gets better perplexity and few-shot reasoning accuracies across $6$ tasks compared to baseline methods. Moreover, aiming to generalize to out-of-domain target tasks, which is unseen in the pretraining corpus (OOD domain), DoGE can effectively identify inter-domain dependencies, and consistently achieves better test perplexity on the target domain.

View on arXivView PDF

Code Implementations(1)

Olivia-fsm/DoGECommunity66%
MIT

Codebase for ICML submission "DOGE: Domain Reweighting with Generalization Estimation"

215Shell, PythonFeb 2, 20242 years agoMIT

Similar Papers

Cite this paper

@article{fan2026doge,
  title  = {DoGE: Domain Reweighting with Generalization Estimation},
  author = {Simin Fan and Matteo Pagliardini and Martin Jaggi},
  year   = {2026},
  eprint = {2310.15393},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2310.15393},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.15393.svg)](https://codeofpaper.com/paper/2310.15393)

Discussion