O
PEN -S ET R ECOGNITION : A G OOD C LOSED -S ET C LASSIFIER IS A LL Y OU N EED
Anonymous authors
Paper under double-blind review
A BSTRACT
The ability to identify whether or not a test sample belongs to one of the semantic classes in a classiﬁer’s training set is critical to practical deployment of the model.
This task is termed open-set recognition (OSR) and has received signiﬁcant attention in recent years.
In this paper, we ﬁrst demonstrate that the ability of a classiﬁer to make the ‘none-of-above’ decision is highly correlated with its accuracy on the closed-set classes.
We ﬁnd that this relationship holds across loss objectives and architectures, and further demonstrate the trend both on the standard OSR benchmarks as well as on a large-scale ImageNet evaluation.
Second, we use this correlation to boost the performance of the cross-entropy OSR ‘baseline’ by improving its closed-set accuracy, and with this strong baseline achieve a new state-of-the-art on the most challenging OSR benchmark.
Similarly, we boost the performance of the existing state-of-the-art method by improving its closed-set accuracy, but this does not surpass the strong baseline on the most challenging dataset.
Our third contribution is to reappraise the datasets used for OSR evaluation, and construct new benchmarks which better respect the task of detecting semantic novelty, as opposed to low-level distributional shifts as tackled by neighbouring machine learning ﬁelds.
In this new setting, we again demonstrate that there is negligible difference between the strong baseline and the existing state-of-the-art.
I NTRODUCTION
Given the success of modern deep learning systems on closed-set visual recognition tasks, a natural next challenge is open-set recognition (OSR) (Scheirer et al., 2013).
In the closed-set setting, a model is tasked with recognizing a set of categories that remain the same during both training and testing phases.
In the more realistic open-set setting, a model must not only be able to distinguish between the training classes, but also indicate if an image comes from a class it has not yet encountered.
The OSR problem was initially formalized in (Scheirer et al., 2013) and has since inspired a rich line of research (Bendale & Boult, 2016; Chen et al., 2020a;
Ge et al., 2017; Neal et al., 2018; Sun et al., 2020;
Zhang et al., 2020; Shu et al., 2020).
The standard baseline for OSR is a model trained with the cross-entropy loss on the known classes.
At test time, the maximum value of the softmax probability vector is used to decide if an input belongs to the known classes or not.
We henceforth refer to this method as the ‘baseline’ or ‘cross-entropy baseline’.
Most existing literature reports signiﬁcantly outperforming this OSR baseline on standard benchmarks of re-purposed image recognition datasets, including MNIST (LeCun et al., 2010) and TinyImageNet (Le & Yang, 2015).
In this paper we reappraise these approaches.
Firstly, we investigate the relationship between the closed-set and open-set performance of a classiﬁer (sec. 3).
While it might be expected that stronger closed-set classiﬁers might overﬁt to the training classes (Recht et al., 2019; Zhang et al., 2017), and thus might perform poorly for OSR, we show instead that the closed-set and open-set performance are highly correlated.
We show this trend holds across datasets, loss objectives and model architectures, and further demonstrate the trend on an ImageNet-scale evaluation.
Secondly, following this observation, we show that the open-set performance of a classiﬁer can be improved by enhancing its closed-set accuracy, tapping the numerous recent advances in image classiﬁcation (Loshchilov & Hutter, 2017; Szegedy et al., 2016; Cubuk et al., 2020; Bello et al., 2021).
Speciﬁcally, we introduce strategies such as more augmentation, better learning rate schedules and label smoothing, that signiﬁcantly improve the closed-set performance of the cross-entropy baseline
[Figure]
state-of-the art methods substantially the currently reported baseline
Notably, we achieve a new state-of-the-art on the most challenging TinyImageNet benchmark.
Furthermore, we transfer these improvements to two previous OSR methods, including the current state-of-the-art from (Chen et al., 2021).
While this does boost its performance, we observe that the improvement with respect to our improved baseline is marginal, further demonstrating the power of the simple cross-entropy classiﬁer (see ﬁg. 1a).
This ﬁnding is important because it allows us to better assess recent reported progress in the area.
Finally, we turn to the experimental setting for OSR (sec. 5).
Current OSR benchmarks are both small scale and lack a speciﬁc deﬁnition of what constitutes a ‘visual class’.
As an alternative, we propose an ImageNet-scale evaluation based on the full ImageNet database (Ridnik et al., 2021), as well as the use of ﬁne-grained datasets, including CUB (Wah et al., 2011) and FGVC-Aircraft (Maji et al., 2013), which have clear deﬁnitions of a semantic class (see ﬁg. 1b).
Furthermore, we construct open-set splits with an explicit focus on semantic novelty , which we hope better separates this avenue of research from related machine learning sub-ﬁelds such as out-of-distribution (Hendrycks & Gimpel, 2017) and anomaly detection (Kwon et al., 2020).
Our proposed splits also offer a better way of quantifying open-set difﬁculty; we ﬁnd that different splits lead to a much larger discrepancy in open-set performance than the current measure of open-set difﬁculty ‘openness’ (Scheirer et al., 2013), which focuses only on the number of open-set classes.
We evaluate our strong baseline as well as the state-of-the-art method on this new conﬁguration to encourage future research in this direction.
R ELATED WORK
Open-set recognition Seminal work in (Scheirer et al., 2013) formalized the task of open-set recognition, and has inspired a number of subsequent works in the ﬁeld.
(Bendale & Boult, 2016) introduced the ﬁrst deep learning approach for OSR, OpenMax, based on the Extreme Value Theory (EVT).
GANs have also been used to tackle the task (Ge et al., 2017; Neal et al., 2018).
OSRCI (Neal et al., 2018) generates images similar to those in the training set
but that do not belong to any of the known classes, and uses the generated images to train an open-set classiﬁer.
This work also established the existing OSR benchmark suite.
(Kong & Ramanan, 2021) achieve strong OSR performance by using an adversarially trained discriminator to delineate closed from open-set images, leveraging real open-set images for model selection.
Other approaches include reconstruction based methods (Yoshihashi et al., 2019; Oza & Patel, 2019; Sun et al., 2020) which use poor test-time reconstruction as an open-set indicator, and prototype-based methods (Shu et al., 2020; Chen et al., 2020a; 2021) which represent known classes with learned prototypes, and identify open-set images based on distances to the prototypes.
State-of-the-art In this work, we compare against methods which achieve state-of-the-art in the controlled OSR setting (with no extra data for training or model selection, for instance as demonstrated in (Kong & Ramanan, 2021)).
To our knowledge, these methods are ARPL (Adversarial Reciprocal
Point Learning)
(Chen et al., 2020a; 2021) and OpenHybrid (Zhang et al., 2020), which we detail in sec.
3.1 and sec.
4 respectively.
In this paper, we show that the cross-entropy baseline can be competitive with or outperform the more complex methods listed above.
Finally, we note recent works (Zhou et al., 2021; Miller et al., 2021;
Guo et al., 2021) with which we do not compare as they report lower performance than ARPL and OpenHybrid.
Related subﬁelds OSR is also closely related to out-of-distribution (OoD) detection (Hendrycks &
Gimpel, 2017; Liang et al., 2018; Hsu et al., 2020), novelty detection (Abati et al., 2019; Perera et al., 2019; Tack et al., 2020), anomaly detection (Hendrycks et al., 2019; Kwon et al., 2020; Bergman & Hoshen, 2020) and novel category discovery (Han et al., 2019; 2020; 2021).
Amongst these,
OoD is perhaps the most widely studied and is similar in nature to OSR.
As noted by (Dhamija et al., 2018; Boult et al., 2019), OSR is similar to the OoD problem with an additional multi-way classiﬁcation component between known categories.
In fact, there is currently signiﬁcant overlap in the evaluation datasets between these settings, though cross-setting comparisons are difﬁcult due to different evaluation protocols.
Speciﬁcally, the OoD setting permits the use of additional data as examples of ‘OoD’ data during training.
(Chen et al., 2021) and (Zhang et al., 2020) evaluate their
OSR methods on OoD benchmarks, with both showing competitive results despite not having access to additional data during training.
In this paper, we distinguish the OSR problem from OoD and other related ﬁelds by proposing a new suite of benchmarks.
While OoD encompasses all forms of distributional shift, including those based on low-level features, OSR speciﬁcally refers to semantic novelty.
We propose new benchmarks that respect this distinction.
C ORRELATION BETWEEN CLOSED - SET AND OPEN - SET PERFORMANCE
One may expect that stronger closed-set classiﬁers have overﬁt their learned representations to the closed-set categories, and thus perform poorly for OSR (Recht et al., 2019; Zhang et al., 2017).
Furthermore, existing literature largely considers the closed and open-set tasks separately, with works generally emphasising good open-set performance despite no degradation in closed-set accuracy (Neal et al., 2018;
Zhou et al., 2021; Miller et al., 2021).
On the contrary, in this section we show that the closed-set and open-set performance of classiﬁers are strongly correlated.
We ﬁrst demonstrate this for the baseline and a state-of-the-art method on the standard OSR benchmarks (sec. 3.1) and then on a large scale evaluation across a number of model architectures (sec. 3.2).
Open-set recognition.
We formalise the problem of OSR, and highlight its differences from closedset recognition .
First, consider a labelled training set for a classiﬁer D train =
{ ( x i , y i ) } Ni =1 ⇢ X ⇥ C .
Here,
X is the input space ( e.g. , images) and C is the set of ‘known’ classes.
In the closed-set scenario, the model is evaluated on a test set in which the labels are also drawn from the same set of classes, i.e. ,
D test-closed = { ( x i , y i ) }
Mi =1 ⇢ X ⇥ C .
In the closed-set setting, the model returns a distribution over the known classes as p ( y | x ) .
Conversely, in OSR, test images may also come from unseen classes U , giving D test-open = { ( x i , y i ) } M 0 i =1 ⇢ X ⇥ ( C [ U ) .
In the open-set setting, in addition to returning the distribution p ( y | x , y 2 C ) over known classes, the model also returns a score S ( y 2 C| x ) to indicate whether or not the test sample belongs to any of the known classes.
3. B ASELINE AND STATE - OF - THE - ART ON STANDARD BENCHMARKS
We ﬁrst experiment with three representative open-set recognition methods across the standard benchmark datasets in the literature (Neal et al., 2018; Oza & Patel, 2019; Sun et al., 2020; Chen et al., 2020a; Zhang et al., 2020).
The methods include the standard cross-entropy baseline as well as two variants of ARPL (Chen et al., 2021).
We use the standard network from the open-set literature (Neal et al., 2018), a lightweight model similar to the VGG architecture (Simonyan & Zisserman, 2015) which we henceforth refer to as ‘VGG32’ (refer to appendix D for details).
The three methods are summarised below, followed by a description of the most commonly used benchmarks.
Methods.
Cross-entropy (baseline) :
The model is trained for closed-set classiﬁcation using the cross-entropy loss between a one-hot target vector and the softmax output p ( y | x ) of the classiﬁer.
This training strategy, along with the use of the maximum softmax probability as S ( y 2 C| x ) = max y 2 C p
( y | x ) , is widely used in the OSR literature as a baseline.
ARPL (Chen et al., 2021):
This method is an extension of the recent RPL (Reciprocal Point Learning) optimization strategy (Chen et al., 2020a).
Here, the probability that a sample belongs to a class is proportional to its distance performance (accuracy) and open-set performance (AUROC).
We train three methods on the standard open-set benchmark datasets, including the cross-entropy baseline, ARPL and ARPL + CS (Chen et al., 2021).
Foreground points in bold show results averaged across ﬁve ‘known/unknown’ class splits for each method dataset pair (following standard practise in the OSR literature) while background points, shown feint, indicate results from the underlying individual splits.
from a learned ‘reciprocal point’ in the feature space.
A reciprocal point aims to represent ‘otherness’ with respect to a class, with the intuition being that open-set examples are different to all known classes.
ARPL extends RPL by computing feature distances as the sum of both the Euclidean and cosine distances.
In this case, S ( y 2 C| x ) is equal to the maximum distance in feature space between the image and any reciprocal point.
ARPL + CS (Chen et al., 2021) augments ARPL with ‘confusing samples’: adversarially generated latent points to stand in for ‘unseen class’ samples.
The confusing samples are encouraged to be equidistant from all reciprocal points, with the same open-set scoring rule used as in ARPL.
We train both ARPL and ARPL + CS based on the ofﬁcial public implementation (Chen et al., 2021).
Datasets.
We train the above methods on the standard benchmark datasets for open-set recognition.
In all cases, the model is trained on a subset of classes, while other classes are reserved as ‘unseen’ for evaluation.
MNIST (LeCun et al., 2010), SVHN (Netzer et al., 2011), CIFAR10 (Krizhevsky, 2009):
These are ten-class datasets, with MNIST and SVHN containing images of hand-written digits and street-view house numbers respectively.
Meanwhile, CIFAR10 is a generic object recognition dataset containing natural images from ten diverse classes including animals and vehicles.
In these cases, the open-set methods are evaluated by training on six classes, while using the other four classes for testing ( |C| = 6; |U| = 4 ).
CIFAR + N (Krizhevsky, 2009):
In an extension to the CIFAR10 evaluation protocol, open-set algorithms are benchmarked by training on four classes from CIFAR10, while using N classes from CIFAR100 for evaluation, where N denotes either 10 or 50 classes ( |C| = 4; |U| 2 { 10 , 50 } ).
TinyImageNet (Le & Yang, 2015):
In the ﬁnal and most challenging case, exisiting open-set algorithms are evaluated on the TinyImageNet dataset.
This dataset containsclasses sub-sampled from ImageNet (Russakovsky et al., 2015), with 20 classes used for training and 180 as unknown ( |C| = 20; |U| = 180 ).
Experimental setup.
At test time, the model is fed test images from both known and novel classes, and is tasked with making a binary ‘known/unknown’ decision on a per-image basis.
Following standard practise in the OSR literature, the threshold-free area under the Receiver-Operator curve (AUROC) is used as an evaluation metric.
We train with the same hyper-parameters as in (Chen et al., 2021) and, following standard practise, train on ﬁve different splits of closed and open-set classes for each dataset and method combination.
When evaluating on existing benchmarks throughout this paper, we use the same data splits as (Chen et al., 2021).
Results.
Fig.
2 gives the AUROC (open-set performance) against the Top-1 multi-way classiﬁcation accuracy (closed-set performance).
We show the averaged results as well as the individual split results, omitting the CIFAR+10 setting for clarity (as the scatter points are almost coincident with the CIFAR+50 setting).
It is clear that there is a positive correlation between the closed-set accuracy and open-set performance: we ﬁnd a Pearson Product-Moment correlation ⇢ = 0 .
95 between the accuracy and AUROC, indicating a roughly linear relationship between the two metrics.
Discussion.
To justify our ﬁndings theoretically, we look to the model calibration literature (Guo et al., 2017).
Intuitively, model calibration aims to quantify whether the model ‘knows when it doesn’t know’, in that low conﬁdence predictions are correlated with high error rates.
Speciﬁcally, assume a classiﬁer, f ( x ) , returns probabilities for each class, making predictions as ˆ y = arg max f ( x ) .
Further assume labelled input-output pairs, ( x , y ) ⇢ X ⇥ C , where C is the label space.
Then, the classiﬁer is said to be perfectly calibrated if:
[Equation]
[Figure]
It is further true that if a classiﬁer is trained with a proper scoring rule (Gneiting et al., 2007) on inﬁnite data, then the classiﬁer will be perfectly calibrated at the loss function’s minimum (Minderer et al., 2021).
Many losses used to train deep networks are proper scoring rules ( e.g. the cross-entropy loss).
Thus, assuming that generalization error on the test set is correlated with the inﬁnite-data loss value, we would suspect models with lower generalization (test) error to be better calibrated.
If we use low-conﬁdence predictions as an indicator that a test sample belongs to a new semantic class, we would expect stronger models to be better open-set detectors.
3. L ARGE - SCALE EXPERIMENTS AND ARCHITECTURE ABLATION
So far, we have demonstrated the correlation between closed and open-set performance on a single, lightweight architecture and on small scale datasets – though we highlight that they are the standard existing benchmarks in the OSR literature.
Here, we experiment with a range of architectures on a large-scale dataset (ImageNet).
Methods.
We experiment with architectures from a number of popular model families, including
VGG (Simonyan & Zisserman, 2015), ResNet (He et al., 2016) and EfﬁcientNet (Tan & Le, 2019).
We further include results for the recently proposed non-convolutional ViT (Dosovitskiy et al., 2021) and MLP-Mixer (Tolstikhin et al., 2021; Melas-Kyriazi, 2021) models.
All models were trained with the standard cross-entropy objective for classiﬁcation.
Dataset.
For large-scale evaluation, we leverage the recently released ImageNet-21K-P (Ridnik et al., 2021).
This dataset contains a subset of the full ImageNet database, processed and standardized to remove small classes and leaving around 11K object categories.
Note that ImageNet-21K-P is a strict superset of ImageNet-1K (ILSVRC12).
As such, models are trained on the standardclasses from ImageNet-1K, and we select two 1000-category subsets from the disjoint categories in
ImageNet-21K-P as the open sets.
Differently to existing practise on the standard datasets, our two open-set splits for ImageNet are not randomly sampled, but rather designed to be ‘Easy’ and ‘Hard’ based on the semantic similarity of the open-set categories to the training classes.
In this way we better capture a models ability to identify semantic novelty as opposed to low-level distributional shift.
This idea and split construction details are expanded upon in sec.
For both ‘Easy’ and ‘Hard’ splits, we have |C| = 1000 and |U| = 1000 .
Results Fig.
3a shows our open-set results on ImageNet.
Once again, we ﬁnd a positive correlation between closed and open-set performance.
In this case we ﬁnd the linear relationship to be weaker, with ⇢ = 0 .
88 for the ‘Hard’ evaluation and ⇢ = 0 .
63 for the ‘Easy’.
This is unsurprising given the large discrepancy in architecture styles.
In general, we do not ﬁnd
any particular model family to be remarkably better for OSR than others.
The exception is the ViT model (highlighted), which noticeably bucks the OSR trend for both ‘Easy’ and ‘Hard’ splits.
When looking within a single model family, we ﬁnd the linear relationship to be substantially strengthened.
Fig.
3b demonstrates the the trend within the ResNet family, with ⇢ = 1 . 00 and ⇢ = 0 .
99 for the ‘Easy’ and ‘Hard’ OSR splits respectively.
Discussion.
We again note that the ViT model, despite its size (86M parameters) and few inductive biases (no convolutions), does not overﬁt its representation to the training classes.
The fact that it outperforms the OSR trend supports recent ﬁndings on the beneﬁts of purely attention-based vision models (including similar ﬁndings in (Fort et al., 2021)), as well as the beneﬁts of good closed-set performance for OSR.
Finally, we note the practical utility of our ﬁndings in sec.
Namely, the fact that the open and closed-set performance are correlated allows OSR to readily improve with the extensive research in standard image recognition.
A G OOD C LOSED -S ET C LASSIFIER IS A LL Y OU N EED
In this section, we demonstrate that we can leverage the correlation established in sec.
3 to improve the performance of the baseline OSR method.
Speciﬁcally, we improve the closed-set accuracy of the cross-entropy baseline and, in doing so, make it competitive with or stronger than state-of-the-art open-set models, achieving a new state-of-the-art on the TinyImageNet benchmark
We ﬁnd that we can signiﬁcantly improve the crossentropy baseline performance by leveraging techniques from the image recognition literature, such as longer training, better augmentations (Cubuk et al., 2020) and label smoothing (Szegedy et al., 2016).
Fig.
4 shows how open-set performance of the crossentropy model increases as we introduce these changes on the TinyImageNet benchmark.
For example: longer training (scatter point 7 - scatter point 8); better augmentations (3 - 5); and ensembling (8 - 9).
Full details and a tabular breakdown of the methods used to increase closed-set performance can be found in appendix C.
We take these improved training strategies and train the VGG32 backbone on the standard benchmark datasets.
We train all models for 600 epochs with a batch size of 128, training models on a single
NVIDIA Titan X GPU.
We do not include ensemble results for fair comparison with previous methods.
Full training strategies and implementation details can be found in appendices C and D.
We report our results as ‘Cross-Entropy+’ in table 1.
We also change the open-set scoring rule from the baseline in (Neal et al., 2018).
Previous work has noted that open-set examples tend to have lower feature norms than closed-set ones (Dhamija et al., 2018;
Chen et al., 2021).
As such, we propose the use of the maximum logit rather than softmax probability for the open-set scoring rule.
Logits are the raw outputs of the ﬁnal linear layer in a deep classiﬁer, while the softmax operation involves a normalization such that the outputs can be interpreted as a probability vector summing to one.
As the softmax operation normalizes out much of the feature magnitude information present in the logits, we ﬁnd logits lead to better open-set detection results.
We provide a detailed analysis and discussion of this effect in appendix B. We further provide a more general study of the representations learned with the cross-entropy model, including visualizations of the learned feature space
[Table]
[Table]
We compare against OpenHybrid (Zhang et al., 2020) and ARPL + CS
(Chen et al., 2021)
[Table]
which hold state-of-the-art performances on the standard datasets in the controlled setting (with no extra data for training or model selection)
We also compare against OSRCI (Neal et al., 2018), which established the current OSR benchmark suite.
While OSRCI and ARPL + CS have been described in sec. 2 and 3.1 respectively, OpenHybrid tackles the open-set task by training a ﬂow-based density estimator on top of the classiﬁer’s feature representation, jointly training both the encoder and density model.
In this way, a distribution over the training data log p ( x ) is learned, which is used to directly provide S ( y 2 C| x ) .
Comparisons with more methods can be found in appendix E.
We improve upon the baseline for all datasets, and substantially close the gap to the state-of-the art methods, with an average absolute increase in AUROC of 13.9% across the datasets.
When framed as a proportion of the difference between the reported baseline and the current state-of-the-art, this comes to a 87.2% reduction in average discrepancy.
We also achieve a new state-of-the-art on
TinyImageNet, outperforming OpenHybrid by 3.3% .
Next, we take the OSRCI and ARPL + CS algorithms (Neal et al., 2018;
Chen et al., 2021), and augment them with our proposed training strategies for a fair comparison, reporting the results under
OSRCI+ and (ARPL + CS)+.
Speciﬁcally, we train them for longer, include label smoothing and use better data augmentations (see appendix D for full details).
We also trained OpenHybrid in this controlled setting, but signiﬁcantly underperformed the reported performance.
This is likely because the method was trained for 10k epochs and with a batch size of 1024, which are both 10 ⇥ larger than those used in these experiments.
Note that, despite this, the stronger baseline still outperforms
OpenHybrid in a number of cases.
In almost all cases we are able to boost the open-set performance of OSRCI and ARPL+CS, especially for the former.
In the case of (ARPL+CS)+, we achieve new state-of-the-art results on two of the benchmarks, and also report a 4.4% boost on TinyImageNet.
However, the discrepancy between this method and the improved baseline is much reduced when compared to previously reported ﬁgures, with the average difference in AUROC reduced from 14.2% to 1.7%.
Furthermore, on the most challenging dataset, there is no discrepancy between the baseline and (ARPL+CS)+.
Discussion.
A number of increasingly sophisticated methods have been proposed for OSR in recent years.
Typically, proposed methods have carefully tuned training strategies and hyper-parameters, such as custom learning rate schedules (Zhang et al., 2020), non-standard backbones (Guo et al., 2021) and novel data augmentations (Zhou et al., 2021).
Meanwhile, the closed-set accuracy of the methods is often unreported.
As such, it is difﬁcult to delineate what proportion of the open-set performance gains come from increases in closed-set accuracy.
Our ﬁndings in this section suggest that many of the gains could equally be realised through the standard baseline.
Indeed, in sec. 5, we propose new evaluation protocols and ﬁnd that once the closed-set accuracy of ARPL and the baseline are made comparable, there is negligible difference in open-set performance.
R ETHINKING THE OSR BENCHMARKS
Current standard OSR benchmarks have two drawbacks: (1) they all involve small scale datasets; (2) they lack a clear deﬁnition of what constitutes a ‘semantic class’.
The latter is important to delineate the open-set ﬁeld from other research questions such as out-of-distribution detection (Hendrycks & Gimpel, 2017) and anomaly detection (Kwon et al., 2020).
Speciﬁcally, OSR aims to identify whether a test image is semantically different to the training classes, not whether, for example, the model is uncertain about its prediction or whether there has been a low-level distributional shift.
To address these issues, we propose three new benchmark evaluations.
In this section, we ﬁrst detail a large-scale ImageNet evaluation (introduced in sec. 3.2) before proposing two evaluations on ﬁne-grained datasets which have clear deﬁnitions of a semantic class.
Differently to previous work, our evaluation settings all aim to explicitly capture the notion of semantic novelty .
Finally, we benchmark Cross-Entropy and ARPL on the new benchmark suite to motivate future research.
5. P ROPOSED B ENCHMARK D ATATSETS
ImageNet for open-set recognition We introduce a large-scale evaluation benchmark for OSR, with open-set splits based on semantic distances to the training set.
Speciﬁcally, we designate the original ImageNet-1K (I-1K) classes for the closed-set, and choose open-set classes from the disjoint set of ImageNet-21K-P (I-21K) (Ridnik et al., 2021).
We exploit the hierarchical, tree-like semantic structure of the ImageNet database.
For instance, the class ‘elephant’ can be labelled at multiple levels of semantic abstraction (‘elephant’, ‘placental’, ‘mammal’, ‘vertebrate’, ‘animal’).
Thus, for each pair of classes between I-1K and I-21K, we deﬁne the semantic distance between two classes as the total path distance between their nodes in the semantic tree.
We can then approximate the total semantic distance from the I-21K classes to the closed-set by summing distances to all I-1K classes.
Finally, we select ‘Easy’ and ‘Hard’ open-set splits by sorting the total distances to the training classes and selecting two sets of 1000 categories.
We note that the larger ImageNet database has been used for OSR research previously (Bendale & Boult, 2016; Kumar et al., 2021) though with no explicit structuring for semantic similarity with I-1K as we propose here.
Fine-grained datasets for open-set recognition Consider the properties of ﬁne-grained visual categorization (FGVC) datasets.
These datasets are deﬁned by an ‘entry level’ category, such as ﬂowers (Nilsback & Zisserman, 2008) or birds (Wah et al., 2011).
Within the dataset, all classes are variants of that single category, deﬁning a single axis of semantic variation , e.g. , ‘bird species’ in the case of birds.
Because the axis of variation is well deﬁned, it is reasonable to expect a classiﬁer to learn it given a number of example classes — namely, to learn what bird species are and how they can be distinguished.
Contrast FGVC datasets with the current OSR benchmarks, such as the CIFAR+10 evaluation.
In this case, a model is trained on four CIFAR10 classes such as { airplane, automobile, ship, truck }, all of which could be considered ‘entry level’, before having to identify images from CIFAR100 classes such as { bicycle, bee, porcupine, baby } as belonging to new classes.
In this case, the axis of variation is much less speciﬁc, and it is uncertain whether the OSR model is responding to a true semantic signal or simply to low-level distributional shifts in the ‘unseen’ data.
Furthermore, because of the small number of training classes in the current benchmark settings, it is unrealistic for a classiﬁer to learn such high-level class deﬁnitions.
We give an illustrative example of this in appendix G.
As a result, we propose two FGVC datasets for OSR evaluation: Caltech-UCSD Birds (CUB)
(Wah et al., 2011) and FGVC-Aircraft (Maji et al., 2013).
These datasets come with labelled attributes ( e.g. , has_bill_shape::hooked in CUB), which can be used to characterize the differences between classes and thus the OSR difﬁculty.
We use attributes to construct open-set FGVC class splits which are binned into ‘Easy’, ‘Medium’ and ‘Hard’ classes, with the difﬁculty depending on the similarity of labelled visual attributes with any of the training classes.
We sketch the split-construction process for CUB here, and refer to appendix H for more details on both CUB and FGVC-Aircraft.
Every image in CUB is labelled for the presence of 312 visual attributes such as has_bill_shape::hooked and has_breast_color::yellow .
This information is aggregated for each class, resulting in a matrix M 2 [0 , 1] C ⇥ A , describing the frequency with which each attribute appears in each class.
Treating each row in M as a semantic class descriptor, this allows us to compute the semantic similarity of every pair of classes and, given a set of closed-set classes, identify which remaining classes are ‘Easy’, ‘Medium’ and ‘Hard’ (least to most similar) with respect to the closed-set.
Examples of ‘Easy’, ‘Medium’ and ‘Hard’ open-set classes, along with their closest class in the closed-set, are shown in ﬁg. 5 for CUB.
[Table]
We note that ﬁne-grained OSR has been demonstrated in (Chen et al., 2021; 2020a) on a dataset of 300 aircraft classes.
However, this dataset does not come with labelled attributes, making it harder to construct open-set splits with varying levels of semantic similarity to the training set, which is our focus here.
Finally, while prior works have recognised the difﬁculty of OoD detection for more ﬁne-grained data (Bodesheim et al., 2015; Perera & Patel, 2019; Lee et al., 2018), we propose them for OSR because of their clear deﬁnition of a semantic class rather than their increased difﬁculty.
A further discussion of these ideas is presented in appendix G. We provide statistics of the splits from all proposed datasets in table 2, and the splits themselves in the supplementary material.
5. B ENCHMARKING IN THE NEW SETTING
Evaluation Protocol.
For the binary ‘known/unknown’ class decision, we report the AUROC as is standard practise, as well as accuracy to allow potential gains in open-set performance to be contextualized in the closed-set accuracy of a model.
We also report Open Set Classiﬁcation Rate (OSCR) (Dhamija et al., 2018) which measures the trade-off between accuracy and open-set detection rate as a threshold on the conﬁdence of the predicted class is varied.
We further report average precision (AP) in appendix I.
In ﬁne-grained classiﬁcation, it is standard to pre-train models on ImageNet.
This is unsuitable for the proposed ﬁne-grained OSR setting, as ImageNet contains overlapping classes with the proposed datasets.
Instead, we pre-train the network on Places (Zhou et al., 2017) using MoCoV2 selfsupervised weights (Chen et al., 2020b; Zhao et al., 2021).
For the ImageNet benchmark, we can train with labels on the ImageNet-1K dataset and evaluate on the unseen classes.
We ﬁnetune the
ARPL model from a pre-trained ImageNet checkpoint.
Results.
In table 3 we test Cross-Entropy+ and ARPL+ (Chen et al., 2021) using a ResNet backbone on the proposed benchmarks (we found ARPL + CS to be prohibitively expensive to train in this setting, see appendix D for details).
The results corroborate the trends found in sec. 4: strong closed-set classiﬁers produce open-set results with good AUROC performance, and the cross-entropy baseline performs comparably to the state-of-the-art method.
In fact, while we ﬁnd ARPL+ achieves slightly better AUROC on the ImageNet benchmark, Cross-Entropy+ outperforms in terms of OSCR across the board.
Finally, more careful consideration of the semantics of the open-set classes leads to harder splits signiﬁcantly reducing OSR performance.
This is in contrast to ‘openness’ (Scheirer et al., 2013), the current measure used to assess the difﬁculty of an OSR problem, dependent on the ratio of the number of closed to open-set classes.
For instance, in the ImageNet case, we ﬁnd the harder split to be lead to around 6% worse AUROC for both methods.
We also experimented with randomly subsampling ﬁrst 1K and then 10K open-set classes, ﬁnding that introducing more classes during evaluation only reduced open-set performance by around 0.6% (10 ⇥ less than our proposed splits).
For the FGVC datasets, harder splits reduce AUROC by as much as 19%.
[Table]
C ONCLUSION
In this work we have demonstrated a strong correlation between the closed-set and open-set performance of models for the task of open-set recognition.
We have done this through controlled experiments on a range of datasets, optimization strategies and model architectures, including a large scale evaluation.
We have further leveraged this ﬁnding to show that the baseline cross-entropy OSR model can achieve comparable or even superior performance to more sophisticated architectures developed for the task in recent years.
Furthermore, we have reappraised the benchmark datasets used for OSR, and constructed new benchmark evaluations which isolate the task of detecting semantic novelty rather than low-level distributional shifts.
Our proposed evaluations also enable more controlled stratiﬁcation of difﬁculty in OSR.
Finally, we have demonstrated that in our proposed setting, there is negligible performance difference between the state-of-the-art OSR algorithm and the standard cross-entropy baseline.
E THICS AND R EPRODUCIBILITY S TATEMENTS
Ethics Statement Open-set recognition is of immediate relevance to the safe and ethical deployment of machine learning models.
In real-world settings, it is unrealistic to expect that all categories of interest to the user will be represented in the training set.
For instance, in an autonomous driving scenario, forcing the model to identify every object as an instance of a training category could lead it to make unsafe decisions.
When considering potential negative societal impacts of this work, we identify the possibility that
OSR research may lead to complacent consideration of the training data.
As we have demonstrated,
OSR models are far from perfect and cannot be exclusively relied upon in practical deployment.
As such, it remains of critical importance to carefully curate training data and ensure its distribution is representative of the target task.
Finally, we comment on the dataset privacy considerations for the existing and proposed benchmarks.
All datasets are licensed for academic/non-commercial research.
However, CIFAR, TinyImageNet and ImageNet contain some personal data for which consent was likely not obtained.
The proposed
FGVC datasets have the added beneﬁt of containing no personal information.
Reproducibility Statement Throughout this work, we have endeavoured to describe the controlled settings used for our experiments.
sec.
3 details the datasets and origins of the data splits used for each experiment, while appendices C and D give further implementation details and training procedures for our experiments.
Furthermore, we will release our code publicly upon paper acceptance.
For our proposed benchmark splits, we describe the split construction process in sec.
5 and appendix H. We further provide the splits themselves in the supplementary material to encourage future research in this direction.
A E XPANSION OF FIG . 2 OF THE MAIN PAPER WITH STANDARD DEVIATIONS
For completeness, we include another version of ﬁg. 2 which includes OSRCI models (Neal et al., 2018) in ﬁg. 6.
We ﬁnd the correlation between the closed and open-set performance continues to hold with the inclusion of this additional method.
We further report the standard deviations of this plot in table 4.
It can be seen that, for the same dataset, the standard deviations of all four methods appear to be similar.
The standard deviations on the most challenging TinyImageNet benchmark is greater than on the other datasets.
Finally, we note in ﬁg. 6 that the trend seems less clear at very high accuracies.
This may be because
AUROC also becomes very high, making it difﬁcult to identify clear patterns.
However, it may also indicate that the relationship between the metrics becomes weaker as closed-set performance saturates.
[Table]
B A NALYSING THE CLOSED - SET AND OPEN - SET CORRELATION
Here, we aim to understand why improving the closed-set accuracy may lead to increased open-set performance through the cross-entropy baseline.
To this end, we train the VGG32 model on the
CIFAR10 benchmark setting with the cross-entropy loss.
We train the model both with a feature dimension of D = 128 (as is standard for this model) as well as with D = 2 for feature space visualization.
We also train without a bias in the linear classiﬁer for more interpretable features and classiﬁcation boundaries (so class boundaries radiate from the origin of the feature space).
Speciﬁcally, we train a model to make predictions as ˆy i = softmax( W  ✓ ( x i )) , where  ✓ ( · ) is a
CNN embedding function (  ✓ ( x ) 2 R D ) and W 2 R C ⇥
D is the linear classiﬁcation matrix.
Here
C = |C| = 6 and D 2 { 2 , 128 } , and we optimise the loss with a one-hot target vector y i and batch size B , as  1 B
[Equation]
Next, we interrogate the learned embeddings by plotting the mean vector norm of the features from all test images, for both the known and unknown classes, as training proceeds.
These are shown in ﬁg. 7a and ﬁg.
7b for the models with D = 128 and D = 2 respectively.
We also show the average vector norm for the per-class weights in the linear classiﬁers as dashed lines.
Furthermore, snapshots of how these images are embedded for the model with D = 2 are shown in ﬁg. 7d to 7f at representative epochs.
The plots of the mean feature norms show that, at the start of training, all
[Figure]
To understand this, consider the cross-entropy loss for a single sample in the batch, shown in eq.
[Equation]
[Equation]
where c refers to the correct class index, and w j refers to the classiﬁcation vector corresponding to the j th class.
Empirically, we ﬁnd that the linear classiﬁer’s weights and the feature norms for known classes increase during training, which is justiﬁed as increasing both | w c | and |  ✓ ( x i ) | reduces the loss value.
Note that we observe this despite training with weight decay, which we omit from eq.
(2) for clarity.
However, for ‘hard’ or ‘uncertain’ training examples (for which the classiﬁer’s prediction may be incorrect) the model is encouraged to reduce w j ·  ✓ ( x i ) 8 j 6 = c through the second term of eq.
While the only way to do this for the D = 2 case is to reduce the feature norm (ﬁg. 7b and ﬁg. 7d to 7f), we show in ﬁg. 7a that this also holds true for the D = 128 case in which D > C .
The tendency of deep networks to map ‘hard’ samples closer to the origin has been noted in (Ranjan et al., 2017).
This suggests that stronger cross-entropy models project features further from the origin, while still ensuring that any ‘uncertain’ samples have lower feature norms.
This, in turn, suggests stronger cross-entropy classiﬁers would perform better for OSR, with images from novel categories likely to be interpreted as ‘uncertain’ during evaluation.
Our analysis also suggests that cross-entropy training already provides a strong signal and thus a strong baseline for open-set recognition.
Finally, this motivates us to propose the use of logits to provide our open-set score, i.e. , S ( y
C| x ) = max j 2 C w j ·  ✓ ( x ) , rather than the softmax output as in the standard cross-entropy baseline.
Normalizing the logits via the softmax operator cancels out the magnitude information of the feature representation, which we have demonstrated is useful for the OSR decision.
Fig.
7c shows how the
AUROC evolves as training proceeds when both the maximum logit and maximum softmax value are used for OSR scoring.
The plot demonstrates that softmax normalization noticeably reduces the model’s ability to make the open-set decision.
We also show the OSR performance if we use the feature norm as our open-set score ( S ( y 2 C| x ) = |  ✓ ( x ) | ) , showing that this simple indicator can perform remarkably well.
B. F EATURE SPACE ANIMATION
Corresponding to ﬁg. 7d to 7f, we include an animation of the VGG32 network with D = 2 trained on the CIFAR10 OSR setting.
The animation was created by checkpointing the network at the end of every epoch, and projecting test images from seen and unseen classes into the 2-dimensional feature space.
The animation highlights that, as training proceeds, images from seen categories are projected with increasing feature norms, while those from unseen categories remain mapped near to the origin.
The leftmost pane of the animation visualizes the feature space, while the middle pane summarizes the vector norms of the features and classiﬁer weights as training proceeds.
Finally, the rightmost pane shows how the open-set performance of the model evolves as training proceeds when different scoring rules are used.
The animation can be found in vgg32_2d_feat_space_animation.mp4 .
C I MPROVING OPEN - SET PERFORMANCE WITH STRONGER CLOSED - SET CLASSIFIERS
Here, we describe how we improve the open-set performance of the baseline cross-entropy method in sec.
4 of the main paper, and provide a full breakdown of ﬁg. 4.
The methods include better learning rate schedules and data augmentations, as well as the use of logits rather than the softmax output for OSR scoring.
We document the closed-set and open-set performance on the TinyImageNet dataset (the most challenging of the OSR benchmarks) in table 5.
We further include the ‘Open
Set Classiﬁcation Rate’ (OSCR (Dhamija et al., 2018)) which summarises the trade-off between closed-set accuracy and open-set performance (here, in terms of the False Positive Rate) as the threshold on the open-set score is varied.
As demonstrated in sec.
4 of the main paper, the ﬁndings of this study generalize well to other datasets
[Table] [Table]
We ﬁrst train the cross-entropy baseline with the same hyper-parameters as in (Chen et al., 2021), training for 100 epochs and using a step learning rate schedule, with a basic random crop augmentation strategy.
We evaluate using both softmax and logit scoring strategies.
It can be seen that using maximum logit scoring gives better open-set performance (AUROC), while softmax scoring appears to be better in terms of OSCR.
This is likely due to the fact that softmax normalization cancels the effect of the feature norm, which results in more separable scores that are beneﬁcial to the OSCR calculation.
Here, we are interested in boosting the open-set performance (AUROC) by improving the closed-set accuracy.
Hence, we use the maximum logit for open-set scoring as discussed in appendix B. This already gives an open-set performance of 69 . 6% AUROC, which is signiﬁcantly higher than the softmax thresholding baseline reported for these datasets in almost all of the comparisons in the literature, which report a baseline 57 .
7% AUROC.
The discrepancy between the reported baseline and our simplest setting is the result of reported ﬁgures originating in (Neal et al., 2018), wherein all models were trained only for 30 epochs (according to the publicly shared code) while our simplest model is trained for 100 epochs.
Following this trend, we ﬁnd that training for longer (200 epochs) and using a better learning rate schedule (cosine annealed schedule (Loshchilov & Hutter, 2017)) signiﬁcantly enhances both closed-set and open-set performance.
We further ﬁnd that stronger augmentations boost accuracy, where we leverage RandAugment (Cubuk et al., 2020) to ﬁnd an optimal strategy.
Finally, we ﬁnd that learning rate warmup and label smoothing (Szegedy et al., 2016) can together signiﬁcantly increase accuracy.
We select the RandAugment and label smoothing hyper-parameters by maximizing closed-set accuracy on a validation set (randomly sampling 20% of the training set).
In summary, we ﬁnd that simply leveraging standard training strategies for cross-entropy models leads to a signiﬁcant boost in open-set performance .
Speciﬁcally, we ﬁnd that the combination of the above methodologies, including longer training and better augmentations boosts the AUROC to 82 .
Finally, we ﬁnd that open-set performance can be boosted to 84 .
0% AUROC by bootstrapping the training data and training K = 5 ensembles.
The improvements in open-set performance strongly correlate with the boosts to the closed-set accuracy, with ⇢ = 0 .
93 between accuracy and AUROC.
D I MPLEMENTATION DETAILS D. VGG32 ARCHITECTURE
This backbone architecture is commonly used in the open-set literature (Neal et al., 2018).
The model consists of a simple series of nine 3 ⇥ 3 convolution layers, with downsampling occurring through strided convolutions every third layer.
Batch normalization and LeakyRelu (slope of 0.2) are used after every convolution layer, with dropout used on the input image, and then after the third and sixth layer.
Finally, after the ninth layer, the spatial feature is reduced with average pooling to a feature vector with dimensionality D = 128 .
This is fed to the linear classiﬁer (fully connected layer) to give the output logits.
D. S TANDARD DATASETS
Here, we describe the experimental setup for our results in sec.
4 of the main paper.
All models were trained on a single 12GB GPU (mostly a NVIDIA Titan X).
When optimizing with the cross-entropy loss, training took between 2 and 6 hours for a single class split, depending on the dataset (for instance, training on TinyImageNet took 2.5 hours).
All hyper-parameters were tuned on a validation set which was constructed by holding out a randomly sampled 20% of the closed-set training data from a single split of seen/unseen classes.
Cross-Entropy+ We trained the VGG32 model with a batch size of 128 for 600 epochs.
For each dataset, we train on ﬁve splits of ‘known/unknown’ classes as is standard practise, training each run with the random seed ‘0’.
We use an initial learning rate of 0.1 for all datasets except TinyImageNet, for which we use 0.01.
We train with a cosine annealed learning rate, restarting the learning rate to the initial value at epochs 200 and 400.
Furthermore, we ‘warm up’ the learning rate by linearly increasing it from 0 to the ‘initial value’ at epoch 20.
We use RandAugment for all experiments, tuning its hyper-parameters on a validation set from a single class split for each dataset.
We follow a similar procedure for the label smoothing value s , though we ﬁnd the optimal value to be s = 0 for all datasets except TinyImageNet, where it helps signiﬁcantly at s = 0 . 9 .
(ARPL + CS)+
We use the same experimental procedure for ARPL + CS (Chen et al., 2021) as for the cross-entropy loss, again tuning the RandAugment and label smoothing hyperparameters for this method.
Here, following the original implementation, we ﬁnd a batch size of 64 and learning rate of 0.001 lead to better performance on TinyImageNet.
This method also took signiﬁcantly longer to train, taking 7.5 hours per class split on TinyImageNet.
(OSRCI)+ OSRCI involves multiple stages of training, including ﬁrst training a GAN to synthesize images similar to the training data, before using generated images as ‘open-set’ examples to train a ( K + 1) -way
classiﬁer (Neal et al., 2018).
As our focus is on the effect of improving classiﬁcation accuracy on open-set performance, we augment the training of the latter stage of OSRCI.
We again train the ( K + 1) -way classiﬁer for 600 epochs with a cosine annealed learning rate schedule and
RandAugment.
For this method, we ﬁnd that reducing all learning rates by a factor 10 compared to
Cross-Entropy+ signiﬁcantly improved performance.
D. P ROPOSED B ENCHMARKS
Here, we describe the experimental setup for our results in sec.
5 of the main paper.
ImageNet For this evaluation, we leverage a ResNet50 model pre-trained with the cross-entropy loss on ImageNet-1K from (Wightman, 2019).
We evaluate the model directly for our CrossEntropy+ baseline.
For ARPL+ , we ﬁnetune the pre-trained model for 10 epochs with the ARPL optimization strategy.
FGVC datasets We use a similar experimental setting for the FGVC datasets as we do for the standard benchmarks.
Speciﬁcally, for both Cross-Entropy+ and ARPL+ , we again train forepochs, using a cosine annealed learning rate and learning rate warmup.
We also re-tune the
RandAugment and label smoothing hyper-parameters on a validation set.
Differently, however, we use a ResNet50 backbone with 448 ⇥ 448 image size as is standard in the FGVC literature.
We further initialize the network with weights from MoCoV2 training on Places, using an initial learning rate of 0.001 and a batch size of 32.
Training for both methods took between one and two days depending on the dataset.
Note: We attempted to train ARPL+CS on our proposed datasets but found it computationally infeasible.
Speciﬁcally, the memory intensive nature of the method meant we could only ﬁt a batch size of 2 on a 12GB GPU.
We attempted to scale it up for the FGVC datasets, ﬁtting a batch size of 16 across 4 ⇥ 24GB GPUs, with training taking a week.
However, we found its performance after a week to be slightly lower than ARPL+ in this setting.
E C OMPARISONS WITH OTHER DEEP LEARNING BASED OSR METHODS
In table 6, we provide comparisons with more methods, including those using a different backbone architecture, to supplement table 1 from the main paper.
The overrall conclusion is the same as in the main paper.
Speciﬁcally, our improved baseline signiﬁcantly outperforms reported baseline ﬁgures and largely closes the gap to state-of-the-art OSR models.
It also achieves a new state-of-the-art on the most challenging TinyImageNet benchmark.
Training other OSR methods (OSRCI, ARPL +
CS (Neal et al., 2018; Chen et al., 2021)) on top of our improved baseline can boost also their OSR performance.
However, the discrepancy between the state-of-the-art and the baseline is now much reduced (notably ARPL+CS still does not surpass the cross-entropy baseline on the most challenging benchmark of TinyImageNet).
F
O UT
- OF -D ISTRIBUTION D ETECTION R ESULTS
In this section, we run experiments on OoD benchmarks, a separate but related machine learning sub-ﬁeld to OSR.
OoD deals with all forms of distributional shifts, whereas OSR focusses on semantic novelty.
Speciﬁcally, in the ‘multiclass’ OoD setting, a model is trained for classiﬁcation on a given
[Table]
dataset, before being tasked with detecting test samples from other datasets as ‘unknown’ (Hendrycks & Gimpel, 2017).
Once again, this task is evaluated as a binary classiﬁcation (‘known’/‘unknown’) problem.
A notable difference with the OSR setting is that OoD models typically have access to auxiliary data as examples of ‘OoD’ during training (Hendrycks et al., 2019).
In this section, we use
CIFAR100 as our ‘in-distribution’ dataset.
F. C ORRELATION BETWEEN CLOSED - SET AND O O D PERFORMANCE
First, we conduct similar experiments to sec. We evaluate the performance of four ResNet models trained on CIFAR100 on the OoD task, using CIFAR10 for examples of ‘OoD’.
We show the closedset and OoD performances of these models are correlated in ﬁg. 8, with a Pearson Product-Moment correlation of ⇢ = 0 . 97 .
This trend is similar to the one observed in the ImageNet OSR evaluation in ﬁg. 3b.
P ERFORMANCE ACROSS O O D BENCHMARKS
Next, in table 7, we evaluate OoD performance when different datasets are taken as examples of ‘OoD’ with respect to CIFAR100. Speciﬁcally, we compare OSR methods (and an OoD baseline), taking Gaussian Noise, SVHN and CIFAR10 as ‘OoD’.
As a strong baseline from the OoD literature, we report results from Outlier Exposure (O.E.) (Hendrycks et al., 2019), which encourages the classiﬁer to predict a uniform distribution when fed auxiliary ‘OoD’ images from 80 Million Tiny Images (Torralba et al., 2008).
We also report results from OpenHybrid (Zhang et al., 2020) who conduct a CIFAR100 !
CIFAR10 experiment.
Furthermore, we train ARPL+CS and Cross-Entropy in this setting, training a ResNet50 forepochs.
As a ﬁnal experiment, we take a strong model pre-trained on CIFAR100 from (Lim et al., 2019) and evaluate it on the OoD benchmarks.
Our results show that, while OpenHybrid performs [Table] strongly on the CIFAR100 !
CIFAR10 experiment, the two cross-entropy models outperform the O.E baseline on this evaluation despite not having seen extra data during training .
Discussion.
Our results show that strong Cross-Entropy models can also perform well in the OoD setting.
Interestingly, the cross-entropy models perform best with respect to the O.E baseline in the ‘near OoD’ case (SVHN and CIFAR10 as ‘OoD’, i.e. in the more similar settings to OSR).
In fact, the cross-entropy models are worse at detecting Gaussian Noise than CIFAR10 images as ‘OoD’. We present this peculiar ﬁnding as further evidence that the OoD and OSR research questions may have different, and possibly orthogonal, solutions.
We hope that benchmarks which can isolate semantic novelty from low-level distributional shifts, such as those we propose in sec. 5, can facilitate more controlled OSR and OoD research.
G D ISCUSSION : U NDERSTANDING SYSTEMS OF CATEGORIZATION
Before one can establish if an image belongs to a new class, one must ﬁrst understand what constitutes a single class, or how the system of categorization is constructed.
To illustrate this, consider a classiﬁer trained on instances of two household pets: { Labrador (dog), British Shorthair (cat) }.
Now consider an open-world setting in which the model must be able to distinguish previously unseen objects, perhaps: { Poodle (dog), Sphynx (cat) }.
In this case, understanding the categorization system is essential to making the open-set decision.
Does the classiﬁcation system delineate individual animal species?
In this case, both ‘Poodle’ and ‘Sphynx’ should be identiﬁed as ‘open-set’ examples.
Or does it instead simply separate ‘cats’ from ‘dogs’?
In which case neither object belongs to the open-set.
To solve this problem, and to perform OSR reliably, the model must understand the set of invariances within a single category, as well as a set of ‘axes of variation’ to distinguish between categories.
Speciﬁcally, different instances within a single category will have a set of features which can be freely varied without the category label changing.
In computer vision, this often refers to characteristics such as pose and lighting, but could also refer to more abstract features such as animal gender or background setting.
Meanwhile, the classiﬁcation system will also have a (possibly abstract) set of axes of variation to which the category label is sensitive.
In the current OSR benchmarks, with either abstract class deﬁnitions or a small number of classes, the set of axes of variation which can distinguish between categories is diverse.
In this sense, the problem is ill-posed , with many axes likely being equally valid to distinguish between the training classes, including those based on semantically meaningless low-level features.
In contrast, within our proposed ﬁne-grained setting, the set of axes of variation which can distinguish between categories is far more constrained.
For instance, in the CUB case, given a training task of classifying 100 bird species, there is little uncertainty as to what the axis of semantic variation could be.
H P ROPOSED FGVC SPLITS H. S PLIT CONSTRUCTION
In sec. 5 of the main paper, we sketched the process for constructing open-set splits from the CUB dataset.
Here, we describe the process in detail for both CUB and FGVC-Aircraft, which have different attribute structures.
For each FGVC benchmark, we split its classes into two disjoint sets, C and U , containing closed-set and open-set classes respectively.
U is further subdivided into disjoint {‘Easy’, ‘Medium’, ‘Hard’} sets with varying degrees of attribute similarity with any class in C .
Speciﬁcally, we measure the difﬁculty of an open-set class by its semantic similarity with its most similar training class (where similarity is deﬁned in terms of attribute overlap).
CUB In CUB, each image is labelled for the presence of 312 visual attributes such as has_bill_shape::hooked and has_breast_color::yellow .
Note that images from the same class do not all share the same attributes, both because of standard factors such as pose and occlusion, but also because of factors such as the age and gender of the bird.
This information is summarised on a per-class basis, describing how often each attribute occurs in each class; i.e. , a matrix M 2 [0 , 1] C ⇥
A is available, where C = 200 is the total number of classes in
CUB and A = 312 is the number of attributes.
This allows us to construct a class similarity matrix
S 2 [0 , 1] C ⇥ C where S ij = m i · m j and m i is the L2-normalized i th row of M .
Thus, given a set of closed-set classes in C , we can rank all remaining classes ( U ) according to their maximum similarity with any of the training classes.
Finally, we bin the ranked open-set classes into {‘Easy’, ‘Medium’, ‘Hard’} sets.
In practise, we randomly sample 1 million combinations of C , and select the combination which results in the most difﬁcult open-set splits.
FGVC-Aircraft We leverage the hierarchy of class labels in FGVC-Aircraft; each image is labelled with a ‘manufacturer’ ( e.g. , ‘Airbus’ or ‘Boeing’), a ‘family’ ( e.g. , ‘A320’ or ‘A330’) and a ‘variant’ ( e.g. ‘A330-200’ or ‘A330-300’).
The hierarchy is constructed as a tree, with ‘manufacturer’ classes at the top level, ‘family’ classes at the second, and ‘variant’ classes at the bottom.
The standard image classiﬁcation challenge operates at the variant level, meaning all variant classes are visually distinct with identiﬁable features.
Furthermore, the hierarchy corresponds to visual similarity, i.e there is more inter-class variation between manufacturers than between variants from the same manufacturer.
Thus, given the closed-set classes C , we can create an ‘Easy’ open-set split from variants which do not share a manufacturer with any closed-set class.
Meanwhile, ‘Medium’ open-set classes share a manufacturer with closed-set classes but come from different families, and ‘Hard’ open-set classes share families with closed-set classes but are different variants.
H. S PLIT EXAMPLES
We include examples of images from the closed-set and open-set splits of the proposed FGVC datasets in ﬁg. 9 and 10.
For each dataset, we show examples of ‘Easy’ (green/top), ‘Medium’ (orange/middle) and ‘Hard’ (red/bottom) classes.
For each difﬁculty, we show three images from three classes from the open-set (right) and their most similar class in the closed-set (left).
We note that ‘Hard’ open-set classes are far more visually similar to their corresponding closed-set class than ‘Easy’ open-set classes.
H. S PLIT DETAILS
We include split details for each dataset, including ‘Easy’, ‘Medium’ (when applicable) and ‘Hard’ open-set bins, as pickle ﬁles.
The splits can be found in imagenet_osr_splits.pkl , cub_osr_splits.pkl , aircraft_osr_splits.pkl .
I A VERAGE P RECISION EVALUATION ON PROPOSED BENCHMARKS
We report average precision (AP) for the binary ‘known/unknown’ decision for the proposed benchmark evaluations in table 8.
AP is a standard metric in the OoD literature and is better suited for dealing with class imbalance at test time.
We note that the ‘Hard’ FGVC open-set splits (with a small number of classes) report substantially poorer AP than AUROC in absolute terms.
We treat open-set examples as ‘positive’ during evaluation.
[Table]