sparse-autoencoder-training

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

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

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?

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

Core Features & Use Cases

  • Pre-trained SAE loading and activation analysis: Identify which sparse features activate for specific inputs, measure sparsity, and validate reconstruction quality against original activations.
  • Custom SAE training workflow: Configure and train SAEs with sparsity-promoting loss (MSE reconstruction plus L1 feature penalty), including practical hyperparameters for controlling dead features and interpretability.
  • Feature-level interpretation and steering: Attribute model logits to individual SAE features and optionally steer generation by adding feature directions to the residual stream.

Use it for feature discovery, superposition/sparsity studies, monosemantic representation research, and mechanistic interpretability experiments on transformer activations.

Quick Start

Use the sparse-autoencoder-training skill to train and evaluate an SAE for a chosen transformer hook point using SAELens, then inspect top-activating features and reconstruction error.

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 a sparse autoencoder to find interpretable features in transformer activations?

To train a sparse autoencoder for feature discovery, configure an SAE with sparsity-promoting loss using MSE reconstruction plus an L1 feature penalty, then select hyperparameters to control dead features and interpretability at your chosen transformer hook point.

What is superposition and how do sparse autoencoders decompose neural network activations?

Superposition occurs when neural networks represent more features than dimensions by encoding features non-orthogonally. Sparse autoencoders decompose these dense activations into sparse, interpretable, monosemantic features by enforcing high sparsity through L1 regularization.

How can I use SAE features to steer language model generation?

You can steer language model generation by attributing model logits to individual SAE features, identifying target feature directions, and optionally adding those feature directions directly to the model's residual stream during inference.

Can I load pre-trained sparse autoencoders to analyze model activations without training from scratch?

Yes, you can load pre-trained SAEs to analyze model activations by measuring sparsity, identifying which sparse features activate for specific inputs, and validating reconstruction quality against the original transformer activations.

Do I need SAELens and TransformerLens to perform mechanistic interpretability experiments on language models?

Yes, SAELens and TransformerLens are required dependencies for configuring, training, and evaluating sparse autoencoders, allowing you to access transformer hook points and perform feature attribution workflows.

What evaluation metrics are used to measure sparse autoencoder reconstruction error?

Sparse autoencoder evaluation involves measuring reconstruction error between original activations and SAE outputs, checking sparsity levels of learned features, and tracking dead features to validate the quality of interpretable feature discovery.