Feature Atlas
The health check and catalog your SAE has been missing
- atlas_path
- summary
- DIAGNOSTICS
You've trained an SAE. Now the honest question: is it actually any good? Feature Atlas is the node that answers it. It analyzes a trained SAE and builds a persistent feature atlas - decoder column statistics, firing patterns, co-occurrence clusters, redundancy analysis, and reconstruction-quality diagnostics including dead-feature counts. Run it once per SAE, keep the JSON, and you've got both a health report and a catalog that the rest of the research stack feeds on.
How it works
The node probes the SAE with n_probe_prompts prompts (and, if you provide it, real cached activations from training), computes per-feature statistics - how often each fires, how strong, how selective - then digs into structure: which features co-occur, which are redundant (firing together so consistently they're probably the same concept twice), and how well the SAE reconstructs its inputs. The diagnostics output is where you learn whether the SAE is healthy or whether you need to retrain with different hyperparameters.
The two data paths matter:
- Probe prompts only - gives you a decent picture, fast.
- cached_activations_path - point it at the activation cache from training (e.g.
sae/activations_layer22_500k.ptfrom the Train SAE node, which caches activations by default) and firing stats are computed from hundreds of thousands of real vectors instead of a couple hundred probes. The tooltip is blunt: this gives "much more accurate dead/alive feature counts." If you have the cache, use it.
The output atlas_path JSON feeds Feature Dashboard for browsing, and its labels enrich Feature Map. It also folds in an existing Feature Dictionary if you pass dict_path.
The inputs that matter
- sae_path - the trained SAE
.pt. - save_path - where the atlas JSON goes.
- layer / sae_expansion - must match SAE training.
- n_probe_prompts - 200 default; "more = better coverage but slower." A good balance per the tooltip.
- n_redundancy_samples - how many random feature pairs to check for redundancy. Higher = more thorough, slower.
- cached_activations_path / max_cached_vectors - the accuracy upgrade; 50K vectors is a good balance for 20K features.
- dict_path - merge existing feature dictionary labels into the atlas.
- encoder_path - Qwen safetensors or
QWEN_ENCODER_PATHenv var.
Outputs: atlas_path (STRING), summary (STRING), DIAGNOSTICS (IMAGE).
Installing
Pack-standard: ComfyUI Manager search "Concept Steer", or clone https://github.com/Nynxz/ComfyUI-ConceptSteer into custom_nodes/ and restart. Requires a trained SAE, transformers/safetensors, and Qwen VRAM (~10 GB) for probing.
Common gotchas
- The atlas is a snapshot, not a live view. Feature statistics are only valid for the SAE + layer + expansion + seed that produced them. Retrain, re-atlas.
- Don't skip the cached activations if you have them. Probe-only firing stats over ~200 prompts undercount rare features and can make healthy features look dead. The cache path exists precisely to fix that.
- Dead features aren't always a training failure. A handful is normal; a huge fraction means your L1 penalty was too high. The diagnostics tell you which situation you're in - that's the whole point of running this.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| sae_path | STRING | Path to the trained SAE weights (.pt) | |
| save_path | STRING | /tmp/ComfyUI/custom_nodes/ComfyUI-ConceptSteer/sae/feature_atlas.json | Where to save the feature atlas JSON. |
| layer | INT | 221–36 | Transformer layer (must match SAE training) |
| sae_expansion | INT | 82–16 | SAE expansion factor (must match SAE training) |
| n_probe_prompts | INT | 20050–2000 | Number of prompts to probe features with. More = better coverage but slower. 200 is a good balance. |
| n_redundancy_samples | INT | 500100–5000 | How many random feature pairs to check for redundancy. Higher = more thorough but slower. |
| dict_path | STRING | Path to existing feature dictionary JSON. If provided, labels are merged into the atlas. | |
| encoder_path | STRING | Path to Qwen encoder safetensors (or set env var) | |
| cached_activations_path | STRING | Path to cached activations .pt file from training (e.g. sae/activations_layer22_500k.pt). When provided, firing statistics are computed from these real activations instead of only probe prompts, giving much more accurate dead/alive feature counts. | |
| max_cached_vectors | INT | 500001000–500000 | Max vectors to sample from cached activations for firing analysis. Higher = more accurate but slower. 50K is a good balance for 20K features. |
| protect_existing | BOOLEAN | true | If the save path already exists, auto-rename to _v2, _v3, … instead of overwriting. Disable only when intentionally replacing. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| atlas_path | STRING | — |
| summary | STRING | — |
| DIAGNOSTICS | IMAGE | — |