Skip to main content
QUICK REVIEW

[論文レビュー] Opening the AI black box: program synthesis via mechanistic interpretability

Eric J. Michaud, Isaac Liao|arXiv (Cornell University)|Feb 7, 2024
Evolutionary Algorithms and Applications被引用数 4
ひとこと要約

この論文では、機械的解釈可能性を用いてニューラルネットワーク方策を逆引きし、解釈可能なPythonコードに変換する完全自動のプログラム合成手法MIPSを紹介する。RNNの隠れ状態を離散的整数またはビット表現に変換し、記号的回帰を適用することで、人為的にコーディングされた例に依存せずに学習済みのアルゴリズムを要約する。62のアルゴリズム的タスクのうち32つを解決し、そのうち13つはGPT-4でも解けない。これは、LLMベースのコード生成とは対照的にスケーラブルで解釈可能な代替手法であることを示している。

ABSTRACT

We present MIPS, a novel method for program synthesis based on automated mechanistic interpretability of neural networks trained to perform the desired task, auto-distilling the learned algorithm into Python code. We test MIPS on a benchmark of 62 algorithmic tasks that can be learned by an RNN and find it highly complementary to GPT-4: MIPS solves 32 of them, including 13 that are not solved by GPT-4 (which also solves 30). MIPS uses an integer autoencoder to convert the RNN into a finite state machine, then applies Boolean or integer symbolic regression to capture the learned algorithm. As opposed to large language models, this program synthesis technique makes no use of (and is therefore not limited by) human training data such as algorithms and code from GitHub. We discuss opportunities and challenges for scaling up this approach to make machine-learned models more interpretable and trustworthy.

研究の動機と目的

  • 訓練済みのニューラルネットワークから解釈可能で記号的なプログラムを抽出する完全自動の手法を開発すること。
  • 大規模言語モデル(LLM)のプログラム合成における限界を克服し、人為的に書かれたコードや例に依存しないこと。
  • 自動的な機械的解釈可能性を用いて、機械学習モデルの信頼性と解釈可能性を向上させること。
  • 自動解釈可能性が、アルゴリズム的推論タスクにおける実用的プログラム合成にスケーラブルに適用可能かどうかを検証すること。
  • ブラックボックスなニューラルネットワーク方策の代替として、検証可能で記号的な代替手段を提供すること。

提案手法

  • アルゴリズム的タスクを解くために、順方向伝播更新および出力関数を備えた再帰的ニューラルネットワーク(RNN)を訓練する。
  • 整数オートエンコーダを用いて、訓練済みRNNを簡略化し、隠れ状態の離散的・有限状態表現を抽出する。
  • 簡略化されたネットワークから、隠れ表現における離散的状態遷移を特定することで有限状態機械を抽出する。
  • 記号的回帰(論理的または整数的)を適用し、入力、隠れ状態、出力の間の正確な数学的または論理的関係を同定する。
  • 記号的関係から人間が読めるPythonコードを生成し、Dafnyを用いた形式的検証により正しさを保証する。
  • 探索ベースのプログラム合成を回避するパイプラインを用い、代わりにニューラルネットワークの学習中にアルゴリズムを学習し、解釈可能性を用いて抽出する。
Figure 1: The pipeline of our program synthesis method. MIPS relies on discovering integer representations and bit representations of hidden states, which enable regression methods to figure out the exact symbolic relations between input, hidden, and output states.
Figure 1: The pipeline of our program synthesis method. MIPS relies on discovering integer representations and bit representations of hidden states, which enable regression methods to figure out the exact symbolic relations between input, hidden, and output states.

実験結果

リサーチクエスチョン

  • RQ1機械的解釈可能性を完全に自動化し、ニューラルネットワークから記号的プログラムを抽出できるか?
  • RQ2人為的にコーディングされた例を使用せずに、この自動化手法が大規模言語モデル(LLM)を上回るか、補完的であるか?
  • RQ3RNNが通常解くアルゴリズム的タスクのベンチマークにおいて、自動プログラム合成のパフォーマンスはいかがなものか?
  • RQ4離散的表現における記号的回帰は、学習済みニューラル表現から真のアルゴリズムをどれほど正確に回復できるか?
  • RQ5合成されたプログラムは形式的検証が可能で、安全性が求められる文脈でも信頼性を確保できるか?

主な発見

  • MIPSはベンチマークの62のアルゴリズム的タスクのうち32つで正しいPythonコードを合成し、プログラム合成における高い有効性を示した。
  • その32のタスクのうち13つはGPT-4でも解けなかったため、MIPSはLLMベースのアプローチを補完するものであることが示された。
  • RNNの隠れ状態を離散的整数およびビット表現に変換することで、真のアルゴリズムを高い忠実度で回復した。
  • Dafnyを用いた形式的検証により、合成されたビット加算プログラムの正しさが確認され、すべての有効な入力に対して期待される振る舞いと等価であることが証明された。
  • このアプローチは人為的に書かれたコードを一切使用せず、入出力ペアとニューラルネットワークの訓練のみに依存するため、スケーラブルで信頼性の高いものである。
  • 離散的表現における記号的回帰により、モジュロ算術や反復的物理シミュレーションなどの複雑な論理を正確に回復できた。
Figure 2: These hidden structures can be turned into discrete representations. Left: the hidden states for the bitstring addition task are seen to form four clusters, corresponding to 2 bits: the output bit and the carry bit. Right: the hidden states for the Sum_Last2 task are seen to form clusters
Figure 2: These hidden structures can be turned into discrete representations. Left: the hidden states for the bitstring addition task are seen to form four clusters, corresponding to 2 bits: the output bit and the carry bit. Right: the hidden states for the Sum_Last2 task are seen to form clusters

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

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

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

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