sparse-autoencoder-training

Train and analyze sparse autoencoders on transformer language model activations.

Updated May 14, 2026
One-click install
npx skills add https://github.com/SethyPagna/Secretary-Jarvis --skill sparse-autoencoder-training-sethypagna
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparse-autoencoder-training
Source: https://github.com/SethyPagna/Secretary-Jarvis/tree/main/src/capabilities/optional-skills/mlops/saelens
Command: npx skills add https://github.com/SethyPagna/Secretary-Jarvis --skill sparse-autoencoder-training-sethypagna

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Neural networks often hide meaningful concepts inside dense, hard-to-read activations. This Skill helps you decompose those activations into sparse, interpretable features so you can understand what a model has learned and why it behaves a certain way.

Core Features & Use Cases

  • Pre-trained SAE Analysis: Load existing Sparse Autoencoders and inspect which features activate for specific prompts or tokens.
  • Custom SAE Training: Configure and train a new SAE on transformer activations with sparsity controls, checkpointing, and evaluation metrics.
  • Feature Steering and Ablation: Test causal influence by amplifying or removing features to see how predictions change.
  • Concept Comparison: Compare activations across prompts to find features that consistently represent the same idea, such as location, sentiment, or syntax.

Quick Start

Use this skill to explain how to load a pre-trained SAE, train a custom SAE, and inspect the most important sparse features for a prompt you provide.

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

To train a sparse autoencoder on transformer activations, configure a custom SAE using PyTorch-compatible activation hooks with sparsity controls, checkpointing, and evaluation metrics to decompose dense activations into interpretable features.

How do I inspect which sparse autoencoder features activate for a specific prompt?

You can inspect which sparse autoencoder features activate for a specific prompt by loading a pre-trained SAE. This allows you to analyze and identify the most important sparse features representing concepts within your provided text tokens.

Can I use SAELens and TransformerLens for feature steering and ablation?

Yes, you can use SAELens and TransformerLens for feature steering and ablation. This workflow tests causal influence by amplifying or removing specific sparse features to observe how the transformer model's predictions change.

What is the best way to find features representing the same concept across different prompts?

The best way to find features representing the same concept across different prompts is cross-prompt comparison. This analyzes sparse autoencoder activations to locate features consistently representing specific ideas like location, sentiment, or syntax.

Do I need PyTorch activation hooks to analyze pre-trained sparse autoencoders?

Yes, you need PyTorch-compatible activation hooks to analyze pre-trained sparse autoencoders. These hooks encode, decode, reconstruct, and evaluate sparse features within transformer-based language models during inspection and attribution workflows.