Inferensys

Glossary

TF-MoDISco

TF-MoDISco is a method that clusters high-contribution genomic subsequences identified by attribution maps into recurring, biologically meaningful motif patterns.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
MOTIF DISCOVERY FROM IMPORTANCE SCORES

What is TF-MoDISco?

A computational method that transforms scattered nucleotide-level attribution maps into consolidated, high-resolution sequence motifs representing the recurring patterns a deep learning model has learned to recognize.

TF-MoDISco (Transcription Factor Motif Discovery from Importance Scores) is a multi-stage algorithm that clusters high-contribution genomic subsequences identified by feature attribution maps into biologically meaningful motif patterns. It operates on per-nucleotide importance scores—typically generated by methods like DeepLIFT or Integrated Gradients—and groups seqlets (short, high-scoring sequence segments) using affinity propagation based on their sequence similarity and spatial alignment.

The output is a set of position weight matrices visualized as sequence logos, where each cluster represents a distinct binding preference learned by the model. By collapsing thousands of individual high-attribution regions into a small number of consolidated motifs, TF-MoDISco bridges the gap between opaque neural network predictions and human-interpretable transcription factor binding site biology, enabling rigorous validation of genomic deep learning models.

MOTIF DISCOVERY

Key Features of TF-MoDISco

TF-MoDISco distills massive, noisy attribution maps into a small set of high-quality, recurring sequence motifs. It bridges the gap between per-nucleotide importance scores and biologically meaningful patterns recognized by transcription factors.

01

Contribution-Weighted Clustering

TF-MoDISco clusters high-scoring genomic subsequences based on their contribution scores from attribution maps. It uses DeepLIFT or Integrated Gradients scores to weight sequences, ensuring that the discovered patterns directly reflect the model's learned decision logic rather than just statistical over-representation.

02

Seqlet Identification

The algorithm first identifies seqlets—short, high-contribution genomic subsequences—from the attribution map. These seqlets serve as the raw material for motif discovery:

  • Extracted from regions with high attribution scores
  • Typically span 10-30 base pairs
  • Represent the model's focal points within a longer input sequence
03

Multi-Stage Refinement Pipeline

TF-MoDISco employs a multi-stage clustering and refinement process to produce non-redundant motifs:

  1. Affinity Propagation groups similar seqlets
  2. Trimming removes low-contribution flanks
  3. Merging combines highly similar clusters
  4. Rediscarding eliminates statistically insignificant patterns This yields a concise set of distinct, high-confidence motifs.
04

Synthetic Motif Generation

Each discovered cluster is aggregated into a Position Weight Matrix (PWM) and visualized as a sequence logo. TF-MoDISco generates a synthetic representation of the motif by averaging the aligned seqlets, providing a human-interpretable summary of the pattern the model has learned to recognize.

05

Hypothesis-Driven Discovery

TF-MoDISco can be run in a hypothesis-driven mode by restricting seqlet extraction to regions associated with a specific prediction class (e.g., high vs. low expression). This allows researchers to isolate motifs that are causally linked to a particular biological outcome, moving beyond correlation to mechanistic insight.

06

Continuous Score Integration

Unlike binary peak-calling methods, TF-MoDISco integrates continuous attribution scores throughout the clustering process. The contribution weight of each nucleotide influences seqlet alignment and motif construction, preserving the nuanced importance gradients that binary thresholding would discard.

TF-MODISCO EXPLAINED

Frequently Asked Questions

Clear, technical answers to the most common questions about TF-MoDISco, the algorithm that transforms genomic attribution maps into biologically meaningful sequence motifs.

TF-MoDISco (Transcription Factor Motif Discovery from Importance Scores) is a post-hoc interpretability algorithm that clusters high-contribution genomic subsequences identified by feature attribution maps into recurring, biologically meaningful motif patterns. It operates in three stages: first, it extracts seqlets—short genomic subsequences with high attribution scores—from per-nucleotide importance maps generated by methods like DeepLIFT or Integrated Gradients. Second, it embeds these seqlets using their attribution-weighted sequence content and clusters them using affinity propagation or density-based spatial clustering. Third, it aligns the seqlets within each cluster and generates a sequence logo representing a consolidated motif. The output is a set of non-redundant, human-interpretable motifs that directly correspond to the decision logic learned by the deep genomic model, bridging the gap between opaque neural network predictions and established biological knowledge of transcription factor binding sites.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.