A Unified Approach Towards Active Learning and Out-of-Distribution Detection

## Abstract

Abstract When applying deep learning models in open-world scenarios, active learning (AL) strategies are crucial for identifying label candidates from a nearly infinite amount of unlabeled data. In this context, robust out-of-distribution (OOD) detection mechanisms are essential for handling data outside the target distribution of the application.
However, current works investigate both problems separately.
In this work, we introduce SISOM as the first unified solution for both AL and OOD detection.
By leveraging feature space distance metrics SISOM combines the strengths of the currently independent tasks to solve both effectively.
We conduct extensive experiments showing the problems arising when migrating between both tasks. In these evaluations SISOM underlined its effectiveness by achieving first place in two of the widely used OpenOOD benchmarks and second place in the remaining one. In AL, SISOM outperforms others and delivers top-1 performance in three benchmarks.

###### Keywords:

## 1 Introduction

Large-scale deep learning applications encounter several data-centric challenges during training and operation, particularly in open-world problems such as mobile robotic perception.
On the one hand, they require vast amounts of data and labels for training, driven by the uncontrolled nature of open-world tasks. On the other hand, even when trained with extensive data, these models can behave unpredictably when encountering samples that deviate significantly from the training data, known as out-of-distribution (OOD) data.

Active learning (AL) addresses the first limitation by guiding the selection of label candidates. In the traditional pool-based AL scenario, models start with a small labeled training set and can iteratively query data and its labels from an unlabeled data pool. The selection is based on model metrics such as uncertainty, diversity, or latent space encoding. One AL cycle concludes with the model being trained on the labeled subset, including the newly added samples.

The second challenge, dealing with unknown data during operation, is typically addressed by OOD detection. OOD detection distinguishes between in-distribution (InD) data used for training the model and OOD samples, which differ from the training distribution. Similar to AL, it often utilizes uncertainty, energy, or latent space distances for separation.

Although both problems are currently addressed separately, they are significantly connected by sharing common metrics, such as uncertainty, latent space distances, and energy.
For instance, we can identify a sample as OOD and useful for labeling by utilizing high uncertainties. This strongly indicates a potential to benefit from insights of the respective opposite domain when designing methods.
However, a simple migration is not possible due to the specific challenges of the respective domains, like specific training schemes in OOD detection or batch diversification in AL, which we illustrate in our experiments.
The aforementioned real-world applications frequently necessitate their concurrent consideration. The open and uncontrolled nature leverages sensors to produce vast amounts of data that must be sensibly selected for labeling and training. Upon completing all AL cycles, the trained model may encounter data outside the distribution captured for the training cycles during its operation.
Thus, unifying both tasks creates a benefit for real-world applications, which we depict in Fig. 1.

In our work, we examine the connection between both tasks and design a novel approach combining mutual strengths to address them. Specifically, we employ enriched feature space distances based on neural coverage techniques, which create a symbiosis between AL and OOD detection. In summary, our contributions are as follows:

- •
We are the first to explore the connection of AL and OOD detection and examine the migration of their methods.
- •
We propose Simultaneous Informative Sampling and Outlier Mining (SISOM ), a novel method designed for both OOD detection *and* AL.
- •
In extensive experiments, we demonstrate SISOM effectiveness in AL *and* OOD benchmarks.

Figure: Figure 1: Active learning training phase (left) and out-of-distribution detection operation phase (right) in a compound framework for real-world applications.
Refer to caption: x1.png

## 2 Related Work

Given the disentanglement of both fields, we review the related work individually.

### 2.1 Active Learning

The goal of AL is to reduce the amount of labels needed while achieving the highest performance possible. Mainly, there exists the pool-based and stream-based scenario [], where data is either queried from a pool in a data center or a stream on the fly. For deep learning, the majority of current research deals with pool-based AL []. However, further scenarios have been evaluated []. Besides the scenarios, the samples are selected either by prediction uncertainty, latent space diversity, or auxiliary models.

A majority of the uncertainty-based methods rely on sampling like Monte Carlo Dropout [] or employ ensembles [, ]. To additionally ensure batch diversity Kirsch *et al. *[] used the joint mutual information. The uncertainty concepts have been employed and further developed for major computer vision tasks, including object detection [, ], 3D object detection [, ], and semantic segmentation [].
One of the few works breaking the gap between both tasks [] modified an OOD detection method for pose estimation.

In contrast, diversity-based approaches aim to select key samples to cover the whole dataset. Sener *et al. *[] proposed to choose a CoreSet of the latent space using a greedy optimization. Yehuda *et al. *[] selected samples having a high coverage in a fixed radius. Ash *et al. *[] enriched the latent space dimensions to the dimensions of the gradients and included uncertainty in this way. The concept of combining uncertainty with diversity has been further refined for 3D object detection [, ]. Liang *et al. *[] combined different diversity metrics for the same task. In semantic segmentation, Surprise Adequacy [] has been employed to measure how surprising a model finds a new instance.

Besides the metric-based approach, the selection can also be made by auxiliary models mimicking diversity and uncertainty. These approaches range from loss estimation [], autoencoder-based approaches [, , ] and graph models[], to teacher-student approaches [, ].

### 2.2 Out of Distribution Detection

The term OOD detection encompasses related concepts, including anomaly detection (AD), novelty detection (ND), open-set recognition (OSR), and OOD detection itself. To mitigate interchangeably usage [, ], we define the task in Sec. 3.2 properly.
Along with clarifying these terms, frameworks have been proposed to facilitate a fair comparison and evaluation of numerous OOD, such as OpenOOD []. This benchmark categorizes the methods into preprocessing methods interfering with the training process and the postprocessing method being applied after the training to differentiate InD and OOD.

Preprocessing techniques include augmenting training data like mixing [, ] different samples or applying fractals to images [].

Contrasting, postprocessing includes techniques of manipulations on neurons and weights of the trained network, such as filtering for important neurons [, ], or weights [], or clipping neuron values to reduce OOD-induced noise [].
Logit-based approaches encompass the model output to estimate uncertainties using temperature-scaling [], modified entropy scores [], energy scores [, ] or ensembles [].

