• No results found

(a) Shaded area isARorc. (b) Shaded area isARuns.

Figure 5.3 Prediction Rejection Curves

are higher for accurate predictions than for misclassifications. An important property of this performance metric is that it is independent of classification performance, unlike AUPR.

5.3

Misclassification Detection

This section considers the use of measures of uncertainty to detect images which are mis- classified by a model. These images, which will be referred to asmisclassifications, can be considered a form of outlier and may occur for a variety of reasons. One possible reason is that they are unseen versions of seen classes, and therefore out-of-distribution relative to the training data. Alternatively, the image may be located in an in-domain region which the model does not understand well and where it has learned poor decision boundaries. In each of these situations it is desirable for the model to yield a higher uncertainty score, allowing such inputs to be detected. The current section is structured as follows: the classification performance of each model is assessed in section 5.3.1, misclassification detection is assessed as a binary classification problem in section 5.3.2 and via rejection curves in section 5.3.3.

5.3.1

Classification Performance

Firstly the classification error rate of each model trained on each data is assessed on the datasets’ corresponding test set. The results are presented in table 5.4 below:

Several trends are noticeable. Firstly, MNIST, SVHN and CIFAR-10 are progressively more challenging tasks, as the error rates of all models considered consistently rise. Secondly, as the datasets become more challenging, the Prior Networks trained using the forward

98 Experimental Evaluation of Prior Networks

Dataset Single Model Ensemble DNN PN-KL PN-RKL MCDP ENS MNIST 0.5±0.1 0.6±0.1 0.5±0.1 0.5±0.1 0.5±NA

SVHN 4.3±0.3 5.7±0.2 4.2±0.2 4.3±0.3 3.3±NA

CIFAR-10 8.0±0.4 14.7±0.4 7.5±0.3 8.0±0.4 6.6±NA

Table 5.4 Mean classification performance (% Error)±2σacross 10 random initializations. Note, performance of explicit ensemble (ENS) is not a mean, as it represents the performance of ensembling the predictions of each DNN model. PN-KL and PN-RKL trained on MNIST use the MNIST-FA out-of-distribution training data.

while Prior Networks trained using thereverseKL-divergence achieve the best single-model performance. These results show that on challenging tasks theforwardKL-divergence loss yields increasingly poor classification performance. Due to this, as well as the theoretical and experimental results from the previous chapter, Prior Networks trained withforward

KL-divergence will not be considered throughout the remained of this chapter. The final trend is that the best overall performance is always achieved using an explicit ensemble of models, which is consistent with previous work [68], while Monte-Carlo dropout ensembles do not seem to yield improvements in classification performance.

5.3.2

Assessing misclassification detection via AUPR

As described in section 5.2, misclassification detection can be seen as a threshold-based binary classification task. The performance of a model on this task can be assessed via area under an ROC curve (AUROC) or area under a Precision-Recall curve (AUPR). AUPR will be more sensitive to the performance of detecting the positive class in cases of severe class mis-balance. Given the results in table 5.4, which show that all models considered in this chapter achieve an error rate below 10%, in the following experiments misclassification detection performance is assessed only using AUPR, where misclassifications are chosen as the positive class.

The use of all uncertainty measures described in sections 3.2.1 and 3.3.1 for misclas- sification detection is explored. Specifically, the confidence and entropy of the predictive posterior, given in equations 3.19 and 3.18, are derived from a DNN. Both measures represent

data uncertainty. The same measures are also derived from the predictive posterior of an explicit ensemble of DNNs, Monte-Carlo dropout ensembles and Prior Networks, where they representtotal uncertainty. Finally, mutual information and expected pairwise KL-divergence will be derived from ensembles via equations 3.31 and 3.32 and from Prior Networks using equations 4.4 and 4.5, respectively. Furthermore, the differential entropy of a Prior Network,

5.3 Misclassification Detection 99

given in equation 4.6, is also considered. All of these measures of uncertainty represent

knowledge uncertainty.

The results of the misclassification detection experiment using models trained on the MNIST, SVHN and CIFAR-10 datasets are described in table 5.1, ordered by dataset com- plexity. There are several notable trends in the results shown in table 5.5. Firstly, the best measure of uncertainty for misclassification detection is the confidence, while second best measure of uncertainty is always the entropy of the predictive distribution. This shows that estimates oftotal uncertaintyare more useful for misclassification detection than measures ofknowledge uncertainty, which means that it is not necessary to separate out the sources of uncertainty for this task. The reason that the confidence is a better measure of uncertainty than the entropy is because the former is directly related to the predicted class, while the latter is sensitive to changes in the entire distribution, which may be irrelevant to the given prediction. In contrast, by far the worst measures of uncertainty for this task are the expected pairwise KL-divergence and differential entropy of Prior Networks. Consequently, further analysis will only consider misclassification detection based on the confidence.

Secondly, the results show that on MNIST and SVHN all models yield similar perfor- mance. However, on CIFAR-10 Prior Networks yield the worst misclassification detection

Dataset Model Total Uncertainty Knowledge Uncertainty % Error Conf. Ent. M.I. EPKL D.Ent.

