# Towards Open Set Deep Networks

OpenMax lets deep networks reject unknown classes instead of forcing a known label

Abhijit Bendale, Terrance Boult · arXiv · 2015-11-19

- **Problem** Deep networks with SoftMax always pick one of their known classes, so fooling images get high confidence. Thresholding SoftMax probabilities helps only somewhat and does not solve this.
- **Method** OpenMax adds an unknown class to the network's final layer. It fits a Weibull distribution to distances from each class's mean activation vector, then shifts part of each strong activation into the unknown class.
- **Results** OpenMax gains nearly 4.3% accuracy over SoftMax with an optimal threshold on ILSVRC 2012 validation, fooling and open set images.

## Why SoftMax cannot reject unknown inputs

A deep network with SoftMax output always returns a most-likely class among its N known labels, because the output is a probability distribution over those labels only. The hope that low confidence would flag unknown inputs does not hold in practice, since fooling images can be built to receive high-confidence scores for a class while looking unlike it to a human.

Thresholding SoftMax probabilities improves open set recognition somewhat, but it does not resolve the fooling problem.

The authors frame the goal as rejection that also covers unknown unknowns, which cannot be listed as an other class in training. They argue that the space in which open space risk is measured should be a feature space rather than pixel space, and they look for a layer of the network where unknown, fooling and adversarial inputs lie far from training data.

## Activation vectors and mean activation vectors

The method reads the penultimate layer, the fully connected layer before SoftMax, which is FC8 in the AlexNet used here. The authors treat the values in this layer, called the activation vector (AV), as a pattern of which classes are related to the input rather than as an independent score per class.

Each class is summarised by a mean activation vector (MAV), computed only over the training examples that the network classified correctly for that class. The authors use a single mean per class as a first approximation and note that multi-centroid models such as NCMC or NCM forests could model the classes more accurately. The distance between an input and the MAV is a weighted combination of normalised Euclidean and cosine distances, computed for each crop and channel separately.

## Per-class Weibull calibration of distances

Meta-Recognition analyses the tail of a recogniser's scores with Extreme Value Theory, and prior work found that such tails follow a Weibull distribution. The authors apply this idea to the activation vectors instead of the final SoftMax scores, because SoftMax outputs are renormalised to a logistic-type form and do not give a meaningful Extreme Value fit.

For each class j, the calibration takes the distances between correctly classified training examples and the MAV, keeps the largest eta of them, and fits a Weibull with libMR's FitHigh function, giving a shift tau\_j and shape and scale parameters kappa\_j and lambda\_j. The tail size is chosen on a small held-out set and ends at 20. Calibration uses only correctly classified data, and at test time the Weibull output for the top-ranked class gives the probability that the input is an outlier.

## Revising SoftMax into OpenMax

For the top alpha classes by activation, a weight is computed from the Weibull distribution of the distance between the input and that class's MAV, and the activations are scaled by these weights. The weights are close to one for inputs near the MAV and fall as the input moves away, so strongly activated classes that are far from their MAV lose probability.

The removed activation is moved into a pseudo-activation for the unknown class at index 0, which keeps the total activation level constant.

The OpenMax probability is a SoftMax over the revised activations and the unknown class, so these probabilities do not have to sum to one over the known classes. The probability of class j is computed as \\\[ \\hat{P}(y=j \\mid x) = \\frac{e^{\\hat{v}\_j(x)}}{\\sum\_{i=0}^{N} e^{\\hat{v}\_i(x)}} \\\] where the sum runs over the unknown class at index 0 and the N known classes.

An input is rejected when the argmax is the unknown class, or when the probability of the top class falls below the uncertainty threshold epsilon.

Because every probability is changed by the unknown-class term, OpenMax rejects more inputs than SoftMax at the same threshold, and its ranking can differ from the SoftMax ranking. The authors argue that the Weibull CDF rises with distance, so one minus the weight decreases monotonically with distance, which they treat as a compact abating probability.

That argument relies on results from prior work, and it yields that thresholding the OpenMax probability of the unknown class limits open space risk in the activation-vector space.

## Experimental setup and evaluation protocol

The closed set is ILSVRC 2012, with about 1.3M training images, 50K validation images and 150K test images, and because its test labels are not public, performance is reported on the validation set. The network is the pre-trained BVLC AlexNet from the Caffe package, which the authors report reaches approximately 57.1% top-1 accuracy on the ILSVRC 2012 validation set.

Open set images come from 360 categories of ILSVRC 2010 that were not used in ILSVRC 2012, giving 15K open set images. The full test mixture has 80,000 images: the 50,000 validation images, the 15,000 fooling images and the 15,000 unknown images.

Predictions are strict top-1, using the average over the 10 channels and the maximum over the 1001 OpenMax probabilities. A validation image counts as a true positive when it is correctly classified, and a fooling or open set image counts as a false negative when it is accepted as a known class. The authors use F-measure rather than accuracy because F-measure is not inflated by true negatives.

The parameters were tuned on non-test data, and the threshold sweeps show the same uncertainty threshold for SoftMax with threshold and for OpenMax.

## OpenMax against SoftMax with thresholding

Across the threshold sweep, the F-measure of OpenMax is higher than that of SoftMax with threshold on the 80,000-image mixture. At the optimal threshold, OpenMax gains nearly 4.3% accuracy over SoftMax and 12.3% over the base network.

