sparse-autoencoder-training

Train Sparse Autoencoders with SAELens on transformer models and analyze learned features.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a structured workflow to train Sparse Autoencoders (SAEs) with SAELens on transformer models and analyze the resultant sparse features to improve model interpretability and feature discovery.

Core Features & Use Cases

  • Guided SAE training workflow: configure architecture (standard, gated, TopK), set sparsity controls, train, and evaluate reconstruction and interpretability.
  • Activation analysis and interpretation: inspect SAE features and relate them to model activations and outputs.
  • Use Case: Researchers can build interpretable feature directions to diagnose polysemantic activations in GPT-like models.

Quick Start

Train a Sparse Autoencoder with SAELens on a selected transformer and analyze the resulting sparse features.

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 on a transformer model for interpretability?

To train a sparse autoencoder, select a transformer model layer using TransformerLens, configure the SAE architecture, set sparsity controls, train the model, and validate feature quality through reconstruction metrics and interpretability checks.

What is the difference between standard, gated, and TopK sparse autoencoders?

Standard, gated, and TopK are SAE architectures that control sparsity differently. This workflow guides you through configuring each type to find interpretable feature directions and diagnose polysemantic activations in transformer models.

How do I fix dead features when training sparse autoencoders?

To fix dead features during sparse autoencoder training, apply the troubleshooting tips provided in the workflow, which address dead features and overfitting to help maintain feature quality and reconstruction fidelity.

Can I use SAELens with TransformerLens for activation analysis?

Yes, SAELens integrates with TransformerLens to inspect SAE features and relate them to model activations and outputs, enabling researchers to diagnose polysemantic activations in GPT-like models.

Why do I need sparse autoencoders for mechanistic interpretability?

Sparse autoencoders are needed for mechanistic interpretability because they decompose complex, polysemantic activations into distinct, interpretable feature directions, making it easier to understand the internal representations of transformer models.

How do I validate the quality of learned sparse features in an SAE?

You validate sparse feature quality by evaluating reconstruction metrics and performing interpretability checks on the trained SAE, ensuring the learned features accurately represent the model's activation patterns.