Other methods rely on distances in the feature space, such as the Mahalanobis distance between InD and OOD samples [], consider the gradients after a forwardpass [, , , ], estimate densities [, ] or k nearest neighbor on latent space distances [].

NAC [] combined gradient information with a density approach, where a probability density function over InD samples is estimated.

In summary, there is a wide variety of OOD detection approaches, ranging from output, distance, and density-based methods to relevance and importance-based techniques. None of the existing methods have been applied and tested for both scenarios. Our goal is to address this research gap by exploring the similarities between both methods and fusing strengths to propose SISOM as an unified solution approach.

## 3 Background

### 3.1 Active Learning

During each of the AL cycles, a new set of samples $\mathcal{A}$ with a query size of $q$ is selected.
Let $\mathcal{X}$ represent a set of samples and $\mathcal{Y}$ a set of labels. AL starts with an initial labeled pool $L$, containing data samples with features $\mathbf{x}$ and corresponding label $y$, and an unlabeled pool $U$ where only $\mathbf{x}$ is known. However, $y$ can be queried from a human oracle. We further assume that $L$ and $U$ are samples from a distribution $\Omega$.

In each cycle, a model $f$ is trained such that $f:\mathcal{X}_{L}\rightarrow\mathcal{Y}_{L}$. This model then selects new samples from $U$ based on a query strategy $Q(\mathbf{x},f)$, which utilizes (intermediate) model outputs. As a result, the newly annotated set $\mathcal{A}$ is added to the labeled pool $L^{i+1}$ and removed from the unlabeled pool $U^{i+1}$.

### 3.2 Out of Distribution Detection

Ancillary, OOD detection assumes a model $f:\mathcal{X}_{L}\rightarrow\mathcal{Y}_{L}$ trained on our training data $\{X,Y\}\in L$ which have been sampled from the distribution $\Omega$.
During evaluation or inference, our model $f$ encounters data samples $\tilde{X}$ from a distribution $\Theta$ and $\Omega$, where $\Omega\cap\Theta=\emptyset$ and $\tilde{X}\notin L$. Data sampled from $\Omega$ are referred to as InD data, while samples from $\Theta$ are referred to as OOD data.

Based on the trained model $f$, a metric $S$ is used to determine whether a sample $x$ is sampled from $\Omega$ or $\Theta$.

$$ $G(\mathbf{x},f)=\begin{cases}\text{InD}&\text{if }S(\mathbf{x};f)\geq\lambda\\ \text{OOD}&\text{if }S(\mathbf{x};f)<\lambda\end{cases}$ (1) $$

OOD detection is further categorized into near- and far-OOD. Far-OOD refers to completely unrelated data, such as comparing MNIST [] to CIFAR-100 [], while CIFAR-10 [] to CIFAR-100 would be considered as near-OOD. OpenODD [] ranks near-OOD detection as more challenging.

For the models $f$, we denote by $h_{j}(\mathbf{x})$ the feature vector from the $j$-th layer of the neural network of an input $\mathbf{x}$, respectively.

## 4 Methodology

The objective of our approach is to combine techniques from both AL and OOD detection to solve their tasks jointly. In the case of active learning, we try to identify data that is diverse and beneficial for training the neural network, and in the case of OOD detection, we aim to detect data that does not belong to the desired distribution. A common aspect of both problems is the goal to characterize data by their feature space representation. Using feature characteristics, we can identify informative samples for AL as well as unusual samples (OOD).

To identify the samples with crucial characteristics for both tasks, SISOM employs an enlarged feature space Coverage (1) and increases the weighting of important neurons in a Feature Enhancement (2). Based on this feature representation, we refine the AL selection and the InD and OOD border by using an inner-to-outer class Distance Ratio (3), guiding it to unexplored and decision boundary regions. As feature space distances are prone to poorly defined latent space representations, we combine our distance metric with an uncertainty-based energy score based on Feature Space Analysis (4). Optionally, we show that we can further refine the feature space representations by tuning the Sigmoid Stepness (5).
A detailed view is depicted in Fig. 2.

(1) Coverage.
We identify two important types of regions in the feature space that should be covered for in AL and OOD detection, namely unexplored regions and those close to decision boundaries.
Unexplored regions can either correspond to OOD samples or contain informative samples that can be discovered by diversity-based AL techniques.
Selecting samples from these regions ensures that the neural network is exposed to new and diverse feature combinations.
Besides the unexplored regions, samples from various classes are closely situated in the feature space in the area of the decision boundaries, causing confusion and inaccurate model predictions.
By specifically increasing the coverage of the training set in regions close to the decision boundary with AL, the model can refine the boundary and correct its predictions accordingly. Moreover, OOD samples close to the InD distribution (near-OOD) can be hidden around the boundary.
Based on this analysis, we define the feature space representation of an input sample $\mathbf{x}$ as a concatenation of the latent space of multiple layers $h_{j}$ in a set of selected layers $H$ in Eq. 2, to determine relevant regions.
This approach follows the procedures of neural coverage [, ] and is contrasting to most diversity-based AL approaches [, ], which use a single layer.

$$ $\mathbf{z}=h_{1}(\mathbf{x})\oplus\dots\oplus h_{j}(\mathbf{x})\oplus\dots \oplus h_{n}(\mathbf{x})$ (2) $$

Given the feature space $\mathbf{z}$, we further denote $Z_{U}$ as a set of feature space representations of unlabeled samples from $U$, while $Z_{L}$ denotes the set of representations of all labeled samples $L$.

(2) Feature Enhancement.
Prior research, particularly [] and [], has demonstrated that the gradients of neurons with respect to the KL divergence of the model’s output and a uniform distribution encapsulate valuable information for OOD detection.

We apply the technique to improve the features further and enrich these by representing the individual contribution of each neuron $i$, denoted as $g_{i}$.
This gradient describes each neuron’s contribution to the actual output being different from the uniform distribution. A low value suggests that the neuron has little influence on the prediction of a given input sample. Conversely, if the value is high, the respective neuron is crucial for the decision process.

Figure: Figure 2: SISOM framework for OOD detection and AL combined.
Refer to caption: x2.png

Thus, the gradient vector can be interpreted as a saliency weighting for the activation values in the feature space. As the saliency efficiently guides the OOD and InD distinction, it should additionally accentuate informative samples for AL.

