sparse-autoencoder-training

Train sparse autoencoders on TransformerLens activations with SAELens and PyTorch.

Updated Feb 15, 2026
One-click install
npx skills add https://github.com/ricable/mcai --skill sparse-autoencoder-training-ricable
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparse-autoencoder-training
Source: https://github.com/ricable/mcai/tree/main/.agents/skills/sparse-autoencoder-training
Command: npx skills add https://github.com/ricable/mcai --skill sparse-autoencoder-training-ricable

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you decompose dense neural network activations into sparse, human-interpretable features so you can understand what a language model has learned, where concepts overlap, and how representations are encoded.

Core Features & Use Cases

  • Pretrained SAE analysis: Load existing Sparse Autoencoders and inspect which features activate on specific prompts or tokens.
  • Custom SAE training: Configure and train new SAEs with sparsity penalties, expansion factors, warmup schedules, and dead-feature mitigation.
  • Feature interpretation and steering: Attribute predictions to individual features, ablate features, or steer model behavior using decoder directions.
  • Research workflows: Support mechanistic interpretability studies on superposition, monosemanticity, and safety-relevant internal features.

Quick Start

Ask the skill to load a pretrained SAE for a chosen model layer and summarize the top activating features for a 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 uncover interpretable features in model activations?

To train sparse autoencoders, you configure sparsity penalties, expansion factors, and warmup schedules to decompose dense neural network activations into sparse, human-interpretable features. This process also requires mitigating dead features and monitoring reconstruction quality.

How does mechanistic interpretability use sparse autoencoders for feature discovery?

Mechanistic interpretability uses sparse autoencoders for feature discovery by decomposing dense activations into interpretable components. This allows researchers to analyze superposition, identify monosemantic features, and understand how representations are encoded within language models.

Can I steer model behavior using decoder directions from a pretrained SAE?

Yes, you can steer model behavior using decoder directions extracted from a pretrained SAE. The workflow supports loading existing sparse autoencoders to ablate specific features, attribute predictions, and actively steer TransformerLens-backed language models.

Does this workflow require SAELens and TransformerLens for custom SAE training?

Yes, custom SAE training requires SAELens and TransformerLens alongside PyTorch. This stack provides the necessary support for encoding activations, decoding reconstructions, managing sparsity regularization, and analyzing feature activations across language models.

What is the best way to analyze which SAE features activate on specific prompts?

The best way to analyze SAE feature activations is to load a pretrained sparse autoencoder for a chosen model layer and summarize the top activating features for your specific prompt. This allows direct inspection of interpretable components within the model.

Why do I need dead-feature mitigation when training sparse autoencoders?

You need dead-feature mitigation when training sparse autoencoders to prevent features from becoming permanently inactive during sparsity regularization. Managing dead features alongside warmup schedules ensures high reconstruction quality and effective feature discovery.