A Bayesian Approach to Data Point Selection

Data point selection (DPS) is becoming a critical topic in deep learning due to the ease of acquiring uncurated training data compared to the difficulty of obtaining curated or processed data. Existing approaches to DPS are predominantly based on a bi-level optimisation (BLO) formulation, which is demanding in terms of memory and computation, and exhibits some theoretical defects regarding minibatches. Thus, we propose a novel Bayesian approach to DPS. We view the DPS problem as posterior inference in a novel Bayesian model where the posterior distributions of the instance-wise weights and the main neural network parameters are inferred under a reasonable prior and likelihood model. We employ stochastic gradient Langevin MCMC sampling to learn the main network and instance-wise weights jointly, ensuring convergence even with minibatches. Our update equation is comparable to the widely used SGD and much more efficient than existing BLO-based methods. Through controlled experiments in both the vision and language domains, we present the proof-of-concept. Additionally, we demonstrate that our method scales effectively to large language models and facilitates automated per-task optimization for instruction fine-tuning datasets.

Paper

Similar papers

Peer review

Reviewer 5MKv7/10 · confidence 3/52024-07-04

Summary

The paper proposes a method for data point selection (DPS) in the setting where only little data from the target (or meta) distribution is available, together with a lot of data from the training distribution. DPS aims to find the weights of data points in the training distribution such that the model parameters that minimise the loss of the therewith weighted training distribution also minimise the loss on the target distribution. The method proposed for DPS in this paper consists in treating the problem in a Bayesian way and doing posterior inference on both (data) weights and model parameters simultaneously, using stochastic gradient Langevin dynamic sampling (SGLD) to approximate the posterior. The crucial trick is to view the data from the target distribution as generated by the model (parameters), which allows for the inference. They show the effectiveness of their approach on 4 experiments and compare against 2 DPS baselines (bilevel optimisation (BLO) and contrastive data selection (CDS)) as well as a range of naive baselines (mixing available training and target distributions to different extents). - The first experiment is on data balancing for MNIST, where the class balance differs significantly between training (imbalanced) and target (balanced) distribution. - The second experiment is on data denoising for CIFAR, where the training distribution (noisy) differs from the target distribution (clean) in the degree of noisiness - The third experiment is on efficient learning on WebNLG, where there are differences in the topic or domain of the data between training distribution (Artist, City) and target distribution (Athlete, Politician, Astronaut) - The fourth experiment is on instruction finetuning (IFT) for LLMs, using an OpenLlama3B model. The proposed method compares favourably in all experiments in the main part of the paper. In the appendix results for the second experiment are additionally shown for longer training times, in which case BLO outperforms the proposed method.

Strengths

- The idea of framing and solving DPS in a Bayesian way seems novel and innovative - The paper is well written in general and is easy to read and follow - The proposed method is getting good empirical results as displayed in the paper, in particular also on the relevant use case of IFT for LLMs - Compared to BLO, the proposed method seems to have lower memory and compute requirements

Weaknesses

- For the most part, the method proposed is explained well and in detail. However, when it comes to a crucial aspect in the implementation that is subsequently used in all experiments (the weight network), details are brushed under the carpet as a 'straightforwardly modification'. However, for me the causal graph in Figure 1 seems to be different if the weights become a function of $z^t$, let alone $\theta$ if model embeddings $f_{\theta}(z^t)$ are used instead of raw data $z^t$ like in the experiments. This should be explained in more detail (see also Question about this below). - In the main part of the paper, performance of BLO is portrayed as clearly falling behind the proposed method and other methods in terms of accuracy on the CIFAR experiment (Fig 2, Fig 3, line 266). However in Fig 7 in the Appendix, it can be seen that with longer training, BLO is at least on par (symmetry noise) or even slightly better (asymmetry noise) in terms of accuracy. It would be better if this would already be mentioned in the main part of the paper - Assuming a non-negativity constraint on the weights and the loss, in Eq (4) and subsequently Eq (7) the gradient wrt $w$ will be negative for the data dependent term and thus each gradient update is only pointing away from $0$ through the gradient of the prior term $\log p(w)$ (and the noise term at the end). Therefore, preventing collapse to $0$ weights (as described in line 148) seems to crucially depend on a strong enough prior as well as the impact constant and $N_t$. At least for the not so compute intensive experiments on MNIST and CIFAR, it would be good to see an ablation on the effect of these impact constants and the prior governing sparsity parameter $\beta$. - The limitations are only spelled out after the page limit

Questions

