Residual Stream Analysis with Multi-Layer SAEs

要約

スパース オートエンコーダー (SAE) は、トランスフォーマー言語モデルの内部表現を解釈するための有望なアプローチです。
ただし、標準的な SAE は各トランスフォーマー層で個別にトレーニングされるため、層間で情報がどのように流れるかを研究するために使用することが困難になります。
この問題を解決するために、多層 SAE (MLSAE) を導入します。これは、すべての変換層からの残差ストリーム アクティベーション ベクトルで同時にトレーニングされる単一の SAE です。
残留ストリームは通常、レイヤー間で情報を保持するものとして理解されているため、複数のレイヤーでアクティブな個々の SAE 機能を見つけることが期待され、実際に見つかりました。
興味深いことに、単一の SAE 機能は異なるプロンプトに対して異なるレイヤーでアクティブになりますが、単一のプロンプトでは、単一の機能が単一レイヤーでアクティブになる可能性がはるかに高いことがわかります。
より大きな基礎となるモデルの場合、残差ストリーム内の隣接するレイヤー間のコサイン類似性がより高いことがわかり、複数のレイヤーでより多くの特徴がアクティブになることが予想されます。
これらの結果は、MLSAE が変圧器内の情報の流れを研究するための有望な方法であることを示しています。
MLSAE をトレーニングおよび分析するためのコードを https://github.com/tim-lawson/mlsae でリリースします。

要約(オリジナル)

Sparse autoencoders (SAEs) are a promising approach to interpreting the internal representations of transformer language models. However, standard SAEs are trained separately on each transformer layer, making it difficult to use them to study how information flows across layers. To solve this problem, we introduce the multi-layer SAE (MLSAE): a single SAE trained on the residual stream activation vectors from every transformer layer simultaneously. The residual stream is usually understood as preserving information across layers, so we expected to, and did, find individual SAE features that are active at multiple layers. Interestingly, while a single SAE feature is active at different layers for different prompts, for a single prompt, we find that a single feature is far more likely to be active at a single layer. For larger underlying models, we find that the cosine similarities between adjacent layers in the residual stream are higher, so we expect more features to be active at multiple layers. These results show that MLSAEs are a promising method to study information flow in transformers. We release our code to train and analyze MLSAEs at https://github.com/tim-lawson/mlsae.

arxiv情報

著者 Tim Lawson,Lucy Farnik,Conor Houghton,Laurence Aitchison
発行日 2024-09-06 11:01:55+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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