Studying Large Language Model Generalization with Influence Functions

要約

関連するリスクを理解し、軽減するために機械学習モデルの可視性を高めようとする場合、潜在的に貴重な証拠源となるのは、どのトレーニング サンプルが特定の動作に最も貢献しているかということです。
影響関数は、反事実に答えることを目的としています。つまり、特定のシーケンスがトレーニング セットに追加された場合、モデルのパラメーター (したがってその出力) はどのように変化するでしょうか?
影響関数は小規模モデルについては洞察をもたらしますが、逆ヘッセベクトル積 (IHVP) の計算が難しいため、大規模言語モデル (LLM) に拡張するのは困難です。
固有値補正クロネッカー因子近似曲率 (EK-FAC) 近似を使用して、影響関数を最大 520 億のパラメータを持つ LLM までスケールします。
私たちの実験では、IHVP の計算が桁違いに速いにもかかわらず、EK-FAC は従来の影響関数推定器と同様の精度を達成しました。
候補トレーニング シーケンスの勾配を計算するコストを削減するための 2 つのアルゴリズム手法、TF-IDF フィルタリングとクエリ バッチングを調査します。
私たちは、影響関数を使用して、影響パターンの希薄性、規模に応じた抽象化の増加、数学およびプログラミング能力、言語を超えた一般化、ロールプレイング行動など、LLM の一般化パターンを調査します。
一見洗練された形式の一般化が数多くあるにもかかわらず、キー フレーズの順序が反転すると、影響がほぼゼロに減衰するという驚くべき制限があることがわかりました。
全体として、影響関数は、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.

arxiv情報

著者 Roger Grosse,Juhan Bae,Cem Anil,Nelson Elhage,Alex Tamkin,Amirhossein Tajdini,Benoit Steiner,Dustin Li,Esin Durmus,Ethan Perez,Evan Hubinger,Kamilė Lukošiūtė,Karina Nguyen,Nicholas Joseph,Sam McCandlish,Jared Kaplan,Samuel R. Bowman
発行日 2023-08-07 04:47:42+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.LG, stat.ML パーマリンク