In detail, we compute the gradient of the Kullback-Leibler (KL) divergence between an uniform distribution $u$ and the softmax output distribution $f(\mathbf{x})$ concerning the input $\mathbf{x}$:

$$ $\mathbf{g}_{i}=\frac{\partial D_{KL}(u||f(\mathbf{x}))}{\partial\mathbf{z}_{i}}.$ (3) $$

We incorporate the calculated saliency to create a weighted feature representation forming the enhanced feature space with the sigmoid function $\sigma$:

$$ $\tilde{\mathbf{z}}=\sigma(\mathbf{z}\odot\mathbf{g}_{i}).$ (4) $$

The resulting gradient-weighted feature representation effectively prioritizes the most influential neurons for each input. This facilitates the identification of inputs activating atypical influence patterns, which is significant for AL as well as OOD detection
A qualitative analysis demonstrating the effect of the feature enrichment is given in Appendix 0.A.

(3) Distance Ratio.
To achieve a balance between selecting samples from unexplored regions and those close to the decision boundary, we incorporate the KL Diversity-enhanced feature representation with the quotient of inner-class distance and outer-class distance.
The quotient, initially introduced by [] to detect adversarial examples, allows us to guide our sample selection more precisely toward the decision boundary.
The inner-class distance $d_{in}$ is defined as the minimal feature space distance to a known sample of the same class $c$ as the predicted pseudo-class of the given sample. The outer-class distance $d_{out}$ represents the minimal feature space distance to a known sample of a different class than the sample’s pseudo-class.

$$ $d_{in}=\min_{\mathbf{z}^{\prime}\in Z_{L}(c^{\prime}=c)}||\tilde{\mathbf{z}}- \tilde{\mathbf{z}}^{\prime}||_{2}$ (5) $$

$$ $d_{out}=\min_{\mathbf{z}^{\prime}\in Z_{L}(c^{\prime}\neq c)}||\tilde{\mathbf{ z}}-\tilde{\mathbf{z}}^{\prime}||_{2}$ (6) $$

Figure: (a)
Refer to caption: x3.png

The distance is computed on the gradient-enhanced feature space $\tilde{\mathbf{z}}$ defined in Eq. 4 with $\mathbf{z}^{\prime}$ describing the nearest sample from the set of known samples $Z_{L}$.
In many state-of-the-art works on AL, computationally expensive distance calculations are often present [, , ]. To make our approach more efficient and feasible for OOD detection tasks, we select a representative subset $T\subset Z_{L}$ as a comparison set, thereby significantly reducing computational overhead.
We modify the Probcover [] approach to select class-wise samples, maximizing coverage within a sphere with a fixed radius in the feature space. The effect of this subset selection is further investigated in Sec. 5.3.
Our final score $r$ reflects the distance between each neuron’s weighted feature representation in the latent space and the nearest sample of the predicted class relative to the closest distance to a sample from a different class:

$$ $r=\frac{d_{in}}{d_{out}}.$ (7) $$

An extended comparison of the different distance metrics and their ability to separate InD and OOD is shown in Appendix 0.A, while a SISOM is depicted in LABEL:fig:Density_Ours.

For AL we select the $q$ samples with the highest distance ratio $r$, with $q$ being the Al query size:

$$ $\mathbf{x}_{sel}=\text{argmax}_{q}{r(\mathbf{x}):\mathbf{x}\in U}.$ (8) $$

For OOD Detection, we map the distance ratios $r$ to an interval $[0;1]$ with the strictly monotonically decreasing function:

$$ $r_{OOD}=1-\frac{{\sigma(r)+1}}{2}.$ (9) $$

This corresponds to the convention of Eq. 1 and task definition of [], where a higher score indicates that the sample is more likely to be InD.

(4) Feature Space Analysis.
Having a well-defined latent space is crucial for SISOM to attain optimal performance. Furthermore, we hypothesize that techniques relying on feature space metrics are more dependent on feature space separation than uncertainty-based methods. This effect is increased as SISOM utilizes a quotient of feature space metrics. Nevertheless, obtaining a well-defined and separable latent space may pose challenges in specific contexts and tasks.

To estimate the separability of feature space, we compute the average distance ratio $r_{avg}$ using Eq. 4 and Eq. 7 for the known set as:

$$ $r_{avg}=\frac{1}{|L|}\sum_{\tilde{\mathbf{z}}\in L}\frac{d_{in}(\tilde{\mathbf {z}})}{d_{out}(\tilde{\mathbf{z}})}=\frac{1}{|L|}\sum_{\mathbf{z}\in L}\frac{d _{in}(\sigma(\mathbf{z}\odot\mathbf{g}_{i}))}{d_{out}(\sigma(\mathbf{z}\odot \mathbf{g}_{i}))}.$ (10) $$

A lower $r_{avg}$ value indicates better separation of the samples in the enhanced feature space, implying that samples of the same class are relatively closer together than samples of different classes.
To mitigate possible performance disparities of SISOM in difficult separable domains, we introduce a self-deciding process for the sampling method, which utilizes the feature separation score $r_{avg}$ as follows:

$$ $\hat{r}_{i}=\min(r_{avg},1)\cdot E_{i}+\max(1-r_{avg},0)\cdot r_{i}.$ (11) $$

The so created $\hat{r}$ combines our SISOM score from Eq. 7 with the uncertainty-based energy score $E(\mathbf{x})=-\log\sum_{i=1}^{c}\exp(f(\mathbf{x})_{i})$ based on the model’s output logits $f(\mathbf{x})$.

Depending on whether $r_{avg}\to 1$ or $r_{avg}\to 0$, the created score $\hat{r}_{i}$ relies more on either the energy score or the distance ratio $r_{i}$. If $r_{avg}\to 1$, indicating poorly separated classes, $\hat{r}_{i}$ relies more on the energy score. Conversely, if $r_{avg}\to 0$, suggesting a well-separated feature space, $\hat{r}_{i}$ relies more on the distance ratio. A density outline of our combined approach SISOMe is given in LABEL:fig:Density_OursEn.
Alternatively, one can replace $r_{avg}$ with a tuneable hyperparameter in Eq. 11.

