Data Selection for Language Models via Importance Resampling
Sang Michael Xie, Shibani Santurkar, Tengyu Ma, Percy Liang
摘要
Selecting a suitable pretraining dataset is crucial for both general-domain (e.g., GPT-3) and domain-specific (e.g., Codex) language models (LMs). We formalize this problem as selecting a subset of a large raw unlabeled dataset to match a desired target distribution given unlabeled target samples. Due to the scale and dimensionality of the raw text data, existing methods use simple heuristics or require human experts to manually curate data. Instead, we extend the classic importance resampling approach used in low-dimensions for LM data selection. We propose Data Selection with Importance Resampling (DSIR), an efficient and scalable framework that estimates importance weights in a reduced feature space for tractability and selects data with importance resampling according to these weights. We instantiate the DSIR framework with hashed n-gram features for efficiency, enabling the selection of 100M documents from the full Pile dataset in 4.5 hours. To measure whether hashed n-gram features preserve the aspects of the data that are relevant to the target, we define KL reduction, a data metric that measures the proximity between the selected pretraining data and the target on some feature space. Across 8 data selection methods (including expert selection), KL reduction on hashed n-gram features highly correlates with average downstream accuracy (r=0.82). When selecting data for continued pretraining on a specific domain, DSIR performs comparably to expert curation across 8 target distributions. When pretraining general-domain models (target is Wikipedia and books), DSIR improves over random selection and heuristic filtering baselines by 2-2.5% on the GLUE benchmark. Code is available at https://github.com/p-lambda/dsir.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 148 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- SoTA with Less: MCTS-Guided Sample Selection for Data-Efficient Visual Reasoning Self-Improvement 引用了 Deduplicating Training Data Makes Language Models Better
- Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To! 引用了 Language Models are Few-Shot Learners
- Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To! 引用了 Training language models to follow instructions with human feedback
- Solving Quantitative Reasoning Problems with Language Models 引用了 Language Models are Few-Shot Learners
- DoReMi: Optimizing Data Mixtures Speeds Up Language Model Pretraining 引用了 Deep Learning on a Data Diet: Finding Important Examples Early in Training
- DoReMi: Optimizing Data Mixtures Speeds Up Language Model Pretraining 引用了 Language Models are Few-Shot Learners
- LESS: Selecting Influential Data for Targeted Instruction Tuning 引用了 Deep Learning on a Data Diet: Finding Important Examples Early in Training
- LESS: Selecting Influential Data for Targeted Instruction Tuning 引用了 Training language models to follow instructions with human feedback
- Deduplicating Training Data Makes Language Models Better 引用了 Language Models are Few-Shot Learners
- Training language models to follow instructions with human feedback 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper148
- Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!Xiangyu Qi, Yi Zeng, Tinghao Xie, Pin-Yu Chen 等ICLR 2024 · 1,104 次引用
- LESS: Selecting Influential Data for Targeted Instruction TuningMengzhou Xia, Sadhika Malladi, Suchin Gururangan, Sanjeev Arora 等ICML 2024 · 460 次引用
- DoReMi: Optimizing Data Mixtures Speeds Up Language Model PretrainingSang Michael Xie, Hieu Pham, Xuanyi Dong, Nan Du 等NeurIPS 2023 · 457 次引用
- SalUn: Empowering Machine Unlearning via Gradient-based Weight Saliency in Both Image Classification and GenerationChongyu Fan, Jiancheng Liu, Yihua Zhang, Eric Wong 等ICLR 2024 · 351 次引用
- SoTA with Less: MCTS-Guided Sample Selection for Data-Efficient Visual Reasoning Self-ImprovementXiyao Wang, Zhengyuan Yang, Chao Feng, Hongjin Lu 等NeurIPS 2025 · 158 次引用
它引用的 Paper24
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- Solving Quantitative Reasoning Problems with Language ModelsAitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer 等NeurIPS 2022 · 2,039 次引用
- Deduplicating Training Data Makes Language Models BetterKatherine Lee, Daphne Ippolito, Andrew Nystrom, Chiyuan Zhang 等ACL 2022 · 844 次引用
- Deep Learning on a Data Diet: Finding Important Examples Early in TrainingMansheej Paul, Surya Ganguli, Gintare Karolina DziugaiteNeurIPS 2021 · 806 次引用
相关 Paper
- Improving Pretraining Data Using Perplexity CorrelationsTristan Thrush, Christopher Potts, Tatsunori HashimotoICLR 2025
- Data-Efficient Selection via Grammatical Complexity in Continual Pre-training of Domain-Specific LLMsYizhou Ying, Geng Zhang, Cui Danxin, Chengyu Du 等EMNLP 2025
- Predictive Data Selection: The Data That Predicts Is the Data That TeachesKaShun Shum, Yuzhen Huang, Hongjian Zou, Qi Ding 等ICML 2025
- Task-Adaptive Pretrained Language Models via Clustered-Importance SamplingDavid Grangier, Simin Fan, Skyler Seto, Pierre AblinICLR 2025
- Analyzing Similarity Metrics for Data Selection for Language Model PretrainingDylan Sam, Ayan Chakrabarti, Afshin Rostamizadeh, Srikumar Ramalingam 等NeurIPS 2025 · 3 次引用
