CoLoR-Filter: Conditional Loss Reduction Filtering for Targeted Language Model Pre-training

Selecting high-quality data for pre-training is crucial in shaping the downstream task performance of language models. A major challenge lies in identifying this optimal subset, a problem generally considered intractable, thus necessitating scalable and effective heuristics. In this work, we propose a data selection method, CoLoR-Filter (Conditional Loss Reduction Filtering), which leverages an empirical Bayes-inspired approach to derive a simple and computationally efficient selection criterion based on the relative loss values of two auxiliary models. In addition to the modeling rationale, we evaluate CoLoR-Filter empirically on two language modeling tasks: (1) selecting data from C4 for domain adaptation to evaluation on Books and (2) selecting data from C4 for a suite of downstream multiple-choice question answering tasks. We demonstrate favorable scaling both as we subselect more aggressively and using small auxiliary models to select data for large target models. As one headline result, CoLoR-Filter data selected using a pair of 150m parameter auxiliary models can train a 1.2b parameter target model to match a 1.2b parameter model trained on 25b randomly selected tokens with 25x less data for Books and 11x less data for the downstream tasks. Code: https://github.com/davidbrandfonbrener/color-filter-olmo Filtered data: https://huggingface.co/datasets/davidbrandfonbrener/color-filtered-c4

Paper

Similar papers

Peer review

Reviewer UH6A6/10 · confidence 5/52024-07-11

Summary

This work propose a novel data selection method, FRHOzen (Frozen Reducible Hold Out Loss), which leverages an empirical Bayes-inspired approach to derive a simple and computationally efficient selection criterion based on the relative loss values of two auxiliary models. They provide an empirical evaluation of FRHOzen on two language modeling tasks: (1) selecting data from C4 for domain adaptation to evaluation on Books and (2) selecting data from C4 for a suite of downstream multiple-choice question answering tasks.

Strengths

1.They analyze a family of loss-based approaches for targeted selection of pre-training data, propose a simple approach that outperforms existing methods, and provide some preliminary evidence of favorable scaling properties. 2. They analyzed and compared the computation cost of FRHOzen with other similar methods and proved its computational efficiency.

Weaknesses

1.I think this work could not match its objective of selecting optimal subsets of data for language model pre-training. The evaluation is done by fine-tuning an already-trained LM using downstream data, which could not prove the selection could work for LM pre-training. In fact, a pre-trained LM usually should not be specifically optimized for a particular downstream task (with regard to its domain-specific data). 2.In addition, the evaluation are based on olmo, which is an decoder-only LM. Exisiting pipeline don’t fine-tune for an decoder-only LMs, usually sft is needed for prompt alignment. I doubt the evaluation results may not be applicable for the real scenario. 3.The assumption of a pre-set budget n is less valid (in Algorithm 1), and the total number of optimal n is hard to predict during pre-training

Questions

1.Could you provide more details for how you fine-tune the olmo using downstream data? What’s the loss function? 2. What is the unit of data point x in Equation 6? 3.Is the selected optimal data used to optimize the fine-tune phase or the pre-train phase of training? 4.What’s the difference of data points and sequences (Section 4.2 Line 215)?

Rating

6

Confidence

5

Soundness

3

Presentation

3

Contribution

2

Limitations

As the authors have stated comprehensive in the limitation Section, I have no further comments for this part.

Authorsrebuttal2024-08-12

Hello! We just wanted to ping the reviewer since the discussion period is almost over and you have not yet responded to our rebuttal. We think there are some misunderstandings in the original review that the rebuttal can clear up. We also urge the reviewer to look at the other reviews and the discussion with the other reviewers to see the general positive consensus among them. Please take a look and let us know if your assessment of the paper has changed.

Reviewer UH6A2024-08-12

Thanks for the response. I'm going deep into the paper again to make the final decision. Pls give me some time.

Reviewer UH6A2024-08-12

Thank you for responding, which helped to clear up my misunderstanding. Now, I believe this work is above the acceptable level. I still have some more questions. 1.Page5 Algorithm1, n is for the selected data sample budget,not the computation budget,right? Since in the above response, you take N can be seen as the compute budget as an example. If n is the data budget, according to scaling law (chinchila or open AI both take power law for scaling), usually you have to pre-define C or N, then D, when plan for a large model pre-training. 2、Although it has been proved in the general response that the method is not overfit for the tasks (the book domain as in the paper), I was wondering if this work could be generalized to the selection of smaples from multiple domains within one pass. As illustrated in (LLaMA: Open and Efficient Foundation Language Models), the training data is from 7 different domains (wiki,CC, books , etc.). Particularly for large models (13B, 57B),  pre-training data should be more generalized. 3、According to the response, the length of a data point is 512 tokens. How does this hyper-parameter affect the results?

Authorsrebuttal2024-08-12

