要約
言語モデルにおける因果生成メカニズムを理解し操作することは、言語モデルの振る舞いを制御するために不可欠である。これまでの研究では、これらのモデルに「介入」するために、主に表 現手術のような技術–例えば、モデルの切除や特定の概念に結びついた線形部分空間の操作–に頼ってきた。介入の影響を正確に理解するためには、例えば、与えられた文章が特定の介入後にモデルによって生成されていたらどのように現れたかを調べることが有効である。我々は、反事実推論は、Pearlの因果階層で明確にされているように、介入とは概念的に異なることを強調する。この観察に基づき、我々はGumbel counterfactual generationと呼ぶ、Gumbel-maxトリックを用いた構造方程式モデルとして言語モデルを再定式化することにより、真の文字列の反事実を生成するフレームワークを提案する。この再定式化により、元の文字列と、サンプリング・ノイズの同じインスタンス化から生じるその反事実に関する共同分布をモデル化することができる。我々は、潜在ノイズ変数を推論し、観測された文字列の反事実を生成することを可能にする、後知恵ガンベルサンプリングに基づくアルゴリズムを開発する。我々の実験は、このアプローチが意味のある反事実を生成することを示すと同時に、一般的に用いられる介入技法には望ましくない副作用がかなりあることを示す。
要約(オリジナル)
Understanding and manipulating the causal generation mechanisms in language models is essential for controlling their behavior. Previous work has primarily relied on techniques such as representation surgery — e.g., model ablations or manipulation of linear subspaces tied to specific concepts — to \emph{intervene} on these models. To understand the impact of interventions precisely, it is useful to examine \emph{counterfactuals} — e.g., how a given sentence would have appeared had it been generated by the model following a specific intervention. We highlight that counterfactual reasoning is conceptually distinct from interventions, as articulated in Pearl’s causal hierarchy. Based on this observation, we propose a framework for generating true string counterfactuals by reformulating language models as a structural equation model using the Gumbel-max trick, which we called Gumbel counterfactual generation. This reformulation allows us to model the joint distribution over original strings and their counterfactuals resulting from the same instantiation of the sampling noise. We develop an algorithm based on hindsight Gumbel sampling that allows us to infer the latent noise variables and generate counterfactuals of observed strings. Our experiments demonstrate that the approach produces meaningful counterfactuals while at the same time showing that commonly used intervention techniques have considerable undesired side effects.
arxiv情報
著者 | Shauli Ravfogel,Anej Svete,Vésteinn Snæbjarnarson,Ryan Cotterell |
発行日 | 2025-03-03 14:56:17+00:00 |
arxivサイト | arxiv_id(pdf) |