A Bayesian Approach to Data Point Selection

Xinnuo Xu, Minyoung Kim, Royson Lee, Brais Martinez, Timothy Hospedales

Overview

In the era of "more data is better," machine learning practitioners increasingly rely on massive, uncurated web-scraped datasets. However, not all data is created equal. Some examples are noisy or mislabeled, some are redundant, and others might be entirely irrelevant to the specific target task.

Data Point Selection (DPS) aims to filter or re-weight training data to focus on the most valuable samples. Currently, the state-of-the-art approach is Bi-Level Optimization (BLO). In a BLO setup, an inner loop trains a model on weighted data, while an outer loop updates those weights based on how well the model performs on a small, clean "meta" validation set.

Unfortunately, BLO is a computational bottleneck. It requires massive memory to track gradients through the training process and often struggles with the minibatch nature of modern deep learning, leading to unstable convergence. To resolve this, researchers have developed BADS, a novel framework that treats data selection as a Bayesian inference problem rather than a complex optimization task. By using Stochastic Gradient Langevin Dynamics (SGLD), BADS efficiently identifies the most useful training examples—even in massive datasets—outperforming traditional methods in speed, memory usage, and accuracy.

The Bayesian Methodology

The authors propose BADS (Bayesian Data Point Selection). Instead of treating data weights as static variables to be optimized, they treat them as random variables to be inferred.

Graphical model of the Bayesian Data Point Selection framework
  1. The Generative Model: The framework defines a joint posterior distribution over both the model parameters ($\theta$) and the instance-wise weights ($w$). The model parameters are driven by a prior based on the weighted training data ($D_t$), while the likelihood is defined by performance on the clean meta-set ($D_m$).
  2. SGLD Sampling: To find the best parameters and weights, BADS employs Stochastic Gradient Langevin Dynamics (SGLD). This functions similarly to standard Stochastic Gradient Descent (SGD) but introduces a specific amount of Gaussian noise. This noise allows the model to explore the posterior landscape of likely solutions, providing a theoretical guarantee of convergence that BLO lacks.
  3. The Weight Network: To scale to millions of points, BADS does not simply learn a static list of weights. Instead, it utilizes a small "weight network" that evaluates a data point and predicts its importance. This provides a smoothing effect and allows the system to assign weights to new, unseen data points without retraining.
  4. Sparsity Prior: A specialized prior is introduced to encourage the model to select a specific percentage of data (a sparsity level $\beta$). This prevents the weights from collapsing to zero or exploding uncontrollably.

Key Experiments and Results

The authors validated BADS across diverse scenarios, including vision tasks (MNIST, CIFAR-10), language generation (WebNLG 2020), and Large Language Model (LLM) fine-tuning.

Performance and weight distribution comparisons across MNIST, CIFAR-10, and WebNLG
  • Denoising Power (Vision): On CIFAR-10 injected with 80% label noise, BADS maintained significantly higher accuracy—leading non-selection baselines by ~15-20% and consistently outperforming BLO.
  • Domain Adaptation (Language): In the WebNLG task, which tests domain adaptation (e.g., training on "City" data to perform well on "Artist" tasks), BADS achieved a 2 BLEU point advantage over the next best system and a 5+ point lead over standard training. Furthermore, the weight predictions showed a much clearer separation between relevant and irrelevant domains compared to BLO.
  • Computational Gains: Because BADS uses an update equation comparable to standard SGD, it avoids the expensive Hessian (second-order derivative) calculations required by many BLO methods. In the WebNLG experiments, BADS used roughly half the memory of BLO and was nearly twice as fast.
  • LLM Scalability: BADS is one of the first DPS methods demonstrated to work effectively on billion-parameter models. When fine-tuning an OpenLLaMA 3B model on a massive mix of instruction datasets (FLAN V2, CoT, DOLLY, Open Assistant 1), BADS achieved the highest scores on MMLU and ARC-e benchmarks compared to other selection methods like AskLLM or simple data mixing.

Limitations and Future Directions

While highly effective, BADS introduces several new hyperparameters, such as the sparsity level ($\beta$) and impact constants that balance the influence of the training set versus the meta-set. Currently, these require manual tuning. Additionally, while more memory-efficient than BLO, maintaining the weight network still incurs a memory footprint that can be demanding for extremely large-scale deployments.

Future work may focus on automating hyperparameter selection by treating $\beta$ itself as a latent variable to be inferred by the model, further streamlining this powerful Bayesian approach to data curation.

Reference: Xu, X., Kim, M., Lee, R., Martinez, B., & Hospedales, T. (2024). A Bayesian Approach to Data Point Selection. 38th Conference on Neural Information Processing Systems (NeurIPS 2024).

Summary updated

BibTeX
@inproceedings{xu2024bayesian,
  author = {Xinnuo Xu and Minyoung Kim and Royson Lee and Brais Martinez and Timothy Hospedales},
  title = {{A Bayesian Approach to Data Point Selection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=9f5tOXKoMC},
}
Figure