Thanks for engaging and for raising your score! Below we respond to the new questions raised in your comment. 1. Right, this is a good point. In our setup, we fix the size of the target model and then just scale the size of the dataset instead of scaling the dataset and model at the same time. We do this in part to try to isolate the contribution of the dataset distribution separate from the model scale. Note that in all prior work on scaling laws, the dataset is held fixed, so it is not immediately clear how those scaling laws will apply when we change the underlying data distribution by aggressive filtering with FRHOzen. But we totally agree that this is a great direction for future work, and we are actively working on this question now, stay tuned! 2. Yes, this is also a good point and similar to one raised by reviewer q13t. We view the distinction of “domains” as a somewhat arbitrary classification of the URLs that the data originated from. Since FRHOzen operates at the level of individual datapoints we can just pass data from all the “domains” we have access to through FRHOzen and get a filtered dataset out. But we totally agree that we need to conduct larger scale experiments beyond C4 to prove this out (although C4 itself does have a decent diversity of sources in it). Again we leave this to future work, but are actively looking into it now, so stay tuned for follow up work. 3. Another good question. So far we have held this context length fixed, but we will look into ablating it in the future. Hopefully this clears up these last remaining questions, and thanks again for engaging in the discussion!

Reviewer ZLEF7/10 · confidence 4/52024-07-13

Summary

This work proposes a simple, intuitive approach for data selection based on empirical bayes formulation minimizing the difference in the likelihood assigned to a candidate training sample by a model trained on a base distribution and a model trained on the base distribution plus a smaller sample of high quality target (test) data of interest. The method is scalable in that it leverages only standard training computation plus additional forward passes and empirical results suggest that it enjoys scale transfer properties where small scale experiments can be used to select data for larger training runs.

Strengths

- The setup is easy to follow, intuitive. Theoretically principled from a bayesian perspective while still feasible in practice is rare :] - Connection to related algorithms is well detailed including complementarity and different tradeoffs against contemporary RHOLoss. - Use of actual conditional-marginal loss gap is a strength of this method over DSDM and other influence function techniques which have been demonstrated to generalize poorly to realistic scenarios for both computational and broken assumption reasons. - The scaling results, headline figure, but last section... are impressive. Suggests that this simple method is worth further empirical exploration and expenditure of compute in the future.

Weaknesses

- The domain transfer experiment should be broadened. Does the result of figure 2 only hold this favorably for the Project Gutenberg Books downstream target? it is possible that improvements are only strong when there exist very distinct sub-distibutions in the prior that match the target. It would improve this empirical section if the authors considered more than one downstream target distribution. - (More minor, academic constraints assumed) Only one model architecture and scale extrapolation test setting are considered. It would be more convincing if another model family were considered and a few more scales, especially beyond 1B, as some trends in O(100M) models change dramatically beyond a few billion parameters.

Questions

- A diversity term seems reasonably easy to incorporate. Did the authors experiment with a diversity regularizer term or step of any sort? - Can we explain why conditional-only worsens with relaxation of the pre-sampling efficiency constraint tau? (Figure 2)

Rating

7

Confidence

4

Soundness

4

Presentation

4

Contribution

4

Limitations

- See weakness.

Reviewer q13t7/10 · confidence 2/52024-07-13

Summary

The paper presents FRHOzen, a new data selection method for targeted pre-training of language models, which uses an empirical Bayes-inspired approach to derive a simple, efficient selection criterion based on the relative loss values of two auxiliary models. Evaluated on tasks such as domain adaptation from C4 to Books and multiple-choice question answering, FRHOzen consistently outperforms training on eight times more randomly selected data. It also scales effectively across model sizes, with data selected by 150 million parameter models yielding improvements when used to train a 1.2 billion parameter model.

Strengths

1. This paper is well-written. The comparison and discussion is very sound, e.g., section 4.2 on computational cost. 2. The proposed method is quite effective -- outperforms training on 8x as much randomly selected data. 3. The method's effectiveness in data selection is transferable across models of different sizes, making it scalable.

Weaknesses

1. Section 2.1, Bayesian Data Selection, lacks rigorous derivation. This part can be considered an intuitive understanding of Bayesian optimization, but it does not constitute a strict derivation. 2. The acceleration effect brought by this paper is quite significant, but the experimental setting uses Books as D_{down} and tests it on the Books held-out set. However, in real-world scenarios, the downstream dataset used and tested should be more general, such as a combination of multiple corpora or multiple end tasks. I hope the authors can confirm that the acceleration effect brought by this paper is applicable to more general datasets.

Questions

I am curious, when the model is larger (for example, at 7B), will the acceleration still be as significant (8x) ?

Rating

7

Confidence

2

Soundness

3

Presentation

3

Contribution

3

Limitations

Yes.

Reviewer yqth6/10 · confidence 4/52024-07-15

Summary

This paper proposes a data selection method that can improve the performance of language models on downstream tasks. The method uses two auxiliary models: one pretrained on the pretraining dataset, and the other is finetuned on the downstream task using that pretrained model. Then the method selects the data that has the largest difference in loss between the two models. Authors formulate the method using Bayesian optimization and show that the method is trying to maximize the likelihood of sequences that will appear in the downstream task. The authors conduct experiments using a 150M parameter model and show that it can be transferred to a 1.2B model. Using the selcted data, the model can achieve better performance on tasks, even when it's pretrained on much fewer tokens.

Strengths

