Inferensys

Glossary

RISE

RISE is a model-agnostic, perturbation-based attribution method that produces saliency maps by averaging thousands of randomly generated binary masks, weighted by the model's confidence score on the correspondingly masked input.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
BLACK-BOX ATTRIBUTION

What is RISE?

RISE (Randomized Input Sampling for Explanation) is a model-agnostic, perturbation-based method for generating visual saliency maps that explain the predictions of black-box image classifiers.

RISE generates an importance map by probing a model with thousands of randomly generated binary masks. It computes a weighted sum of these masks, where the weight for each mask is the model's confidence score on the correspondingly masked input. This process empirically estimates the marginal probability of a pixel being important for a specific class prediction.

Unlike gradient-based methods, RISE requires no internal access to the model's architecture or weights, making it applicable to any off-the-shelf model. The final saliency map highlights the regions of the input image that most consistently preserve the target class score when visible, providing a faithful, occlusion-driven explanation.

Randomized Input Sampling for Explanation

Key Characteristics of RISE

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 an input image.

01

Monte Carlo Masking

RISE generates an importance map by creating N binary masks (typically thousands) that randomly occlude different regions of the input. Each mask is upsampled to the input resolution using bilinear interpolation to produce smooth, continuous occlusion patterns. The model's confidence score on each masked input is recorded, and the final saliency map is computed as the weighted sum of all masks, where each mask's weight is the model's prediction score for the target class on that masked input. This process approximates the expected marginal effect of preserving each pixel.

8000+
Typical Mask Count
02

Black-Box Applicability

RISE treats the model as a complete black box, requiring no access to internal weights, gradients, or architecture details. It only needs the ability to query the model with perturbed inputs and receive output probabilities. This makes RISE applicable to any model type, including proprietary APIs, ensemble methods, and non-differentiable classifiers where gradient-based methods like Integrated Gradients or Grad-CAM are impossible to use. The trade-off is computational cost, as each explanation requires thousands of forward passes.

0
Gradient Computations
03

Probabilistic Completeness

As the number of random masks approaches infinity, the RISE importance map converges to the true conditional expectation of the model output given each pixel's visibility. This provides a probabilistic guarantee that the saliency map faithfully represents the model's reliance on each input region. In practice, the method approximates the Shapley value of each pixel under a coalitional game where pixels are randomly included or excluded. The variance of the estimate decreases with the square root of the mask count.

O(1/√N)
Convergence Rate
04

Mask Generation Strategy

Masks are generated by first creating small binary grids (e.g., 7x7 or 11x11) where each cell is independently set to 1 (preserve) with probability p or 0 (occlude) with probability 1-p. These coarse masks are then upsampled to the full input resolution using bilinear interpolation, producing smooth spatial transitions that avoid sharp occlusion boundaries. The probability p controls the expected fraction of preserved pixels and is typically set between 0.3 and 0.7. Higher p values produce masks that preserve more context, while lower p values isolate smaller regions.

0.5
Default Preservation Probability
05

Comparison to Occlusion Sensitivity

RISE improves upon the classic Occlusion Sensitivity method in two key ways. First, instead of systematically sliding a single occluding patch, RISE randomizes occlusion patterns, avoiding grid artifacts and providing smoother, more visually coherent saliency maps. Second, by averaging over thousands of masks, RISE captures non-linear interactions between occluded regions that a single sliding window cannot detect. The method also avoids the computational inefficiency of evaluating every possible occlusion position, instead sampling strategically from the space of all possible masks.

Smooth
Artifact Profile
06

Evaluation with Deletion and Insertion Metrics

RISE saliency maps are commonly evaluated using the Deletion Metric and Insertion Metric. For deletion, pixels are progressively removed from most to least important according to the RISE map, and the area under the resulting probability curve (AUC) is measured—a sharp drop indicates faithful attribution. For insertion, pixels are progressively added into a blurred baseline, and a rapid increase in confidence confirms the map correctly identifies salient regions. RISE consistently achieves competitive AUC scores against gradient-based methods like Grad-CAM and Integrated Gradients on standard benchmarks.

AUC
Standard Evaluation Metric
BLACK-BOX PERTURBATION COMPARISON

RISE vs. Other Attribution Methods

Comparing Randomized Input Sampling for Explanations against other perturbation-based and gradient-based feature attribution techniques for image models.

FeatureRISELIMEOcclusion SensitivityIntegrated Gradients

Approach

Random binary masks

Superpixel perturbations

Systematic gray square sliding window

Path integral of gradients

Model Access Required

Black-box (probe only)

Black-box (probe only)

Black-box (probe only)

White-box (gradients)

Baseline Dependency

No explicit baseline

No explicit baseline

No explicit baseline

Requires user-defined baseline

Axiom: Completeness

Axiom: Implementation Invariance

Computational Cost

High (thousands of forward passes)

Moderate (sampled perturbations)

High (one pass per occlusion patch)

Moderate (50-300 gradient steps)

Output Resolution

Per-pixel importance map

Superpixel-level explanation

Patch-level coarse map

Per-pixel importance map

Stochasticity in Explanation

Inherent (Monte Carlo sampling)

Inherent (perturbation sampling)

Deterministic

Deterministic (given baseline)

RISE EXPLAINED

Frequently Asked Questions

Clear answers to the most common technical questions about Randomized Input Sampling for Explanation, a black-box attribution method that generates importance maps through Monte Carlo sampling of random binary masks.

Randomized Input Sampling for Explanation (RISE) is a black-box feature attribution method that generates saliency maps by probing a model with thousands of randomly masked versions of an input image. The core mechanism is straightforward: RISE generates a large number of binary masks by sampling smaller grids and upsampling them to the input resolution via bilinear interpolation. Each mask is applied element-wise to the original input, and the masked input is fed through the model to obtain a confidence score for the target class. The final importance map is computed as a weighted sum of all masks, where each mask's weight is the model's output probability on the corresponding masked input. This Monte Carlo approach estimates the marginal effect of each pixel on the prediction without requiring access to model gradients, internal weights, or architecture details. The method satisfies a form of completeness by construction, as the sum of importance scores across all pixels approximates the total prediction score. RISE is particularly effective for convolutional neural networks processing visual data but generalizes to any input modality where meaningful random occlusion can be performed.

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.