sparse-autoencoder-training

Train sparse autoencoders with SAELens to identify interpretable features in transformer activations.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/matthew-johnson/hermes-agent --skill sparse-autoencoder-training-matthew-johnson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparse-autoencoder-training
Source: https://github.com/matthew-johnson/hermes-agent/tree/main/optional-skills/mlops/saelens
Command: npx skills add https://github.com/matthew-johnson/hermes-agent --skill sparse-autoencoder-training-matthew-johnson

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

SAELens enables researchers and engineers to decompose neural activations into sparse, interpretable features using sparse autoencoders (SAEs), enabling mechanistic interpretability and auditability of transformer models.

Core Features & Use Cases

  • Train and analyze Sparse Autoencoders (SAEs) to compress dense activations into sparse feature representations for detection of monosemantic concepts.
  • Explore, diagnose, and steer model behavior by inspecting top activating features, performing ablations, and performing feature attribution across transformer layers.
  • Apply the SAELens workflow to research into polysemanticity, feature discovery, and safety-relevant activations; supports multiple SAE architectures (Standard, Gated, TopK, JumpReLU) and training configurations.

Quick Start

Train a Sparse Autoencoder on a GPT-2 activation stream using LanguageModelSAERunnerConfig and SAETrainingRunner to build interpretable feature representations.

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 find interpretable features in transformer models?

You can discover interpretable features by configuring LanguageModelSAERunnerConfig and running SAETrainingRunner from the SAELens toolchain on transformer activations. This workflow trains sparse autoencoders to decompose dense activations into sparse, monosemantic feature representations.

What is mechanistic interpretability and how do sparse autoencoders help with it?

Mechanistic interpretability audits transformer models by decomposing dense neural activations into sparse, interpretable features using sparse autoencoders. This addresses polysemanticity by isolating monosemantic concepts, enabling researchers to understand and steer internal model mechanisms safely.

Can I use different sparse autoencoder architectures with TransformerLens activations?

Yes, the SAELens toolchain supports multiple sparse autoencoder architectures including Standard, Gated, TopK, and JumpReLU variants for TransformerLens activations. You can configure these architectures via LanguageModelSAERunnerConfig to target different transformer layers.

Do I need Python 3.10 and TransformerLens configured before training sparse autoencoders?

Yes, you need Python 3.10 or higher along with TransformerLens and the SAELens training toolchain configured before training sparse autoencoders. These dependencies are required to run SAETrainingRunner and process model activations.

How do I steer model behavior after discovering monosemantic features in transformer layers?

Steer model behavior after discovering monosemantic features by performing ablations and feature attribution across transformer layers with SAELens. This allows you to diagnose and manipulate safety-relevant activations based on the trained sparse autoencoder representations.