1. The method is novel and intuitive. The idea of selecting data based on the difference in loss between two models is interesting and can be easily understood. The method is also well-motivated and well-explained in the paper. 2. The method is well-formulated. It can be viewed as maximizing the posterior likelihood of the downstream sequences. 3. The authors have thoroughly discussed the relevance of the method to other data selction methods. 4. The experiments can very well support the claims. The method is shown to be effective in improving the performance of the model on downstream tasks. Moreover, the method seem to reduce the computational cost of pretraining because the model can be pretrained on much fewer tokens when using selected data.

Weaknesses

1. The paper has an aim of "Pre-training", but the models being tested are relatively small (150M and 1.2B). It's unclear whether the method can scale to larger models (eg, 10B, 100B). The authors should test the method on larger models to show the scalability of the method. 2. In order to select the pretraining data that can improve the downstream performance, the method requires knowing the downstream tasks ahead of time. This is a limitation of the method because in practice, we might not always know the downstream tasks when we are pretraining the model. And people using want the pretrained model to be versatile and not just good at a few tasks. 3. It's not very clear what will happen to the downstream tasks that are not included in the data selection process. It's unclear whether there are side effects of the data selection process on unknown tasks. 4. As the authors mentioned, "In particular, the FRHOzen objective no longer encourages the selection of a diverse dataset". So a lack of diversity and overfitting might be a concern when using the selected data. 5. Using a probability-based view, the method is effective in improving the likelihood of the downstream sequences. However, it does not explain or guarantee anything about RLHF/preference-based fine-tuning. And it's unclear how it will impact the model's safety and robustness.

Questions

1. What will happen to the downstream tasks that are not included in the data selection process? Will the model perform worse on those tasks? 2. How do you choose the downstream tasks? Any criteria? 3. Do you only consider maximal likelihood for the downstream tasks? What about other downstream finetuining methods, such as RLHF, DPO, etc?

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

Limitations with respect to approximations, data diversity, and computational cost are discussed.

Reviewer q13t2024-08-09

Thank you for your response. 1. It seems that that formula (1) lacks mention of the Model, as we cannot say the probability of one dataset given another dataset. Therefore, formula (1) refers to the probability of D_down given the Model trained on a dataset. However, the Model itself changes with the given training data and is not fixed, which makes the Bayesian part hard for me to accept. Could the author elaborate further on this? 2. My concern is not about the generalization of downstream tasks; what I mean is that in addition to validating the acceleration on specific training data (books), it is necessary to verify the acceleration on the mixture proportions of pretraining data domains, like in [1] [1] DoReMi: Optimizing Data Mixtures Speeds Up Language Model Pretraining

Authorsrebuttal2024-08-09

Thanks for the quick response! 1. Thanks for the clarification, now we see where the miscommunication is. In equations 1 and 2 we are referring to the marginal likelihoods we get when marginalizing out the model parameters. We then explicitly introduce the model parameters in equation 3 (which is a straight equality from equation 2). We can see how this was maybe not well presented and could be confusing. We are happy to change the presentation so that the model parameters appear in every equation (as they do from equation 3 onwards). Would that satisfy your concern? 2. Again, thanks for the clarification. As we said before, the books example is meant to be didactic. When thinking about practical applications, we likely want to focus on performance on downstream tasks. Take the DoReMi paper that you cite as an example. In that paper, Figure 2 presents their main results which report *downstream task accuracy*. They propose a *method* for data selection that relies on mixing “domains”, where “domains” are a user-defined way to bucket the datapoints based on where they are from. You can view this as a data selection method with very coarse features (i.e. a one-hot feature of which domain a datapoint comes from). FRHOzen can also be used to improve downstream task performance, but we do this using *fine-grained* features so that we can select at the datapoint level, rather than relying on coarse user-defined notions of domain. This seems beneficial, since we can get 8x efficiency improvements in downstream accuracy compared to 2.6x for DoReMi (although the settings are not directly comparable, since they are (1) operating at a larger scale than we are able to, (2) using different data/tasks, and (3) we use data from only a single one of their “domains”). We agree that an interesting direction for future work would be to scale FRHOzen up to larger settings where the data comes from more diverse sources than C4, but there is no a priori reason that our method would not work, since it operates on a per-datapoint level with no need to define domains. Thanks again for engaging with us. We hope this clarifies things so that you feel you can increase your score or your confidence. Please let us know if you have any more questions!

Reviewer ZLEF2024-08-11

Response to Rebuttal

I appreciate the authors thorough response to my initial review. While I am happy with my strong score of 7 as is, I reiterate to the review pool that I believe the work is high quality, the method is simple and well motivated, and the experimental results are promising and thus recommend it for acceptance. I think that future research would benefit from exploring the author speculation as to question 2. regarding why FRHOzen's selection signal seems more useful than the conditional method. Separating easy tokens from useful tokens is certainly at the crux of all data selection and valuation work in language modeling (throwing out trash tokens is just the table stakes) and so mechanistic analysis of why a method works at this fine-grained a level is just as important as increased scale and scope of the training experiments.

Authorsrebuttal2024-08-11

Thanks for the kind words and indeed we agree that this is a promising direction for future work!

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC