arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.06645cs.LGcs.CL
收藏

熵定律:数据压缩与大语言模型性能背后的规律

Entropy Law: The Story Behind Data Compression and LLM Performance

University of Science and Technology of China(中国科学技术大学)

Mingjia Yin, Chuhan Wu, Yufei Wang, Hao Wang, Wei Guo, Yasheng Wang, Yong Liu, Ruiming Tang, Defu Lian, Enhong Chen

AI总结:

本研究揭示了关联大语言模型性能、数据压缩比与首轮训练损失的熵定律,据此提出高效通用的贪心多阶段数据选择方法ZIP,经多场景实验验证有效,还可用于训练初期性能风险检测。

摘要:

数据是大语言模型(LLM)的基石,但并非所有数据都对模型学习有用。经过精心筛选的数据能够以低得多的计算开销更好地激发大语言模型的能力。大多数数据选择方法聚焦于评估单个样本的质量,却忽略了样本之间的组合效应。即便每个样本的质量都很高,由于其内在的同质性或矛盾性,它们的组合在用于大语言模型教学时可能并非最优。\n本文旨在揭示大语言模型性能与数据选择之间的内在关联。受大语言模型的信息压缩本质启发,我们发现了一条将大语言模型性能与数据压缩比、首轮训练损失联系起来的“熵定律”,这两个指标分别反映了数据集的信息冗余度以及模型对该数据集所编码内在知识的掌握程度。通过理论推导与实证评估,我们发现模型性能与训练数据的压缩比呈负相关,而低压缩比的训练数据通常会带来更低的训练损失。\n基于熵定律的研究结果,我们提出了一种高效且通用的大语言模型训练数据选择方法,名为ZIP,其核心目标是优先选择压缩比较低的数据子集。该方法基于一种多阶段算法,以贪心方式选择多样化数据,能够得到具备理想多样性的优质数据子集。我们开展了大量实验,在不同的大语言模型骨干网络和对齐阶段验证了熵定律的正确性以及ZIP方法的优越性。我们还展示了熵定律的一项有趣应用:它可以在模型训练初期检测潜在的性能风险。

英文摘要:

Data is the cornerstone of large language models (LLMs), but not all data is useful for model learning. Carefully selected data can better elicit the capabilities of LLMs with much less computational overhead. Most methods concentrate on evaluating the quality of individual samples in data selection, while the combinatorial effects among samples are neglected. Even if each sample is of perfect quality, their combinations may be suboptimal in teaching LLMs due to their intrinsic homogeneity or contradiction. In this paper, we aim to uncover the underlying relationships between LLM performance and data selection. Inspired by the information compression nature of LLMs, we uncover an ``entropy law'' that connects LLM performance with data compression ratio and first-epoch training loss, which reflect the information redundancy of a dataset and the mastery of inherent knowledge encoded in this dataset, respectively. Through both theoretical deduction and empirical evaluation, we find that model performance is negatively correlated to the compression ratio of training data, which usually yields a lower training loss. Based on the findings of the entropy law, we propose a quite efficient and universal data selection method named \textbf{ZIP} for training LLMs, which aim to prioritize data subsets exhibiting a low compression ratio. Based on a multi-stage algorithm that selects diverse data in a greedy manner, we can obtain a good data subset with satisfactory diversity. Extensive experiments have been conducted to validate the entropy law and the superiority of ZIP across different LLM backbones and alignment stages. We also present an interesting application of entropy law that can detect potential performance risks at the beginning of model training.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