{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "biohub-esm--interpret-esmc-features-with-sparse-autoencoders",
 "repo": "Biohub/esm",
 "repo_url": "https://github.com/Biohub/esm",
 "repo_slug": "biohub-esm",
 "title": "Read which learned features a protein activates",
 "page_title": "How to read which learned features a protein activates with Esm",
 "summary": "Attach an ESMC sparse autoencoder and inspect the sparse feature activations for a sequence.",
 "who": "A researcher who wants to know what a protein model has learned about their sequence.",
 "problem": "Raw embeddings say nothing a human can read.",
 "outcome": "A sparse tensor of feature activations per layer you can map to the published feature descriptions.",
 "steps": [
  "Install the package with `pip install esm`",
  "Load ESMC with EsmcForMaskedLM.from_pretrained and the autoencoder with EsmcSaeModel.from_pretrained on biohub/ESMC-6B-sae-k64-codebook16384",
  "Call sae.initialize_layers([30, 60]) and model.add_sae_models with those layers, as in the README",
  "Run the model and read output.sae_outputs[\"layer60\"], which is a sparse coo tensor"
 ],
 "agent_prompt": "Using Biohub/esm, attach the ESMC-6B SAE to layers 30 and 60, run <my sequence> through it, and list the strongest sparse features with their shapes.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Advanced",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "The human readable feature descriptions in the README apply to the ESMC-6B-sae-layer60-k64-codebook16384 codebook, not every SAE variant.",
 "category": "Security and science",
 "tags": [
  "Security and science"
 ],
 "lang": "",
 "requirements": [
  "Python with pip; `pip install esm` is about 5.6 GB, of which about 4.6 GB is the CUDA build of torch",
  "A CUDA GPU for the local examples, which load models with device set to cuda",
  "A Biohub Platform API token if you use the hosted client instead of local weights"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/biohub-esm/interpret-esmc-features-with-sparse-autoencoders/",
 "md": "https://dedupedai.com/use-cases/biohub-esm/interpret-esmc-features-with-sparse-autoencoders/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/biohub-esm--interpret-esmc-features-with-sparse-autoencoders.json",
 "api_version": "v1"
}
