Evaluating and Designing Sparse Autoencoders by Approximating Quasi-Orthogonality

要約

スパースオートエンコーダー(SAE)は、現代の機械的解釈可能性の主力として登場していますが、$ $ k $スタイルのアクティベーション関数を使用して主要なSAEアプローチは、ハイパーパラメーター$ k $を選択するための理論的根拠に欠けています。
SAEは、線形表現仮説(LRH)に基づいており、大規模な言語モデル(LLM)の表現が線形エンコードされていると仮定し、重ね合わせ仮説(SH)は、その次元よりもモデルに多くの特徴がある可能性があると述べています。
LRHとSHの正式な定義に基づいて、スパース特徴ベクトルの大きさ(LLMSの密な埋め込みのSAEによって学習された潜在表現)は、閉じた型誤差を持つ対応する濃いベクターを使用して近似できることを示します。
これを視覚化するために、ZFプロットを提案します。これは、LLM隠された埋め込みとSAE機能ベクターの間に以前は未知の関係を明らかにし、特定の入力に対して過剰または過剰に活性化される範囲の範囲の最初の経験的測定を行うことができます。
それに対応して、接地真実のスパース特徴ベクトルの大きさに近似し、入力とアクティベーション間のアライメントを評価するためにAFAから派生した新しい評価メトリックを提案する近似特徴アクティベーション(AFA)を導入します。
また、AFAを活用して、新しいSAEアーキテクチャであるTop-AFA SAEを導入し、次のSAEにつながります。(a)理論的正当性に沿っています。
(b)Sae Sparsity HyperParametersを調整する必要性を取り除きます。
最後に、HyperParameter $ K $を調整する必要なく、最先端のTOP-K SAEのトップAFA SAEが再建損失を達成できることを経験的に実証します。
私たちのコードは、https://github.com/sewoonglee/top-afa-saeで入手できます。

要約(オリジナル)

Sparse autoencoders (SAEs) have emerged as a workhorse of modern mechanistic interpretability, but leading SAE approaches with top-$k$ style activation functions lack theoretical grounding for selecting the hyperparameter $k$. SAEs are based on the linear representation hypothesis (LRH), which assumes that the representations of large language models (LLMs) are linearly encoded, and the superposition hypothesis (SH), which states that there can be more features in the model than its dimensionality. We show that, based on the formal definitions of the LRH and SH, the magnitude of sparse feature vectors (the latent representations learned by SAEs of the dense embeddings of LLMs) can be approximated using their corresponding dense vector with a closed-form error bound. To visualize this, we propose the ZF plot, which reveals a previously unknown relationship between LLM hidden embeddings and SAE feature vectors, allowing us to make the first empirical measurement of the extent to which feature vectors of pre-trained SAEs are over- or under-activated for a given input. Correspondingly, we introduce Approximate Feature Activation (AFA), which approximates the magnitude of the ground-truth sparse feature vector, and propose a new evaluation metric derived from AFA to assess the alignment between inputs and activations. We also leverage AFA to introduce a novel SAE architecture, the top-AFA SAE, leading to SAEs that: (a) are more in line with theoretical justifications; and (b) obviate the need to tune SAE sparsity hyperparameters. Finally, we empirically demonstrate that top-AFA SAEs achieve reconstruction loss comparable to that of state-of-the-art top-k SAEs, without requiring the hyperparameter $k$ to be tuned. Our code is available at: https://github.com/SewoongLee/top-afa-sae.

arxiv情報

著者 Sewoong Lee,Adam Davies,Marc E. Canby,Julia Hockenmaier
発行日 2025-03-31 16:22:11+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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