{"id":18436954,"url":"https://github.com/etowahadams/interprot","last_synced_at":"2025-04-06T07:13:26.285Z","repository":{"id":258766737,"uuid":"850099807","full_name":"etowahadams/interprot","owner":"etowahadams","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-01T18:27:08.000Z","size":3369,"stargazers_count":99,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T06:06:34.670Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://interprot.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/etowahadams.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-30T22:01:08.000Z","updated_at":"2025-03-06T01:30:08.000Z","dependencies_parsed_at":"2025-02-21T22:02:35.105Z","dependency_job_id":"137cf161-19ae-4232-9d7c-354b1bbb9680","html_url":"https://github.com/etowahadams/interprot","commit_stats":{"total_commits":300,"total_committers":5,"mean_commits":60.0,"dds":0.28,"last_synced_commit":"57da04ce6f8f597dc3c67ebb877978d8b1cae364"},"previous_names":["etowahadams/plm-interpretability","etowahadams/interprot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etowahadams%2Finterprot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etowahadams%2Finterprot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etowahadams%2Finterprot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etowahadams%2Finterprot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etowahadams","download_url":"https://codeload.github.com/etowahadams/interprot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445671,"owners_count":20939958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T06:13:14.946Z","updated_at":"2025-04-06T07:13:26.266Z","avatar_url":"https://github.com/etowahadams.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InterProt\n\nThis repo contains tools for interpreting protein language models using sparse autoencoders (SAEs). Our SAE visualizer is available at [interprot.com](https://interprot.com) and our SAE models weights are on [HuggingFace](https://huggingface.co/liambai/InterProt-ESM2-SAEs). For more information, check out our [preprint](https://www.biorxiv.org/content/10.1101/2025.02.06.636901v1).\n\n`viz` contains the frontend app for visualizing SAE features. `interprot` is a Python package for SAE training, evaluation, and interpretation.\n\n## Getting started with our SAEs\n\nCheck out this [demo notebook](./notebooks/sae_inference.ipynb) for SAE inference with a custom input sequence.\n\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/etowahadams/interprot/blob/main/notebooks/sae_inference.ipynb)\n\n## The visualizer\n\nThe visualizer is a React app with some RunPod serverless functions that serve our SAEs.\n\n### Running the visualizer locally\n\n```bash\ncd viz\npnpm install\npnpm run dev\n```\n\n### RunPod endpoints\n\nThe RunPod serverless functions live in their own repos:\n\n- SAE inference: https://github.com/liambai/sae-inference\n- SAE steering: https://github.com/liambai/sae-steering\n\n## Generating visualization files\n\nThe visualizer and several of our analysis scripts require the generation of files (also referred to as visualization files) which summarize each SAE latent. \n\n1. Generate the visualization files using `interprot/make_viz_files/__main__.py`\n2. Compute family specificity using `interprot/scripts/run_compute_family_specificity.py`\n2. Classify latents by activation pattern using `interprot/scripts/run_viz_file_analysis.py`. This will also\ncompute many more statistics about the latents.\n\nThe input sequences to the visualization file generation script can be found [here](https://drive.google.com/file/d/1JwVzxDAlgWNe0qoTKbUozvqBxwcmMebB/view?usp=sharing).\n\n\n## Running and developing the Python package\n\n### Setting up pre-commit\n\n```bash\npip install pre-commit\npre-commit install\n```\n\n### Building and running the Docker container\n\n```bash\ndocker compose build\ndocker compose run --rm interprot bash\n```\n\n## Linear probes\n\nWe find linear probes over SAE latents to be a powerful tool for uncovering interpretable features. Here's a [demo notebook](./notebooks/subcellular_localization_linear_probe.ipynb) on the subcellular localization classification task.\n\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/etowahadams/interprot/blob/main/notebooks/subcellular_localization_linear_probe.ipynb)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetowahadams%2Finterprot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetowahadams%2Finterprot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetowahadams%2Finterprot/lists"}