Skip to main content
QUICK REVIEW

[論文レビュー] Not All Language Model Features Are One-Dimensionally Linear

Joshua Engels, Eric J. Michaud|arXiv (Cornell University)|May 23, 2024
Natural Language Processing TechniquesComputer Science被引用数 3
ひとこと要約

この論文は、言語モデルにおける線形表現仮説に挑戦し、特に週の曜日や月の名前といった周期的概念のための円形表現が、本質的に多次元的で還元不能であることを示している。スパース自己オートエンコーダーを用いて、GPT-2 および Mistral 7B でこれらの特徴を同定・検証し、Llama 3 8B および Mistral 7B におけるモジュラ加法のタスクを解くために不可欠であることを介入実験で示している。

ABSTRACT

Recent work has proposed that language models perform computation by manipulating one-dimensional representations of concepts ("features") in activation space. In contrast, we explore whether some language model representations may be inherently multi-dimensional. We begin by developing a rigorous definition of irreducible multi-dimensional features based on whether they can be decomposed into either independent or non-co-occurring lower-dimensional features. Motivated by these definitions, we design a scalable method that uses sparse autoencoders to automatically find multi-dimensional features in GPT-2 and Mistral 7B. These auto-discovered features include strikingly interpretable examples, e.g. circular features representing days of the week and months of the year. We identify tasks where these exact circles are used to solve computational problems involving modular arithmetic in days of the week and months of the year. Next, we provide evidence that these circular features are indeed the fundamental unit of computation in these tasks with intervention experiments on Mistral 7B and Llama 3 8B, and we examine the continuity of the days of the week feature in Mistral 7B. Overall, our work argues that understanding multi-dimensional features is necessary to mechanistically decompose some model behaviors.

研究の動機と目的

  • すべての言語モデル特徴が一次元的であると仮定する線形表現仮説に挑戦すること。
  • 特に円形多様体を含む、還元不能な多次元的特徴を定義・同定すること。
  • このような特徴が単なるアーティファクトではなく、モジュラ加法タスクに不可欠な計算ユニットであることを示すこと。
  • スパース自己オートエンコーダーを用いたスケーラブルな手法を開発し、多次元的特徴を発見すること。
  • 介入実験を通じて、円形特徴が曜日や月に関するモジュラ加法タスクを解くために本質的であることを検証すること。

提案手法

  • 独立的または同時に発現しない低次元特徴に分解できない、非分解性に基づく還元不能な多次元的特徴の形式的定義を提唱すること。
  • GPT-2 および Mistral 7B の活性化空間において、多次元的特徴を自動的に発見するためのスケーラブルな手法を、スパース自己オートエンコーダー(SAEs)を用いて設計すること。
  • SAE辞書要素のクラスタリングを適用し、週の曜日や月の名前といった周期的概念を表す円形多様体を同定すること。
  • モデルの挙動を調査し、特徴の使用をテストするため、曜日のモジュラ加法および月のモジュラ加法の2つのタスクを構築すること。
  • 活性化パッチワークと EVR(説明される分散比)を用いて、Mistral 7B および Llama 3 8B における介入実験を実施し、特徴の寄与度を評価すること。
  • 繰り返し分解による隠れ状態の分解を実行し、モデルの内部計算に解釈可能な円形表現が存在することを明らかにすること。
Figure 1: Circular representations of days of the week, months of the year, and years of the 20th century in layer 7 of GPT-2-small. These representations were discovered via clustering SAE dictionary elements, described in Section 4 . Points are colored according to the token which created the repr
Figure 1: Circular representations of days of the week, months of the year, and years of the 20th century in layer 7 of GPT-2-small. These representations were discovered via clustering SAE dictionary elements, described in Section 4 . Points are colored according to the token which created the repr

実験結果

リサーチクエスチョン

  • RQ1言語モデルは、週の曜日や月の名前といった周期的概念を表現するために、還元不能な多次元的特徴(たとえば円形多様体)を用いることができるか?
  • RQ2これらの円形特徴は、モジュラ加法タスクを解くために不可欠なものであり、余分な表現ではないか?
  • RQ3介入実験は、円形特徴がモジュラ加法タスクにおける主な計算ユニットであることを確認できるか?
  • RQ4スパース自己オートエンコーダーは、大規模言語モデルにおけるこのような多次元的特徴を信頼性高く発見・分離できるか?
  • RQ5LLM の隠れ状態は、周期的データのための円形表現を含む解釈可能なコンポーネントに分解可能か?

主な発見

  • スパース自己オートエンコーダーを用いて、GPT-2-small および Mistral 7B で、曜日や月の名前の円形表現を同定した。円周上の点は特定のトークンに対応している。
  • Mistral 7B および Llama 3 8B における介入実験から、円形特徴がモジュラ加法タスクを解くために不可欠であることが示された。特徴を除去または破壊すると性能が著しく低下した。
  • EVR解析により、説明変数に円形特徴 γ を追加したことで、重要な層での説明される分散が約 0.7 から約 0.99 に上昇し、高い説明力を持つことが確認された。
  • アテンションヘッドは円形特徴 γ を計算または伝搬しておらず、層 25 未満では γ を説明関数に追加しても分散の説明に追加の寄与がなかった。
  • モデルは層 20 から 25 の MLP ブロックで γ を計算しており、介入効果が最も顕著に観察された。これにより、MLP が主な計算源であることが確認された。
  • 隠れ状態の分解から、モデル内部の曜日および月の表現が一貫性のある円形多様体を形成していることが明らかになり、多次元的計算の存在を支持する結果となった。
(a) Testing $S({\mathbf{a}})$ and $M_{\epsilon}({\mathbf{a}})$ on a reducible feature ${\mathbf{a}}$ .
(a) Testing $S({\mathbf{a}})$ and $M_{\epsilon}({\mathbf{a}})$ on a reducible feature ${\mathbf{a}}$ .

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。