- Which part in the prior formulation or in the optimisation ensures that the weights are non-negative? Or are they intentionally not constrained by the method in that sense? - How does the causal graph in Figure 1 change if a weight network that is using embeddings of training data as inputs is being used like in the experiments? How does posterior inference change in this case? - Why is the weight network being used in the experiments if in the ablation in the appendix, the element wise weights version of the proposed approach is outperforming it? - Why are the inputs to the weight network different for the MNIST experiment (image embeddings) and the CIFAR experiment (image embedding + one-hot encoded label)? - When comparing to BLO in terms of compute efficiency, have the authors taken into account proposals of making the Hessian vector product calculations more efficient for BLO (see https://iclr-blogposts.github.io/2024/blog/bench-hvp/ for example)?

Rating

7

Confidence

3

Soundness

2

Presentation

3

Contribution

4

Limitations

- Limitations are discussed, but after the page limit

Authorsrebuttal2024-08-09

RE: Official Comment by Reviewer 5MKv

We appreciate the reviewer’s engaging discussion and sharp questions. **[RE: Circular Dependence]** Strictly speaking, if we use the embedding $f_\theta(z^t)$ in the weightnet, then weight $w$ becomes a function of both $\theta$ and $D_t$, thus we can have circular dependency as the reviewer pointed out. However, we would rather see this case in the following way: Suppose we were able to access the ideal oracle embedding function $f^*$. Then ideally the weightnet would use this $f^*$ internally to output the weight $w$, ie, $w = weightnet(f^*(z^t); \phi)$. This way, as $f^*$ is constant, our graphical model in Fig.1(b) of the attached PDF is still valid, and there is no circular dependency. In practice, however, since we cannot access $f^*$, one reasonable way to approximately mimic it is to use the current estimate $f(z^t; \theta)$ as an *online plugin proxy for* $f^*$. We hope this answers your question. FYI, in the implementation, we do stop-gradient $\theta$ in the weightnet update, which is in line with our argument of *online plugin proxy for* $f^*$. **[RE: Test/BLEU]** For WebNLG, we did experiments on two different setups: * **The main setup** (the performance is shown in *top-right plot in Figure 2 of the paper*): We use the original WebNLG domain adaptation set up (16 domains for training and 3 domains for testing) to report the models generation performance. Details are explained in *Appendix A*. * **Ablation setup (called 2-domain)** (the performance is shown in *Figure 8 in the Appendix*): The purpose of this setup is to easily assess the effectiveness of data selection, as visualizing the data selection across 16 domains can be challenging. Details and the rationale for this setup are explained in lines 291-301 of the paper. Generally, the Ablation setup is somewhat simpler than the main setup, resulting in a higher test BLEU score. In the Hyperparameter Analysis section of the rebuttal, we did experiments using the Ablation setup to visualize how hyperparameters affect data selection behavior (shown in Figure 3 in the rebuttal PDF). So, reviewers comparing Figure 1 in the rebuttal PDF to Figure 8 in the paper will observe that the test BLEU score for $\beta=0.05$ consistently hovers around 44. If the reviewer has any further questions, please feel free to reach out.

Reviewer 5MKv2024-08-12

Thanks, I understand now the discrepancy between Figure 2 in the paper and the ablation in the rebuttal pdf. I definitely think some discussion around the hyper parameter sensitivity based on the ablations in the rebuttal pdf should be part of the main paper, as this is important to guide future work around your method. Regarding the circular dependence when using embeddings I am not sure if I follow the authors arguments and would encourage them to think about the effects of using a changing embedding function as approximation of some fixed embedding function $f^*$. But overall many of my doubts or concerns have been answered and I definitely think the Bayesian perspective on DPS offers a novelty that makes this work stand out, so I have increased my original score from 6 to 7.

Authorsrebuttal2024-08-13

Regarding the embedding functions: In practice, using a fixed embedding function requires an additional embedding model, which increases memory usage. Additionally, the embedding model may require tuning, which would add extra time. We could consider including experiments to empirically understand the gap between using a changing function approximation and a fixed embedding function. We sincerely appreciate the reviewer’s insightful and valuable feedback, as well as their time. We will incorporate the information provided in the rebuttal into the revised paper.

Reviewer oLJs6/10 · confidence 4/52024-07-12

Summary

This work proposes a Bayesian approach to the data point selection task. Specifically, the authors introduce the important weights to each training point and derive the posterior joint probability of the instance-wise weights and network parameters. The parameters and weights are then sampled iteratively based on the stochastic-gradient MCMC technique. Experiments on computer vision and natural language processing have been conducted to show the efficacy of the proposed method.

Strengths

1. This work views the data point selection problem from the perspective of Bayesian theory and introduces the posterior distributions of the instance-wise weights and network parameters. 2. Experimental results demonstrate the efficacy of the proposed method.

Weaknesses

1. I suggest the authors provide a detailed derivative for Eq. 4. 2. Eq. 5 still requires to compute the normalizing constant in Eq. 4, which serves as the bias of the gradient. 3. The authors claim that “Our method straightforwardly achieves sparsity on the w weights allowing efficient sample selection unlike”. I hope the authors provide more analysis and evidence about the sparsity of instance-wise weight.

Questions

Please see the weaknesses

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

No potential negative societal impact.

Authorsrebuttal2024-08-13

Dear reviewer oLJs, We appreciate your thoughtful and detailed feedback once again. Since today is the final day for the rebuttal discussion, we wanted to check if you have any remaining questions or suggestions that we can address before the deadline. Thank you for your time.

Reviewer JeEz7/10 · confidence 4/52024-07-12

Summary

This paper proposes a new Bayesian method for Data Point Selection (DPS), called BADS. DPS aims to select training data points that optimize performance on downstream tasks. Instead of relying on bi-level optimization (BLO), BADS frames DPS as a posterior inference problem. The method uses a weight network to learn the importance of each data point and proposes a novel update rule for jointly updating model parameters and data point weights using Stochastic Gradient Langevin Dynamic sampling. Experiments on MNIST, CIFAR, and WebNLG datasets show that BADS outperforms or matches existing DPS methods, including BLO, in terms of accuracy and efficiency.

Strengths

- Originality: This paper introduces a novel perspective on DPS by using a Bayesian framework instead of the BLO approach. This offers a new way to think about data selection and its connection to posterior inference. The paper also leverages Langevin sampling for optimizing the derived posterior inference which adds to the novelty. - Clarity: The paper is well-written and easy to understand. The authors clearly explain their method and the motivations behind their design choices. The final derived method is simple and intuitive.

Weaknesses

- Limited theoretical analysis: The paper focuses on the empirical performance of BADS and lacks a deep theoretical analysis. Providing more theoretical insights on the convergence and optimality properties of BADS would strengthen the paper, especially since the authors claim that their method, unlike BLO, has theoretical convergence guarantees. - Hyperparameter sensitivity: The paper mentions that BADS has several hyperparameters that require careful tuning. A more in-depth discussion on the impact of these hyperparameters and potential strategies for automatic tuning would be beneficial. - Comparison and claims: The paper primarily compares BADS with BLO, but there are other methods that deal with selecting data to learn on, such as offline pruning methods [1], and online and offline batch selection [2, 3], among others. In addition to that, some of these methods have already been used for large scale model training, such as [4, 5]. Some important equations and their corresponding assumptions have been omitted. In particular, equation (4) is not derived and on first glance seems to assume independence of $w$ and $\mathcal{D}$, but it is not clear if this still holds after the introduction of the weight network. 1. https://arxiv.org/abs/2206.14486 2. https://arxiv.org/abs/2312.05328 3. https://arxiv.org/abs/2406.10670 4. https://arxiv.org/abs/2402.09668 5. https://arxiv.org/abs/2406.17711

Questions

Can the authors provide any theoretical guarantees on the convergence of BADS? What are the conditions under which BADS finds an optimal solution? What is the impact of different hyperparameters, especially the sparsity level parameter and impact constants? How robust is BADS to hyperparameter variability.

Rating

7

Confidence

4

Soundness

3

Presentation

3

Contribution

2

Limitations

The authors have adequately addressed the limitations proposed in their work.

Authorsrebuttal2024-08-13

We sincerely appreciate the reviewer’s insightful and valuable feedback, as well as their time. We will incorporate the information provided in the rebuttal into the revised paper.

Reviewer 5MKv2024-08-09

I thank the authors for answering some of my questions (non-negativity of weights, different weight NN inputs for MNIST and CIFAR, why using the weight NN). I also acknowledge that they added some ablation on WebNLG about the prior parameters $\beta$ and $\sigma$ as well as a derivation on the inference when a weight network is being used. Regarding this however I have 2 questions: - How does inference change if instead of $z^t$ model embeddings $f_{\theta}(z^t)$ are used like in the experiments of the paper? Does that not cause a circular dependence between $\theta$ and $w$? - Why is the Test/BLEU for $\beta=0.05$ in the ablation at 44 after 40k vs. only 36 in Figure 2 of the paper?

Reviewer JeEz2024-08-12

I would like to thank the authors for thoroughly addressing my comments and quickly incorporating the revelant comparisons to related work and baseline comparisons where relevant. This new information has improved my understanding and confidence in the impact of the paper.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC