Abstract
Language Models (LMs) pre-trained with self-supervision on large text corpora have become the default starting point for developing models for various NLP tasks. Once the pre-training corpus has been assembled, all data samples in the corpus are treated with equal importance during LM pre-training. However, due to varying levels of relevance and quality of data, equal importance to all the data samples may not be the optimal choice. While data reweighting has been explored in the context of task-specific supervised learning and LM fine-tuning, model-driven reweighting for pre-training data has not been explored. We fill this important gap and propose PRESENCE, a method for jointly reweighting samples by leveraging self-influence (SI) scores as an indicator of sample importance and pre-training. PRESENCE promotes novelty and stability for model pre-training. Through extensive analysis spanning multiple model sizes, datasets, and tasks, we present PRESENCE as an important first step in the research direction of sample reweighting for pre-training language models.
Introduction
Modern Large Language Models (LLMs) are typically pre-trained on massive, web-scraped corpora such as mC4 or Common Crawl. Traditionally, these billions of tokens are treated with uniform importance. However, web data is inherently heterogeneous, containing a mix of high-quality literature, domain-specific text, and "noisy" content like gibberish or jumbled text.
While data reweighting is common in fine-tuning, applying it to pre-training presents significant challenges. Supervised reweighting requires gold-standard validation sets, which are absent in unsupervised pre-training. Moreover, "offline" filtering—scoring an entire dataset before training—is computationally prohibitive at the scale of trillions of tokens. To address this, we introduce a method to identify and prioritize useful data samples online during the training process.
The PRESENCE Framework
We propose PRESENCE (Pre-training data Re-weighting with Self-influence), a novel framework that uses "self-influence" (SI) scores to dynamically prioritize training samples. The SI score, derived from the TracIn algorithm, measures the impact of a specific training sample on the model's own loss for that sample.
Unlike offline methods that rely on a static proxy model, PRESENCE calculates influence based on the current state of the model. To maintain efficiency, we implement this at the microbatch level, adding only approximately 30% overhead to standard training time—a modest price for the resulting performance gains.
Two-Stage Adaptive Strategy
A central innovation of PRESENCE is its two-stage weighting strategy, which adapts to the model's maturity during pre-training:
- Stage 1: Direct Weighting ($\tau > 0$): In the early phases of training, the model prioritizes samples with high SI scores. At this stage, high SI typically indicates "novelty"—concepts the model has yet to master, providing a strong gradient signal to drive initial learning.
- Stage 2: Inverse Weighting ($\tau < 0$): As the model matures, the logic is reversed. High SI scores in a mature model often signal "noise" or unlearnable outliers. By de-emphasizing these samples, the model achieves greater stability and focuses on high-quality, representative data.
Experimental Results
We evaluated PRESENCE using the mT5-base and mT5-large architectures on the mC4 dataset. Performance was measured across the XTREME multilingual benchmark, including tasks such as Question Answering (XQuAD, MLQA, TyDi QA) and Natural Language Inference (XNLI).
The results demonstrate that PRESENCE consistently outperforms uniform-weighting baselines and offline sequential filtering. For instance, on the XQuAD task, mT5-large with PRESENCE achieved an F1 score of 77.78, a significant improvement over the baseline's 64.15. Furthermore, the performance gains were more pronounced as the model size increased, suggesting that larger models are better equipped to leverage the cleaner training signal provided by adaptive reweighting.
Conclusion and Future Work
PRESENCE demonstrates that self-influence is an effective unsupervised metric for distinguishing between clean and noisy text. By balancing novelty early in training with stability later on, it provides a robust framework for online data prioritization. Future research will focus on automating the transition between weighting stages and exploring the interaction of self-influence across diverse languages and domains in even larger-scale models.
Summary updated