Scalable Multi-Stage Influence Function for Large Language Models via Eigenvalue-Corrected Kronecker-Factored Parameterization

Yuntai Bao, Xuhong Zhang, Tianyu Du, Xinkui Zhao, Jiang Zong +2 more
5/8/2025
cs.CL

Official code: colored-dye/multi_stage_influence_function (5 stars, MIT, last commit 2026-02-06).

Abstract

Pre-trained large language models (LLMs) are commonly fine-tuned to adapt to downstream tasks. Since the majority of knowledge is acquired during pre-training, attributing the predictions of fine-tuned LLMs to their pre-training data may provide valuable insights. Influence functions have been proposed as a means to explain model predictions based on training data. However, existing approaches fail to compute ``multi-stage'' influence and lack scalability to billion-scale LLMs. In this paper, we propose the multi-stage influence function to attribute the downstream predictions of fine-tuned LLMs to pre-training data under the full-parameter fine-tuning paradigm. To enhance the efficiency and practicality of our multi-stage influence function, we leverage Eigenvalue-corrected Kronecker-Factored (EK-FAC) parameterization for efficient approximation. Empirical results validate the superior scalability of EK-FAC approximation and the effectiveness of our multi-stage influence function. Additionally, case studies on a real-world LLM, dolly-v2-3b, demonstrate its interpretive power, with exemplars illustrating insights provided by multi-stage influence estimates. Our code is public at https://github.com/colored-dye/multi_stage_influence_function.

View on arXivView PDF

Code Implementations(1)

MIT

Code for "Scalable Multi-Stage Influence Function for Large Language Models via Eigenvalue-Corrected Kronecker-Factored Parameterization" (accepted by IJCAI 2025).

50Python, Jupyter NotebookMay 4, 20258 months agoMIT

Cite this paper

@article{bao2025scalable,
  title  = {Scalable Multi-Stage Influence Function for Large Language Models via Eigenvalue-Corrected Kronecker-Factored Parameterization},
  author = {Yuntai Bao and Xuhong Zhang and Tianyu Du and Xinkui Zhao and Jiang Zong and Hao Peng and Jianwei Yin},
  year   = {2025},
  eprint = {2505.05017},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.05017v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.05017.svg)](https://codeofpaper.com/paper/2505.05017)

Discussion