The 1-vs-set algorithm trained as a linear SVM on the FC8 data reached an overall F-measure of .407, against .595 for OpenMax. In the fooling and open set detector sweeps, OpenMax is shown to reject fooling images well at prediction time. The authors report that a single MAV detects fooling images better than thresholding uncertainty alone.

Setting alpha to 10 gave the best performance, and lower values reduced F-measure, while larger values gave almost no further gain. Tail size 20 was optimal, and beyond it validation performance dropped even as rejection of open set and fooling images improved. Among the distances tested, the Euclidean-cosine combination performed best, with Euclidean and cosine distances each slightly worse.

## Limitations

Adversarial images are not part of the experiments, because the outcome would depend on which adversarial images are generated. Adversarial images made toward a nearby class, such as hammerhead to great white shark, are not expected to be rejected because fine-grained differences are not captured by the MAV. Unknown classes that are fine-grained variants of known classes are likely to be accepted rather than rejected.

A single MAV per class may not represent objects seen from different views or in different contexts, and multi-exemplar models were left to future work. Increasing rejection of open set and fooling images can also increase the rejection of true classes, and the authors suggest richer AV models as a way to reduce that cost. Only top-1 predictions were evaluated, and top-5 OpenMax output was not part of the experimental evaluation.

All experiments use the BVLC AlexNet backbone.

## Paper info

- **Authors**: Abhijit Bendale, Terrance Boult
- **Venue**: arXiv · Preprint
- **First published**: 2015-11-19
- **Added**: 2026-11-12
- **Updated**: 2015-11-19
- **Version**: v1
- **arXiv**: 1511.06233
- **Category**: cs.CV · cs.LG
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1511.06233v1) · [PDF ↗](https://arxiv.org/pdf/1511.06233v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Abhijit Bendale, Terrance Boult (2015). Towards Open Set Deep Networks. arXiv:1511.06233v1. https://arxiv.org/abs/1511.06233v1

**BibTeX**

```
@misc{bendale2015towards,
  title = {{Towards Open Set Deep Networks}},
  author = {Abhijit Bendale and Terrance Boult},
  year = {2015},
  eprint = {1511.06233},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1511.06233v1}
}
```

## Other paper commentary

- [Image Captioning with Semantic Attention](https://refivu.com/en/papers/1d01d0ec-7423-41cc-9a8a-b002bc483a11-image-captioning-with-semantic-attention.md)
- [Learning from Simulated and Unsupervised Images through Adversarial Training](https://refivu.com/en/papers/932cb1b6-f4a0-43ce-8dda-320fa18f82a5-learning-from-simulated-and-unsupervised-images-through.md)
- [Libra R-CNN: Towards Balanced Learning for Object Detection](https://refivu.com/en/papers/c37a17a8-6ca9-466b-8cf2-8b63070f36bc-libra-r-cnn-towards-balanced-learning-for-object.md)
- [BiSeNet V2: Bilateral Network with Guided Aggregation for Real-time Semantic Segmentation](https://refivu.com/en/papers/fe62be3d-2187-471e-93af-db527c65a4a6-bisenet-v2-bilateral-network-with-guided-aggregation-for.md)
- [Receptive Field Block Net for Accurate and Fast Object Detection](https://refivu.com/en/papers/c379e7ab-56c5-489a-a229-d959705f520a-receptive-field-block-net-for-accurate-and-fast.md)
- [AutoML: A Survey of the State-of-the-Art](https://refivu.com/en/papers/c151a283-ee30-4b90-ae39-a522aa0cfc5f-automl-a-survey-of-the-state-of-the.md)
- [Graph Embedding Techniques, Applications, and Performance: A Survey](https://refivu.com/en/papers/eeed1384-bf87-452c-b3b1-9ecc6ce7d43b-graph-embedding-techniques-applications-and-performance-a.md)
- [Expanding Performance Boundaries of Open-Source Multimodal Models with Model, Data, and Test-Time Scaling](https://refivu.com/en/papers/90a6655e-9301-4ffa-a598-267663200fa0-expanding-performance-boundaries-of-open-source-multimodal.md)
- [A Multitask, Multilingual, Multimodal Evaluation of ChatGPT on Reasoning, Hallucination, and Interactivity](https://refivu.com/en/papers/a220e44a-f4ac-4a9b-9268-eefcbafeda8e-a-multitask-multilingual-multimodal-evaluation-of-chatgpt-on.md)
- [A Neural Conversational Model](https://refivu.com/en/papers/2838569c-2f3a-45e5-86e6-549de8737d24-a-neural-conversational-model.md)
- [Super-Convergence: Very Fast Training of Neural Networks Using Large Learning Rates](https://refivu.com/en/papers/6770e9ca-a3e2-40e5-bf7e-fd1daf28cf68-super-convergence-very-fast-training-of-neural-networks.md)
- [BloombergGPT: A Large Language Model for Finance](https://refivu.com/en/papers/2dae70a1-3c88-432c-b934-14abfe8cc431-bloomberggpt-a-large-language-model-for-finance.md)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/2821701d-d008-4717-86f5-1119fb0809bf-towards-open-set-deep-networks)
