Skip to main content
QUICK REVIEW

[Paper Review] Kronfluence: Influence Functions with Eigenvalue-corrected Kronecker-Factored Approximate Curvature

Grosse, Roger, Bae, Juhan|arXiv (Cornell University)|Aug 7, 2023
Topic ModelingComputer Science24 citations
TL;DR

The paper scales influence functions to large language models (up to 52B params) using EK-FAC for IHVP, validates accuracy against traditional methods, and analyzes generalization patterns and influence distributions in LLMs.

ABSTRACT

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.

Motivation & Objective

  • Investigate how training sequences influence large language models via influence functions.
  • Scale influence-function computations to transformer LLMs up to 52B parameters using EK-FAC.
  • Validate EK-FAC as a fast, accurate alternative to traditional IHVP methods.
  • Analyze generalization patterns in LLMs, including sparsity, abstraction, memorization, and cross-lingual behavior.
  • Examine how word ordering and role-playing behaviors emerge in large models.

Proposed method

  • Use Eigenvalue-corrected Kronecker-Factored Approximate Curvature (EK-FAC) to approximate the Hessian for IHVP computations.
  • Adopt proximal Bregman response function (PBRF) formulation to handle non-converged or overparameterized models.
  • Introduce query batching to share gradient computations across multiple influence queries.
  • Employ TF-IDF filtering to reduce gradient-costs for candidate training sequences.
  • Adapt K-FAC to transformer/Multi-Layer Perceptron (MLP) layers for efficient G inverse-vector products.
  • Provide layer- and token-wise attribution analyses to localize influence within the network.

Experimental results

Research questions

  • RQ1How well does EK-FAC approximate the inverse-Hessian-vector product compared to traditional methods?
  • RQ2What are the distributional properties of influence scores in large language models (e.g., sparsity, tail behavior)?
  • RQ3How do generalization patterns evolve with model scale (e.g., abstraction, memorization, cross-lingual generalization, role-playing)?
  • RQ4Where in the network (which layers) do influential sequences concentrate, and how does this relate to token-level attributions?
  • RQ5To what extent do word-ordering and imitation vs. planning explain influential sequences, especially for complex behaviors?

Key findings

  • EK-FAC achieves competitive influence estimates with orders-of-magnitude faster IHVP computation than traditional methods.
  • Influence distributions are heavy-tailed and spread across many sequences rather than concentrating on a few memorized examples.
  • Larger models generalize at more abstract levels, enabling advanced capabilities like programming, math reasoning, and cross-lingual generalization.
  • Influence is roughly evenly distributed across layers, with middle layers capturing more abstract patterns and upper/lower layers closer to tokens.
  • Word ordering critically affects influence: sequences influence the model only when related phrases appear in a specific order (prompt before completion).
  • Role-playing behaviors appear to be largely imitation-based, driven by examples of similar behaviors in training data.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.