Full text not available for this paper

DAiSy: Online Data Selection by Adaptive Utility Estimation for LLM Pretraining

Authors: Simin Fan, Martin Jaggi (EPFL)

Paper: arXiv:2611.32294v1 [cs.LG], November 2026


Summary (Overview)

  • DAiSy (online DAta Selection by adaptive utility estimation) is a lightweight online data selection pipeline for LLM pretraining that eliminates the computational overhead of existing gradient-based selection methods.
  • The method trains a linear auxiliary model that predicts gradient-based data utility scores from frozen document embeddings, requiring only +5.6% FLOPs and +6% memory overhead compared to standard training.
  • DAiSy significantly outperforms uniform sampling, static embedding similarity baselines, and prior online selection methods (GREATS, OPUS, MATES) across English and multilingual pretraining scenarios.
  • The pretraining gains from DAiSy survive instruction tuning, maintaining 2.0–4.8% accuracy improvements over uniform baselines after SFT.
  • The paper also investigates data-boundary scenarios (token-limited training), showing that a properly designed memory factor (γ\gamma) and redundancy penalties (especially momentum-based) help balance task-relevance with diversity.

Introduction and Theoretical Foundation

Background and Motivation

Training data quality is one of the strongest levers determining LLM pretraining quality. While static selectors (quality classifiers, target-matching resampling) curate documents once before training, they are not adaptive to evolving model states. Online model-aware selectors estimate how much a candidate would help the model at its current learning status, but existing methods suffer from severe computational overhead:

  • Gradient-based utility scoring requires full forward-backward passes on every candidate document
  • Oversampling-then-selection paradigms (e.g., 2× candidates) consume 2× more FLOPs than training itself
  • Memory/bandwidth waste from loading 2× more data into GPU/RAM

Theoretical Foundation

The core utility score is derived from a first-order approximation of how an optimization step on document xx changes the target loss:

−ΔLV≈ηt⟨Pt∇LV(θt),∇ℓˉ(x;θt)⟩-\Delta L_V \approx \eta_t \left\langle P_t \nabla L_V(\theta_t), \nabla \bar{\ell}(x; \theta_t) \right\rangle

where:

  • θt\theta_t = model parameters at step tt
  • ηt\eta_t = learning rate
  • PtP_t = optimizer preconditioner (for AdamW: Pt=diag(1/(v^t+ϵ))P_t = \text{diag}(1/(\sqrt{\hat{v}_t} + \epsilon)))
  • LVL_V = target loss on validation set VV
  • ℓˉ(x)\bar{\ell}(x) = document's mean token loss

This builds on prior work in:

  • Influence functions and trajectory-based scores
  • Ghost-engine techniques (Wang et al., 2024) that extract gradient-based utilities as a by-product of standard backward passes
  • Learned data valuation methods (meta-learned reweighting, DVRL)

Methodology

1. Synchronized Utility Labels from Training Backward Pass

DAiSy uses the ghost engine technique to extract exact first-order gradient-based utility scores during the standard backward pass. For one linear layer with per-token input aa and output gradient δ\delta:

ylayer(x)=⟨Vt,layer,∇ℓˉ(x)⟩=1∣x∣∑tok∈xδ⊤Vt,layeray_{\text{layer}}(x) = \left\langle V_{t,\text{layer}}, \nabla \bar{\ell}(x) \right\rangle = \frac{1}{|x|} \sum_{\text{tok} \in x} \delta^\top V_{t,\text{layer}} a

where Vt=Pt∇LV(θt)V_t = P_t \nabla L_V(\theta_t) is the preconditioned target direction, refreshed every RR steps.

2. Online Linear Scorer on Frozen Embeddings

The selector is a linear vector wtw_t applied to frozen document embeddings:

st(x)=wt⊤ϕ~(x),ϕ~(x)=[ϕ(x);1]∈Rd+1s_t(x) = w_t^\top \tilde{\phi}(x), \quad \tilde{\phi}(x) = [\phi(x); 1] \in \mathbb{R}^{d+1}

Gaussianized ranks are used as labels for robustness against outliers:

rs(x)=Φ−1(ranks(x)−12ns)r_s(x) = \Phi^{-1}\left(\frac{\text{rank}_s(x) - \frac{1}{2}}{n_s}\right)

where Φ−1\Phi^{-1} is the standard normal quantile function.

Running ridge regression updates the selector:

At=∑s≤tγt−s∑x∈Ssϕ~(x)ϕ~(x)⊤,bt=∑s≤tγt−s∑x∈Ssrs(x)ϕ~(x)A_t = \sum_{s \leq t} \gamma^{t-s} \sum_{x \in S_s} \tilde{\phi}(x)\tilde{\phi}(x)^\top, \quad b_t = \sum_{s \leq t} \gamma^{t-s} \sum_{x \in S_s} r_s(x)\tilde{\phi}(x) wt=(At+pˉtI)−1btw_t = (A_t + \bar{p}_t I)^{-1} b_t

where γ\gamma is the decay factor controlling selector memory.

3. Selection from Candidate Window

At each step, candidates are drawn until the window holds λ×\lambda \times the batch's tokens (window factor λ\lambda controls selectivity). The top-ranked documents are selected for training.

Default hyperparameters: L=4L=4 (label interval), R=200R=200 (target refresh), U=10U=10 (refit interval), γ=0.999\gamma=0.999, λ∈{2,4,8,16,32,64}\lambda \in \{2, 4, 8, 16, 32, 64\}, selection starts at step 2500.


