Occlusion Sensitivity is a perturbation-based attribution method that quantifies feature importance by systematically sliding a gray square across an input image, replacing the underlying pixels, and measuring the resulting change in the model's prediction probability for the target class. The core principle is that occluding a critical region will cause a significant drop in the classifier's confidence score, producing a two-dimensional heatmap where low probability values directly correspond to high-importance spatial locations.
Glossary
Occlusion Sensitivity

What is Occlusion Sensitivity?
A foundational feature attribution method that systematically occludes regions of an input to measure their impact on a model's prediction probability.
As a model-agnostic technique, occlusion sensitivity requires no access to internal model weights or gradients, making it applicable to any black-box classifier. However, its computational cost scales with the stride and window size, and the choice of the occluding patch—typically a constant gray value—introduces an out-of-distribution artifact. This method is conceptually related to RISE and the Deletion Metric, which formalize the perturbation-and-measure paradigm for evaluating attribution faithfulness.
Key Characteristics of Occlusion Sensitivity
Occlusion sensitivity is a foundational, model-agnostic method for interpreting black-box models by systematically blocking regions of an input and measuring the resulting change in prediction confidence.
Sliding Window Perturbation
The core mechanism involves iteratively sliding a gray square (or a baseline patch) across the input image. At each position, the patch replaces the underlying pixels, and the model's output probability for the target class is recorded. The resulting drop in confidence forms a heatmap, where darker regions indicate higher importance. The size of the occluding patch, or kernel size, is a critical hyperparameter that determines the granularity of the explanation.
Probability Delta Heatmap
The raw output is a 2D map of probability deltas. For each patch position (x, y), the method computes P(class|original_image) - P(class|occluded_image). A large positive delta signifies that the occluded region was critical for the prediction. This direct measurement of prediction sensitivity avoids the need for backpropagation or access to internal model weights, making it suitable for any model that outputs a probability score.
Kernel Size Trade-offs
The choice of the occluding patch size presents a fundamental trade-off between spatial resolution and computational cost:
- Small Kernels (e.g., 4x4): Provide high-resolution, fine-grained heatmaps but require many forward passes, increasing latency.
- Large Kernels (e.g., 32x32): Are computationally cheap but produce coarse, blocky explanations that may miss small, critical features.
- Adaptive Kernels: Advanced implementations can vary patch size based on local image entropy.
Occlusion Value Selection
The pixel value used to fill the occluding patch significantly impacts the explanation's fidelity. Common strategies include:
- Zero Padding: Replacing pixels with black (0).
- Mean Pixel Value: Using the dataset's average pixel intensity.
- Blurring: Applying a Gaussian blur to the patch region instead of a solid color.
- Learned Baseline: Using a generative model to inpaint a realistic, neutral background. A poor baseline can introduce out-of-distribution artifacts, causing the model to react to the patch itself rather than the missing information.
Computational Complexity
Occlusion sensitivity is computationally expensive. For an image of size H x W and a stride S, the number of forward passes is approximately (H/S) * (W/S). This linear scaling with input resolution makes it impractical for real-time applications. However, the process is embarrassingly parallel, as each patch perturbation is an independent inference call that can be batched and distributed across multiple GPUs to reduce wall-clock time.
Comparison to RISE
Occlusion sensitivity is the deterministic precursor to Randomized Input Sampling for Explanation (RISE). While occlusion uses a systematic grid of square masks, RISE uses thousands of random, soft-edged binary masks. RISE produces smoother, more visually appealing heatmaps by averaging over many random perturbations, but occlusion sensitivity offers a more direct, exhaustive measurement of local importance without the stochastic noise inherent in random sampling.
Occlusion Sensitivity vs. Related Attribution Methods
A feature-level comparison of Occlusion Sensitivity against other perturbation-based and gradient-based attribution methods for auditing model predictions.
| Feature | Occlusion Sensitivity | RISE | KernelSHAP | Integrated Gradients |
|---|---|---|---|---|
Method Category | Perturbation-based | Perturbation-based | Perturbation-based | Gradient-based |
Model Agnostic | ||||
Requires Baseline Input | ||||
Satisfies Completeness Axiom | ||||
Computational Cost | High | Medium | High | Low |
Spatial Resolution | Coarse (patch size dependent) | Fine (pixel-level) | Coarse (coalition dependent) | Fine (pixel-level) |
Stochastic Output | ||||
Typical Use Case | Debugging CNN focus | Saliency map generation | Model-agnostic SHAP estimation | Axiomatic feature attribution |
Frequently Asked Questions
Answers to common questions about occlusion sensitivity, a perturbation-based feature attribution method used to interpret model predictions by systematically blocking input regions.
Occlusion sensitivity is a perturbation-based feature attribution method that systematically occludes different regions of an input with a gray square and measures the resulting change in the model's prediction probability. The technique operates by sliding an occluding patch—typically a gray box—across the input image in a grid pattern, recording the model's output probability for the target class at each position. When the patch covers a region critical to the prediction, the probability drops significantly, producing a heatmap where low-intensity areas correspond to important features. Unlike gradient-based methods such as Saliency Maps or Integrated Gradients, occlusion sensitivity is completely model-agnostic and requires no access to internal model parameters, making it applicable to any black-box classifier. The resolution of the resulting attribution map is determined by the stride and size of the occluding patch, creating a trade-off between computational cost and spatial precision.
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
Mastering occlusion sensitivity requires understanding its relationship to other perturbation-based and gradient-based attribution methods. These concepts form the core toolkit for auditing model decisions.
Deletion & Insertion Metrics
The standard evaluation protocol for perturbation-based explanations. Deletion measures the drop in prediction probability as pixels are removed from most to least important, while Insertion measures the rise as pixels are added to a blurred baseline. These metrics directly validate occlusion sensitivity's core assumption: that occluding important regions causes a measurable performance decay.
Faithfulness Metric
A quantitative criterion that measures how accurately an attribution map reflects the true importance of features. It operates by perturbing the inputs deemed most important by a method like occlusion sensitivity and measuring the resulting prediction drop. A high correlation between occlusion scores and actual model degradation confirms the explanation is faithful to the model's internal logic.
Saliency Maps
The foundational visualization technique that ranks input features by computing the absolute value of the partial derivative of the model's output with respect to each input dimension. Occlusion sensitivity is often used as a ground-truth benchmark to validate these faster, gradient-based methods, as it directly measures the causal effect of removing information rather than relying on local linear approximations.

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