Abstract
We propose D-RISE, a method for generating visual explanations for the predictions of object detectors. Utilizing the proposed similarity metric that accounts for both localization and categorization aspects of object detection allows our method to produce saliency maps that show image areas that most affect the prediction. D-RISE can be considered "black-box" in the software testing sense, as it only needs access to the inputs and outputs of an object detector. Compared to gradient-based methods, D-RISE is more general and agnostic to the particular type of object detector being tested, and does not need knowledge of the inner workings of the model. We show that D-RISE can be easily applied to different object detectors including one-stage detectors such as YOLOv3 and two-stage detectors such as Faster-RCNN. We present a detailed analysis of the generated visual explanations to highlight the utilization of context and possible biases learned by object detectors.
Introduction
While deep learning has revolutionized object detection, these models remain "black boxes"—complex systems whose decision-making processes are difficult to interpret. Understanding why a model identifies a specific bounding box as a "sink" or a "laptop" is crucial for debugging, safety, and building user trust.
Existing explanation techniques, like saliency maps, were primarily designed for image classification. Object detection is significantly more complex because it involves two distinct tasks: categorization (what is it?) and localization (where is it?). Standard methods often fail here because they require access to internal gradients ("white-box") or cannot handle the multiple, overlapping proposals inherent to detection.
The D-RISE Method
D-RISE (Detector Randomized Input Sampling for Explanation) is a model-agnostic method that treats the detector as a closed system. It generates saliency maps by testing the model's response to randomized image masking.
The process involves four key steps:
- Masking: Thousands of random, low-resolution binary masks are generated and upsampled to the original image size.
- Inference: These masks are applied to the input image, and the object detector runs on each masked version.
- Similarity Scoring: For a target detection, D-RISE compares it against all detections in the masked images using a similarity metric ($S$) that combines localization (IoU), categorization (cosine similarity of probability vectors), and objectness (confidence).
- Saliency Map Generation: The final heatmap is a weighted sum of all masks, where weights are the similarity scores. Pixels that consistently lead to detections similar to the target when unmasked receive the highest importance.
Key Insights and Results
D-RISE reveals that detectors often rely on both object features and surrounding context. For instance, a model might look at a faucet to help identify a sink, or at ski poles to confirm the presence of skis. It also highlights "discriminative parts," showing that for a "laptop" prediction, a model might focus almost exclusively on a logo or keyboard corner rather than the entire screen.
Quantitatively, the researchers evaluated D-RISE using the MS-COCO dataset. D-RISE significantly outperformed gradient-based methods like Grad-CAM in the "pointing game," which measures if the maximum saliency point falls within the object's boundaries. D-RISE achieved a score of 0.9656 compared to Grad-CAM's 0.5232. Additionally, a human study on Amazon Mechanical Turk showed that users found D-RISE explanations for more accurate models (like YOLOv3) to be more trustworthy than those for weaker models.
Conclusion
The primary limitation of D-RISE is its computational cost, as it requires thousands of forward passes (typically 5,000 masks) per explanation. However, its ability to provide high-quality, model-agnostic explanations makes it a powerful tool for debugging biases and understanding the decision-making process of complex object detectors. Future work will focus on optimizing mask generation to reduce the required inference time.
Summary updated