Empirical Validation / Results

Experimental Setup

  • Models: Decoder-only Llama-architecture transformers at 124M and 720M parameters
  • Data: FineWeb (English), FineWeb2 (multilingual: French, German, Chinese, Spanish, Portuguese, Italian)
  • Embeddings: XLM-RoBERTa-base (768-dim) for English; mmBERT-base for multilingual
  • Training: 33.6B tokens, AdamW optimizer, peak LR 3×10−43 \times 10^{-4}, cosine scheduler

Task-Oriented Pretraining Results

Key results (Table 1, 124M scale, λ=64\lambda=64):

MetricUniformSimilarityDAiSy
Downstream Loss3.5213.1293.040
I.D. Tasks Avg.48.38%54.31%56.28%
All Tasks Avg.43.22%46.38%48.52%

Efficiency gains:

  • DAiSy with λ=4\lambda=4 reaches final downstream loss with 7.6× fewer tokens at 124M and 4.7× fewer at 720M
  • Prior online methods (OPUS, MATES) fall behind uniform sampling at equal compute
  • OPUS would take 209 GPU hours vs. 28.8 for uniform at 124M scale

Web-Targeted Pretraining

  • DAiSy with high-quality FineWeb-Edu target improves benchmarks with no benchmark items in the target
  • At λ=64\lambda=64, DAiSy achieves +3.3% average accuracy over Uniform at 124M
  • DAiSy outperforms the strict FineWeb-Edu oracle baseline with 0.7–1.5% accuracy improvements
  • FineWeb topic-uniform target gives no gain (negative control): when the target resembles uniform sampling, selection cannot improve much

Instruction Tuning Survival

  • DAiSy runs lead uniform baseline by 2.0–4.8% after every SFT epoch (chat template)
  • DAiSy with λ=16,64\lambda=16, 64 maintains leads over FineWeb-Edu baseline with +0.39% and +0.80% improvements

Multilingual Pretraining

Key findings:

  • With HQ-FineWeb2 target at λ=16\lambda=16: DAiSy achieves 0.28 nats reduction on downstream losses, with +0.63% (Global-MMLU) and +2.5% (INCLUDE) accuracy improvements
  • Similarity fails completely in multilingual settings—it selects only 0.1% from Chinese with HQ target and over-weights Portuguese (48%), causing severe degradation in other languages
  • DAiSy with balanced stream + mixed target achieves the best downstream loss overall

Data Boundary Analysis (Token-Limited Scenario)

Training on a 10B-token subset (3.36× repetition):

  • Memory factor γ\gamma controls selector adaptivity:
    • High γ\gamma (0.999, 0.99): overfits to narrow document set, degrades around 20B tokens
    • Low γ\gamma (0.1, 0): adapts fast but less accurate task-relevance estimation
    • γ=0.9\gamma = 0.9: optimal trade-off, best downstream performance

Redundancy penalties (evaluated at token boundary):

PenaltyCoverageDownstream Improvement
Count penalty80%✗ No help
Embedding penalty60%✗ No help
Gradient penalty+10%✓ Effective
Momentum penalty+10%✓ Most effective

The momentum penalty uses the optimizer's existing first-order momentum, incurring zero extra computation:

yβ(x)=zW(y(x))−βzW(ρ(x)),ρmom(x)=⟨Ptm^t,∇ℓˉ(x)⟩y_\beta(x) = z_W(y(x)) - \beta z_W(\rho(x)), \quad \rho_{\text{mom}}(x) = \left\langle P_t \hat{m}_t, \nabla \bar{\ell}(x) \right\rangle

Theoretical and Practical Implications

Theoretical Implications

  1. Linear expressivity on data utility: DAiSy validates that a simple linear predictor on frozen embeddings can effectively approximate gradient-based utility scores, supporting the "linear representation" hypothesis for data valuation.

  2. Online vs. static selection: The paper demonstrates that online adaptation matters most in heterogeneous (multilingual) and constrained (token-limited) settings, where static methods fail catastrophically.

  3. Memory-diversity trade-off: The analysis of γ\gamma reveals a fundamental tension between selector accuracy (long memory) and adaptivity (short memory), with an optimal intermediate regime.

Practical Implications

  1. Scalability: DAiSy makes online data selection practical for production LLM training with only +5.6% FLOPs overhead, unlike prior methods that cost 2× or more.

  2. Target design flexibility: The method works with various targets (benchmarks, high-quality web data, mixed targets), making it adaptable to different training objectives.

  3. Cross-stage benefits: Pretraining gains survive instruction tuning, suggesting DAiSy improves the quality of learned representations, not just benchmark overfitting.

  4. Multilingual robustness: DAiSy remains effective in heterogeneous multilingual spaces where embedding-similarity methods fail, making it suitable for multilingual LLM development.


Conclusion

DAiSy introduces a lightweight, effective online data selection pipeline that:

  • Eliminates the computational overhead of gradient-based selection through a linear auxiliary model on frozen embeddings
  • Achieves significant data efficiency improvements across English and multilingual pretraining
  • Survives instruction tuning
  • Handles token-limited scenarios with proper memory design and redundancy penalties

Limitations:

  • Single random seed per run (compute constraints)
  • Candidate window λ=64\lambda=64 not exceeded (benefits not yet capped)

Future directions:

  • Apply DAiSy to more heterogeneous task spaces (world models, physical AI)
  • Multi-modal data selection
  • Exploring larger candidate windows and more diverse target designs

Related papers