← All blog posts

DeepExplainer on Simulated Genomic Data (DeepLIFT)


When a neural network scores a DNA or RNA sequence, the prediction alone rarely tells you why. Was the model attending to a known motif, a GC-rich stretch, or something spurious in the flanks? Attribution methods assign credit to individual bases so you can inspect that question. This primer introduces DeepLIFT and its SHAP-facing wrapper DeepExplainer at a conceptual level, enough to read genomic interpretability plots with confidence.

Why sequence models need explanation

Convolutional and related models for genomics often take one-hot encoded sequences and output a binding, accessibility, or expression score. They can capture combinatorial patterns that simple motifs miss, but a high score does not reveal which nucleotides drove the decision. Spurious correlations can look like biology until you inspect attributions. Attribution is therefore a quality-control and hypothesis-generation tool: it does not replace wet-lab validation or prove causality, but it helps you ask better follow-up questions.

DeepLIFT in plain language

DeepLIFT explains a prediction by comparing the network's activations on the real input to activations on a reference input. Rather than exhaustively flipping every base, it propagates difference-from-reference signals backward through the layers using rules designed for common nonlinearities.

  • Reference choice, For DNA, a common reference is a background sequence (dinucleotide-shuffled or GC-matched). Attribution then measures contribution relative to that baseline.
  • Conservation of difference, DeepLIFT aims to redistribute the output difference between the real sequence and the reference across input features in a coherent way.

That framing is the conceptual heart of the method. Pure gradient saliency can miss saturated units; DeepLIFT was designed to stay informative when activations sit in flat regions of a nonlinearity.

DeepExplainer and simulated data

DeepExplainer in the SHAP library approximates Shapley-style attributions for deep models using DeepLIFT-style rules and a background set. For one-hot DNA you typically get signed per-base scores: positive where bases raised the prediction relative to background, negative where they lowered it.

Simulated genomic data is the cleanest teacher because you know the planted signal. Embed a motif in background sequence, train a small CNN on the label, then ask whether attributions light up the planted positions on held-out sequences. Recovery supports that model and explainer are aligned; failure is equally informative, the model may have learned GC composition, the reference may be poorly chosen, or the network may be underpowered.

Practical cautions

  1. Reference matters, A mismatched background can invent or hide motifs.
  2. Attribution is not biology, A peak means important to this model under this reference, not causal in the cell.
  3. Sanity-check on simulations, Verify recovery of planted sites before trusting highlight tracks on real ChIP, ATAC, or expression models.

Takeaway

DeepLIFT attributes deep sequence predictions by propagating differences from a reference; DeepExplainer exposes that idea in a SHAP-friendly API. Use simulated motifs to learn what trustworthy attributions look like, then treat real-data peaks as clues to interrogate, not as finished biology.