Skip to main content
QUICK REVIEW

[Paper Review] Harnessing Diversity for Important Data Selection in Pretraining Large Language Models

Chi Zhang, Huaping Zhong|arXiv (Cornell University)|Sep 25, 2024
Natural Language Processing TechniquesComputer Science3 citations
TL;DR

Quad proposes a novel data selection method for pretraining large language models that balances data quality and diversity by leveraging influence functions and multi-armed bandits. It accelerates influence computation in attention layers via adapted iHVP methods, clusters data for diversity, and uses a bandit-based strategy to sample from high-influence, low-exploration clusters, achieving state-of-the-art performance with reduced computational cost.

ABSTRACT

Data selection is of great significance in pre-training large language models, given the variation in quality within the large-scale available training corpora. To achieve this, researchers are currently investigating the use of data influence to measure the importance of data instances, $i.e.,$ a high influence score indicates that incorporating this instance to the training set is likely to enhance the model performance. Consequently, they select the top-$k$ instances with the highest scores. However, this approach has several limitations. (1) Computing the influence of all available data is time-consuming. (2) The selected data instances are not diverse enough, which may hinder the pre-trained model's ability to generalize effectively to various downstream tasks. In this paper, we introduce exttt{Quad}, a data selection approach that considers both quality and diversity by using data influence to achieve state-of-the-art pre-training results. In particular, noting that attention layers capture extensive semantic details, we have adapted the accelerated $iHVP$ computation methods for attention layers, enhancing our ability to evaluate the influence of data, $i.e.,$ its quality. For the diversity, exttt{Quad} clusters the dataset into similar data instances within each cluster and diverse instances across different clusters. For each cluster, if we opt to select data from it, we take some samples to evaluate the influence to prevent processing all instances. To determine which clusters to select, we utilize the classic Multi-Armed Bandit method, treating each cluster as an arm. This approach favors clusters with highly influential instances (ensuring high quality) or clusters that have been selected less frequently (ensuring diversity), thereby well balancing between quality and diversity.

Motivation & Objective

  • To address the limitations of existing data selection methods that prioritize only data quality or use heuristic filtering, leading to suboptimal model generalization.
  • To overcome the high computational cost of computing influence scores for all data instances in large-scale LLM pretraining.
  • To ensure selected training data are both high-quality and diverse, improving model generalization across downstream tasks.
  • To develop an efficient, scalable method that integrates influence-based quality assessment with cluster-level diversity control.

Proposed method

  • Clusters the training data into groups of similar instances using embedding-based similarity, enabling representative sampling per cluster.
  • Adapts accelerated iHVP computation methods from MLP layers to full multi-head attention layers, improving influence score accuracy for attention mechanisms.
  • Treats each cluster as an arm in a Multi-Armed Bandit (MAB) framework, balancing exploration (diversity) and exploitation (quality).
  • Samples mini-batches from top-ranked clusters based on a Cluster Score (CS) that combines average influence and uncertainty-driven exploration.
  • Uses a reward mechanism where influence scores from sampled data are propagated to neighboring clusters based on distance, promoting diversity.
  • Applies Johnson-Lindenstrauss Lemma to reduce gradient dimensionality, minimizing memory usage during iHVP computation.

Experimental results

Research questions

  • RQ1Can influence-based data selection be made scalable and efficient for large-scale LLM pretraining without computing influence for every data point?
  • RQ2How can data diversity be effectively incorporated into influence-based data selection to improve model generalization?
  • RQ3Can a multi-armed bandit strategy balance high-quality data selection with under-explored, diverse clusters in a computationally efficient manner?
  • RQ4To what extent does adapting iHVP computation to attention layers improve influence estimation accuracy compared to MLP-only methods?
  • RQ5Does combining cluster-level sampling with influence scoring lead to better pretraining performance than top-k influence selection alone?

Key findings

  • Quad achieves state-of-the-art performance in LLM pretraining by selecting a subset of data that balances high influence and diversity.
  • The method reduces computational cost by sampling from clusters rather than evaluating all data instances, while maintaining high-quality selection.
  • Influence scores computed via adapted iHVP in attention layers lead to more accurate quality estimation than methods restricted to MLP layers.
  • The MAB-based cluster selection strategy effectively balances exploration (diverse clusters) and exploitation (high-influence clusters), preventing over-concentration on similar data.
  • The use of distance-weighted influence propagation to neighboring clusters enhances diversity without requiring full gradient computation.
  • Empirical results show that Quad outperforms baseline methods in downstream tasks, even when using only a fraction of the full training data.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.