Data Selection via Optimal Control for Language Models

Yuxian Gu, Li Dong, Hongning Wang, Y. Hao, Qingxiu Dong +2 more
2/12/2026

No official code found. Best implementation: microsoft/LMOps (4,440 stars, MIT, last commit 2026-04-30).

Abstract

This work investigates the selection of high-quality pre-training data from massive corpora to enhance LMs' capabilities for downstream usage. We formulate data selection as a generalized Optimal Control problem, which can be solved theoretically by Pontryagin's Maximum Principle (PMP), yielding a set of necessary conditions that characterize the relationship between optimal data selection and LM training dynamics. Based on these theoretical results, we introduce PMP-based Data Selection (PDS), a framework that approximates optimal data selection by solving the PMP conditions. In our experiments, we adopt PDS to select data from CommmonCrawl and show that the PDS-selected corpus accelerates the learning of LMs and constantly boosts their performance on a wide range of downstream tasks across various model sizes. Moreover, the benefits of PDS extend to ~400B models trained on ~10T tokens, as evidenced by the extrapolation of the test loss curves according to the Scaling Laws. PDS also improves data utilization when the pre-training data is limited, by reducing the data demand by 1.8 times, which helps mitigate the quick exhaustion of available web-crawled corpora. Our code, model, and data can be found at https://github.com/microsoft/LMOps/tree/main/data_selection.

View on arXivView PDF

Code Implementations(1)

microsoft/LMOpsCommunity100%
MIT

General technology for enabling AI capabilities w/ LLMs and MLLMs

4,440377C, C++Dec 13, 20225 months agoMIT
agigptlanguage-modelllmlm+6 more

Cite this paper

@article{gu2026data,
  title  = {Data Selection via Optimal Control for Language Models},
  author = {Yuxian Gu and Li Dong and Hongning Wang and Y. Hao and Qingxiu Dong and Furu Wei and Minlie Huang},
  year   = {2026},
  eprint = {2410.07064},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.07064},
  journal = {ICLR 2024 2024}
}

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/2410.07064.svg)](https://codeofpaper.com/paper/2410.07064)

Discussion