(5) Sigmoid Steepness.
Since Eq. 10 depends on the sigmoid function defined in Eq. 4, the sigmoid function has a large influence on the enhanced feature space $\tilde{\mathbf{z}}$. An additional hyperparameter $\alpha$ can influence the sigmoid function’s steepness. As $\mathbf{z}$ is concatenated from different layers in Eq. 2, the sigmoid can be applied to each layer $j$ individually. This allows for a more nuanced control over the influence of each neuron’s contribution to the final decision. We define the sigmoid using the steepness parameter $\alpha$ as:

$$ $\sigma_{j}(\mathbf{x})=\frac{1}{1+e^{-\alpha_{j}\mathbf{x}}};\quad\{\alpha_{j} :h_{j}\in\mathbf{z}~{}~{}\forall j\}.$ (12) $$

Relating to Eq. 4, the set $\alpha$ of steepness parameters of the sigmoid function for each layer $h_{j}$, determines the degree of continuity or discreteness of the features within that layer. By applying a layerwise sigmoid, Eq. 4 is formulated as follows:

$$ $\displaystyle\tilde{\mathbf{z}}=\sigma_{1}(h_{1}(\mathbf{x})\odot g_{i,1}) \oplus\dots\oplus\sigma_{j}(h_{j}(\mathbf{x})\odot\mathbf{g}_{i,j})\oplus\dots \oplus\sigma_{n}(h_{n}(\mathbf{x})\odot\mathbf{g}_{i,n}),$ (13) $\displaystyle\text{with}\quad\mathbf{g}_{i,j}=\frac{\partial D_{KL}(u||f( \mathbf{x}))}{\partial h_{j,i}};\quad\forall j.$ $$

Following this consideration we can select $\alpha$ values which optimize the feature space separable Eq. 10 by minimizing $\alpha_{\text{opt}}=\arg\min_{\alpha}r_{\text{avg}}(\alpha)$.
Besides the quantitative assessment of our Feature Space Analysis and Sigmoid Steepness in Sec. 5.3, the influence of the Sigmoid Steepness is shown in LABEL:fig:Density_OursOS.

## 5 Experiments

To evaluate our proposed method, we conducted a comprehensive assessment of SISOM on both tasks AL and OOD detection individually. The experiments’ details, settings, and results are presented in Sec. 5.1 and Sec. 5.2, respectively. We utilized the standard pool-based AL scenario [] for AL. For OOD detection, we followed the widely used OpenOOD benchmarking framework [, ].

In the AL experiments, we compared our method against several baselines, including CoreSet [], CoreGCN [], Random, Badge [], and Loss Learning []. Additionally, we adapted the NAC [] method from OOD detection to AL to assess the transferability from OOD to AL.

For OOD detection experiments, we employed the implementation provided by the OpenOOD framework when available. We also followed the experimental setup and datasets for near and far OOD detection. The baselines used for validation include NAC [], Ash [], KNN [], Odin [], ReAct [], MSP [], Energy [], Dice [], and GEN []. Moreover, we tested the CoreSet [] AL method to verify the transferability from AL to OOD. Our focus was on methods that use the cross-entropy training scheme to maintain a fair comparison and ensure compatibility post-AL. We further discuss different modifications in our ablation study in Sec. 5.3.

Figure: Figure 4: Comparison of different active learning methods on CIFAR-100 with indicated standard errors.
Refer to caption: x7.png

### 5.1 Active Learning

We followed the most common AL benchmark settings and datasets, including the CIFAR-10 [], CIFAR-100 [], and SVHN [] datasets paired with a ResNet18 [] model. We assessed the network’s performance by measuring accuracy relative to the amount of data used. The plots include markers to indicate the selection steps.
As suggested by [, ], we start with an initial pool size of 1,000 labeled samples for CIFAR-10 and SVHN. In each AL cycle, the model can query 1,000 additional samples from an unlabeled pool, which are then labeled and added to the labeled pool for the subsequent cycle. Due to the larger number of classes in CIFAR-100, we increased the selection size to 5,000. Detailed parameters and settings are available in Sec. 0.B.1. We evaluate the achieved performance over the number of used samples and further indicate each selection step with a marker in the following plots.

**Table 1: OOD benchmark for ImageNet 1k using the provided ResNet50 checkpoint of OpenOOD, Near-OOD: SSB-hard [], NINCO [] Far-OOD: iNaturalist [], Textures [], OpenImage-O []**
| Postprocessor | OOD AUROC | ID |  |
| --- | --- | --- | --- |
| Near-OOD | Far-OOD | Acc. |  |
| SISOMe | 78.59 | 89.04 | 76.18 |
| ASH | 78.17 | 95.74 | 76.18 |
| ReAct | 77.38 | 93.67 | 76.18 |
| SISOM | 77.33 | 88.01 | 76.18 |
| GEN | 76.85 | 89.76 | 76.18 |
| KLM | 76.64 | 87.6 | 76.18 |
| Energy | 76.03 | 89.50 | 76.18 |
| MSP | 76.02 | 85.23 | 76.18 |
| ODIN | 74.75 | 89.47 | 76.18 |
| DICE | 73.07 | 90.95 | 76.18 |
| NAC | 71.73 | 94.66 | 76.18 |
| KNN | 71.1 | 90.18 | 76.18 |

In the CIFAR-10 benchmark, as shown in LABEL:fig:cifar10, SISOM proves a steep learning curve, consistently outperforming other methods and achieving the highest performance for most of the selection cycles. Moreover, as the number of samples increases, SISOM maintains its lead over Learning Loss and CoreSet. Unlike other methods, NAC does not show a better performance than Random.

Figure: (a)
Refer to caption: x8.png

Following the CIFAR-10 settings, we depict the results for the SVHN experiments in LABEL:fig:svhn. Similar to the CIFAR-10 results, our method maintained high performance.
In the last cycle, SISOM reaches the highest performance, with a narrow margin over other methods. As for CIFAR-10, NAC did not perform well in the data selection. Given that SVHN’s 10 classes are numbers, it is easier than the more diverse CIFAR-10 benchmark dataset. This can be observed by an overall reduced performance gap between the methods compared to CIFAR-10.

