Skip to main content
QUICK REVIEW

[论文解读] Entropy Law: The Story Behind Data Compression and LLM Performance

Mingjia Yin, Chuhan Wu|arXiv (Cornell University)|Jul 9, 2024
Financial Distress and Bankruptcy Prediction被引用 6
一句话总结

本文提出一个熵定律,将 LLM 的性能与数据压缩比和初始轮训练损失联系起来,并提出 ZIP,一种无模型数据选择方法,最小化压缩以最大化信息增益。

ABSTRACT

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 extbf{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.

研究动机与目标

  • 在计算资源有限的情况下,通过考察数据的信息内容(超出样本级别质量)来为 LLM 训练的数据选择提供动机。
  • 在理论上通过熵定律将 LLM 学习与信息压缩和数据冗余联系起来。
  • 提出一种高效的、通用的数据子集选择方法(ZIP),以压缩比为引导,最大化有效信息。
  • 在多种 LLM 主干与对齐阶段上验证熵定律和 ZIP。

提出的方法

  • 将数据压缩比定义为压缩前后比特数,用以衡量数据密度。
  • 推导一个熵定律,将压缩比、训练损失、数据一致性和平均数据质量与模型性能联系起来。
  • 提出 ZIP:一种多阶段贪心算法,包含全局、粗粒度局部和细粒度局部步骤,用于选择低压缩、多样化的数据子集。
  • 在 SFT 和 RLHF 实验中使用仅 CPU 的、无模型的数据选择实现 ZIP,避免依赖专有评估器。
  • 在 Mistral-7B 和 Llama-3-8B 上针对启发式和基于模型的基线评估 ZIP,使用 MT-bench 作为评估指标。
  • 通过对压缩比与训练损失分析提供对熵定律的实证验证。
Figure 1 : An illustrative example describing different data selection paradigms. Quality-based data selection relies on sample-level data quality measurements while overlooking combinatorial effects among samples. Information-amount-based selection aims to select samples maximizing the overall info
Figure 1 : An illustrative example describing different data selection paradigms. Quality-based data selection relies on sample-level data quality measurements while overlooking combinatorial effects among samples. Information-amount-based selection aims to select samples maximizing the overall info

实验结果

研究问题

  • RQ1在样本质量保持不变的情况下,模型性能是否与数据压缩比呈负相关?
  • RQ2低压缩比(高信息密度)的数据子集能否比高质量但可能冗余的样本更提升 LLM 学习?
  • RQ3与现有基线相比,ZIP 是否在不同的 LLM 主干和对齐阶段(SFT 和 RLHF)上都有效?
  • RQ4熵定律的见解能否预测模型训练早期阶段的性能风险?

主要发现

  • 模型性能与训练集的数据压缩比呈负相关。
  • ZIP 在 SFT 和 RLHF 的 Mistral-7B 与 Llama-3-8B 上均优于基线。
  • ZIP 是无模型的且对 CPU 高效,选取更短、冗余更少的样本,MT-bench 分数与之相比相当或更好。
  • 熵定律曲线显示,当训练损失变化时,较低的压缩比通常与更好的性能一致。
  • 该定律使得在增量训练数据更新过程中能及早发现潜在的性能风险。
  • 选定子集的数据质量分数在不同方法之间可能相似,表明基于压缩的选择捕获了样本级质量无法完全反映的互补信息。
(a) ZIP
(a) ZIP

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。