Practical overview
When it fits
Use Deeplift when you need a Python-based attribution workflow around a trained deep-learning model, particularly when the model is saved in a supported Keras format or can be recreated with Deeplift layers.
Who it is for
- Python developers analyzing predictions from trained deep-learning models.
- Researchers comparing feature-attribution approaches or inspecting model inputs and intermediate layers.
- Keras users who want to convert saved models for attribution workflows.
Documented uses
- Calculate feature-importance scores for a model prediction.
- Compare DeepLIFT attribution with gradients, guided backpropagation or integrated gradients.
- Inspect contributions at input pixels or, for some vision tasks, at a higher convolutional layer.
- Convert a saved Keras model into Deeplift’s model format.
Requirements & limits
The repository is public and identifies the project as open source under the MIT license. The README provides installation through pip.
- The README reports this version tested with Keras 2.2.4 and TensorFlow 1.14.0; its installation section also refers to earlier TensorFlow and Keras test versions.
- Keras models have documented autoconversion functions. Other models require recreation with Deeplift layers, except non-Keras models saved in Keras 2.0 format, which the README says can be converted.
- Attribution depends on selecting a method, target layer and reference; the documentation identifies optimal reference selection as an open problem.
- For some computer-vision tasks, scoring a higher convolutional layer rather than input pixels may produce better results, according to the README.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Convert a saved Keras model for attribution
Convert a saved Keras model into Deeplift’s format as the documented preparation for calculating importance scores.
Before you start
- Deeplift installed in a Python environment.
- A saved model in the HDF5 format used by the README example.
Steps
Import
deepliftandkerasapi_conversionfromdeeplift.conversion.Call
convert_model_from_saved_fileswith the saved model file path.Choose the documented nonlinear multiplier mode, such as
DeepLIFT_GenomicsDefault.
Expected outcome
The saved Keras model is converted into a Deeplift model object for the subsequent scoring workflow.
Guide limitations
- The repository describes autoconversion for Keras models; models from other libraries must be recreated using Deeplift layers unless saved in Keras 2.0 format.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 12 October 2026
- Original website title
- kundajelab/deeplift · Official homepage title · retained in its source language

