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

> DAiSy enables practical online data selection for LLM pretraining by predicting gradient-based utility scores with a linear model, achieving 7.6x data efficiency at only 5.6% extra FLOPs.

- **Source:** [arXiv](https://arxiv.org/abs/2611.32294)
- **Published:** 2026-11-28
- **Permalink:** https://picx.dev/p/HY3AfW
- **Whiteboard:** https://picx.dev/p/HY3AfW/image

## Summary

# 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 **DA**ta **S**election by adaptive utilit**y** 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 $x$ changes the target loss:

$$-\Delta L_V \approx \eta_t \left\langle P_t \nabla L_V(\theta_t), \nabla \bar{\ell}(x; \theta_t) \right\rangle$$

where:
- $\theta_t$ = model parameters at step $t$
- $\eta_t$ = learning rate
- $P_t$ = optimizer preconditioner (for AdamW: $P_t = \text{diag}(1/(\sqrt{\hat{v}_t} + \epsilon))$)
- $L_V$ = target loss on validation set $V$
- $\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 $a$ and output gradient $\delta$:

$$y_{\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 $V_t = P_t \nabla L_V(\theta_t)$ is the preconditioned target direction, refreshed every $R$ steps.

### 2. Online Linear Scorer on Frozen Embeddings

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

$$s_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:

$$r_s(x) = \Phi^{-1}\left(\frac{\text{rank}_s(x) - \frac{1}{2}}{n_s}\right)$$

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

**Running ridge regression** updates the selector:

$$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)$$

$$w_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=4$ (label interval), $R=200$ (target refresh), $U=10$ (refit interval), $\gamma=0.999$, $\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 \times 10^{-4}$, cosine scheduler

### Task-Oriented Pretraining Results

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

| Metric | Uniform | Similarity | DAiSy |
|--------|---------|------------|-------|
| Downstream Loss | 3.521 | 3.129 | **3.040** |
| I.D. Tasks Avg. | 48.38% | 54.31% | **56.28%** |
| All Tasks Avg. | 43.22% | 46.38% | **48.52%** |

**Efficiency gains:**
- DAiSy with $\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 $\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 $\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 $\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
  - **$\gamma = 0.9$**: optimal trade-off, best downstream performance

**Redundancy penalties** (evaluated at token boundary):

| Penalty | Coverage | Downstream Improvement |
|---------|----------|----------------------|
| Count penalty | 80% | ✗ No help |
| Embedding penalty | 60% | ✗ 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_\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 $\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

---

_Markdown view of https://picx.dev/p/HY3AfW, served by PicX — AI-generated visual whiteboard summaries of research papers._