MNIST DNN 33.7±8.1 33.2±5.5 - - - 0.5 MCDP 33.2±7.3 30.6±6.0 23.7±7.6 21.5±7.3 - 0.5 ENS 37.8±NA 35.5±NA 34.8±NA 34.7±NA - 0.5 PN-RKL 36.1±6.4 31.1±6.0 20.5±4.5 20.5±4.1 20.7±5.7 0.5 SVHN DNN 43.4±3.2 43.8±3.5 - - - 4.3 MCDP 43.3±3.9 43.9±3.7 40.9±2.9 40.4±2.7 - 4.3 ENS 42.7±NA 40.1±NA 37.4±NA 32.4±NA - 3.3 PN-RKL 43.8±4.5 43.0±4.4 34.9±3.5 34.7±3.5 37.1±3.7 4.2 CIFAR-10 DNN 48.2±2.7 47.0±3.4 - - - 8.0 MCDP 48.4±3.2 47.4±3.6 36.6±3.2 36.5±3.2 - 8.0 ENS 48.0±NA 44.7±NA 38.6±NA 35.4±NA - 6.6 PN-RKL 40.5±3.0 38.5±2.7 35.0±2.3 34.8±2.3 36.9±2.6 7.5

Table 5.5 Misclassification detection results on MNIST, SVHN and CIFAR-10 test datasets in terms of mean % AUPR±2σacross 10 random initializations. Note, % AUPR of explicit ensemble (ENS) is not a mean, as it represents the performance of ensembling the predictions of each DNN model. MNIST Prior Network used MNIST-FA data as out-of-distribution training data.

100 Experimental Evaluation of Prior Networks

(a) MNIST (b) SVHN

(c) CIFAR-10

Figure 5.4 Misclassification detection Precision-Recall Curves on MNIST, SVHN and CIFAR- 10 test sets. Constructed using confidence as a measure of (inverse) uncertainty. The predictions of models from 10 different initializations were concatenated together as a way of combining predictions. The exception to this is the explicit ensemble (ENS), where only a single set of predictions is available.

performance by a large margin. This can be further analyzed by considering the PR-curves depicted in figure 5.4. The PR curves derived from all models on the MNIST and SVHN are similar, though the PR curves on MNIST are noisy as there are so few misclassifications. However, the PR curves for models trained on CIFAR-10, depicted in figure 5.4c, show that Prior Networks yield consistently lower precision, especially as the uncertainty threshold is increased.

Let’s consider the histograms of the confidence scores for correct and misclassified inputs of an explicit ensemble and a Prior Network trained on CIFAR-10, shown in figure 5.5. By comparing figures 5.5a and 5.5b it is clear that Prior Networks tend to make more classification with a low confidence than ensembles. These result suggest that due to overall similarity between the CIFAR-10 and CIFAR-100 data, the out-of-distribution loss decreases

5.3 Misclassification Detection 101

(a) Explicit Ensemble (b) Prior Network

Figure 5.5 Histograms of confidence scores of explicit ensemble (ENS) and Prior Network (PN-RKL) on CIFAR-10 test set. The predictions of models from 10 PN-RKL models trained form different initializations were concatenated together as a way of combining predictions. Only a single set of predictions is available from ENS.

the confidence the model assigns to inputs which are close to the CIFAR-10 region. However, considering that the overall error rate goes down, it is possible there are two separate effects occurring. Firstly, the model makes more low-confidence predictions overall due to the effect of CIFAR-100 data. Secondly, low-confidence misclassifications have now become low-confidence correct predictions. As a result, there is a greater number of misclassification and correct predictions which have a low confidence, which will bring down the precision, decreasing overall AUPR, as shown in figure 5.4c. In contrast, models trained on MNIST and SVHN used out-of-distribution training data which was quite different from the in-domain data and which therefore had little effect on in-domain performance.

These results show that in general, Prior Networks do not provide a significant advantage to misclassification detection over standard models like DNN and ensemble of DNNs. How- ever, the out-of-distribution data can act as a regularizer and improves overall classification performance. Finally, if there are similarities between the out-of-distribution training data and the in-domain data, then it can actually decrease the precision with which misclassifications can be detected and shift the overall level of confidence down.

5.3.3

Assessing misclassification detection via rejection curves

As discussed in section 5.2, an alternative way to assess misclassification detection per- formance is via rejection curves, which represent a realistic downstream application of uncertainty estimates. Here, the predictions a model makes are replaced by the predictions of an ‘oracle’, for example a human, in order of decreasing uncertainty. The rejection curves

102 Experimental Evaluation of Prior Networks

Dataset Single Model Ensemble DNN PN-RKL MCDP ENS MNIST 98.2±0.3 95.8±1.5 97.9±0.5 98.4±NA

SVHN 80.7±2.1 77.8±2.0 81.6±2.1 84.4±NA

CIFAR-10 84.4±1.1 82.0±1.4 84.4±1.1 86.9±NA

Table 5.6 Mean rejection ratios±2σ across 10 random initializations on MNIST, SVHN and CIFAR-10 test sets. Constructed using confidence as a measures of (inverse) uncertainty. Performance is evaluated on the test sets of MNIST, SVHN and CIFAR-10.

for all models trained on the MNIST, SVHN and CIFAR-10 datasets are shown in figure 5.6. Predictions are rejected in order of decreasing confidence. The rejection performance can be summarized by the rejection area ratio, introduced in section 5.2. These ratios are provided in table 5.6. The results show that the best model at rejection is an explicit ensemble, while Prior Networks consistently yield the worst rejection performance. This essentially reflects the same trends as the analysis based on precision-recall curves above. Analyzing precision- recall curves is more informative than rejection curves. However, rejection curves provide more information about performance on a downstream application. Furthermore, it may not be possible to use precision-recall curves to analyze the quality of uncertainty estimates on certain tasks, like regression. In these situations it is possible to use rejection curves and rejection area ratios instead.