Nodes/Concept Steer/Feature Atlas
ComfyUI Node

Feature Atlas

The health check and catalog your SAE has been missing

By Nynxz·Created 6 months ago·Updated 6 months ago· 4
Feature Atlas
    • atlas_path
    • summary
    • DIAGNOSTICS
    sae_path
    save_path/tmp/ComfyUI/custom_nodes/ComfyUI-ConceptSteer/sae/feature_atlas.json
    layer22
    sae_expansion8
    n_probe_prompts200
    n_redundancy_samples500
    dict_path
    encoder_path
    cached_activations_path
    max_cached_vectors50000
    protect_existingtrue

    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.pt from 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_PATH env 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.
    CategoryConcept Steer/Research

    Inputs (11)

    NameTypeDefaultDescription
    sae_pathSTRINGPath to the trained SAE weights (.pt)
    save_pathSTRING/tmp/ComfyUI/custom_nodes/ComfyUI-ConceptSteer/sae/feature_atlas.jsonWhere to save the feature atlas JSON.
    layerINT221–36Transformer layer (must match SAE training)
    sae_expansionINT82–16SAE expansion factor (must match SAE training)
    n_probe_promptsINT20050–2000Number of prompts to probe features with. More = better coverage but slower. 200 is a good balance.
    n_redundancy_samplesINT500100–5000How many random feature pairs to check for redundancy. Higher = more thorough but slower.
    dict_pathSTRINGPath to existing feature dictionary JSON. If provided, labels are merged into the atlas.
    encoder_pathSTRINGPath to Qwen encoder safetensors (or set env var)
    cached_activations_pathSTRINGPath 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_vectorsINT500001000–500000Max vectors to sample from cached activations for firing analysis. Higher = more accurate but slower. 50K is a good balance for 20K features.
    protect_existingBOOLEANtrueIf the save path already exists, auto-rename to _v2, _v3, … instead of overwriting. Disable only when intentionally replacing.

    Outputs (3)

    NameTypeDescription
    atlas_pathSTRING
    summarySTRING
    DIAGNOSTICSIMAGE