Skip to main content
QUICK REVIEW

[Paper Review] Transcoders Find Interpretable LLM Feature Circuits

Jacob Dunefsky, Philippe Chlenski|arXiv (Cornell University)|Jun 17, 2024
Natural Language Processing TechniquesComputer Science6 citations
TL;DR

The paper introduces transcoders as wide, sparsely-activating approximations of MLP sublayers that retain fidelity while enabling interpretable circuit analysis, outperforming sparse autoencoders (SAEs) in sparsity, faithfulness, and human interpretability across multiple model sizes.

ABSTRACT

A key goal in mechanistic interpretability is circuit analysis: finding sparse subgraphs of models corresponding to specific behaviors or capabilities. However, MLP sublayers make fine-grained circuit analysis on transformer-based language models difficult. In particular, interpretable features -- such as those found by sparse autoencoders (SAEs) -- are typically linear combinations of extremely many neurons, each with its own nonlinearity to account for. Circuit analysis in this setting thus either yields intractably large circuits or fails to disentangle local and global behavior. To address this we explore transcoders, which seek to faithfully approximate a densely activating MLP layer with a wider, sparsely-activating MLP layer. We introduce a novel method for using transcoders to perform weights-based circuit analysis through MLP sublayers. The resulting circuits neatly factorize into input-dependent and input-invariant terms. We then successfully train transcoders on language models with 120M, 410M, and 1.4B parameters, and find them to perform at least on par with SAEs in terms of sparsity, faithfulness, and human-interpretability. Finally, we apply transcoders to reverse-engineer unknown circuits in the model, and we obtain novel insights regarding the "greater-than circuit" in GPT2-small. Our results suggest that transcoders can prove effective in decomposing model computations involving MLPs into interpretable circuits. Code is available at https://github.com/jacobdunefsky/transcoder_circuits/.

Motivation & Objective

  • Motivate and enable fine-grained mechanistic interpretability of transformer MLP sublayers.
  • Develop transcoders that sparsely approximate MLP outputs with fidelity to the original computations.
  • Demonstrate that transcoder-based circuits separate input-dependent and input-invariant contributions.
  • Show that transcoders support new circuit-analysis methods and reverse-engineer unknown model circuits.
  • Provide tooling and empirical evidence across multiple model scales.

Proposed method

  • Define a transcoder as a wide ReLU MLP with one hidden layer that learns a sparse linear combination of feature vectors to approximate an MLP sublayer’s output.
  • Train transcoders with an L1 sparsity penalty on activations and a fidelity loss to match the original MLP sublayer’s output.
  • Compare transcoders to SAEs on interpretability, sparsity, and fidelity across GPT2-small, Pythia-410M, and Pythia-1.4B.
  • Develop a circuit-analysis method that decomposes attributions into input-dependent and input-invariant terms using transcoder connections.
  • Introduce de-embeddings to summarize input-invariant behavior and perform blind case studies to reverse-engineer features.
  • Apply the approach to analyze the GPT2-small greater-than circuit and other tasks.
Transcoders Find Interpretable LLM Feature Circuits

Experimental results

Research questions

  • RQ1Can transcoders provide a faithful yet sparse approximation of MLP sublayers across model sizes?
  • RQ2Do transcoder features yield interpretable patterns comparable to or better than SAEs?
  • RQ3Can transcoder-based circuit analysis separate input-dependent from input-invariant information?
  • RQ4What new insights into known circuits (e.g., GPT2-small greater-than circuit) can be gained via transcoder analysis?

Key findings

  • Transcoders achieve equal or better sparsity-faithfulness tradeoffs than SAEs across models up to 1.4B parameters.
  • Qualitative human-judged interpretability of transcoder features is comparable to SAEs, with some features deemed context-free.
  • The sparsity-accuracy Pareto fronts show transcoders often outperform SAEs, with larger gaps for bigger models.
  • A novel circuit-analysis method using transcoders yields factorization into input-invariant and input-dependent contributions for edges between features.
  • Blind case studies demonstrate reverse-engineering capabilities without viewing the actual triggering prompts.
  • In GPT2-small, transcoder analysis provides insights into the greater-than circuit consistent with prior neuronal analyses, while highlighting sparse, interpretable feature sets.
Transcoders Find Interpretable LLM Feature Circuits

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.