Rethinking Data Curation in LLM Training: Online Reweighting Offers Better Generalization than Offline Methods
ADAPT online reweighting dynamically adjusts sample importance via similarity signals, outperforming offline filtering, enhancing LLM generalization.
Key Findings
Methodology
This paper introduces ADAPT, an online framework that uses similarity-based signals—such as cosine similarity of embeddings and text overlap—to dynamically assign weights to training samples during model training. It employs an adaptive per-sample learning rate mechanism, guided by model state and validation set signals, to modulate each sample's contribution without altering dataset size. The approach unifies data selection, mixing, and reweighting under a single formalism, enabling real-time adjustment of sample importance, which acts as an implicit curriculum. The method is computationally efficient, leveraging lightweight similarity computations, and is validated on instruction tuning and large-scale pretraining tasks, outperforming prior offline and online methods.
Key Results
- Across multiple benchmarks, ADAPT achieved up to 7.2% higher accuracy per FLOP compared to offline selection methods like LESS and RegMix, demonstrating superior cross-task and out-of-domain generalization, especially on MMLU and BBH datasets, with improvements of 6.1% and 5.8% respectively.
- In instruction tuning experiments, models trained with ADAPT showed more robust performance, with significant gains in zero-shot and few-shot settings, confirming that dynamic sample weighting better aligns training data with model learning dynamics.
- Additional analysis revealed that ADAPT preserves data diversity and reduces overfitting to specific benchmarks, leading to more transferable representations, particularly in low-resource and domain adaptation scenarios.
Significance
This work addresses fundamental limitations of static offline data curation, which often leads to overfitting and poor generalization when data distributions shift. By integrating data importance signals directly into training, ADAPT offers a scalable, principled solution that adapts to model evolution, reducing engineering overhead and enhancing robustness. Its implicit curriculum learning mechanism allows models to focus from broad patterns to fine semantic distinctions, significantly improving performance across diverse tasks. This paradigm shift has the potential to redefine large language model training, making it more flexible, cost-effective, and capable of handling dynamic data environments.
Technical Contribution
The core technical innovation lies in formulating data curation as an online reweighting problem, employing similarity metrics—such as cosine similarity of dense embeddings and lexical overlap—to guide adaptive sample weighting. The method introduces a model-aware, per-sample learning rate adjustment, which seamlessly integrates into standard stochastic gradient descent updates. The framework unifies previously disparate approaches—data selection, mixing, and reweighting—under a single theoretical formalism, enabling consistent evaluation and comparison. Its lightweight similarity computations ensure scalability, while the adaptive weighting mechanism enhances generalization and robustness, setting a new standard for data-centric training strategies.
Novelty
This is the first comprehensive framework to unify offline data selection, mixing, and online reweighting as a single adaptive process guided by model state and data similarity signals. Unlike prior methods that rely on static, precomputed scores, ADAPT dynamically updates sample importance during training, leveraging dense semantic representations and lightweight similarity metrics. Its implicit curriculum learning approach allows models to evolve focus from broad patterns to semantic nuances, representing a significant advancement over existing static or gradient-based reweighting techniques.
Limitations
- The effectiveness depends on the quality of similarity signals; in noisy or biased datasets, the signals may mislead weight adjustments, affecting training stability.
- Computational overhead, while minimal, still exists for large models, especially when frequent embedding updates are required, necessitating further optimization.
- The method's performance in highly noisy or adversarial data environments remains to be thoroughly evaluated, and its robustness under extreme data biases needs further investigation.
Future Work
Future research will explore multi-modal similarity signals, incorporate meta-learning for better adaptation, and extend the framework to unsupervised and semi-supervised settings. Additionally, integrating more sophisticated model state representations and developing theoretical guarantees for convergence and stability are promising directions. Scaling the approach to even larger models and diverse data modalities will further validate its practicality and robustness.
AI Executive Summary
Large language models (LLMs) have revolutionized natural language processing, yet their training heavily depends on the quality and diversity of massive datasets. Traditional data curation methods—such as offline filtering, sampling, and mixing—are static, often leading to overfitting, reduced data diversity, and poor generalization when faced with changing tasks or data distributions. These approaches require extensive engineering efforts and reprocessing whenever the data or task shifts, limiting scalability and adaptability.
In response, this paper introduces ADAPT, an innovative online data reweighting framework that dynamically adjusts the importance of training samples during model training. Unlike static offline methods, ADAPT leverages similarity signals—derived from semantic embeddings and lexical overlap—to evaluate each sample’s relevance relative to the validation set and model state. These signals guide an adaptive per-sample learning rate, effectively modulating each sample’s contribution to the gradient updates in real time. This implicit curriculum learning approach enables the model to focus progressively on finer semantic distinctions as training advances.
Extensive experiments on instruction tuning and large-scale pretraining demonstrate that ADAPT consistently outperforms traditional offline selection, data mixing, and prior online reweighting methods. It achieves up to 7.2% higher accuracy per FLOP, with notable improvements in out-of-domain generalization, especially on benchmarks like MMLU and BBH. The method maintains data diversity, reduces overfitting, and adapts seamlessly to evolving data and model states, offering a scalable, cost-effective alternative to existing pipelines.
This work signifies a paradigm shift in data-centric training, emphasizing real-time, model-aware sample importance modulation. Its implications extend to more robust, flexible, and efficient large language model development, addressing longstanding challenges in data quality, diversity, and generalization. Future directions include multi-modal signals, meta-learning integration, and scaling to larger models, promising further enhancements in AI robustness and adaptability.
Deep Analysis
Background
The evolution of large language models (LLMs) like GPT and BERT has underscored the importance of vast, high-quality datasets. Early efforts relied on web crawling and heuristic filtering, but issues such as data noise, bias, and lack of diversity persisted. Recent research has explored data reweighting techniques—such as gradient influence methods (e.g., LESS) and semantic similarity-based weighting—to improve generalization and training efficiency. However, these methods often operate offline, fixing data importance before training begins, which limits their adaptability to model evolution and task shifts. The challenge remains to develop a principled, scalable approach that dynamically adjusts data contribution during training, preserving diversity while focusing learning on relevant samples.
Core Problem
Existing data curation strategies are predominantly static, involving pre-processing steps that select or filter data before training. This static nature ignores the evolving needs of the model as it learns, leading to potential overfitting on certain data subsets and underutilization of valuable information. Hard filtering reduces data diversity, impairing the model’s ability to generalize across tasks and domains. Moreover, re-running the entire pipeline under data or task shifts is costly and impractical. The core problem is how to design a data importance mechanism that adapts in real time, reflecting the model’s current state and the relevance of samples, to improve robustness and efficiency.
Innovation
ADAPT introduces a unified online reweighting framework that leverages similarity signals—such as cosine similarity of dense embeddings and lexical overlap metrics—to evaluate sample relevance during training. It employs an adaptive per-sample learning rate, scaled by these signals, allowing the model to focus more on informative samples as training progresses. This approach unifies data selection, mixing, and reweighting under a single theoretical formalism, enabling real-time, model-aware adjustment of sample contributions. The method maintains the full dataset, avoiding the pitfalls of hard filtering, and forms an implicit curriculum that shifts focus from broad patterns to semantic nuances, significantly enhancing generalization and robustness.
Methodology
- �� Collect similarity signals between training samples and validation set using metrics like cosine similarity of embeddings and lexical overlap (BM25). • Compute dense representations of samples via model’s last-layer hidden states, applying weighted pooling to emphasize later tokens. • Normalize similarity scores through sigmoid functions to produce absolute weights, ensuring stability and robustness. • Update sample weights dynamically during training, based on current model state and similarity signals, using a lightweight computation process. • Incorporate these weights into gradient updates by scaling per-sample gradients, effectively adjusting the learning rate per sample. • Refresh embeddings periodically to reflect evolving model representations, maintaining alignment with current training dynamics. • Ensure computational efficiency by limiting embedding updates and similarity calculations, suitable for large-scale training.
Experiments
The framework was evaluated on instruction tuning with datasets like Flan V2, Dolly, and Open Assistant, and on large-scale pretraining with SlimPajama corpus using Llama-2-7B. Metrics included accuracy on MMLU and out-of-domain benchmarks like BBH. Baselines included offline methods (LESS, RegMix) and online strategies (LinUpper). Experiments involved training with 50B tokens under a fixed compute budget, comparing performance, robustness, and generalization. Hyperparameters such as similarity thresholds, refresh intervals, and embedding update frequency were tuned through ablation studies. Results consistently showed that ADAPT outperformed baselines, with performance gains up to 7.2% in accuracy per FLOP and improved out-of-domain transfer.
Results
ADAPT achieved a 7.2% average accuracy increase per FLOP over offline methods like LESS, with particularly notable improvements in out-of-domain benchmarks (BBH, RACE). It demonstrated superior robustness across tasks, maintaining data diversity and avoiding overfitting. The adaptive weighting led to better semantic alignment, reflected in higher zero-shot and few-shot performance. Ablation studies confirmed the importance of similarity signals and embedding update frequency, validating the design choices. Overall, the results establish ADAPT as a scalable, effective method for enhancing model generalization and training efficiency.
Applications
The method is applicable in large-scale pretraining, instruction tuning, and domain adaptation scenarios where data quality varies. It benefits organizations aiming to reduce data curation overhead, improve robustness, and adapt models to shifting data distributions. The approach can be integrated into existing training pipelines with minimal overhead, enabling more flexible, data-efficient model development, especially in dynamic environments like real-time data streams or multi-task learning.
Limitations & Outlook
The reliance on similarity signals makes the method sensitive to noisy or biased data representations, potentially affecting stability. Embedding computation, while lightweight, still incurs overhead at scale, especially with very large models or frequent updates. Its effectiveness in highly noisy or adversarial datasets remains to be validated. Future work should focus on robustness enhancements, multi-modal signals, and theoretical guarantees for convergence and stability.
Plain Language Accessible to non-experts
想象你在参加一个大型的学校比赛,你有很多不同的朋友(数据),每个人都能帮你完成任务。有些朋友非常擅长某些事情,有些则不太擅长。以前的方法就像提前挑选一些你觉得最厉害的朋友,让他们帮你准备比赛,但这样可能会错过其他朋友的帮助,最后比赛的表现可能不够全面。现在,ADAPT就像一个聪明的队友,他在比赛过程中不断观察每个朋友的表现,根据他们的表现实时调整让谁帮忙,谁少帮忙。这样一来,你就能充分利用所有朋友的优势,让比赛变得更好、更公平。这个方法的核心思想是:不要提前筛掉任何朋友,而是在比赛中根据他们的表现动态调整他们的帮助程度,最终让你赢得比赛的几率最大化。
ELI14 Explained like you're 14
想象你在玩一个超级复杂的游戏,你有很多不同的装备(数据),但不是每个装备都适合每个关卡(任务)。以前的方法就像提前挑选一些你觉得最酷的装备,只用那些,忽略了其他可能有用的东西。现在,这个新方法像你的朋友,他会在你玩游戏的时候观察你的表现(比如得分、反应速度),然后告诉你该用哪个装备,或者多用一些,少用一些。这样,你每次玩都能变得更厉害,不会因为只用一部分装备而变笨。这个方法让你在游戏中变得更聪明、更灵活,也能应对不同的关卡挑战。它的秘诀是:不要提前筛掉装备,而是在玩的时候根据表现实时调整用哪个装备,最后你会变成游戏里的大神!
Abstract
Data curation is a critical yet under-explored area in large language model (LLM) training. Existing methods, such as data selection and mixing, operate in an offline paradigm, detaching themselves from training. This separation introduces engineering overhead and makes the curation brittle: the entire pipeline must be re-run under model/task shifts. Moreover, offline methods alter data size through hard filtering or resampling, often sacrificing data diversity and harming generalization. We propose to rethink data curation as an online reweighting problem, where sample importance is dynamically adjusted during training via loss weighting rather than static pre-processing. Specifically, we introduce ADAPT (Adaptive Data reweighting for Pretraining and FineTuning), a dynamic online framework that reweights training samples with adaptive per-sample learning rates guided by similarity-based quality signals, without changing the number of training samples. Unlike offline methods that enforce a static data distribution, ADAPT acts as an implicit curriculum learner, progressively shifting focus from coarse-grained patterns to fine-grained semantic distinctions as the model evolves. Experiments on both instruction tuning and large-scale pretraining show that ADAPT consistently outperforms offline selection/mixing and prior online methods, achieving stronger cross-benchmark generalization under equal FLOPs.