sparse-autoencoder-training

Train sparse autoencoders to decompose transformer activations into interpretable features.

1.0k|117|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/OpenLAIR/dr-claw --skill sparse-autoencoder-training-openlair
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparse-autoencoder-training
Source: https://github.com/OpenLAIR/dr-claw/tree/main/skills/mechanistic-interpretability/saelens
Command: npx skills add https://github.com/OpenLAIR/dr-claw --skill sparse-autoencoder-training-openlair

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sae-lens>=6.0.0, transformer-lens>=2.0.0, torch>=2.0.0, and includes references (resource) components.

What problem does it solve?

Sparse Autoencoders (SAEs) decompose dense neural activations into sparse, interpretable features, enabling researchers to analyze and visualize monosemantic representations in transformer models.

Core Features & Use Cases

  • Train Sparse Autoencoders (SAEs) on model activations to reveal interpretable features.
  • Analyze activations by encoding to sparse features and decoding back to reconstruct activations.
  • Use in mechanistic interpretability studies such as studying superposition, feature steering, and ablation.

Quick Start

Load a pretrained SAE and analyze the top activating features for a sample prompt.

Frequently Asked Questions about sparse-autoencoder-training

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train sparse autoencoders to decompose transformer activations into interpretable features?

Train sparse autoencoders by configuring LanguageModelSAERunnerConfig to decompose dense transformer activations into sparse, monosemantic interpretable features for mechanistic interpretability analysis. You can analyze polysemantic representations and superposition in models like GPT-2 and Gemma.

What are sparse autoencoders used for in mechanistic interpretability research?

Sparse autoencoders are used in mechanistic interpretability to decompose dense neural activations into sparse, interpretable features. They enable researchers to analyze monosemantic representations, study superposition, and perform feature steering and ablation experiments on transformer models.

Can I analyze pre-trained sparse autoencoders on GPT-2 and Gemma architectures?

Yes, you can load pre-trained sparse autoencoders to analyze model activations across architectures such as GPT-2 and Gemma. The skill supports encoding activations to sparse features and decoding back to reconstruct activations for evaluating feature quality.

How do I evaluate sparse autoencoder feature quality through steering and ablation?

Evaluate sparse autoencoder feature quality through analysis, steering, and ablation experiments. Encode model activations to sparse features and decode them back to reconstruct activations, allowing you to assess how well the autoencoder isolates interpretable monosemantic features.

Do I need TransformerLens and PyTorch to train sparse autoencoders for interpretability?

Yes, you need TransformerLens, PyTorch, and sae-lens installed. These dependencies provide the foundational framework for extracting transformer activations and configuring the sparse autoencoder training runner for mechanistic interpretability tasks.

When should I use sparse autoencoders instead of analyzing raw transformer activations directly?

Use sparse autoencoders when raw transformer activations are too polysemantic to interpret directly. They decompose dense activations into sparse, monosemantic features, making it easier to study superposition and isolate individual interpretable features for steering and ablation.