sparse-autoencoder-training

Train and analyze Sparse Autoencoders on neural network activations using SAELens, TransformerLens, and PyTorch.

3|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/ihatesea69/HieuNghi-AI-Skills --skill sparse-autoencoder-training-ihatesea69
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparse-autoencoder-training
Source: https://github.com/ihatesea69/HieuNghi-AI-Skills/tree/main/airesearch_skills/04-mechanistic-interpretability/saelens
Command: npx skills add https://github.com/ihatesea69/HieuNghi-AI-Skills --skill sparse-autoencoder-training-ihatesea69

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the challenge of understanding complex neural network behavior by decomposing dense, polysemantic activations into sparse, interpretable features, making AI models more transparent.

Core Features & Use Cases

  • Feature Discovery: Identify and analyze interpretable concepts learned by models.
  • Superposition Analysis: Study how models represent multiple features within single neurons.
  • Model Steering: Manipulate model behavior by activating specific learned features.
  • Use Case: When investigating why a language model generates biased output, use this Skill to find and analyze the specific features in its activations that correlate with biased language.

Quick Start

Use the saelens skill to train a sparse autoencoder on gpt2-small activations.

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 on transformer model activations. This process maps dense, polysemantic representations into sparse, human-readable concepts to increase AI transparency.

What is the best way to train sparse autoencoders for mechanistic interpretability research?

The best way to train sparse autoencoders for mechanistic interpretability is using the SAELens library with TransformerLens and PyTorch. This stack facilitates feature discovery and superposition analysis by isolating specific concepts within model activations.

Can I analyze superposition in transformer models using SAELens?

Yes, you can analyze superposition in transformer models using SAELens. By training sparse autoencoders on model activations, you can study how networks represent multiple features within single neurons and isolate interpretable concepts.

Do I need PyTorch and TransformerLens to train sparse autoencoders on GPT-2 activations?

Yes, you need PyTorch, TransformerLens, and SAELens to train sparse autoencoders on GPT-2 activations. TransformerLens extracts the activations, while PyTorch and SAELens handle the sparse autoencoder training and feature visualization.

How does feature discovery help with model steering in neural networks?

Feature discovery helps with model steering by identifying specific interpretable concepts within activations. Once these features are discovered via sparse autoencoders, you can manipulate model behavior by directly activating or deactivating those learned features.