After examining SISOM in datasets with a limited number of classes, we examine the AL setup on the larger CIFAR-100 dataset and report the results in Fig. 4. In this setting, the learning curve of the methods is less steep compared to the other two experiments, reflecting the increased difficulty of the task. The complexity of the dataset requires more data for the model to perform effectively. While in the early stages, pure diversity-based methods are in the lead, SISOM gains velocity in the last selection steps and achieves the highest performance.

In conclusion of the AL experiments, SISOM reached state-of-the-art performance and surpasses other methods across all three datasets, demonstrating its viability for AL.
While in the early stages, SISOM falls behind other approaches, in following selection cycles with more training data it outperforms them.
We hypothesize that the early cycles had a poorly separated feature space, causing this issue.

### 5.2 Out-of-distribution detection

Following our evaluation of SISOM on classic AL benchmarks, we utilize the OpenOOD framework to evaluate its performance on the OOD detection task. We stick to the recommended benchmarks on CIFAR-10 [], CIFAR-100 [], and ImageNet 1k [], and we provide evaluation values for both near- and far-OOD detection. The assignment of datasets to near and far categories follows the framework’s suggestions and is reported in the table captions. Additional experiment settings are described in Sec. 0.B.2. The framework ranks methods based on their AUROC performance and provides checkpoints for fair post-processor validation.

Firstly, we examine the performance on the CIFAR-10 benchmark and show the results in Tab. 3. SISOMe and SISOM achieve the highest AUROC score for near-OOD data, respectively. SISOMe surpasses SISOM in all metrics. For far-OOD, SISOM ranks third after NAC, while SISOMe secures the first place. This is noteworthy as NAC underperformed in the AL task, even when compared to methods suffering from batch diversification, which underlines the non-triviality of migrating between both tasks out of the box.

Figure: (a)
Refer to caption: x10.png

**Table 2: OOD benchmark for CIFAR-10 with ResNet18 with Cross-Entropy training, Near-OOD: CIFAR-100 [], Tiny ImageNet [] Far-OOD: MNIST [], SVHN [], Textures [], Places365 []**
| Postprocessor | OOD AUROC | ID |  |
| --- | --- | --- | --- |
| Near-OOD | Far-OOD | Acc. |  |
| SISOMe | 91.76 | 94.74 | 95.06 |
| SISOM | 91.40 | 94.50 | 95.06 |
| NAC | 90.93 | 94.60 | 95.06 |
| KNN | 90.64 | 92.96 | 95.06 |
| CoreSet | 90.34 | 92.85 | 95.06 |
| GEN | 88.20 | 91.35 | 95.06 |
| MSP | 88.03 | 90.73 | 95.06 |
| Energy | 87.58 | 91.21 | 95.06 |
| ReAct | 87.11 | 90.42 | 95.06 |
| ODIN | 82.87 | 87.96 | 95.06 |
| KLM | 79.19 | 82.68 | 95.06 |
| DICE | 78.34 | 84.23 | 95.06 |
| ASH | 75.27 | 78.49 | 95.06 |

The second benchmark dataset suggested by OpenOOD is CIFAR-100, which is similar to the CIFAR-10 benchmark but two datasets are swapped in the experimental setting. While this might not seem like a significant change, differentiating CIFAR-10 as OOD in a larger InD space is more challenging. We report the results in Tab. 3. Interestingly, while for CIFAR-10, methods performed well on both near- and far-OOD, for CIFAR-100, the best far-OOD method is equal to the worst near-OOD method. SISOMe ranks as the second-best method for near-OOD and repeatedly beats the individual metrics, SISOM and Energy. This is an interesting finding since, in contrast to CIFAR-10, energy achieves better performance than SISOM among the individual metrics on CIFAR-100. This supports our hypothesis that by considering the average ratio $r_{avg}$ as a proxy for feature space separation, we obtain stronger performances in both well-separated and poorly-separated feature spaces. It is noteworthy that the best approach, GEN, showed an average performance on CIFAR-10.

The third benchmark suggested by OpenOOD is ImageNet 1k, which contains more classes and is a much larger dataset than the previous ones. Nonetheless, the overlap of the datasets used for the previous benchmarks is quite low, compared to the other two benchmarks. In the results depicted in Tab. 1, SISOMe and SISOM achieved first and fourth-best scores on near-OOD, with SISOMe showing strong performance for far-OOD. Interestingly, the NAC method, which was the second-best in CIFAR-10, ranks much lower, and KNN, the third-best method in CIFAR-10, ranks last. Meanwhile, ASH, which ranks first in this benchmark, is last in the CIFAR-10 benchmark.

Overall benchmarks, SISOMe is the only approach, being consistently under the top three ranks, and even secured first place in two of them. Excluding SISOMe , SISOM achieved two top-three rankings and one-top one ranking. Notably, our method performs relatively better on near-OOD data than on far-OOD data. This is understandable, as the ratio between inner and outer class distance is higher for data close to the training data distribution, while the quotient is lower for far-OOD. Additionally, near-OOD is closer to the data of interest for AL selection. According to [], near-OOD is considered the more challenging task and is more likely to occur in real applications. Thus, higher performance on near-OOD may be preferred in practice.

### 5.3 Ablations studies

In an ablation study, we qualitatively examine the latent space assumptions for AL as well as the effect of unsupervised feature space analysis and reduce labeled set $T$.

AL Latent Space.
To validate the assumptions made in Sec. 4, we examine the configuration of the latent space of our selection in the AL experiments. The objective of our method is to select samples in the decision boundary region for the AL case. In Fig. 6, we compare CoreSet and Loss Learning with SISOM without a greedy selection. It can be observed that CoreSet, as intended, exhibits high diversity in unseparated regions. The pseudo-uncertainty-based Loss Learning method is more concentrated in its selection but fails to diversify the selection across all decision boundaries. In contrast, SISOM , as shown in LABEL:fig:tsneOurs, focuses on the decision boundary while successfully covering the entire area between the unseparated samples. This demonstrates the effectiveness of our method in addressing the challenges of both AL and OOD detection.

