Abstract: Deep Neural Networks achieve high performance in vision tasks by learning features from regions of interest (ROI) within images, but their performance degrades when deployed on out-of-distribution (OOD) data that differs from training data. This challenge has led to OOD detection methods that aim to identify and reject unreliable predictions. Although prior work shows that OOD detection performance varies by artefact type, the underlying causes remain underexplored. To this end, we identify a previously unreported bias in OOD detection: for hard-to-detect artefacts (near-OOD), detection performance typically improves when the artefact shares visual similarity (e.g. colour) with the model's ROI and drops when it does not - a phenomenon we term the Invisible Gorilla Effect. For example, in a skin lesion classifier with red lesion ROI, we show the method Mahalanobis Score achieves a 31.5% higher AUROC when detecting OOD red ink (similar to ROI) compared to black ink (dissimilar) annotations. We annotated artefacts by colour in 11,355 images from three public datasets (e.g. ISIC) and generated colour-swapped counterfactuals to rule out dataset bias. We then evaluated 40 OOD methods across 7 benchmarks and found significant performance drops for most methods when artefacts differed from the ROI. Our findings highlight an overlooked failure mode in OOD detection and provide guidance for more robust detectors.
Introduction
Deep Neural Networks (DNNs) are notoriously overconfident when encountering data outside their training distribution. In safety-critical domains like medical imaging, Out-of-distribution (OOD) detection is essential to flag unreliable predictions. While "near-OOD" samples—those closely resembling training data—are known to be difficult to detect, this research identifies a specific, previously overlooked failure mode: the Invisible Gorilla Effect.
This effect occurs when OOD artifacts become "invisible" to detectors because they do not share visual features (such as color) with the model's Region of Interest (ROI). For instance, a model trained to identify red skin lesions may easily detect red ink as OOD but fail to detect black ink, despite both being clearly anomalous. This "inattentive blindness" mirrors the psychological phenomenon where humans miss unexpected objects that do not match their current visual focus.
Methodology
To investigate this effect, we conducted a large-scale study evaluating 40 OOD detection methods across seven benchmarks. The study utilized three primary datasets: ISIC (dermatology), CheXpert (chest X-rays), and MVTec-AD (industrial inspection).
Manual Annotation and Counterfactuals
We manually annotated 11,355 images based on the color and type of OOD artifacts. To ensure that observed performance drops were due to visual similarity rather than dataset bias, we employed the Segment Anything Model (SAM) to generate color-swapped counterfactuals. This allowed us to compare detection performance on identical images where only the artifact's color was changed (e.g., from red to black).
Subspace Analysis
We performed Principal Component Analysis (PCA) on the models' latent representations to identify "nuisance subspaces"—feature directions that capture artifact color. We found that color variation often aligns with high-variance directions in the latent space. Many OOD methods, such as the Mahalanobis Score, inadvertently mute these signals by normalizing high-variance directions, leading to the observed detection failures.
Key Results
Our evaluation revealed massive performance gaps across nearly all tested methods:
- Significant AUROC Drops: In skin lesion classification (red ROI), the Mahalanobis Score achieved a 31.5% higher AUROC for red ink compared to black ink. Across the ISIC benchmark, feature-based methods saw a mean AUROC drop of 7.1 percentage points for dissimilar artifacts.
- Vulnerability of Feature-Based Methods: Methods relying on hidden-layer representations (e.g., Mahalanobis, KNN) were significantly more susceptible to the Invisible Gorilla Effect than simple confidence-based methods like Max Logit.
- Counter-Intuitive Difficulty: This work demonstrates that similarity to the ROI actually makes OOD samples easier to detect, contradicting the standard assumption that similarity always increases difficulty.
Mitigation and Conclusion
We proposed a Subspace Projection strategy to mitigate this bias. By projecting features orthogonally to the identified nuisance subspace, we significantly improved detection for dissimilar artifacts. For example, using this method on the ISIC dataset improved the AUROC for dissimilar artifacts from 48.5% to 76.8%.
The Invisible Gorilla Effect represents a critical reliability gap in current OOD detection. While standard data augmentations like color jittering proved insufficient, our subspace projection method offers a path toward more robust and reliable OOD detection in real-world applications.
Summary updated