{"id":42269342,"url":"https://github.com/kundajelab/fastism","last_synced_at":"2026-01-27T07:11:46.468Z","repository":{"id":44148985,"uuid":"285516463","full_name":"kundajelab/fastISM","owner":"kundajelab","description":"In-silico Saturation Mutagenesis implementation with 10x or more speedup for certain architectures. ","archived":false,"fork":false,"pushed_at":"2022-06-18T04:40:24.000Z","size":6225,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T10:27:20.566Z","etag":null,"topics":["cnn","genomics","interpretability","interpretable-deep-learning","ism"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kundajelab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-06T08:28:20.000Z","updated_at":"2024-11-06T14:38:38.000Z","dependencies_parsed_at":"2022-09-03T13:02:16.577Z","dependency_job_id":null,"html_url":"https://github.com/kundajelab/fastISM","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/kundajelab/fastISM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kundajelab%2FfastISM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kundajelab%2FfastISM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kundajelab%2FfastISM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kundajelab%2FfastISM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kundajelab","download_url":"https://codeload.github.com/kundajelab/fastISM/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kundajelab%2FfastISM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28807526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T06:25:51.065Z","status":"ssl_error","status_checked_at":"2026-01-27T06:25:50.640Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cnn","genomics","interpretability","interpretable-deep-learning","ism"],"created_at":"2026-01-27T07:11:45.814Z","updated_at":"2026-01-27T07:11:46.463Z","avatar_url":"https://github.com/kundajelab.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://github.com/kundajelab/fastISM/raw/docs/images/logo.jpeg)](https://github.com/kundajelab/fastISM)\n\n[![](https://img.shields.io/pypi/v/fastism.svg)](https://pypi.org/project/fastism/) [![](https://readthedocs.org/projects/fastism/badge/?version=latest)](https://fastism.readthedocs.io/en/latest/?badge=latest)\n\n# Quickstart\n\nA Keras implementation for fast in-silico saturated mutagenesis (ISM) for convolution-based architectures. It speeds up ISM by 10x or more by restricting computation to those regions of each layer that are affected by a mutation in the input.\n\n## Installation\n\nCurrently, fastISM is available to download from PyPI. Bioconda support is expected to be added in the future. fastISM requires TensorFlow 2.3.0 or above.\n```bash\npip install fastism\n```\n\n## Usage\n\nfastISM provides a simple interface that takes as input Keras models. For any Keras ``model`` that takes in sequence as input of dimensions `(B, S, C)`, where\n- `B`: batch size\n- `S`: sequence length\n- `C`: number of characters in vocabulary (e.g. 4 for DNA/RNA, 20 for proteins)\n\nPerform ISM as follows:\n\n```python\nfrom fastism import FastISM\n\nfast_ism_model = FastISM(model)\n\nfor seq_batch in sequences:\n    # seq_batch has dim (B, S, C)\n    ism_seq_batch = fast_ism_model(seq_batch)\n    # ism_seq_batch has dim (B, S, num_outputs) \n```\n\nfastISM does a check for correctness when the model is initialised, which may take a few seconds depending on the size of your model. This ensures that the outputs of the model match that of an unoptimised implementation. You can turn it off as `FastISM(model, test_correctness=False)`. fastISM also supports introducing specific mutations, mutating different ranges of the input sequence, and models with multiple outputs. Check the [Examples](https://fastism.readthedocs.io/en/latest/examples.html) section of the documentation for more details. An executable tutorial is available on [Colab](https://colab.research.google.com/github/kundajelab/fastISM/blob/master/notebooks/colab/DeepSEA.ipynb).\n\n## Benchmark\nYou can estimate the speedup obtained by comparing with a naive implementation of ISM.\n```python\n# Test this code as is\n\u003e\u003e\u003e from fastism import FastISM, NaiveISM\n\u003e\u003e\u003e from fastism.models.basset import basset_model\n\u003e\u003e\u003e import tensorflow as tf\n\u003e\u003e\u003e import numpy as np\n\u003e\u003e\u003e from time import time\n\n\u003e\u003e\u003e model = basset_model(seqlen=1000)\n\u003e\u003e\u003e naive_ism_model = NaiveISM(model)\n\u003e\u003e\u003e fast_ism_model = FastISM(model)\n\n\u003e\u003e\u003e def time_ism(m, x):\n        t = time()\n        o = m(x)\n        print(time()-t)\n        return o\n\n\u003e\u003e\u003e x = tf.random.uniform((1024, 1000, 4),\n                          dtype=model.input.dtype)\n\n\u003e\u003e\u003e naive_out = time_ism(naive_ism_model, x)\n144.013728\n\u003e\u003e\u003e fast_out = time_ism(fast_ism_model, x)\n13.894407\n\u003e\u003e\u003e np.allclose(naive_out, fast_out, atol=1e-6) \nTrue\n\u003e\u003e\u003e np.allclose(fast_out, naive_out, atol=1e-6) \nTrue # np.allclose is not symmetric\n```\n\nSee `notebooks/ISMBenchmark.ipynb` for benchmarking code that accounts for initial warm-up.\n\n## Getting Help\nfastISM supports the most commonly used subset of Keras for biological sequence-based models. Occasionally, you may find that some of the layers used in your model are not supported by fastISM. Refer to the [Supported Layers](https://fastism.readthedocs.io/en/latest/layers.html) section in Documentation for instructions on how to incorporate custom layers. In a few cases, the fastISM model may fail correctness checks, indicating there are likely some issues in the fastISM code. In such cases or any other bugs, feel free to reach out to the author by posting an [Issue](https://github.com/kundajelab/fastISM/issues) on GitHub along with your architecture, and we'll try to work out a solution!\n\n## Citation\nfastISM: Performant *in-silico* saturation mutagenesis for convolutional neural networks; Surag Nair, Avanti Shrikumar*, Jacob Schreiber*, Anshul Kundaje (Bioinformatics 2022)\n[http://doi.org/10.1093/bioinformatics/btac135](http://doi.org/10.1093/bioinformatics/btac135). \n\n\\*equal contribtion \n\nPreprint available on bioRxiv.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkundajelab%2Ffastism","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkundajelab%2Ffastism","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkundajelab%2Ffastism/lists"}