sparse-autoencoder-training

Train Sparse Autoencoders to decompose neural network activations into interpretable features.

1|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/brittaniebuffiecsu/zerogravityclaw --skill sparse-autoencoder-training-brittaniebuffiecsu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparse-autoencoder-training
Source: https://github.com/brittaniebuffiecsu/zerogravityclaw/tree/main/src/hermes-core/optional-skills/mlops/saelens
Command: npx skills add https://github.com/brittaniebuffiecsu/zerogravityclaw --skill sparse-autoencoder-training-brittaniebuffiecsu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sae-lens>=6.0.0, transformer-lens>=2.0.0, torch>=2.0.0, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of interpretability in neural networks by providing a framework for decomposing dense activations into sparse, interpretable features using Sparse Autoencoders (SAEs).

Core Features & Use Cases

  • Sparse Autoencoder Training: Train SAEs to reconstruct neural network activations and identify interpretable features.
  • Feature Analysis: Analyze the contributions of features to model predictions and understand the underlying concepts.
  • Use Case: For a language model, use this Skill to discover which features are most predictive of certain tokens, such as 'Paris' in the context of 'The capital of France is Paris'.

Quick Start

Train a Sparse Autoencoder for the GPT-2 model on the "gpt2-small-res-jb" release and analyze the features for the "blocks.8.hook_resid_pre" layer.

Frequently Asked Questions about sparse-autoencoder-training

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decompose neural network activations into interpretable features?

To decompose neural network activations into interpretable features, you train Sparse Autoencoders (SAEs) on those activations to learn monosemantic representations. This process reconstructs the dense activations into sparse features, enabling feature discovery and improving model interpretability.

What is a sparse autoencoder used for in neural network interpretability?

A sparse autoencoder is used for neural network interpretability to break down dense model activations into sparse, interpretable features. By learning monosemantic representations, it allows you to perform feature discovery and understand which features predict specific tokens.

How do I train a sparse autoencoder using SAE Lens and Transformer Lens?

To train a sparse autoencoder using SAE Lens and Transformer Lens, you utilize the libraries to extract activations from a model like GPT-2. You then train the SAE on a specific layer, such as "blocks.8.hook_resid_pre", to reconstruct and analyze the learned interpretable features.

Can I analyze which features predict specific tokens like 'Paris' in a language model?

Yes, you can analyze which features predict specific tokens like 'Paris' in a language model. By training a sparse autoencoder, you can identify the interpretable features that are most predictive of certain tokens within their context, thus understanding the underlying concepts driving predictions.

Do I need PyTorch and specific libraries to train sparse autoencoders for feature discovery?

Yes, you need PyTorch and specific libraries including SAE Lens and Transformer Lens to train sparse autoencoders for feature discovery. These dependencies provide the necessary framework to extract activations and learn the sparse, interpretable representations from neural networks.