Code Monkey home page Code Monkey logo

scrambler's Introduction

DOI

Scrambler Logo

Scrambler Neural Networks

Code for training Scrambler networks, an interpretation method for sequence-predictive models based on deep generative masking. The Scrambler learns to predict maximal-entropy PSSMs for a given input sequence such that downstream predictions are reconstructed (the "inclusion" objective). Alternatively, the Scrambler can be trained to output minimal-entropy PSSMs such that downstream predictions are distorted (the "occlusion" objective).

Scramblers were presented in a MLCB 2020* conference paper, "Efficient inference of nonlinear feature attributions with Scrambling Neural Networks".

*2nd Conference on Machine Learning in Computational Biology, (MLCB 2020), Online.

Contact jlinder2 (at) cs.washington.edu for any questions about the code.

Features

  • Efficient interpretation of sequence-predictive neural networks.
  • High-capacity interpreter based on ResNets.
  • Find multiple salient feature sets with mask dropout.
  • Separate maximally enhancing and repressive features.
  • Fine-tune interpretations with per-example optimization.
  • Supports multiple-input predictor architectures.

Installation

Install by cloning or forking the github repository:

git clone https://github.com/johli/scrambler.git
cd scrambler
python setup.py install

Required Packages

  • Tensorflow == 1.13.1
  • Keras == 2.2.4
  • Scipy >= 1.2.1
  • Numpy >= 1.16.2

Analysis Notebooks

The sub-folder analysis/ contains all the code used to produce the results of the paper.

Example Notebooks

The sub-folder examples/ contains a number of light-weight examples showing the basic usage of the Scrambler package functionality. The examples are listed below.

Images

Interpretating predictors for images.

Notebook 1: Interpreting MNIST Images

RNA

Interpretating predictors for RNA-regulatory biology.

Notebook 2a: Interpreting APA Sequences
Notebook 2b: Interpreting APA Sequences (Custom Loss)
Notebook 3a: Interpreting 5' UTR Sequences
Notebook 3b: Optimizing individual 5' UTR Interpretations
Notebook 3c: Fine-tuning pre-trained 5' UTR Interpretations

Protein

Interpretating predictors for proteins.

Notebook 4a: Interpreting Protein-protein Interactions (inclusion)
Notebook 4b: Interpreting Protein-protein Interactions (occlusion)
Notebook 5a: Interpreting Hallucinated Protein Structures (no MSA)
Notebook 5b: Interpreting Natural Protein Structures (with MSA)

Scrambler Training GIFs

The following GIFs illustrate how the Scrambler network interpretations converge on a few select input examples during training.

WARNING: The following GIFs contain flickering pixels/colors. Do not look at them if you are sensitive to such images.

Alternative Polyadenylation

The following GIF depicts a Scrambler trained to reconstruct APA isoform predictions.

APA GIF

5' UTR Translation Efficiency

The following GIF depicts a Scrambler trained to reconstruct 5' UTR translation efficiency predictions.

UTR5 GIF

Protein-Protein Interactions

The following GIF depicts a Scrambler trained to distort protein interactions predictions (siamese occlusion). Red letters correspond to designed hydrogen bond network positions. The following GIF displays the same interpretation but projected onto the 3D structure of the complex.

Protein GIF

Protein GIF

scrambler's People

Contributors

johli avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.