Optimal Sigmoid Steepness.
In our feature space analysis in Sec. 4, we derived $r_{\text{avg}}$ in Eq. 10 as a proxy for the feature space separability.
Due to the distance concept of SISOM , we hypothesize that it works better in well-separated feature spaces. To examine this, we conduct a random search for different $\alpha$ sets and record the different $r_{\text{avg}}$ values. To reduce the search space, we follow the premise postulated in Sec. 4 that generally, deeper layers require a steeper sigmoid curve, i.e., a higher $\alpha_{j}$ value due to the nature of the features captured within these layers.

After computing every $r_{\text{avg}}$ value for each combination of $\alpha$, we select the $\alpha_{\text{opt}}$ set that minimizes $r_{\text{avg}}$. Formally, this can be written as:

$$ $\alpha_{\text{opt}}=\arg\min_{\alpha}r_{\text{avg}}(\alpha)$ $$

In Tab. 4, an optimized set $\alpha_{opt}$ is marked with OS. As it can be seen, a set with better feature space separation leads to increased performance for CIFAR-100 and ImageNet, partly confirming our hypothesis. In CIFAR-10 however, the original set of parameters yields the best results. One explanation might be that, in CIFAR-10, the different classes are already well separated, such that optimization on this separation yields no improvement and leads to an overfitting behavior.

Reduced Subset Selection.
For larger datasets, distance-based approaches like CoreSet [] or [] suffer from huge computational efforts, which is problematic for OOD detection, too.
In Sec. 4, we suggested to use a reduced subset $T$ of the comparison set $Z_{L}$. In this section, we want to explore the effect of a subset selection using Probcover [].
Probcover selects samples maximizing coverage within a sphere with a fixed radius in the feature space. We modify the algorithm by applying it class-wise to select a representative subset for each class. For each dataset, we select a total of 10% of the samples for each class, drastically increasing our method’s inference speed. We compare the effect of our reduced subset selection (RS) in Tab. 4 and highlight it qualitatively in LABEL:fig:Density_OursOSRS.

A comparison of the preprocessing steps for SISOM in Tab. 4 indicates that the AUROC near-OOD score has improved for all datasets.
It can be observed that preselection enhances feature space separability based on the $r_{\text{avg}}$ column.
This also strengthens our hypothesis from the previous subsection. For ImageNet and CIFAR-100, the combination of feature analysis and preselection results in the best performance, for CIFAR-10 the additional feature space analysis did not improve the performance. By taking the low $r_{\text{avg}}$ into account, the chosen values could have reduced the space too much, leading to an overfitting behavior. All parameters are given in Sec. 0.B.3.

**Table 4: Ablation Study on Optimal Sigmoid Steepness (OS) and Reduced Subset Selection (RS) on Near OOD Benchmarks.**
|  | ImageNet |  | CIFAR 100 |  | CIFAR 10 |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Method | $\text{AUROC}_{near}$ | $r_{\text{avg}}$ |  | $\text{AUROC}_{near}$ | $r_{\text{avg}}$ |  | $\text{AUROC}_{near}$ | $r_{\text{avg}}$ |
| SISOM | 77.21 | 0.270 |  | 75.93 | 0.33 |  | 91.33 | 0.26 |
| $\text{SISOM\,}+\text{OS}$ | 77.4 | 0.266 |  | 79.56 | 0.19 |  | 90.37 | 0.099 |
| $\text{SISOM\,}+\text{RS}$ | 77.33 | 0.249 |  | 76.07 | 0.31 |  | 91.40 | 0.24 |
| $\text{SISOM\,}+\text{OS}+\text{RS}$ | 77.37 | 0.245 |  | 79.69 | 0.18 |  | 90.54 | 0.086 |

## 6 Conclusion

We proposed SISOM , the first approach designed to solve out-of-distribution detection and AL jointly.
By weighting latent space features with KL divergence of the neuron activations and relating them to the latent space clusters of the different classes SISOM achieves state-of-the-art performance in both tasks.
In the famous OpenOOD benchmarks SISOM archives the first place in two of the three benchmarks and the second place in the remaining one. Moreover, SISOM surpasses state-of-the-art AL approaches in three different benchmarks.
Underlined by these results, SISOM effectively addresses open-world applications, like environment sensing, which usually suffers from label costs during training and high unlabeled data availability as well as out-of-distribution samples during inference.

In future work, we plan to combine the two tasks that are currently separated as independent steps. Enabling continuous AL during inference while filtering out-of-distribution data can significantly enhance the model’s performance after the initial selection phase.

## Appendix 0.A Qualitative Assignments

In this section, we highlight the influence of major components of our methods on the ability to separate InD and OOD data.
In Fig. 7, we display the influence of the KL divergence gradient with a T-SNE analysis on CIFAR-10 [] as InD and Tiny ImageNet (tin) [] as nearOOD. Without feature enhancement, the latent space is much harder to separate, and tin is distributed all over the latent space as shown in LABEL:fig:tsneWOkldiv. In contrast, the latent space with KL divergence enhances features, is much more separated, and has a clearer decision boundary to the near classes as indicated in LABEL:fig:tsnekldiv.

Figure: (a)
Refer to caption: x13.png

In addition to the previously presented density plots, we show the inner and outer distance together with the distance quotient of SISOM in Fig. 8 for CIFAR-10. LABEL:fig:densityA shows the inner class, indicating small inner class distances leading to a good separability for the InD data. On the other hand, the outer class distance in LABEL:fig:densityB provides a good separable peak for InD data, but a portion of InD overlaps with OOD data. The combined distance quotient shows the increased separability of the different InD and OOD sets as depicted in LABEL:fig:densityDSA.

Figure: (a)
Refer to caption: x15.png

## Appendix 0.B Experimental Details

In this section, we provide experiment details to support the reproducibility of results by providing the used parameters.

### 0.B.1 Active Learning Experiments

In active learning experiments, we used a ResNet18 [] model, with the suggested modifications of [] presented in a CIFAR benchmark repository [], which replaced the kernel of the first convolution with a $3\times 3$ kernel. Additionally, we used an SGD optimizer with a learning rate of $0.1$ and multistep scheduling at 60, 120, and 160, decreasing the learning rate by a factor of 10, which aligns the scheduler with Yoo *et al. *[] but refines the steps further, especially for CIFAR-100 []. For the construction of the feature space, we used the layers after the 4 blocks of ResNet with the following sigmoid values:

