TL;DR
AutoData introduces an agentic search framework that treats pre-training data selection as an automated code-generation problem. Instead of relying on fixed human heuristics or simple domain weight tuning, an LLM agent iteratively writes, executes, and refines Python data-selection algorithms based on performance feedback from a small proxy model. The discovered recipes automatically combine complex feature interactions and diversity-preserving rules, consistently outperforming established human-designed curation pipelines.
What Problem Does This Paper Address?
While model architectures and training code are increasingly optimized by autonomous agents, the training data itself has largely remained static or curated via rigid, human-designed preprocessing pipelines. Traditional data curation relies on fixed combinations of heuristics—such as deduplication, perplexity filtering, and basic domain mixture optimization.
However, manually designed methods bottleneck both the design space and iteration speed. They fail to capture complex, non-linear interactions between document-level features (like text length, topical diversity, and semantic quality). The authors address this gap by bringing data engineering directly into the agentic optimization loop, asking: Can an AI agent autonomously discover superior data selection algorithms?
Methods
AutoData frames data selection as a search over a program space of executable Python functions. The framework operates via a Self-Evolving Loop:
- Proposal: An LLM agent (such as GPT-5.5, Claude-4.7, or Gemini-3-Pro) acts as a code optimizer, proposing an executable data selection function.
- Feature Bank Evaluation: The function scores and filters a massive document pool using a rich set of per-document features:
- Lexical: Token length and $n$-gram distinctness ratios.
- Categorical: Topic and format labels generated by classifiers.
- Perplexity: Document difficulty scores computed via a small reference model (Qwen2.5-0.5B).
- LLM Annotations: High-level semantic signals (e.g., counts of factual errors or reasoning steps).
- Proxy Training: A small, computationally cheap proxy model (GPT-2 125M) is trained on the selected data subset.
- Feedback: The proxy model's validation performance—measured via validation bits-per-byte (val-bpb) or downstream task accuracy (CORE)—is fed back to the LLM agent to inform and improve its next code proposal.
Datasets
The framework was evaluated using NVIDIA’s ClimbMix, a 400-billion-token English pre-training corpus. AutoData was tasked with selecting a highly compact 2.6% subset (~14.3 million documents) from this pool, matching the data constraints of the competitive NanoChat speedrun benchmark.
Key Insights and Ideas
- Beyond Simple Thresholds: Rather than applying simple single-feature cutoffs (e.g., "discard text if perplexity is too high"), the autonomous agents discovered sophisticated, composite scoring rules. For instance, GPT-5.5 learned to gate perplexity by diversity, only favoring low-perplexity text if its $n$-gram diversity was high, effectively preventing the model from over-selecting repetitive boilerplate text.
- The Necessity of Stochasticity: Successful agent-generated algorithms naturally avoided strict deterministic filtering. Instead, they implemented diversity-preserving mechanisms like Gumbel tournament selection or stratified quotas to maintain broad coverage of the data distribution while still prioritizing high-quality documents.
- Proxy-to-Scale Transferability: A core "aha" moment was that data selection strategies optimized on a tiny 125M parameter proxy model successfully transferred to larger models (up to 897M and 1.3B parameters) without any re-tuning.
Key Results
Within 200 search steps, AutoData discovered data selection recipes that consistently outperformed strong human-designed baselines, including DCLM-Baseline, standard perplexity filtering, and RegMix.
- Language Modeling (val-bpb): AutoData achieved statistically significant improvements in validation bits-per-byte across model scales from 125M to 897M parameters.
- Downstream Performance (CORE): On a suite of 22 downstream tasks, the AutoData-optimized recipe achieved a top accuracy of 0.2727 at the 1.3B parameter scale, notably outperforming both the random uniform baseline (0.2609) and RegMix (0.2567).
Limitations and Future Work
Despite its success, the authors note several limitations:
- Scale and Corpus Boundaries: The experiments were restricted to models under 1.3B parameters and evaluated on a single base corpus (ClimbMix). Verifying these recipes on multi-billion parameter models and alternative data distributions remains an open question.
- Objective Sensitivity: The optimization trajectories vary significantly depending on whether the agent optimizes for val-bpb or CORE accuracy, indicating that choosing the right proxy objective is critical.
- Annotation Costs: The highest-performing feature sets rely on semantic annotations from advanced LLMs (like Gemini-3-Flash), which introduces non-trivial computational and financial overhead. Future work will focus on analyzing the cost-quality trade-offs of these feature sources and scaling AutoData to larger data pools.
Summary updated