[论文解读] Harnessing Diversity for Important Data Selection in Pretraining Large Language Models
Quad 提出了一种用于大规模语言模型预训练的新型数据选择方法,通过利用影响函数和多臂老虎机(multi-armed bandits)在数据质量和多样性之间实现平衡。该方法通过改进的 iHVP 方法加速注意力层中的影响计算,对数据进行聚类以实现多样性控制,并采用基于老虎机的策略从高影响、低探索的聚类中采样,从而在降低计算成本的同时实现最先进性能。
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.
研究动机与目标
- 解决现有数据选择方法仅关注数据质量或依赖启发式过滤所带来的局限,避免模型泛化能力不足的问题。
- 克服大规模 LLM 预训练中对所有数据实例计算影响分数所带来的高计算成本。
- 确保所选训练数据兼具高质量与多样性,从而提升模型在下游任务中的泛化能力。
- 开发一种高效且可扩展的方法,将基于影响的品质评估与聚类级别的多样性控制相结合。
提出的方法
- 使用基于嵌入的相似性将训练数据聚类为相似实例组,从而实现每类中的代表性采样。
- 将原本用于 MLP 层的加速 iHVP 计算方法适配至完整的多头注意力层,提升注意力机制中影响分数的准确性。
- 将每个聚类视为多臂老虎机(MAB)框架中的一个“臂”,在探索(多样性)与利用(质量)之间实现平衡。
- 基于结合了平均影响与不确定性驱动探索的聚类得分(CS),从排名靠前的聚类中采样小批量数据。
- 采用奖励机制,将采样数据的影响分数按距离传播至邻近聚类,从而促进多样性。
- 应用 Johnson-Lindenstrauss 引理降低梯度维度,最小化 iHVP 计算过程中的内存使用量。
实验结果
研究问题
- RQ1是否可以在不计算每个数据点影响分数的前提下,使基于影响的数据选择在大规模 LLM 预训练中实现可扩展且高效?
- RQ2如何有效将数据多样性整合到基于影响的数据选择中,以提升模型泛化能力?
- RQ3多臂老虎机策略是否能以计算高效的方式,在高质量数据选择与未充分探索的多样化聚类之间实现平衡?
- RQ4与仅限于 MLP 层的方法相比,将 iHVP 计算适配至注意力层在多大程度上提升了影响估计的准确性?
- RQ5将聚类级别采样与影响评分相结合,是否能带来优于仅使用 top-k 影响选择的预训练性能?
主要发现
- Quad 通过选择在高影响与多样性之间取得平衡的数据子集,在 LLM 预训练中实现了最先进性能。
- 该方法通过从聚类中采样而非评估所有数据实例,显著降低了计算成本,同时保持了高质量的选择。
- 通过在注意力层中适配 iHVP 计算得到的影响分数,相比仅限于 MLP 层的方法,能实现更准确的质量估计。
- 基于 MAB 的聚类选择策略有效平衡了探索(多样化聚类)与利用(高影响聚类),防止模型过度集中于相似数据。
- 通过距离加权的影响传播机制,有效增强了多样性,且无需进行完整的梯度计算。
- 实证结果表明,即使仅使用完整训练数据的一小部分,Quad 在下游任务中的表现也优于基线方法。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。