Introduction
Deploying deep learning models in real-world environments requires robust Out-of-Distribution (OOD) detection. A major challenge is that modern, overparameterized neural networks often produce high-confidence predictions for unfamiliar inputs. This overconfidence stems from "unimportant" weights that, while negligible for in-distribution (ID) tasks, aggregate noisy signals when presented with OOD data.
The DICE Framework
The authors introduce DICE (Directed Sparsification), a post-hoc method designed to mitigate this noise by pruning the network's final layer. Unlike traditional pruning that focuses on weight magnitude, DICE ranks weights based on their actual contribution to the output.
The process involves three main steps:
- Contribution Measurement: For each class, the average value of (weight $\times$ activation) is calculated using a small ID validation set.
- Directed Sparsification: A mask is applied to keep only the top-$k$ contributing weights per class, setting the rest to zero.
- Energy-based Scoring: Inference is performed on the sparsified network, and an Energy Score is used to distinguish ID from OOD samples.
Mechanism: Variance Reduction
The core insight behind DICE is that sparsification acts as a powerful variance reducer. In a dense network, the "long tail" of unimportant weights sums up noisy signals from OOD data, leading to high-variance outputs that overlap with ID distributions. By selectively keeping only salient weights, DICE "sharpens" the OOD output distribution, pushing it closer to zero and significantly improving separability.
Experimental Results
DICE was evaluated across standard benchmarks (CIFAR-10/100) and large-scale ImageNet-1k tasks. It consistently outperforms established baselines such as ODIN, Mahalanobis distance, and standard Energy-based methods.
Notably, DICE exhibits strong synergy with ReAct, a method that truncates high activations. While DICE targets the weight structure, ReAct addresses activation anomalies. Together, they achieve state-of-the-art performance on challenging ImageNet OOD datasets.
On ImageNet, DICE alone reduces the average False Positive Rate (FPR95) from 58.41% to 34.75%. When combined with ReAct, the FPR95 further drops to 27.25%, representing a significant leap in OOD detection reliability.
Conclusion
DICE provides a simple, post-hoc solution for safer AI deployment. By pruning away the noise-inducing weights in overparameterized models, it significantly reduces overconfidence on unseen data without requiring retraining or sacrificing original classification accuracy.
Summary updated