sparse-autoencoder-training

Train and analyze Sparse Autoencoders with SAELens to decompose neural activations into sparse features.

Updated May 4, 2026
One-click install
npx skills add https://github.com/JamesFincher/gengar --skill sparse-autoencoder-training-jamesfincher
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparse-autoencoder-training
Source: https://github.com/JamesFincher/gengar/tree/main/optional-skills/mlops/saelens
Command: npx skills add https://github.com/JamesFincher/gengar --skill sparse-autoencoder-training-jamesfincher

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you train and analyze Sparse Autoencoders to turn dense neural activations into sparse, more interpretable features.

Core Features & Use Cases

  • Mechanistic feature discovery: find candidate monosemantic/interpretable features from model activations (e.g., via top-activating features per token).
  • SAE training recipes: configure training runs with sparsity control (L1 coefficient, warmup/ghost grads) and evaluate metrics like reconstruction quality.
  • Feature analysis & interventions: compute feature attribution and perform feature steering/ablation using SAE directions in the residual stream.

Example use case: you want to discover which sparse features in a specific layer explain “Paris” predictions, then test importance by steering or ablation.

Quick Start

Use the sparse-autoencoder-training skill to analyze and train SAEs for GPT-style models by loading a pretrained SAE, encoding activations into sparse features, and evaluating reconstruction and interpretability metrics.

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 activations?

You train sparse autoencoders by configuring sparsity objectives like L1 coefficients to decompose dense neural activations into sparse interpretable features, evaluating reconstruction quality and feature monosemanticity across transformer layers.

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

Mechanistic interpretability analyzes model internals, and sparse autoencoders enable feature discovery by decomposing dense activations into sparse interpretable features, revealing monosemantic representations within transformer layers.

Can I use SAELens to perform feature steering and ablation on GPT-style models?

Yes, SAELens supports feature steering and ablation by injecting or removing SAE directions in the residual stream of GPT-style models to test how specific sparse features influence predictions.

How do I evaluate reconstruction quality when training sparse autoencoders?

You evaluate sparse autoencoder reconstruction quality by measuring encoding and decoding pipelines against original activations, balancing reconstruction loss with sparsity penalties like L1 coefficient to ensure interpretable feature retention.

What are ghost grads and how do they affect sparse autoencoder training?

Ghost grads are a warmup mechanism in sparse autoencoder training that stabilizes sparsity objectives by resuscitating dead features, ensuring the encoding pipeline maintains reconstruction quality without losing interpretability.

Does sparse autoencoder training work with TransformerLens for superposition analysis?

Yes, sparse autoencoder training integrates with TransformerLens to load GPT-style models and analyze superposition by extracting residual stream activations for encoding into sparse interpretable features.