- •
CIFAR-10
Adaptive Average Pooling Layer: 50,
Sequential Layer 3: 10,
Sequential Layer 2: 1,
Sequential Layer 1: 0.05.
- •
CIFAR-100/SVHN
Adaptive Average Pooling Layer: 1,
Sequential Layer 3: 0.1,
Sequential Layer 2: 0.1,
Sequential Layer 1: 0.1

### 0.B.2 Out-of-Distribution Experiments

In the OOD experiments, we report the mean of the three different seeds employed in the standard setting of the OpenOOD [] framework with ResNet18 for CIFAR-10 and CIFAR-100. For Imagenet, we use the sole ResNet50 torchvision checkpoint provided in the standard settings. We followed the official tables of OpenOOD’s benchmark and reported the mean without the standard deviation. For the CIFAR-100 experiment, instead of using the automated $r_{\text{avg}}$ value to balance between $r$ and $E$ from Eq. (11), we set $r_{\text{avg}}=0.8$ for SISOMe based on a hyperparameter study.
In the benchmark tables, we reported for SISOM the best values matching the best values of the ablation study modifications.
Furthermore, we follow the suggested sigmoid values [] for CIFAR-10 and ImageNet. For CIFAR-100, we choose values that minimize Eq. (10). A detailed overview of the sigmoid values for the 4 blocks of ResNet18 and ResNet50 for all experiments is provided below:

- •
CIFAR-10
Adaptive Average Pooling Layer: 100,
Sequential Layer 3: 1000,
Sequential Layer 2: 0.001,
Sequential Layer 1: 0.001
- •
CIFAR-100
Adaptive Average Pooling Layer: 1,
Sequential Layer 3: 0.1,
Sequential Layer 2: 0.1,
Sequential Layer 1: 0.1
- •
ImageNet:
Adaptive Average Pooling Layer: 3000,
Sequential Layer 3: 300,
Sequential Layer 2: 0.01,
Sequential Layer 1: 1

### 0.B.3 Ablation Study

In this section, we highlight the relevant parameters for the ablation study experiments on SISOM . Namely, we examine the Optimal Sigmoid Steepness (OS) and the Reduced Subset Selection (RS) shown in Tab. 4. In the experiments conducted with RS, a representative subset size of 10% relative to the original training set was used across all experiments. Additionally, the specific distance radius used for the class-wise ProbCover [] implementation on CIFAR-10, CIFAR-100, and ImageNet is provided in Tab. 5.
For SISOM + RS without OS, the suggested sigmoid values [] emphasized in Sec. 0.B.2 were used.
For the OS modification, the search space for the optimal sigmoid parameters is presented in Tab. 5. The parameters fulfilling the minimization of Eq. (10) are highlighted in bold.

**Table 5: Parameters for the Ablation Study, Probcover Radius for RS and Search Space of Optimal Sigmoid Steepness.**
| Dataset | ProbCover Radius | Layer | Sigmoid Search Values |
| --- | --- | --- | --- |
| CIFAR-10 | 0.75 | AdaptiveAvgPool2d-1 | 100, 1000 |
| Sequential-3 | 1, 10, 1000 |  |  |
| Sequential-2 | 0.001, 0.1, 1 |  |  |
| Sequential-1 | 0.001, 0.1, 1 |  |  |
| CIFAR-100 | 5.0 | AdaptiveAvgPool2d-1 | 1, 50, 100 |
| Sequential-3 | 0.1, 10, 100 |  |  |
| Sequential-2 | 0.1, 1 |  |  |
| Sequential-1 | 0.005, 0.1 |  |  |
| ImageNet | 10.0 | AdaptiveAvgPool2d-1 | 10, 100, 3000 |
| Sequential-3 | 1, 10, 300 |  |  |
| Sequential-2 | 0.1, 1 |  |  |
| Sequential-1 | 0.1, 1 |  |  |

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 3
presentation: 2
questions: See weakness.
soundness: 3
strengths: 1. This paper proposes SISOM, the first approach designed to jointly solve OOD detection and AL.
2. The experiments on AL and OOD detection are extensive.
summary: This paper proposes to handle active learning and out-of-distribution detection in a unified framework, SISOM.  SISOM provides
a novel feature space analysis scheme enabling a post-training feature space refinement. By employing enriched feature space distances based on neural coverage technique, SISOM creates a symbiosis between AL and OOD detection.
weaknesses: 1. In the active learning (AL) experiments, does the unlabeled data include out-of-distribution (OOD) samples? It appears that AL and OOD are discussed as separate scenarios in the experiments. I would like to know if the proposed method can work in a coupled scenario where the unlabeled data contains some OOD samples as noisy data.
2. The improvement in experimental performance is limited. 
3. In AL experiments, if 5,000 labeled samples are added in each AL cycle, what is the total number of labeled samples at the end? 
4. The data requirements for the AL experiments are not low either. The semi-supervised problem also involves a small number of initial labeled samples and a large amount of unlabeled data, without the need to query for labels. Compared to semi-supervised methods, does the proposed approach offer any performance advantages?

---

