Skip to main content
QUICK REVIEW

[论文解读] DataInf: Efficiently Estimating Data Influence in LoRA-tuned LLMs and Diffusion Models

Yongchan Kwon, Eric Hsiao‐Kuang Wu|arXiv (Cornell University)|Oct 2, 2023
Topic Modeling被引用 5
一句话总结

DataInf 提出了一种计算高效的闭式影响估计方法,适用于经过 LoRA 微调的大规模语言模型(LLMs)和扩散模型。通过利用可计算的解析公式,该方法在保持高精度识别关键训练数据点及检测错误标注样本的同时,相较现有方法实现了数量级的速度提升。

ABSTRACT

Quantifying the impact of training data points is crucial for understanding the outputs of machine learning models and for improving the transparency of the AI pipeline. The influence function is a principled and popular data attribution method, but its computational cost often makes it challenging to use. This issue becomes more pronounced in the setting of large language models and text-to-image models. In this work, we propose DataInf, an efficient influence approximation method that is practical for large-scale generative AI models. Leveraging an easy-to-compute closed-form expression, DataInf outperforms existing influence computation algorithms in terms of computational and memory efficiency. Our theoretical analysis shows that DataInf is particularly well-suited for parameter-efficient fine-tuning techniques such as LoRA. Through systematic empirical evaluations, we show that DataInf accurately approximates influence scores and is orders of magnitude faster than existing methods. In applications to RoBERTa-large, Llama-2-13B-chat, and stable-diffusion-v1.5 models, DataInf effectively identifies the most influential fine-tuning examples better than other approximate influence scores. Moreover, it can help to identify which data points are mislabeled.

研究动机与目标

  • 解决大规模生成式模型(如 LLMs 和扩散模型)中影响函数计算的高计算成本问题。
  • 开发一种可扩展至参数高效微调设置(如 LoRA)的实际影响力估计方法。
  • 在先前方法不可行的大规模模型上,实现有效的以数据为中心的分析(如错误标注数据检测和关键样本识别)。
  • 提供一个理论基础坚实的闭式近似方法,避免迭代或昂贵的 Hessian 矩阵计算。

提出的方法

  • 基于模型梯度和曲率近似,推导出影响力分数的闭式表达式,避免了 Hessian 矩阵求逆的需要。
  • 将影响力近似方法专门应用于 LoRA 微调的模型,利用其低秩参数更新结构实现计算效率。
  • 采用 Hessian 矩阵的低秩近似,实现可计算的影响力计算,而无需完整的特征值分解。
  • 采用参数偏移在数据重加权下的首阶近似,实现无需微调即可快速计算影响力。
  • 将该方法集成至 LLM 和扩散模型的推理流程中,实现大规模影响力评分。
  • 通过近似误差的理论边界验证该方法,结果表明其在 LoRA 微调设置下表现优异。
Figure 3: Illustrative examples of most and least influential training data points discovered using DataInf across the text generation and text-to-image generation tasks performed with the Llama-2-13B-chat and stable-diffusion-v1.5 models. The most ( resp. least) influential data point has the large
Figure 3: Illustrative examples of most and least influential training data points discovered using DataInf across the text generation and text-to-image generation tasks performed with the Llama-2-13B-chat and stable-diffusion-v1.5 models. The most ( resp. least) influential data point has the large

实验结果

研究问题

  • RQ1我们能否在不产生禁止性计算成本的前提下,实现大规模 LLM 和扩散模型中的高精度影响力估计?
  • RQ2与 Hessian-free 或 EK-FAC 等现有方法相比,DataInf 的影响力近似质量在速度和准确性方面表现如何?
  • RQ3DataInf 在微调后的 LLM 和扩散模型中,能在多大程度上识别出错误标注的训练样本?
  • RQ4DataInf 是否能有效检索出对模型生成任务最具影响力和最无影响力的训练数据点?
  • RQ5在参数高效微调设置(尤其是 LoRA)下,影响力闭式近似的表现如何?

主要发现

  • 在 Llama-2-13B-chat 模型上,DataInf 在多个任务中实现了近乎完美的 AUC(1.000 ± 0.000)分类检测性能,显著优于 Hessian-free 方法。
  • 在文本到图像生成任务中,DataInf 在主体生成任务中达到 AUC 0.865 ± 0.000,在风格生成任务中达到 AUC 0.820 ± 0.005,大幅优于 Hessian-free 方法。
  • 在句子转换任务中,DataInf 以 99.8% 的召回率识别出最具影响力的训练样本,展现出极高的检索精度。
  • 该方法相比最先进影响力计算算法快了数量级,使得其在 LLM 和扩散模型中具备实际部署的可行性。
  • DataInf 通过识别对测试损失产生异常高影响力的样本,成功检测出错误标注的数据点。
  • 理论分析表明,DataInf 的近似误差在 LoRA 微调设置下被最小化,使其特别适用于此类配置。
Figure 4: Examples of images used in the text-to-image generation task, along with before and after images from the LoRA fine-tuning of the stable-diffusion-v1.5 model.
Figure 4: Examples of images used in the text-to-image generation task, along with before and after images from the LoRA fine-tuning of the stable-diffusion-v1.5 model.

更好的研究,从现在开始

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

无需绑定信用卡

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