Bounding Box Anomaly Scoring for simple and efficient Out-of-Distribution detection
Mohamed Bahi Yahiaoui, Geoffrey Daniel, Loïc Giraldi, Jérémie Bruyelle, Julyan Arbel · 2026
Read Bounding Box Anomaly Scoring for simple and efficient Out-of-Distribution detection by Mohamed Bahi Yahiaoui, Geoffrey Daniel, Loïc Giraldi, Jérémie Bruyelle, Julyan Arbel (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-22660.txt.
Introduction
Yahiaoui and co-authors present a simple way to spot out-of-distribution inputs for neural networks. Such inputs differ from training data and can cause unreliable predictions. Their method, BBAS, sums up hidden activations with compact axis-aligned boxes. Inputs that fall far outside the boxes get high anomaly scores. The method adds graded scores, monitors suited to convolutional layers, and split clustering and box building. Tests on image benchmarks show strong separation of normal and odd inputs. The approach stays compact, simple, and easy to update.
Catalog record
| CREATOR | Mohamed Bahi Yahiaoui, Geoffrey Daniel, Loïc Giraldi, Jérémie Bruyelle, Julyan Arbel |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 134165 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2603.22660
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Bounding Box Anomaly Scoring for simple and efficient Out-of-Distribution detection Mohamed Bahi Yahiaoui, Geoffrey Daniel, Loïc Giraldi, Jérémie Bruyelle, Julyan Arbel Abstract Out-of-distribution (OOD) detection aims to identify inputs that differ from the training distribution in order to reduce unreliable predictions by deep neural networks. Among post-hoc feature-space approaches, OOD detection is commonly performed by approximating the in-distribution support in the representation space of a pretrained network. Existing methods often reflect a trade-off between compact parametric models, such as Mahalanobis-based scores, and more flexible but reference-based methods, such as k-nearest neighbors. Bounding-box abstraction provides an attractive intermediate perspective by representing in-distribution support through compact axis-aligned summaries of hidden activations. In this paper, we introduce Bounding Box Anomaly Scoring (BBAS), a post-hoc OOD detection method that leverages bounding-box abstraction. BBAS combines graded anomaly scores based on interval exceedances, monitoring variables adapted to convolutional layers, and decoupled clustering and box construction for richer and multi-layer representations. Experiments on image-classification benchmarks show that BBAS provides robust separation between in-distribution and out-of-distribution samples while preserving the simplicity, compactness, and updateability of the bounding-box approach. 1 Introduction Over the past decade, deep learning has become the dominant paradigm in machine learning, with especially strong impact in computer vision and natural language processing [ 30 , 59 ] . As these data-driven systems transition from benchmarks to deployment in decision and safety-critical settings, ranging from healthcare and industrial control to energy infrastructure, the need for trustworthy artificial intelligence becomes increasingly salient [ 46 , 23 ] . One unreliable behavior of deep learning models is that they always produce predictions, possibly with high-confidence, even when presented with unfamiliar or nonsensical inputs. Out-of-distribution (OOD) detection aims to identify samples that differ substantially from the data distribution used to train the model. Such inputs may arise from noise, distribution shift, or novel contexts not observed during training, forcing the model to extrapolate and potentially yielding unreliable predictions. Consequently, developing effective OOD detection methods has become an important research focus in the deep learning community [ 40 , 37 ] . Previous works on OOD detection can be broadly grouped into two categories. The first category modifies training to encourage OOD awareness, for instance through auxiliary objectives or uncertainty-aware formulations [ 8 , 19 , 42 , 11 , 38 , 28 ] . The second category comprises post-hoc methods, which attach a scoring rule to an already trained model, using its outputs (e.g., softmax scores, logits, energies) or internal representations, to separate in-distribution (InD) from OOD inputs without retraining or architectural changes. Owing to their practicality, post-hoc detectors have attracted substantial attention, yielding a rich set of scoring functions. Early approaches derived OOD scores from softmax probabilities or logits [ 17 , 33 , 34 ] . More recent methods further improve separability by applying test-time transformations or calibration and by adjusting intermediate activations or parameters to mitigate overconfident predictions on OOD inputs [ 61 , 9 , 35 , 64 ] . Among post-hoc approaches, a promising family of methods relies on distances or similarity metrics computed in the feature space of a network relative to in-distribution training data [ 31 , 66 , 56 ] . The key hypothesis is that InD inputs concentrate in a “typical” region in the representation space, whereas OOD inputs tend to fall farther from it. Accordingly, these methods approximate the InD support in feature space, or at least a high-density region of that support, and assign higher OOD scores to test samples whose representations deviate from this approximation. They are generally model-agnostic and often transfer across tasks and architectures because they operate on intermediate activations rather than task-specific outputs. A central design choice in feature-space OOD detection is how the in-distribution support is approximated: compact parametric models can be efficient but restrictive, whereas highly local reference-based methods can be expressive but less scalable. Bounding-box abstraction provides an appealing intermediate form of geometric support representation through compact summaries of internal activations. Bounding-box abstraction [ 20 ] , originally introduced for runtime monitoring and novelty detection, summarizes in-distribution data using compact axis-aligned hyperrectangles in a neural network representation space. These hyperrectangles approximate the support of the training data and can be used to determine whether a test sample internal activations remain within the learned region. As such, bounding-box abstraction fits naturally within post-hoc feature-space OOD detection. While attractive for its interpretability and efficiency, the original instantiation monitors only a single layer and yields only a hard accept/reject decision. Moreover, it couples clustering and box construction in the same representation, which can restrict the monitor to a narrow subset of layers or features. Contributions In this work, we propose Bounding Box Anomaly Scoring (BBAS), a distance-based OOD detection approach that leverages bounding box abstraction to detect OOD data. BBAS quantifies deviations in internal network states between test inputs and training data via an anomaly score, leveraging the geometric structure induced by neuron activations. In our evaluation, BBAS achieves strong OOD detection performance across multiple benchmarks and architectures. The main contributions are: • We extend bounding-box-based OOD monitoring by incorporating convolutional layer representations in addition to the final fully-connected layer. • We introduce a decoupled clustering and abstraction scheme: clustering is performed on a selected subset of features, while bounding boxes are constructed in a richer representation. This enables multi-layer monitoring while mitigating high-dimensional clustering issues. • We propose an OOD scoring mechanism leveraging neuron exceedance, enabling graded novelty assessment and calibration of detector sensitivity. Outline This paper is structured as follows. Section 2 formalises OOD detection and introduces the scoring-based evaluation setting. Section 3 reviews distance-based post-hoc detectors and situates our approach with respect to bounding box abstraction, including a detailed comparison and discussion of the design choices addressed by our method. Section 4 presents BBAS and provides an interpretation of the abstraction. Section 5 reports an empirical study of the design choices and compares BBAS with prior work on the unified OpenOOD benchmark [ 67 ] . Finally, Section 6 discusses the flexibility and limitations of the approach. 2 Out-of-Distribution problem setting This paper examines OOD detection challenges mainly in the context of multiclass classification. Let \mathcal{X} denote the input space, and \mathcal{Y} denote the label space, where \mathcal{Y}=\{1,2,\dots,K\} for a classification task with K classes. The training dataset \mathcal{D}=\{(x_{i},y_{i})\}_{i=1}^{n} consists of n i.i.d. samples drawn from the training distribution. A neural network \mathcal{N}_{\theta}:\mathcal{X}\to\mathbb{R}^{K} parameterised by \theta is trained on samples from \mathcal{D} to produce a logit vector as output for classification tasks. OOD detection is a critical task in machine learning, aiming to identify whether a given input sample belongs to the distribution on which a model was trained or deviates from it. This problem is framed as a binary classification task, where each input x\in\mathcal{X} is classified as either in-distribution (InD) or out-of-distribution (OOD). To effectively perform this classification, a scoring function S(x) can be employed as an intermediate step. The scoring function assigns a real-valued score to each sample, reflecting the likelihood of x being out-of-distribution. By establishing a threshold \tau , a decision function \hat{g}(x) can then be defined as: \hat{g}(x)=\begin{cases}1&\text{meaning }x\sim\textnormal{OOD},\text{if }S(x)>\tau,\\ 0&\text{meaning }x\sim\textnormal{InD},\text{if }S(x)\leq\tau.\end{cases} Using an intermediate scoring function S facilitates the comparison and benchmarking of