RISE (Randomized Input Sampling for Explanation) is a black-box feature attribution method that generates saliency maps by randomly masking an input image thousands of times, querying the model on each masked version, and computing a weighted average of the masks where the weights are the model's output scores. Unlike gradient-based methods such as Grad-CAM or Integrated Gradients, RISE requires no access to model internals, making it applicable to any off-the-shelf classifier.
Glossary
RISE

What is RISE?
Randomized Input Sampling for Explanation is a model-agnostic method for generating saliency maps by probing a black-box model with thousands of randomly masked versions of an input image.
The core mechanism involves generating a set of small binary masks, upsampling them to the input resolution, and element-wise multiplying them with the original image. The final saliency map is the linear combination of all masks, weighted by the model's confidence score for the target class on each corresponding masked input. This approach directly measures the marginal effect of occluding specific regions, providing a faithfulness score that correlates strongly with true feature importance.
Key Characteristics of RISE
A black-box attribution method that generates saliency maps by probing the model with thousands of randomly masked versions of the input image and averaging the outputs weighted by the masks.
Black-Box Model Agnosticism
RISE operates without any access to the model's internal architecture, gradients, or parameters. It treats the model as a complete black box, requiring only the ability to query it with inputs and receive outputs. This makes it universally applicable to any model type—convolutional neural networks, vision transformers, or even proprietary cloud APIs—without modification. The method works by observing how the model's prediction for a target class changes when different parts of the input are randomly occluded, building an importance map purely from input-output behavior.
Random Mask Generation
The core mechanism involves generating thousands of binary masks that randomly occlude portions of the input image. Each mask is a grid of 0s and 1s, typically created at a lower resolution than the input and upsampled using bilinear interpolation to produce smooth occlusion boundaries. Key properties:
- Mask count: Usually 4,000–8,000 masks for stable results
- Mask resolution: Smaller grids (e.g., 7×7 or 11×11) upsampled to image size
- Occlusion probability: Each cell has a fixed probability (often 0.5) of being set to 1 (preserved) or 0 (masked)
- Smooth transitions: Bilinear upsampling creates soft edges that avoid grid artifacts in the final saliency map
Weighted Averaging Mechanism
RISE computes the final saliency map as a weighted sum of all random masks, where each mask's weight is the model's confidence score for the target class when that mask is applied. The formula is:
S = (1 / N) × Σ (M_i × f(I ⊙ M_i))
Where:
- S: Final saliency map
- N: Total number of masks
- M_i: The i-th binary mask
- f(I ⊙ M_i): Model's score for the masked input
- ⊙: Element-wise multiplication
Masks that preserve regions critical to the prediction receive higher weights, causing those regions to accumulate importance across the averaging process.
Computational Trade-offs
RISE exchanges computational efficiency for model-agnostic flexibility. Each mask requires a full forward pass through the model, making the method significantly slower than gradient-based approaches like Grad-CAM or Integrated Gradients. Typical resource considerations:
- Inference count: 4,000–8,000 forward passes per explanation
- GPU memory: Only requires storing one masked image at a time
- Latency: Seconds to minutes per image depending on model size and mask count
- Batch processing: Masks can be batched to leverage GPU parallelism, reducing wall-clock time
- Trade-off: Higher mask counts improve explanation fidelity but increase compute linearly
Clinical Applicability and Regulatory Use
RISE is particularly valuable in medical imaging contexts where model internals may be inaccessible due to proprietary constraints or regulatory requirements. Its black-box nature allows it to explain FDA-cleared SaMD devices without modifying validated software. Key clinical advantages:
- No model modification: Preserves regulatory validation status
- Vendor-agnostic: Works with third-party diagnostic APIs
- Lesion attribution: Can verify that predictions are based on actual pathological regions
- Audit trail compatibility: Deterministic given a fixed random seed, supporting reproducible explanations
- Limitation: The stochastic nature requires careful seed management for regulatory documentation
Comparison with Gradient-Based Methods
RISE occupies a distinct position in the explainability landscape compared to gradient-based alternatives:
vs. Grad-CAM:
- RISE: Black-box, no gradient access, slower, produces finer-grained maps
- Grad-CAM: White-box, requires final convolutional layer access, near-instantaneous, coarser localization
vs. Integrated Gradients:
- RISE: Perturbation-based, satisfies no formal axioms, model-agnostic
- Integrated Gradients: Gradient-based, satisfies completeness and sensitivity axioms, requires differentiable model
vs. LIME:
- Both are black-box perturbation methods
- RISE uses random binary masks on raw pixels
- LIME uses superpixel segmentation and fits a local surrogate model
RISE vs. Other Attribution Methods
A technical comparison of Randomized Input Sampling for Explanation against other prominent post-hoc feature attribution methods used in medical imaging diagnostics.
| Feature | RISE | Grad-CAM | Integrated Gradients | LIME |
|---|---|---|---|---|
Model Access Required | Black-box (probes only) | White-box (gradients) | White-box (gradients) | Black-box (probes only) |
Architecture Agnostic | ||||
Satisfies Completeness Axiom | ||||
Computational Cost | High (thousands of forward passes) | Low (single backward pass) | Medium (50-300 gradient steps) | High (local sampling) |
Spatial Resolution of Output | Pixel-level (configurable mask size) | Coarse (low-res class activation map) | Pixel-level | Super-pixel level |
Sensitivity to Masking Strategy | High (mask size and distribution critical) | High (segmentation algorithm dependent) | ||
Typical Medical Imaging Use Case | Model-agnostic lesion attribution for proprietary APIs | Real-time localization in PACS workflows | Regulatory audit with quantitative feature importance | Clinician-facing local explanations for individual predictions |
Frequently Asked Questions
Common questions about Randomized Input Sampling for Explanation and its application in generating saliency maps for medical imaging diagnostic models.
RISE (Randomized Input Sampling for Explanation) is a black-box attribution method that generates saliency maps by probing a model with thousands of randomly masked versions of the input image and averaging the outputs weighted by the masks. Unlike gradient-based methods such as Grad-CAM or Integrated Gradients, RISE requires no access to the model's internal architecture, weights, or gradients—it only needs the ability to query the model and observe its output. The process works by generating a set of binary masks that randomly occlude different regions of the input image, feeding each masked image through the model, and recording the target class score. The final saliency map is a weighted sum of all masks, where each mask's weight is the model's confidence score for the masked image. Masks that preserve high-confidence regions receive higher weights, revealing which image areas are most critical to the model's decision. This makes RISE particularly valuable for auditing proprietary or third-party diagnostic models where internal access is restricted.
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
RISE belongs to a broader family of post-hoc explanation techniques. These related methods provide complementary approaches to auditing diagnostic models, each with distinct mathematical foundations and clinical applicability.

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