Skip to main content
QUICK REVIEW

[論文レビュー] The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networks

Ziqian Zhong, Ziming Liu|arXiv (Cornell University)|Jun 30, 2023
Neural Networks and Applications被引用数 11
ひとこと要約

本論文は、モジュラー加算で訓練されたニューラルネットワークが、アーキテクチャとハイパーパラメータに応じて複数のアルゴリズム的戦略(Clock、Pizza など)を発見し、ニューラルネットワークの機械的解法におけるアルゴリズム的位相遷移を明らかにすることを示す。

ABSTRACT

Do neural networks, trained on well-understood algorithmic tasks, reliably rediscover known algorithms for solving those tasks? Several recent studies, on tasks ranging from group arithmetic to in-context linear regression, have suggested that the answer is yes. Using modular addition as a prototypical problem, we show that algorithm discovery in neural networks is sometimes more complex. Small changes to model hyperparameters and initializations can induce the discovery of qualitatively different algorithms from a fixed training set, and even parallel implementations of multiple such algorithms. Some networks trained to perform modular addition implement a familiar Clock algorithm; others implement a previously undescribed, less intuitive, but comprehensible procedure which we term the Pizza algorithm, or a variety of even more complex procedures. Our results show that even simple learning problems can admit a surprising diversity of solutions, motivating the development of new tools for characterizing the behavior of neural networks across their algorithmic phase space.

研究の動機と目的

  • ニューラルネットワークがアルゴリズム的タスクの単一の標準解を超えてアルゴリズムを発見する動機づけ。
  • Clock と Pizza アルゴリズムが、類似のアーキテクチャでも異なるハイパーパラメータ下で両方現れることを示す。
  • ネットワークが複数のアルゴリズム変種を並列にアンサンブルして頑健性を高められることを示す。
  • アルゴリズム空間の位相遷移を定量化し識別する指標を導入する。

提案手法

  • One-layer トランスフォーマーを attention あり/なしで訓練し、modular addition modulo p (p=59) を学習させる。
  • PCA 投影空間で学習された埋め込みを円として特徴づけ、Clock の挙動を識別する。
  • Clock と Pizza を区別する指標として、勾配対称性と距離不変性を定義・計算する。
  • 低次元サブスペース下での埋め込み表現を分析するための circle isolation を導入する。
  • アーキテクチャと新しい attention-rate パラメータを変化させ、Clock と Pizza の間のアルゴリズム的位相遷移をマッピングする。
Figure 1: Illustration of the Clock and the Pizza Algorithm.
Figure 1: Illustration of the Clock and the Pizza Algorithm.

実験結果

リサーチクエスチョン

  • RQ1モジュラー加算で訓練されたニューラルネットワークは、Clock のような馴染み深いアルゴリズムを再発見するのか、それとも条件が変わると別の戦略が生まれるのか。
  • RQ2実践的にはどのような機構(埋め込み、勾配)が Clock と Pizza を区別するのか。
  • RQ3アーキテクチャ(attention あり/なし)とハイパーパラメータは、学習されるアルゴリズムにどのような影響を与えるのか。
  • RQ4ネットワークは複数のアルゴリズム戦略をアンサンブルするのか、どのように検出・分析できるのか。

主な発見

  • Clock と Pizza は、類似のネットワークで両方有効なモジュラー加算の解法である。
  • attention なしのネットワーク(Clock-leaning)は勾配対称性と距離非依存の logits パターンを示し、Pizza に類似した挙動を示す。
  • Pizza アルゴリズムは埋め込みの平均化と絶対値演算に依存しており、logit パターンが a-b に依存する。
  • Clock アルゴリズムは円形埋め込みを使用し、a-b への依存がなく、Pizza は a-b への依存と logits に(|cos((a-b)/2)|) という追加要因を示す。
  • モデルの幅と attention 強度によって Clock と Pizza の間に鋭いアルゴリズム的位相遷移があり、アンサンブリングは入力全体に対する頑健性を示す。
Figure 2: Gradients on first six principal components of input embeddings. $(a,b,c)$ in the title stands for taking gradients on the output logit $c$ for input $(a,b)$ . x and y axes represent the gradients for embeddings of the first and the second token. The dashed line $y=x$ signals a symmetric g
Figure 2: Gradients on first six principal components of input embeddings. $(a,b,c)$ in the title stands for taking gradients on the output logit $c$ for input $(a,b)$ . x and y axes represent the gradients for embeddings of the first and the second token. The dashed line $y=x$ signals a symmetric g

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。