Skip to main content
QUICK REVIEW

[论文解读] What is Your Data Worth to GPT? LLM-Scale Data Valuation with Influence Functions

Sang Keun Choe, Hwijeen Ahn|arXiv (Cornell University)|May 22, 2024
Big Data Technologies and Applications被引用 4
一句话总结

本文提出 LoGra,一种基于低秩梯度投影的高效方法,可显著加速大语言模型(LLMs)的基于影响函数的数据估值,相比先前基线方法,GPU 显存减少 5 倍,吞吐量最高提升 6,500 倍。该方法在仅使用 10 亿 token 训练数据集的情况下,实现了对 Llama3-8B-Instruct 模型的可扩展、高精度数据估值,且通过 Logix 软件框架仅需极少代码修改即可完成。

ABSTRACT

Large language models (LLMs) are trained on a vast amount of human-written data, but data providers often remain uncredited. In response to this issue, data valuation (or data attribution), which quantifies the contribution or value of each data to the model output, has been discussed as a potential solution. Nevertheless, applying existing data valuation methods to recent LLMs and their vast training datasets has been largely limited by prohibitive compute and memory costs. In this work, we focus on influence functions, a popular gradient-based data valuation method, and significantly improve its scalability with an efficient gradient projection strategy called LoGra that leverages the gradient structure in backpropagation. We then provide a theoretical motivation of gradient projection approaches to influence functions to promote trust in the data valuation process. Lastly, we lower the barrier to implementing data valuation systems by introducing LogIX, a software package that can transform existing training code into data valuation code with minimal effort. In our data valuation experiments, LoGra achieves competitive accuracy against more expensive baselines while showing up to 6,500x improvement in throughput and 5x reduction in GPU memory usage when applied to Llama3-8B-Instruct and the 1B-token dataset.

研究动机与目标

  • 解决大语言模型训练中缺乏对数据提供者进行信用认定或补偿的机制问题,尤其在数据使用相关的法律与伦理争议日益加剧的背景下。
  • 克服将数据估值方法——特别是影响函数——应用于现代大语言模型及其大规模训练数据集时所面临的高昂计算与显存成本问题。
  • 开发一种可扩展、高效且理论基础坚实的梯度投影方法,用于影响函数,避免完整梯度计算与模型微调。
  • 通过引入 Logix 软件包,将标准训练代码无缝转化为数据估值代码,以最小化开发成本,降低实际应用中采用数据估值的门槛。

提出的方法

  • 提出 LoGra,一种低秩梯度投影算法,通过利用反向传播梯度的结构特性,将梯度投影的空间与时间复杂度从 O(nk) 降低至 O(√(nk))。
  • 设计 LoGra 以直接计算投影梯度,而无需显式存储完整梯度,从而实现极低的 GPU 显存占用与极高的 GPU 利用率。
  • 通过将阻尼项解释为谱梯度稀疏化机制,从理论上证明梯度投影在影响函数中的合理性,增强方法的可信度。
  • 基于阻尼项的理论解释,提出一种针对 LoGra 的专用主成分分析(PCA)初始化方案。
  • 开发 Logix,一个软件包,可实现现有 LLM 训练代码到数据估值代码的无缝转换,兼容 LLM 生态系统工具,并具备扩展性以支持其他可解释性方法。
  • 将 LoGra 应用于预训练与微调场景的影响函数,实现两种场景下的数据估值。
Figure 1 : Data valuation system architecture. (Left Bottom) We first extract the Hessian and gradients for all training data using efficient gradient projection LoGra and store them in a database. (Left Top) At test time, we similarly extract gradients and query the database. (Right) The database r
Figure 1 : Data valuation system architecture. (Left Bottom) We first extract the Hessian and gradients for all training data using efficient gradient projection LoGra and store them in a database. (Left Top) At test time, we similarly extract gradients and query the database. (Right) The database r

实验结果

研究问题

  • RQ1影响函数能否在参数量达十亿级的大语言模型及大规模数据集上实现可接受的计算与显存成本下的可扩展性?
  • RQ2如何在不牺牲数据估值准确性的情况下,使影响函数中的梯度投影更加高效?
  • RQ3影响函数中使用梯度投影的理论基础是什么?这些理论基础如何被用于提升方法的可靠性?
  • RQ4通过软件抽象,数据估值系统在多大程度上可实现实用化与可访问性,以服务于研究人员与实践者?
  • RQ5LoGra 所识别出的最具影响力的训练样本,在定性相似性与实用性方面,与查询模型输出相比如何?

主要发现

  • 当应用于 Llama3-8B-Instruct 与 10 亿 token 数据集时,LoGra 相较于唯一可扩展运行的基线方法 EKFAC 影响函数,吞吐量最高提升 6,500 倍,GPU 显存使用降低 5 倍。
  • LoGra 在反事实评估中保持了具有竞争力的准确性,表明其影响估计在实现显著效率提升的同时仍具可靠性。
  • LoGra 识别出的最具价值训练样本通常与查询的 LLM 输出在定性上具有相似性,支持该方法的可解释性与相关性。
  • LoGra 通过谱梯度稀疏化与 PCA 初始化的理论依据,增强了数据估值过程的信任度。
  • Logix 仅需极少代码修改即可将数据估值轻松集成至现有训练流程,显著促进 LLM 社区对数据估值技术的采纳。
  • 在低质量模型输出(如 Pythia-1.4B)中,数据归属失败的情况更常见,表明模型质量会影响估值的可靠性。
(a) Brittleness test
(a) Brittleness test

更好的研究,从现在开始

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

无需绑定信用卡

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