Attribution Sanity Checks are a diagnostic framework for validating the trustworthiness of feature attribution methods applied to genomic neural networks. The core principle involves systematically corrupting the model's learned parameters through cascading randomization, starting from the output layer and progressing toward the input. If an attribution map remains visually identical after the model's weights have been scrambled, the method is deemed unreliable, as it is insensitive to the model's actual training.
Glossary
Attribution Sanity Checks

What is Attribution Sanity Checks?
A rigorous suite of empirical tests designed to verify that a feature attribution method is genuinely sensitive to the learned parameters of a genomic model, rather than producing plausible-looking but uninformative edge-detectors.
A critical variant, the data randomization test, verifies that an attribution method depends on the true data-generating relationship. By training a model on a version of the dataset where input sequences have been randomly permuted relative to their labels, the resulting attributions must differ significantly from those of a properly trained model. Passing these sanity checks confirms that an interpretability technique is not merely an edge detector but is faithfully reflecting the learned biological logic.
Key Characteristics of Sanity Checks
A rigorous suite of tests designed to verify that an attribution method is genuinely sensitive to the learned parameters of a genomic model, rather than producing plausible-looking but uninformative edge detectors or sequence biases.
Model Parameter Randomization
The foundational sanity check that cascades randomization from the output layer backward. If an attribution method is faithful, its output must degrade when model parameters are destroyed.
- Cascading Randomization: Weights are re-initialized layer-by-layer, starting from the top. Attribution maps should diverge from the original at the first randomization step.
- Similarity Metrics: Use rank correlation (Spearman) or structural similarity indices to quantify the divergence between original and randomized attributions.
- Failure Mode: If an attribution map remains unchanged after full randomization, the method is acting as an edge detector or sequence complexity analyzer, not a model explainer.
Data Randomization Test
A complementary check where the model is trained on a version of the dataset where input sequences have been randomly permuted relative to their labels. A valid attribution method must produce fundamentally different explanations for a model trained on nonsense data.
- Label Permutation: Shuffle the mapping between genomic sequences and their target labels before training.
- Expected Outcome: Attribution maps from the data-randomized model should show no biologically coherent motifs or known transcription factor binding sites.
- Comparison Baseline: Quantify the difference using TF-MoDISco motif recovery rates between the real and randomized models.
Edge Case Sensitivity
Verification that the attribution method correctly handles constant or near-constant input sequences where no single nucleotide should be deemed important.
- Zero-Entropy Inputs: A sequence of all adenine (poly-A) should yield uniformly near-zero attribution scores.
- Synthetic Constructs: Test with sequences containing a single strong motif embedded in random background. The method must isolate only the motif.
- Gradient Saturation: Ensure the method does not produce artificially high attributions in regions where the model's output is saturated and gradients vanish.
Faithfulness Metrics
Quantitative evaluation of how accurately an attribution map reflects the model's true decision logic, measured through systematic perturbation experiments.
- AOPC (Area Over the Perturbation Curve): Sequentially mask the most salient nucleotides and measure the drop in prediction probability. A steep drop indicates high faithfulness.
- ROAR (RemOve And Retrain): Retrain the model after removing the top-k attributed features. If the method is faithful, retraining on the remaining features should recover performance.
- Infidelity Measure: Compute the expected mean-squared error between a perturbation to the input and the corresponding perturbation to the attribution map.
Biological Plausibility Audit
A domain-specific sanity check that validates attributions against established biological knowledge bases, ensuring explanations are not just faithful to the model but also to molecular biology.
- Motif Database Overlap: Compare high-attribution subsequences against known motifs in JASPAR or ENCODE databases using Tomtom.
- Evolutionary Conservation: Overlay attribution maps with PhyloP or GERP conservation scores. Functional regulatory elements should show both high attribution and high conservation.
- Saturation Mutagenesis Concordance: Validate that nucleotide-level attribution scores correlate with experimentally measured Deep Mutational Scan (DMS) effect sizes.
Implementation-Independent Consistency
A meta-check ensuring that the attribution method's output is stable across different implementations, software libraries, and hardware backends.
- Cross-Library Validation: Compare outputs from Captum, DeepExplain, and SHAP implementations. Results should be numerically identical within floating-point tolerance.
- Deterministic Reproducibility: Verify that running the same method on the same model and input with the same random seed produces bit-for-bit identical attributions.
- Numerical Precision: Test under FP32, FP16, and BF16. Significant divergence under reduced precision indicates an unstable implementation unsuitable for production.
Frequently Asked Questions
A technical deep-dive into the validation methodologies used to ensure that feature attribution maps faithfully reflect the learned logic of a genomic model, rather than producing misleading or edge-detecting noise.
An attribution sanity check is a validation framework designed to verify that a feature attribution method is sensitive to the learned parameters of a genomic model, not just the input data structure. The core principle involves comparing the attribution maps generated by a trained model against those generated by a parameter-randomized model. If an attribution method passes the sanity check, the attributions from the trained model should differ significantly from those of the untrained, randomized network. This ensures the explanation is genuinely capturing the model's learned biological signal—such as transcription factor binding motifs—rather than acting as a generic edge detector that highlights nucleotide transitions regardless of training. Failure indicates the method is architecture-dependent but task-agnostic, making it unreliable for identifying causal genomic variants.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core methodologies and metrics used to validate that attribution maps faithfully reflect the learned logic of a genomic model, not random noise.
Model Parameter Randomization
The foundational sanity check for any attribution method. This test compares the attribution maps generated by a trained model against those from a model with randomly initialized weights. If the attribution method is truly sensitive to the model's learned parameters, the maps should differ significantly. A failure to detect this difference indicates the method is merely reacting to the input structure, not the model's logic.
Faithfulness Metrics
Quantitative measures that evaluate how accurately an attribution map reflects the true decision-making logic of a genomic model. The core principle is perturbation-based validation: if the attributed nucleotides are truly important, removing or altering them must cause a predictable drop in model confidence. Key implementations include:
- AOPC (Area Over the Perturbation Curve): Measures the drop in prediction probability as the most salient nucleotides are sequentially perturbed.
- ROAR (RemOve And Retrain): Iteratively retrains a model after removing the most relevant features to test if the attribution map identifies genuinely learned dependencies.
Infidelity Measure
A formal metric that quantifies the expected error between a significant perturbation of the input sequence and the corresponding perturbation of the attribution map. Mathematically, it measures the difference between the dot product of the attribution map and the perturbation vector and the actual change in the model's output. A low infidelity score indicates that the attribution map is a locally faithful linear surrogate to the model's complex decision function.
Deep Mutational Scan (DMS)
A high-throughput experimental method that assays the functional impact of thousands of genomic variants, serving as the ground-truth benchmark for validating attribution methods. By comparing computationally predicted variant effects from attribution maps against the empirical DMS measurements, developers can rigorously assess if their interpretability tools are identifying biologically causal nucleotides. This closes the loop between in-silico explanation and real-world molecular phenotype.
Sensitivity Analysis
The systematic study of how uncertainty in the output of a genomic model can be apportioned to different sources of uncertainty in its nucleotide inputs. Unlike point-estimate attributions, sensitivity analysis provides a distribution of importance scores, often using techniques like Monte Carlo dropout or Bayesian neural networks. This allows practitioners to distinguish between high-confidence attributions and spurious correlations driven by noise.
Cascading Randomization
An extension of the basic parameter randomization test where layers of the genomic model are randomized sequentially from the top down. If an attribution method is faithful, the similarity between the original and randomized attribution maps should progressively degrade as randomization cascades closer to the input. This test verifies that the method is sensitive to the hierarchical feature representations learned by deep architectures like Basset or Enformer.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us