提出高效准确的样本影响评估方法,解决大模型下计算成本高、精度差问题。
HyperINF: Unleashing the HyperPower of the Schulz's Method for Data Influence Estimation
- 基于 Schulz 迭代法改进影响函数近似,保证收敛性。
- 在 LoRA 微调模型上实现常数级内存与计算开销。
- 适用于大模型数据清洗与精选,尤其适合资源受限场景。
影响函数为评估单个训练样本对特定目标的贡献提供了理论框架,但其高昂的计算成本限制了在大规模模型和数据集上的应用。现有近似方法虽降低了计算开销,但大多因缺乏严格的收敛保证而存在估计不准确的问题。超幂方法(hyperpower methods)以矩阵逆近似的严格收敛性著称,但大规模模型中的矩阵乘法带来难以承受的内存与计算负担。本文提出 HyperINF,一种基于 Schulz 迭代算法的高效且精确的影响函数近似方法。为缓解计算密集型矩阵乘法问题,引入广义费雪信息矩阵(GFIM)作为海森矩阵的低秩近似,使内存与计算开销在 LoRA 微调模型上降至与秩无关的常数级别。通过合成矩阵求逆的收敛性模拟,验证了 HyperINF 在准确性和稳定性上优于基线方法。进一步在真实数据归因任务中验证其有效性,包括误标注数据检测以及大语言模型和视觉语言模型微调中的数据选择。在 LoRA 微调模型上,HyperINF 实现了优异的下游性能,且仅需极小内存与计算开销,而其他基线方法则出现显著性能下降。代码已开源:https://github.com/Blackzxy/HyperINF。
原文摘要 · Abstract (English)
Influence functions provide a principled method to assess the contribution of individual training samples to a specific target. Yet, their high computational costs limit their applications on large-scale models and datasets. Existing methods proposed for influence function approximation have significantly reduced the computational overheads. However, they mostly suffer from inaccurate estimation due to the lack of strong convergence guarantees from the algorithm. The family of hyperpower methods are well-known for their rigorous convergence guarantees on matrix inverse approximation, while the matrix multiplication operation can involve intractable memory and computation costs on large-scale models. We propose HyperINF, an efficient and accurate influence function approximation method which leverages the hyperpower method, specifically Schulz's iterative algorithm. To deal with the computation-intensive matrix multiplication, we incorporate the generalized fisher information (GFIM) as a low-rank approximation of the Hessian matrix, which reduces the memory and computation overheads to constant costs independent of ranks on LoRA-tuned models. We first demonstrate the superior accuracy and stability of HyperINF compared to other baselines through a synthetic convergence simulation for matrix inversion. We further validate the efficacy of HyperINF through extensive real-world data attribution tasks, including mislabeled data detection and data selection for LLM and VLM fine-tuning. On LoRA-tuned models, HyperINF achieves superior downstream performance with minimal memory and computational overhead, while other baselines suffer from significant degradation. Our codebase is available at https://github.com/Blackzxy/HyperINF.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。