Abstract
Deep Neural Networks (DNNs) often exhibit overconfidence when encountering Out-of-Distribution (OOD) data, posing significant risks in safety-critical applications. This paper introduces ExCeL (Combined Extreme and Collective Logit Information), a novel post-hoc detection method. ExCeL integrates the "extreme" information of the top prediction confidence with "collective" information derived from a new metric: the class rank signature. By analyzing the predictable patterns of secondary class rankings for In-Distribution (ID) data, ExCeL effectively distinguishes between known and unknown inputs. Experimental results on the OpenOOD benchmark demonstrate that ExCeL achieves the best overall performance across CIFAR100 and ImageNet-200 compared to 21 competitive baselines.
Introduction
The deployment of Deep Neural Networks in real-world scenarios is often hindered by their tendency to assign high-confidence scores to inputs they have never seen during training. This phenomenon, known as OOD overconfidence, is a critical challenge for autonomous systems, medical diagnostics, and financial modeling.
Existing post-hoc OOD detectors—methods that work with pre-trained models without requiring retraining—typically focus on one of two information types. "Extreme" methods, such as MaxLogit or Softmax confidence, look solely at the magnitude of the highest output. "Collective" methods analyze the broader behavior of the output layer across multiple classes. The authors of ExCeL argue that relying on a single information source is insufficient. They propose that combining the strength of the primary prediction with the contextual "signature" of the remaining classes provides a more robust defense against OOD samples.
Methodology: The Class Rank Signature
The central innovation of ExCeL is the observation that for In-Distribution (ID) data, the rankings of classes beyond the top prediction are not random. Instead, they form a deterministic "class rank signature" based on semantic relationships. For instance, if a model correctly identifies an "Elephant," its secondary and tertiary predictions are likely to be semantically related animals like "Camel" or "Bear." In contrast, OOD data typically results in chaotic, near-random secondary rankings.
The Class Likelihood Matrix (CLM)
To capture these signatures, ExCeL utilizes a Class Likelihood Matrix (CLM). During a pre-computation phase using the training set, a matrix is constructed for every class $c$. This matrix $M_c$ stores the probability $P(i, j | c)$ that class $i$ appears at rank $j$ when the model correctly predicts class $c$.
Smoothing and Scoring
To ensure generalizability and prevent overfitting to the training data, a piecewise smoothing function is applied to the CLM. This function rewards rankings that appear frequently in the training set while penalizing those that resemble random noise. At test time, a Rank Score (RS) is calculated by comparing the input's specific class ranking against the stored CLM signature for the predicted class.
The final ExCeL score is a linear combination of the Rank Score and the standard MaxLogit: $$Score_{ExCeL} = \alpha \cdot MaxLogit + (1 - \alpha) \cdot RS$$ This fusion ensures the detector considers both the "extreme" confidence of the top pick and the "collective" context of the secondary classes.
Experimental Evaluation
ExCeL was evaluated using the comprehensive OpenOOD benchmarking library, covering both small-scale (CIFAR100) and large-scale (ImageNet-200) In-Distribution datasets. The evaluation included Near-OOD datasets (semantically similar to ID) and Far-OOD datasets (visually distinct, such as SVHN, Textures, and Places365).
Performance and Consistency
ExCeL was compared against 21 state-of-the-art post-hoc methods, including MSP, Energy, and Mahalanobis. A key finding was ExCeL's unique consistency across different scales. While some methods like RMDS performed exceptionally on CIFAR100 but struggled on ImageNet-200, ExCeL maintained a top-tier position on both benchmarks.
On the ImageNet-200 benchmark, ExCeL reduced the False Positive Rate (FPR95) by 5.6% for far-OOD detection compared to the MaxLogit baseline. This improvement highlights the value of incorporating collective rank information to ground extreme confidence scores.
Discussion and Limitations
ExCeL offers a versatile, post-hoc solution that can be integrated into existing pipelines without the need for expensive retraining. Its primary strength lies in far-OOD detection, where the "rank signature" of OOD samples is most distinct from ID signatures.
However, challenges remain in near-OOD detection. If an OOD sample is semantically very close to an ID class, its rank signature may inadvertently mimic the expected ID pattern. Additionally, while the authors identified stable default hyperparameters ($a=10, b=5, \alpha=0.8$), optimal performance on specific datasets may require further tuning.
Conclusion
By bridging the gap between extreme and collective logit information, ExCeL provides a more nuanced "sense of context" for neural networks. The method's ability to maintain high performance across diverse benchmarks makes it a promising candidate for enhancing the reliability of AI systems in open-world environments. Future research may explore the application of rank signatures to larger architectures like Vision Transformers or to non-visual domains such as Natural Language Processing.
Summary updated