[논문 리뷰] Kronfluence: Influence Functions with Eigenvalue-corrected Kronecker-Factored Approximate Curvature
이 연구는 EK-FAC를 사용해 IHVP에 대해 대형 언어 모델(최대 52B 매개변수)까지 영향 함수의 규모를 확장하고, 기존 방법과의 정확도를 검증하며, LLM에서 일반화 패턴과 영향 분포를 분석한다.
When trying to gain better visibility into a machine learning model in order to understand and mitigate the associated risks, a potentially valuable source of evidence is: which training examples most contribute to a given behavior? Influence functions aim to answer a counterfactual: how would the model's parameters (and hence its outputs) change if a given sequence were added to the training set? While influence functions have produced insights for small models, they are difficult to scale to large language models (LLMs) due to the difficulty of computing an inverse-Hessian-vector product (IHVP). We use the Eigenvalue-corrected Kronecker-Factored Approximate Curvature (EK-FAC) approximation to scale influence functions up to LLMs with up to 52 billion parameters. In our experiments, EK-FAC achieves similar accuracy to traditional influence function estimators despite the IHVP computation being orders of magnitude faster. We investigate two algorithmic techniques to reduce the cost of computing gradients of candidate training sequences: TF-IDF filtering and query batching. We use influence functions to investigate the generalization patterns of LLMs, including the sparsity of the influence patterns, increasing abstraction with scale, math and programming abilities, cross-lingual generalization, and role-playing behavior. Despite many apparently sophisticated forms of generalization, we identify a surprising limitation: influences decay to near-zero when the order of key phrases is flipped. Overall, influence functions give us a powerful new tool for studying the generalization properties of LLMs.
연구 동기 및 목표
- 훈련 시퀀스가 영향 함수를 통해 대형 언어 모델에 어떤 영향을 미치는지 조사한다.
- EK-FAC를 사용하여 트랜스포머 LLMS의 영향 함수 계산을 최대 52B 매개변수까지 확장한다.
- 전통적인 IHVP 방법에 대한 빠르고 정확한 대안으로 EK-FAC를 검증한다.
- 희소성, 추상화, 암기, 다언어 일반화 등 LLM의 일반화 패턴을 분석한다.
- 대형 모델에서 어휘 순서화(word ordering)와 역할 연기(role-playing) 행동이 어떻게 나타나는지 살펴본다.
제안 방법
- IHVP 계산을 위한 해시안(Hessian)을 근사하기 위해 Eigenvalue-corrected Kronecker-Factored Approximate Curvature (EK-FAC)를 사용한다.
- 수렴하지 않거나 과매개변수화된 모델을 다루기 위해 proximal Bregman 응답 함수(PBRF) 형식을 채택한다.
- 여러 영향 질의 간에 그래디언트 계산을 공유하기 위해 쿼리 배치를 도입한다.
- 후보 훈련 시퀀스의 그래디언트 비용을 줄이기 위해 TF-IDF 필터링을 활용한다.
- 효율적인 G 인버스-벡터 곱을 위해 transformer/Multi-Layer Perceptron(MLP) 계층에 K-FAC를 적응시킨다.
- 네트워크 내의 영향력을 국소화하기 위해 층별 및 토큰별 기여 분석을 제공한다.
실험 결과
연구 질문
- RQ1전통적인 방법과 비교할 때 EK-FAC가 역 Hessian-벡터 곱을 얼마나 잘 근사하는가?
- RQ2대형 언어 모델에서 영향 점수의 분포 특성은 어떤가(예: 희소성, 꼬리 특성)?
- RQ3모델 규모가 커질수록 일반화 패턴은 어떻게 변화하는가(예: 추상화, 암기, 다언어 일반화, 역할 연기)?
- RQ4네트워크의 어디에 있는가(어떤 층에서) 영향력 있는 시퀀스가 집중되는지, 그리고 이것이 토큰 수준의 기여도와 어떤 관련이 있는가?
- RQ5단어 순서화와 모방 대 계획 수립이 특히 복잡한 행동에 대해 영향력 있는 시퀀스를 얼마나 설명하는가?
주요 결과
- EK-FAC는 전통적인 방법에 비해 IHVP 계산을 수십 배 빠르게 수행하면서도 경쟁력 있는 영향 추정치를 달성한다.
- 영향 분포는 무거운 꼬리를 가지며 몇몇 암기된 예시에 집중하기보다 많은 시퀀스에 걸쳐 확산된다.
- 더 큰 모델은 더 추상적인 수준에서 일반화하여 프로그래밍, 수학적 추론, 다언어 일반화와 같은 고급 기능을 가능하게 한다.
- 영향은 계층 전반에 대략 고르게 분포하며 중간 계층이 더 추상적인 패턴을 포착하고 상위/하위 계층은 토큰에 더 가까운 경향이 있다.
- 단어 순서는 영향에 결정적으로 영향을 미친다: 관련 구가 특정 순서로 나타날 때만(프롬프트가 완료 전에) 시퀀스가 모델에 영향을 준다.
- 역할 연기 행동은 주로 모방 기반인 것으로 보이며, 학습 데이터에서 유사한 행동의 예에 의해 좌우된다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.