Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/zjunlp/mechanist/feature-dictionary-learningnpx skills add zjunlp/Mechanist --skill feature-dictionary-learninggit clone --depth 1 https://github.com/zjunlp/MechanistWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/zjunlp/mechanist/feature-dictionary-learning)<a href="https://agentmods.dev/skills/zjunlp/mechanist/feature-dictionary-learning"><img src="https://agentmods.dev/badge/skills/zjunlp/mechanist/feature-dictionary-learning.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00122 | $0.01405 |
| Opus 5 | $0.00061 | $0.00702 |
| Sonnet 5 | $0.00024 | $0.00281 |
| Haiku 4.5 | $0.00012 | $0.00140 |
Grade A, and why
Feature Dictionary Learning scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Advantage
- Towards monosemanticity: By forcing decompositions to be sparse, Feature Dictionary Learning recovers features that are more monosemantic than individual neurons — though not strictly so — making the resulting basis far better suited to interpretation, attribution, and steering than the model's native one.
- Computational efficiency: Although training the dictionary is resource-intensive, inference is cheap — encoding an activation is a single linear pass plus a non-linearity, and intervening on a feature reduces to scaling or zeroing its weight before reconstruction.
- Composability: This composability makes downstream tools — feature dashboards, circuit discovery via attribution graphs, and SAE-based steering — practical at LLM scale.
Limitation
- Reconstruction fidelity: The decomposition is only as faithful as the training data and reconstruction loss admit. Residual reconstruction error implicitly introduces an "error node" whose contribution must be tracked when making claims about full circuits.
- Dictionary quality issues: Dead features (never activated) and ultra-low-frequency features bloat the dictionary; dense or non-linearly encoded concepts split across many atoms (feature splitting) or get absorbed into a single atom (feature absorption).
- Site- and checkpoint-specificity: A dictionary trained on one model or one layer rarely transfers verbatim to another. The cost of training and storing a large over-complete dictionary per analyzed site is non-trivial.
Submethods
The three main forms below follow a progression of increasing scope — from a single activation site, to cross-site mappings, to cross-layer or cross-model analysis.
- Sparse Autoencoders (SAE):
The canonical instance: train an autoencoder on activations from a single site. The encoder maps an activation $\mathbf{a}$ to a sparse feature vector via $\mathbf{f}(\mathbf{a}) = \text{act}(\mathbf{W}_e \mathbf{a} + \mathbf{b}_e)$, where
actis typically ReLU (L1 penalty), top-k, or JumpReLU depending on the variant. The decoder then reconstructs $\hat{\mathbf{a}} = \mathbf{W}_d \mathbf{f}(\mathbf{a}) + \mathbf{b}_d$, with columns of $\mathbf{W}_d$ serving as the dictionary atoms. The per-token values in $\mathbf{f}(\mathbf{a})$ are the feature firings used for downstream interpretability. You can find a demo for this method in ./SAE. This demo shows saelens: Use this skill when working with Sparse Autoencoders (SAEs) for mechanistic interpretability of language models, including training SAEs, loading pre-trained SAEs, analyzing neural network features, or integrating SAEs with TransformerLens, HuggingFace Transformers, or other PyTorch-based models.
What ships with it
17 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- article_references.md 636 B
- crosscoder/article_references.md 164 B
- crosscoder/scripts/train_and_evaluate_sae.py 10 KB runs code
- crosscoder/scripts/train_sae_demo.py 9.7 KB runs code
- crosscoder/SKILL.md 23 KB
- ica-lens/article_references.md 154 B
- ica-lens/references/api_reference.md 8.9 KB
- ica-lens/scripts/artifact_variant_example.py 3.5 KB runs code
- ica-lens/scripts/explorer_app_usage.py 4.2 KB runs code
- ica-lens/SKILL.md 20 KB
- SAE/article_references.md 150 B
- SAE/SKILL.md 3.0 KB
- transcoder/article_references.md 130 B
- transcoder/references/api_reference.md 12 KB
- transcoder/scripts/train_transcoder_example.py 5.8 KB runs code
- transcoder/scripts/transcoder_usage_example.py 9.0 KB runs code
- transcoder/SKILL.md 22 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 37 lines · 122 tokens per session scan A 278602d3eee6
Feature Dictionary Learning is a skill published in the GitHub repository zjunlp/Mechanist (51 stars, last pushed 9d ago), licensed MIT. It adds 122 tokens to every session and 1,405 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
scienceworld-animal-identifier
Use when the agent needs to locate, identify, and focus on a specific animal or biological entity in the ScienceWorld environment. This skill handles tasks involving animal comparison, examination, or interaction (such as determining lifespan extremes) by navigating to the correct location with "teleport to"…
scienceworld-inventory-focus
Use when the agent needs to confirm and prepare a specific inventory item before using it in an experiment or task step. This "focus on [ITEM] in inventory" action verifies the correct item has been collected and signals intent, ensuring operational readiness for subsequent actions like measurement, combination, or…
nanoresearch-writing
Draft a LaTeX research paper from all previous stage outputs.
nanoresearch-experiment
Generate a Python code skeleton from an experiment blueprint.
nanoresearch-ideation
Search academic literature and generate research hypotheses.
scienceworld-circuit-builder
This skill constructs a simple electrical circuit by connecting components like batteries, wires, and light bulbs. Use when the agent needs to test electrical conductivity or create a functional circuit for an experiment. The input is a set of available components, and the output is a fully connected circuit ready for…