confidence: 5
contribution: 1
initial_rating: 3
presentation: 3
questions: - In Equation (9), $r_{OOD}$ is proportional to $-r$. Is there a particular reason $r_{OOD}$ needs to be in the form presented in Equation (9)?
- In line 498, it is mentioned that for CIFAR-10, the original set of parameters yielded good performance. How can one determine whether $\alpha$ needs to be optimized? A key advantage of the proposed method is that it is hyperparameter-free, so it would be helpful to provide guidelines on how to decide the value of $\alpha$ from this perspective.
soundness: 1
strengths: - This study is significant in that it explores the practical applicability of deep learning by simultaneously considering both AL and OoDD tasks. The proposed method is particularly valuable as it is hyperparameter-free, which greatly enhances its practical usability.
- The paper is clearly written and easy to follow. Additionally, the paper includes comparative experiments with many well-known methods in both AL and OoDD tasks.
summary: This study proposes the Simultaneous Informative Sampling and Outlier Mining (SISOM) methodology, which can be applied to both active learning (AL) and out-of-distribution detection (OoDD) tasks, as they are closely related. Specifically, the method extracts enhanced features by weighting features from all layers with gradients and introduces a scoring scheme based on the distance to classes. The proposed SISOM and its variant combined with energy score, SISOMe, demonstrate comparable or better performance in AL and OoDD settings compared to existing methods.
weaknesses: - I have concerns about certain overclaims in the study. First, the authors state that they propose the "first unified solution for both AL and OoDD." I understand that this claim is based on the fact that the proposed SISOM score, using a distance ratio, can be applied to both AL and OoDD. However, existing uncertainty metrics, such as MSP and MC Dropout, can also be used as a single metric for both AL and OoDD, making it difficult to assert that this study is the first unified solution. Second, the authors claim that their method achieves top-1 performance on most OOD benchmarks. However, as seen in Table 1, while the method performs well in the Near-OOD setting, it does not do as well in the Far-OOD setting. More precise claims are needed here.
- I am concerned about the computational cost of the proposed method. The SISOM score includes both gradient computation and distance computation between samples, which is not negligible compared to existing methods (even when using a representative subset, $\mathbb{T}$). Additionally, the $r_{avg}$ value in Equation (10) must be updated with each AL cycle, which also requires recalculating the $\alpha_j$ values. These additional computational requirements should be discussed and compared with existing methods.
- I have also concerns regarding the comparison experiments between the proposed method and existing methods. The AL performance shown in Figure 5 does not demonstrate a significant advantage over existing methods. Additionally, I question whether the performance of existing methods in Table 1 has been rigorously evaluated. For example, despite differences in architecture and settings, the performance of ASH on CIFAR-10 differs considerably from the results in the original paper. These points should be clarified to provide readers with sufficient information.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 2
questions: As discussed above.
soundness: 3
strengths: 1) This paper tries to study a unified approach to address active learning and out-of-distribution detection simultaneously. This problem has rarely been studied.
2) A new distance metrics has been introduced to help improve both the performance of active learning and OOD detection.
summary: This paper focuses on active learning and out-of-distribution detection. Specifically, the authors aim to propose a unified approach that tries to address OOD detection and active learning simultaneously. The proposal leverages feature space distance metrics to improve the performance. Experimental results on both active learning and OOD detection are reported.
weaknesses: 1) Why it is necessary to unify active learning and OOD detection into one framework. How can these tasks help each other? More explanations or theoretical analyses are needed. The contribution of this work to the field of active learning and OOD detection needs to be emphasized.
2) Active learning aims to exploit unlabeled data. Actually, in the field of semi-supervised learning, various works are focusing on open-set or open-world semi-supervised learning, i.e., the unlabeled data contains out-of-distribution instances. The goal is to decrease the negative impact of these OOD unlabeled instances. Can the proposal be applied to this setting?
3) In Table 1, how many runs are the experiments conducted, and how about the performance variance or std?
4) Some other works focus on active learning and OOD[1]. But these works are missing in the related works.

[1] LOG: Active Model Adaptation for Label-Efficient OOD Generalization. NeurIPS 2022.

---

confidence: 5
contribution: 1
initial_rating: 1
presentation: 2
questions: See weaknesses.
soundness: 1
strengths: 1. The paper provides a clear and detailed description of the SISOM method, making it accessible and understandable.
2. The authors conducted extensive experiments across various datasets and compared the method against multiple benchmarks, substantiating SISOM's efficacy.
summary: This paper introduces SISOM (Simultaneous Informative Sampling and Outlier Mining), a novel approach that addresses both active learning (AL) and out-of-distribution (OOD) detection in a unified framework. By leveraging feature space distance metrics, SISOM combines the strengths of these previously independent tasks and demonstrates effectiveness in extensive experiments. The method achieved top performance in multiple OOD benchmarks and surpassed existing AL methods in benchmark tests. Additionally, SISOM introduces a new latent space analysis for post-training refinement and a self-balancing fusion of uncertainty and diversity metrics.
weaknesses: 1. The problem addressed in this paper is essentially consistent with existing open-set active learning (OSAL) methods [1-7]. However, the authors provide a highly inappropriate justification for separating the two, allowing their proposed method to avoid comparison with these existing methods. In OSAL tasks, the goal of AL is to query known class samples with high information content. The authors' assertion that "existing methods address AL and OOD separately" is misleading, as it merely represents one specific means to achieve this goal. In OSAL, unknown class samples will inevitably be queried, leading to the presence of unknown class samples in the labeled set. Not utilizing these samples is a waste of labeling resources. Since directly inputting unknown class samples into the target classifier to train a k+1 classifier often harms the performance of known classes, introducing an additional classifier to assist in active querying is a natural idea. So, the authors' claim that existing methods incorporate auxiliary models for differentiation is also unreasonable. Furthermore, not all existing methods utilize auxiliary models, such as CCAL [1], and those that do can often have the auxiliary models removed with appropriate modifications. After all, introducing auxiliary models alone is insufficient for these papers to be accepted; each has its own unique innovations to achieve the goals of OSAL.

2. The contributions in the methods section are negligible. The authors' approach of distinguishing samples based on their distances in the feature space is a common practice, with similar methods already proposed in [5, 6].

3. Regarding the experimental section, the active learning method chosen by the authors is not currently state-of-the-art, and there is no comparison with open-set active learning methods. This lack of comparison undermines the validation of the proposed method's effectiveness.

4. The comparison results for OOD detection are predictable. Existing OSAL studies [2,4,6,7] have demonstrated that, due to the limited data in active learning, current OOD detection methods often perform poorly.

[1] Contrastive Coding for Active Learning under Class Distribution Mismatch, ICCV 2021

[2] Active Learning for Open-set Annotation, CVPR 2022

[3] Meta-Query-Net: Resolving Purity-Informativeness Dilemma in Open-set Active Learning, NeurIPS 2022

[4] Not All Out-of-Distribution Data Are Harmful to Open-Set Active Learning, NeurIPS 2023

[5] Entropic Open-set Active Learning, AAAI 2024

[6] Inconsistency-Based Data-Centric Active Open-Set Annotation, AAAI 2024

[7] Bidirectional Uncertainty-Based Active Learning for Open Set Annotation, ECCV 2024