arXiv:2610.26323cs.CVOct 2026

Manuscript Offprint

arXiv:2610.26323

TriScore: Post-Hoc Out-of-Distribution Detection with Energy, Boundary Probes, and Transform Consistency

Ege Gursoy, Nicolas Mansard

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Post-hoc out-of-distribution detection usually relies on a single signal extracted from a frozen classifier, such as confidence, energy, features, or gradients. This dependence becomes fragile under classifier-level adversarial shift, where the shift can preserve the detector's chosen cue while changing the model's decision behavior. We investigate whether this failure mode can be mitigated by combining complementary detection criteria instead of selecting a single score. We introduce TriScore, a post-hoc OOD detector that combines three ID-calibrated signals from the same frozen backbone: an energy prior, a boundary-fragility score, and a transform-consistency score. These signals are standardized on ID validation data and fused by an input-dependent ID-residual gate, requiring no OOD labels, auxiliary model, training, or stored feature bank. Across four ImageNet-scale backbones, TriScore achieves the best mean AUROC among 15 post-hoc baselines under a non-adaptive adversarial-shift protocol, while remaining competitive on standard OOD benchmarks. Ablations show that the gains come from combining complementary cues rather than optimizing a single detector signal. These results support multi-criterion post-hoc detection as a practical route toward more robust OOD detection under classifier-level shift. The source code is publicly available at github.com/gursoyege/TriScore.

1 Introduction

Modern vision systems often reuse a trained backbone across datasets, tasks, and deployment settings. Post-hoc out-of-distribution (OOD) detection methods help in those cases, where the classifier has already been fixed and the detector must rely on the outputs or internal signals of the existing classifier without retraining it or using OOD data.

Many post-hoc detectors are built around a primary cue, such as softmax confidence (Hendrycks & Gimpel, 2017), logit energy (Liu et al., 2020), activation statistics (Sun et al., 2021; Djurisic et al., 2023), feature distance (Sun et al., 2022), or gradient magnitude (Huang et al., 2021). Each cue emphasizes a different property of the same classifier. A detector built around only one of these cues therefore has little redundancy when a shift happens to preserve that particular statistic, even when other classifier signals are affected.

This lack of redundancy is most visible under classifier-level adversarial shift. These are not detector-adaptive attacks, but they provide a demanding stress test for post-hoc detectors, since the image remains close to an in-distribution sample while the classifier response changes by design. In this setting, several strong baselines become difficult to distinguish from random guessing on at least one backbone, and the backbone on which a baseline collapses differs across baselines.

TriScore addresses this lack of redundancy, extracting three signals from the same frozen classifier. The energy branch measures abnormal logit evidence after subtraction of a class-mean logit vector estimated from ID calibration data. The Boundary-Probe branch estimates local decision fragility from a top-k logit margin

Figure

Figure 1: TriScore attaches to a frozen classifier. It computes class-centered energy, Boundary-Probe fragility, and transform consistency, then fuses the standardized branch scores using an ID-residual gate. Calibration uses ID validation data only.

and the gradient of that margin at a late feature representation. The transform-consistency branch measures whether mild deterministic views lead to stable predictive distributions. These branches are complementary as they fail for different reasons: Energy is cheap and strong on many semantic shifts, Boundary-Probe responds to locally fragile decisions even when the logit magnitude remains plausible, Transform consistency detects predictions that are unstable under benign views.

After the three signals are computed, TriScore fuses them with a calibrated rule. Each branch is calibrated on ID validation data, which determines the typical behavior for that branch. At test time, the final score gives more weight to branches whose standardized score exceeds the ID-typical range. Calibration does not use OOD examples, and the method does not train an auxiliary model. An overview of our method is shown in Figure 1.

We evaluate TriScore in the OpenOOD framework on four ImageNet-scale backbones: ResNet-50, RegNet, ViT-B/16, and Swin-T (He et al., 2016; Radosavovic et al., 2020; Dosovitskiy et al., 2021; Liu et al., 2021). The evaluation uses near-OOD and far-OOD datasets (Bitterwolf et al., 2023; Vaze et al., 2022b; Van Horn et al., 2018; Cimpoi et al., 2014; Wang et al., 2022; Zhang et al., 2024), and adversarial-shift data (Goodfellow et al., 2015; Kurakin et al., 2018; Madry et al., 2018; Dong et al., 2018; Zheng et al., 2019; Croce & Hein, 2020; Carlini & Wagner, 2017; Moosavi-Dezfooli et al., 2016; Andriushchenko et al., 2020; Athalye et al., 2018).

TriScore provides a stronger adversarial-shift robustness floor than the individual post-hoc methods. The per-attack analysis shows that this result is not driven by a single attack, and the transformer results show lower cross-attack variance than the closest competitors.

Our contribution is a practical post-hoc detector for frozen classifiers, together with a controlled study of how energy, boundary fragility, and consistency under deterministic transforms interact under clean and adversarial shift. We make the following claims: (i) TriScore combines three frozen-backbone signals under ID-only calibration and remains compatible with standard OpenOOD post-hoc evaluation. (ii) under our non-adaptive adversarial-shift protocol, TriScore gives the best mean AUROC among 15 post-hoc baselines on all four ImageNet-scale backbones, and the best mean FPR@95 on three of four. (iii) the gain is broad across attack families. TriScore wins 27 of 40 attack×backbone AUROC cells and 19 of 40 FPR@95 cells, and it has lower cross-attack AUROC standard deviation on multiple backbones. (iv) the ablation study shows that the proposed branches improve over their closest predecessor-style alternatives and that the fusion provides an ID-only way to combine them.

References (68)