Year: 2019

Abstract:
Determining the source of uncertainties in the predictions of AI systems are important. It allows the users to act in an informative manner to improve the safety of such systems, applied to the real-world sensitive applications. Predictive uncertainties can originate from the uncertainty in model parameters, data uncertainty or due to distributional mismatch between training and test examples. While recently, significant progress has been made to improve the predictive uncertainty estimation of deep learning models, most of these approaches either conflate the distributional uncertainty with model uncertainty or data uncertainty. In contrast, the Dirichlet Prior Network (DPN) can model distributional uncertainty distinctly by parameterizing a prior Dirichlet over the predictive categorical distributions. However, their complex loss function by explicitly incorporating KL divergence between Dirichlet distributions often makes the error surface ill-suited to optimize for challenging datasets with multiple classes. In this paper, we present an improved DPN framework by proposing a novel loss function using the standard cross-entropy loss along with a regularization term to control the sharpness of the output Dirichlet distributions from the network. Our proposed loss function aims to improve the training efficiency of the DPN framework for challenging classification tasks with a large number of classes. In our experiments using synthetic and real datasets, we demonstrate that our DPN models can distinguish the distributional uncertainty from other uncertainty types. Our proposed approach significantly improves DPN frameworks and outperform the existing OOD detectors on CIFAR-10 and CIFAR-100 dataset while also being able to recognize distributional uncertainty distinctly.

heading: 1 INTRODUCTION
text: Deep neural networks (DNNs) have achieved impeccable success to address various real world tasks (Simonyan & Zisserman, 2014a; Hinton et al., 2012; Litjens et al., 2017). However, despite impressive, and ever-improving performance in various supervised learning tasks, DNNs tend to make over-confident predictions for every input. Predictive uncertainties of DNNs can be confronted from three different factors such as model uncertainty, data uncertainty and distributional uncertainty (Malinin & Gales, 2018). Model or epistemic uncertainty captures the uncertainty in estimating the model parameters, conditioning on training data (Gal, 2016). This uncertainty can be explained away given enough training data. Data or aleatoric uncertainty is originated from the inherent complexities of the training data, such as class overlap, label noise, homoscedastic and heteroscedastic noise (Gal, 2016). Distributional uncertainty or dataset shift arises due to the distributional mismatch between the training and test examples (Quionero-Candela et al., 2009; Malinin & Gales, 2018). In this case, as the network receives unfamiliar out-of-distribution (OOD) test data, it should not confidently make predictions. The ability to separately model these three types of predictive uncertainty is important, as it enables the users to take appropriate actions depending on the source of uncertainty. For example, in the active learning scenario, distributional uncertainty indicates that the classifier requires additional data for training. On the other hand, for various real-world applications where the cost of an error is high, such as in autonomous vehicle control, medical, financial and legal fields, the source of uncertainty informs whether an input requires manual intervention.
Recently notable progress has been made to detect OOD images. Bayesian neural network based approaches conflate the distributional uncertainty through model uncertainty (Hernandez-Lobato &
Adams, 2015; Gal, 2016). However, since obtaining the true posterior distribution for the model parameters are intractable, the success of these approaches depends on the chosen prior distribution over parameters and the nature of approximations. Here, the predictive uncertainties can be measured by using an an ensemble of multiple stochastic forward passes using dropouts from a single DNN (Monti-Carlo Dropout or MCDP) (Gal & Ghahramani, 2016) or by ensembling results from multiple DNNs (Lakshminarayanan et al., 2017) and computing their mean and spread. On the other hand, most of the non-Bayesian approaches model their distributional uncertainty with data uncertainty. These approaches can explicitly train the network in a multi-task fashion incorporating both in-domain and OOD examples to produce sharp and flat predictive posteriors respectively (Lee et al., 2018a; Hendrycks et al., 2019). However, none of these approaches can robustly determine the source of uncertainty. Malinin & Gales (2018) introduced Dirichlet Prior Network (DPN) to distinctly model the distributional uncertainty from the other uncertainty types. A DPN classifier aims to produce sharp distributions to indicate low-order uncertainty for the in-domain examples and flat distributions for the OOD examples. However, their complex loss function, using the Kullback-Leibler (KL) divergence between Dirichlet distributions, results in the error surface to become poorly suited for optimization and makes it difficult efficiently train the DNN classifiers for challenging datasets with a large number of classes (Malinin & Gales, 2019).
In this work, we aim to improve the training efficiency of the DPN framework by proposing a novel loss function that also allows the distributional uncertainty to be modeled distinctly from both data uncertainty and model uncertainty. Instead of explicitly using Dirichlet distributions in the loss function, we propose to apply the standard cross-entropy loss on the softmax outputs along with a novel regularization term for the logit (pre-softmax activation) outputs. We train the models in a multi-task function by leveraging both in-domain training images and OOD training images. The proposed loss function can be also viewed from the perspective of the non-Bayesian frameworks (Lee et al., 2018a; Hendrycks et al., 2019) where the proposed regularizer presents an additional term to control the sharpness of the output Dirichlet distributions. In our experiments, we demonstrate that our proposed regularization term can effectively control the sharpness of the output Dirichlet distributions from the DPN to detect distributional uncertainties along with making the framework scalable for more challenging datasets. We also find that the OOD detection performance of our DPN models often improves by augmenting Gaussian noises with the OOD training images to train the DPN. Our experimental results on CIFAR-10 and CIFAR-100 suggest that our proposed approach significantly improves the performance of the DPN framework for OOD detection and out-performs the recently proposed OOD detection techniques.

heading: 2 RELATED WORKS
text: In Bayesian frameworks, the predictive uncertainty of a classification model, trained on a finite dataset, Din = {xi, yi}Ni=1 ∼ Pin(x, y), is expressed in terms of data (aleatoric) and model (epistemic) uncertainty (Gal, 2016). For an input x∗, the predictive uncertainty is expressed as:
p(ωc|x∗,Din) = ∫ p(ωc|x∗, θ) p(θ|Din) dθ (1)
Here, x and y represents the images and the corresponding class labels, sampled from an underlying probability distribution pin(x, y). Here, the data uncertainty, p(ωc|x∗, θ) is described by the posterior distribution over class labels given model parameters, θ and model uncertainty, p(θ|Din), is given by the posterior distribution over parameters given the data, Din. The expected distribution for predictive uncertainty, p(ωc|x∗,Din) is obtained by marginalizing out θ. However, true posterior for p(θ|Din) is intractable. Approaches such as Monte-Carlo dropout (MCDP) (Gal & Ghahramani, 2016), Langevin Dynamics (Welling & Teh, 2011), explicit ensembling (Lakshminarayanan et al., 2017) approximate the integral in eq. 1 as:
p(ωc|x∗,Din) ≈ 1
M M∑ m=1 p(ωc|x∗,θ(m)) θ(m) ∼ q(θ) (2)
where, θ(m) is sampled from an explicit or implicit variational approximation, q(θ) of the true posterior p(θ|Din). Each p(ωc|x∗, θ(m)) represents a categorical distribution, µ = [µ1, · · · , µk] = [p(y = ω1), · · · , p(y = ωK)] over the class labels and the ensemble can be visualized as a collection of points on the simplex. While for a confident prediction, the ensemble is expected to sharply
appear in one corner of the simplex, the flatly spread ensembles cannot determine whether the uncertainty is due to data or distributional uncertainty. Furthermore, for standard DNNs, with millions of parameters, it becomes even harder to find an appropriate prior distribution and inference scheme to estimate the posterior distribution of the model. Dirichlet Prior Network (DPN) is introduced to explicitly model the distributional uncertainty by parameterizing a Dirichlet distribution over a simplex (Malinin & Gales, 2018). More discussions about DPN is presented in section 3.1.
Alternatively, non-Bayesian frameworks derive their measure of uncertainties using the predictive posteriors obtained from DNNs. Lee et al. (2018a) and Hendrycks et al. (2019) introduce new components in their loss functions to explicitly incorporate OOD data for training. DeVries & Taylor (2018) append an auxiliary branch onto a pre-trained classifier to derive the OOD score. Shalev et al. (2018) uses multiple semantic dense representations as the target label to train the OOD detection network. Several recent works such as (Lee et al., 2018b; Liang et al., 2018) have demonstrated that by tweaking the input images during inference using adversarial perturbations can enhance the performance of a DNN for OOD detection (Goodfellow et al., 2014b). However, their discriminative scores are achieved by tailoring the parameters for each OOD distributions during test time, which is not possible for real-world OOD examples. Hein et al. (2019) propose an adversarial training (Madry et al., 2018) like approach to produce lower confident predictions for OOD examples. However, while these models can identify the total predictive uncertainties, they can not robustly determine whether the source of uncertainty is due to an in-domain input in a region of class overlap or an OOD example far away from the training distribution.

heading: 3 PROPOSED METHODOLOGY
text: This section first describes the DPN framework and the difficulties of the existing modeling techniques to scale DPNs for challenging datasets. We then present our improved version DPN by proposing a novel loss function to address these difficulties while allowing to model the distributional uncertainty distinctly from the model and data uncertainty.

heading: 3.1 DIRICHLET PRIOR NETWORK
text: A DPN for classification directly parametrizes a prior Dirichlet distribution over the categorical output distributions on a simplex (Malinin & Gales, 2018). For in-domain examples, a DPN attempts to produce sharp Dirichlet in one corner of the simplex, when it is confident in its predictions (Figure 1a). It should produce a sharp distribution in the middle of the simplex to indicate the data (loworder) uncertainty for the in-domain example with a high degree of noise or belongs to a class overlapping region (Figure 1b). In contrast, for OOD examples, a DPN should produce a Dirichlet that spreads over the simplex or across the edge of the simplex to indicate the distributional uncertainty (Figure1c). Here, the data uncertainty is expressed by the point-estimate categorical distribution µ while the distributional uncertainty is described using the distribution over the predictive categorical i.e p(µ|x∗, θ). The overall predictive uncertainty is expressed as:
p(ωc|x∗,D) = ∫ ∫ p(ωc|µ) p(µ|x∗,θ) p(θ|D) dµ dθ (3)
This expression forms a three layered hierarchy of uncertainties: a large model uncertainty, p(θ|D) would induce a large variation in distributional uncertainty in p(µ|x∗,θ) and a large degree of uncertainty for µ leads to higher data uncertainty. DPN framework is consistent with the existing approaches, where an additional layer of uncertainty is included to capture the distributional uncertainty. For example, marginalization of µ in Eqn. 3 will reproduce Eqn. 1 while loose the control over the sharpness of the output Dirichlet distributions. The marginalization of θ produces the expected estimation of data and distributional uncertainty given model uncertainty as:
p(ωc|x∗,D) = ∫ p(ωc|µ) [ ∫ p(µ|x∗,θ) p(θ|D)dθ ] dµ = ∫ p(ωc|µ) p(µ|x∗,D)dµ (4)
However, similar to eq. 1 marginalizing θ is eq. 4 is also intractable. Since the model uncertainty is reducible given large training data, for simplicity, here we assume a dirac delta estimation, θ̂ for θ:
p(θ|D) = δ(θ − θ̂) =⇒ p(µ|x∗,D) ≈ p(µ|x∗, θ̂) (5)
Constructing a DPN. A DPN constructs a Dirichlet distribution as a prior over the categorical distributions, which is parameterized by the concentration parameters, α = α1, · · · , αK .
Dir(µ|α) = Γ(α0)∏K c=1 Γ(αc) K∏ c=1 µαc−1c , αc > 0, α0 = K∑ c=0 αc (6)
where, α0 is called the precision of the Dirichlet. A larger value of α0 produces sharper distributions to indicate low order uncertainties (fig 1a and 1b). A DPN, fθ̂ produces the concentration parameters, α and the posterior over class labels, p(ωc|x∗; θ̂), is given by the mean of the Dirichlet.
α = fθ̂(x ∗) p(µ|x∗; θ̂) = Dir(µ|α) p(ωc|x∗; θ̂) = ∫ p(ωc|µ) p(µ|x∗; θ̂) dµ =
αc α0
(7)
A standard DNN with the softmax activation function can be represented as a DPN where the concentration parameters are αc = ezc(x
∗); zc(x∗) is the pre-softmax (logit) output corresponding to the class, c for an input x∗. The expected posterior probability of class label ωc is given as:
p(ωc|x∗; θ̂) = αc α0 = ezc(x ∗)∑K c=1 e zc(x∗) (8)
However, the mean of the Dirichlet is now insensitive to any arbitrary scaling of αc. Hence, the precision of the Dirichlet, α0, degrades under the standard cross-entropy loss.
Malinin & Gales (2018) instead introduced a new loss function that explicitly minimizes the KL divergence between the output Dirichlet and a target Dirichlet to produce a predefined target precision value for the output Dirichlet distributions. For in-domain examples, the target distribution is chosen to be a sharp Dirichlet, Dir(µ|α̂y), focusing on their ground truth classes. While for OOD examples, a flat Dirichlet, Dir(µ|α̃) is selected that spreads over the whole simplex.
L(θ) = EPinKL[Dir(µ|α̂y)||p(µ|x,θ)] + EPoutKL[Dir(µ|α̃)||p(µ|x,θ)] (9)
where, Pin and Pout are the underlying distribution of in-domain and OOD training examples respectively. However, learning the model using sparse 1-hot continuous distributions for class labels, which are effectively a delta function, is challenging due to their complex loss function (eq. 9). Here, the error surface becomes poorly suited for optimization using the back-propagation algorithm (Malinin & Gales, 2019). Malinin & Gales (2018) tackle this problem by using label smoothing (Szegedy et al., 2016) or teacher-student training (Hinton et al., 2015a) to redistribute a small amount of probability density to each corner of the Dirichlet. This technique is found to work well for datasets with a fewer number of class labels. However, for more challenging datasets with a large number of classes, even these techniques cannot efficiently redistribute the probability densities at each corner and results in the target distribution to tend to a delta function. Hence, it becomes difficult to train the DPN to achieve competitive performances. Malinin & Gales (2019) have recently proposed to reverse the terms within the KL divergence in eq. 9 to improve the training efficiency of DPN models. This approach still requires to explicitly constrain the precision of the output Dirichlet distributions using an appropriately chosen hyper-parameter for training.

heading: 3.2 IMPROVED DIRICHLET PRIOR NETWORK
text: We now propose an improved technique to model DPN by proposing a novel loss function using the standard cross-entropy loss along with a regularization term to control the precision of the output Dirichlet distribution from the network. As we have seen in equation 8, the precision of a Dirichlet distribution produced by the standard DNN is given as ∑K c=1 exp zc(x
∗). Hence, we can control the sharpness of the distribution by designing a regularization term that increases the sum of logit (presoftmax) outputs for the in-domain examples to produce sharp distributions to indicate their lower uncertainties. For the OOD examples, the regularization term aims to decrease the sum of logit (presoftmax) outputs to produce flat distributions to indicate distributional (higher-order) uncertainties. Hence, instead of explicitly constraining the precision the output Dirichlet with a specific hyperparameter, we allow the network to appropriately produce the precision values for different input.
In this paper, we propose the regularization term as 1K ∑K c=1 sigmoid(zc(x)) to control the sharpness of the output Dirichlet distribution along with the standard cross-entropy loss for classification. Here, the sigmoid function is chosen for the regularization term as it always produces a value within the range of (0, 1) for any zc(x). For in-domain training examples, the loss function is given as:
Lin(θ) = EPin [ − log p(y|x,θ)− λin
K K∑ c=1 sigmoid(zc(x)) ] , (10)
For OOD training examples, the loss function is given as:
Lout(θ) = EPout [ Hc(U ; p(ω|x,θ))−
λout K K∑ c=1 sigmoid(zc(x)) ] , (11)
where, U denotes the uniform distribution over the class labels. Hc is the cross-entropy function. We train the network in a multi-task fashion with the overall loss function as:
min θ L(θ) = Lin(θ) + λLout(θ), λ > 0 (12)
In this loss function, we have incorporated three user-defined hyper-parameters: λin , λout and λ in Eq. 10, Eq. 11, and Eq. 12 respectively. λ balances between the loss values for in-domain examples and OOD examples. The hyper-parameters λin and λout controls the sharpness of the output Dirichlet from a DPN. By choosing λin > 0, we enforce the network to produce positive logit values for in-domain examples that lead to producing sharper Dirichlet distributions (Fig. 2(a)). We choose λin > λout to ensure that the density is either spread over the the simplex or across the boundary (Fig 1c). The choice of λin > λout > 0 will lead the network to produce comparatively flatter Dirichlet distributions for OOD examples (Fig. 2b). In contrast, by choosing λout < 0, we enforce the network to produce negative values for zc(x∗) and hence fractional values for αc’s (i.e αc ∈ (0, 1)) for OOD examples. This will cause the densities of the Dirichlet to be distributed in the edges of the simplex and produces an extremely sharp distribution, as shown in Fig 2c.
The proposed loss function in Eq. 12 is also very closely related to non-Bayesian approaches, where by choosing λin, λout to zero we re-obtain similar loss functions as proposed by Lee et al. (2018a); Hendrycks et al. (2019). However, by setting λin, λout to zero, we lose control over the precision of the Dirichlet distribution that distinguishes distributional uncertainty from data uncertainty.
Our multi-task loss function (eq. 12) requires training samples from the in-domain distribution, Pin as well as from OOD Pout. However, since Pout is unknown, Lee et al. (2018a) propose to synthetically generate the OOD training samples from the boundary of in-domain region, Pin using generative models such as GAN (Goodfellow et al., 2014a). Alternatively, a different, easily available, real datasets can be used as OOD training examples. In practice, the latter approach is to found to be more effective for training the OOD detectors and has been applied for our experiments on vision datasets (Hendrycks et al., 2019).

heading: 4 EXPERIMENTAL STUDY
text: We demonstrate the effectiveness of the DPN framework using the proposed loss function by conducting two sets of experiments. First, we experiment on a synthetic dataset. Next, we present a comparative study of our proposed framework with the existing approaches on CIFAR10 and CIFAR100, and show the advantages over the original DPN framework (Malinin & Gales, 2018).

heading: 4.1 SYNTHETIC DATASET
text: We construct a simple dataset with three classes where the instances are sampled from three different isotropic Gaussian distributions as shown in Figure 3(a). We select isotropic co-variances, σ2I with σ = 4, to ensure that the classes are overlapping. We train a small DPN with 2 hidden layers of 50
nodes each for the synthetic dataset. For our loss function, we set λ as 1.0. We choose both positive and negative values for λout in our experiments. Here, λin and λout are chosen as λin = (1 − β) and λout = ( 1#class − β). We train two different sets of DPN models using β = 0.0 (i.e positive λout) and 0.5 (i.e negative λout), denoted as DPN(β = 0.0) and DPN(β = 0.5), respectively (See Appendix B for additional details).
An uncertainty measure can be computed as the probability of the predicted class or max probability, maxP = maxc p(ωc|x∗, Din), in the expected predictive categorical distribution, p(ωc|x∗, Din) (Figure 3(b) and 3(c) for DPN(β = 0.0) and DPN(β = 0.5), respectively).
Entropy of the predicted distribution,H[p(ωc|x∗, Din)] = − ∑K c=1 p(ωc|x
∗, Din) ln p(ωc|x∗, Din), can be also applied as a total uncertainty measure that produces low scores when the model is confident in its prediction (Figure 3(d) and 3(e) for DPN(β = 0.0) and DPN(β = 0.5) respectively).
Max probability and entropy are the most frequently used uncertainty measures used by the existing OOD detection models. However, since the predicted distribution is obtained by marginalizing µ (eq. 3), these measures cannot capture the sharpness of the output Dirichlet for a DPN. Hence, they cannot distinguish between misclassified examples and OOD examples. This observation also indicates the limitation of the existing nonDPN approachesto differentiate between data and distributional uncertainties (Malinin & Gales, 2018). A DPN framework address this limitation by using the differential entropy (D-Ent) as an uncertainty measure that produces lower scores for sharper Dirichlet distributions (eq. 13). Appendix D presents the expression to compute D-Ent scores for a given data point.
H[p(µ|x∗, Din)] = − ∫ SK−1 p(µ|x∗, Din) ln p(µ|x∗, Din) (13)
Figure 3(f) and 3(g) demonstrate that D-Ent can distinguish between in-domain and OOD examples. DPN(β = 0.0) produces smaller positive logit values, resulting in flat Dirichlet distributions for OOD examples. Hence, we obtain relatively lower D-Ent scores for OOD examples compared to the in-domain examples (fig 3 (d)). Subsequently, DPN(β = 0.5) produces negative logit values, resulting in sharp Dirichlet distributions across the edge of the simplex for OOD examples (Fig. 2(c)). As we can see in Figure 3(g), the D-Ent scores for OOD examples are even smaller than the in-domain confident predictions, indicating that the output Dirichlet distributions for OOD examples are even sharper.
Since we explicitly constrain the logit outputs to produce smaller values for OOD examples, it is meaningful to define the sum of the exponential of logits, ∑K c=1 e zc(x ∗), as a new measure of predictive uncertainty. In Figure 3(d) and 3(h), we visualize this uncertainty measure for our DPN(β = 0.0) and DPN(β = 0.5), respectively. We found that our DPN models produce very high logit values. Hence, we scaled down these values by a factor of 100 before computing this uncertainty measure for better visualization. We can see, ∑K c=1 e zc(x ∗) produces high scores for all in-domain data points to distinguish them from OOD examples.

heading: 4.2 EXPERIMENTS ON CIFAR-10 AND CIFAR-100
text: Experimental setup. In this section, we present our experiments on CIFAR-10 and CIFAR-100 datasets (Krizhevsky, 2009). CIFAR-10 images belong to 10 different classes while CIFAR-100 is a more challenging dataset, containing 100 image classes. Both of these datasets contain 32×32 natural colored images of 50, 000 training and 10, 000 testing examples. In Appendix-A, we have also experimented on TinyImageNet (TIM) that consists of 64× 64 natural images from 200 classes.
The CIFAR-10 classifiers are trained using CIFAR-10 training images as in-domain and CIFAR-100 training images as OOD dataset (Simonyan & Zisserman, 2014b). We use VGG-16 architecture for this case. For
We present in-domain misclassification detection and OOD detection experiments to evaluate the performance of our models. For our misclassification detection experiments, we take the in-domain test set and attempt to distinguish the correctly classified examples from misclassified examples (see Table 2). The OOD detection experiments attempt to distinguish the in-domain test images from unknown OOD images. In Table 3, we present a smaller set of results where we consider TinyImageNet (TIM) as the OOD dataset and attempt to distinguish them from in-domain test data points. In Appendix A, we present an expanded version of this comparative table for a wide range of OOD examples. Note that, the OOD test images are selected from datasets different from the datasets used for training. The description of our training and test datasets are presented in Table 1. Please refer to Appendix C for further details.
Evaluation of Predictive Uncertainty Estimation. To evaluate the performance of our model for misclassification detection, we consider the misclassified examples as the positive class and correctly classified examples as the negative class. For the OOD detection task, we treat the OOD examples as the positive class and in-domain examples as a negative class. The detection performance for these tasks are measured using two metrics: area under the receiver operating characteristic curve (AUROC) and area under the precision-recall curve (AUPR) (Hendrycks & Gimpel, 2016). The AUROC can be interpreted as the probability of an OOD example to produce a higher detection score than an in-domain example (Davis & Goadrich, 2006). Hence, a higher AUROC is desirable, and an uninformative detector produces an AUROC ≈ 50%. The AUPR is more informative when the positive class and negative class have greatly differing base rates. It can take these base rates into account (Manning & Schütze, 1999).
Hyper-parameters for Training Loss. Unlike Liang et al. (2018); Lee et al. (2018a), and similar toMalinin & Gales (2018); Hendrycks et al. (2019), we do not require to tune any hyper-parameters during testing for different datasets. In other words, the OOD test examples remain unknown to our DPN classifiers, as in a real-world scenario. During training, we set λ = 0.5 (eq. 12), similar to Hendrycks et al. (2019). We train multiple DPN models for CIFAR-10 and CIFAR-100 classifiers using both positive and negative values for λout. We choose λin and λout as λin = (1 − β) and λout = ( 1#class − β). We train two different sets of DPN models using 0.0 (i.e positive λout) and β = 0.5 (i.e negative λout), denoted as DPNsoft(β : 0.0) and DPNsoft(β : 0.5), respectively.
Detecting the source of uncertainty. [1] DPN model with λout > 0: By choosing a positive value for λout, we enforce the network to produce flat Dirichlet distributions over the simplex for OOD examples. Hence, the D-Ent measure should produce higher scores for OOD examples and lower scores for in-domain examples. Therefore, given a test example with high scores for both entropy as well as D-Ent, it indicates distributional uncertainty. In contrast, if the test example achieves high entropy scores and lower D-Ent score, it indicates data uncertainty. Our DPNsoft(β : 0.0) models achieve high AUROC and AUPR scores using D-Ent to detect OOD examples for both CIFAR-10 and CIFAR-100 (see Table 3) while achieves lower AUROC and AUPR scores for D-Ent while detecting misclasification for CIFAR-100 (see Table 2). However for CIFAR-
10, our DPNsoft(β : 0.0) models fail to produce low AUROC and AUPR scores under D-Ent measure for misclassification detection. This indicates that these models achieve high D-Ent scores for both misclassified and OOD examples and make it difficult to distinguish distributional uncertainty from data uncertainty for CIFAR-10.
Note that, similar to our DPNsoft(β : 0.0), DPNDir (Malinin & Gales, 2018) also produces high AUPR and AUROC scores under D-Ent measure for for both misclassified examples and OOD examples for CIFAR-10 model (Table 2 and 3). This indicates that both DPNDir and our DPNsoft(β : 0.0) models may be ineffective to detect distributional uncertainty for CIFAR-10. In contrast, our DPNsoft(β : 0.5) models are always found to be effective to identify the source of uncertainties.
[2] DPN model with λout < 0: In contrast, if we choose a negative value for λout, our DPN network produces very sharp Dirichlet distributions across the edge of the simplex for OOD examples. Hence, it produces very low D-Ent scores. Notably, these distributions are even sharper than the Dirichlet distributions obtained for confidently predicted examples. Hence, for a test example, we can detect distributional uncertainty if it achieves high entropy and low D-Ent scores. As we can see, our DPNsoft(β : 0.5) models produce very low AUROC and AUPR scores for D-Ent measure to detect OOD examples (Table 3) while achieve relatively higher AUROC and AUPR scores for detecting misclassified examples (Table 2).
Data Augmentation with white-noise for Training. After training our DPN models using clean training images, we also fine-tune them using noisy OOD training images for a few epochs. We add minor Gaussian noise sampled from isotropic Gaussian distributions N (0, σ2I) with our OOD training images. Here, the idea is to add minor perturbation without distorting the features of the OOD training images. It further exposes the network into the out of distribution space. Note that, the DPN models are fine-tuned only using OOD training images. The OOD test examples remain unknown. In practice, this technique may often further improve the OOD detection performance of our DPNsoft models as we choose σ = 0.01 (see Table 3). However, for larger perturbation, performance degrades for the DPNsoft(σ = 0.05).
Comparative Study. In Table 2 and 3, we compare the performance of our approach with several baselines, such as standard DNN (Hendrycks & Gimpel (2016)), MCDP (Gal & Ghahramani, 2016), DPNDir (Malinin & Gales, 2018), ODIN (Liang et al., 2018), and OE (Hendrycks et al., 2019). We use the same architecture as our DPNsoft models for all the competitive models. OE models are trained using the set of in-domain and OOD training images with their proposed loss function (Hendrycks et al., 2019). Note that, since non-DPN methods do not explicitly model the logit outputs, the D-Ent or ∑K c=1 e zc(x ∗) measures are not meaningful (Malinin & Gales, 2018).
We also compare our results with the existing DPN framework, namely DPNDir Malinin & Gales (2018) for CIFAR-10. Note that, the DPNDir framework fails to scale for the CIFAR-100 dataset that consists of 100 classes. Due to the unavailability of codes and results (under the same settings), we could not compare our model with Malinin & Gales (2019). Overall, our DPNsoft models significantly improved the performance of the DPN framework and consistently out-performed the existing OOD detection models. In addition, it is able to distinguish distributional uncertainty from other uncertainty types.

heading: 5 CONCLUSION
text: In this paper, we propose a novel framework to improve the training efficiency of DPN models for challenging classification tasks with large number of classes. We also propose a novel regularization term that allows controls the sharpness of the Dirichlet distributions. We show that the proposed regularizer can be easily integrated
with the standard cross-entropy loss function. Our experiments on synthetic and real datasets demonstrate that our proposed framework can efficiently distinguish the distributional uncertainty from other uncertainty types. We demonstrate that the OOD detection performance of our DPN models can be often improved by training with noisy OOD examples. Experiments show that our proposed approach significantly improves DPN frameworks, and outperforms the existing OOD detectors on both CIFAR-10 and CIFAR-100 datasets.

heading: A EXPANDED RESULTS

heading: B EXPERIMENTAL DETAILS ON SYNTHETIC DATASETS
text: The three classes of our synthetic dataset are constructed by sampling from three different isotropic Gaussian distributions with means of (−4, 0), (4, 0) and (0, 5) and isotropic variances of σ = 4. We sample 200 training data points from each distribution for each class. We also sample 600 OOD training examples from an uniform distribution of U([−15, 15], [−13, 17]).
We train a neural network with 2 hidden layers with 50 nodes each and relu activation function. The network is trained for 2, 500 epochs using stochastic gradient descent (SGD) optimization with a constant learning rate of 0.01.

heading: C EXPERIMENTAL DETAILS ON CIFAR-10 AND CIFAR-100
text: C.1 TRAINING DETAILS
For our experiments on CIFAR-10, we train a VGG-16 model with CIFAR-10 as the in-domain and CIFAR100 as the OOD training data (Simonyan & Zisserman (2014b)). For CIFAR-100, we train a DenseNet with
depth = 55, growth rate = 12 and CIFAR-100 as the in-domain and CIFAR-10 as the OOD training data (Huang et al. (2017)). We trained multiple DPNsoft models using our proposed loss functions with different hyper-parameters.
For CIFAR-10, we use the VGG-16 network. Here, we use CIFAR-10 training images (50, 000 images) as our in-domain training data and CIFAR-100 training images (50, 000 images) as our OOD training data.
For CIFAR-100, Densenet(55, 12) is trained using the same setup as proposed by Huang et al. (2017). Here, we use CIFAR-100 training images (50, 000 images) as our in-domain training data and CIFAR-10 training images (50, 000 images) as our OOD training data.
For TinyImageNet (TIM), we use the VGG-16 network. Here, we use TIM training images (100,000 images) as our in-domain training data and ImageNet-25K images (25, 000 images) as our OOD training data. ImageNet25K is obtained by randomly selecting 25, 000 images from the ImageNet dataset (Deng et al., 2009).
After training the models with clean in-domain and OOD images, we further fine-tune the models using noisy OOD training images for 50 epochs with the learning rate of 0.0001. The noises are chosen form an isotropic Gaussian distribution, N (0, σ2I). We have experimented with three different values of σ as {0.0, 0.01, 0.05} to introduce different level of noises.
C.2 OOD TEST DATASETS
We use a wide range of OOD dataset to evaluate the performance of our proposed OOD detection models. For CIFAR-10 and CIFAR-100 classifiers, these input test images are resized to 32× 32, while for TinyImageNet classifiers, we resize them to 64 × 64. In this task, we attempt to distinguish the unknown OOD images from the corresponding in-domain test images from different classification tasks. We compute different uncertainty measures for these images for this purpose. For our evaluations, we use the following OOD images as described in the following.
1. TinyImageNet (TIM) (Li et al. (2017)). This is a subset of Imagenet dataset. We use the validation set, that contains 10, 000 test images from 200 different image classes for our evaluation during test time. This dataset is used as an OOD test dataset only for CIFAR-10 and CIFAR-100 classifiers. Note that, for TinyImageNet classifiers, this is the in-domain test set.
2. LSUN (Yu et al. (2015)). The Large-scale Scene UNderstanding dataset (LSUN) contains images of 10 different scene categories. We use its validation set, containing 10, 000 images, as an unknown OOD test set.
3. Places 365 (Zhou et al. (2017)). The validation set of this dataset consists of 36500 images of 365 scene categories.
4. Textures (Cimpoi et al. (2014)) contains 5640 textural images in the wild belonging to 47 categories.
5. STL-10 contains 8, 000 images of natural images from 10 different classes (Coates et al., 2011).
6. Gaussian Noise. This is an artificially generated dataset obtained by adding Gaussian noise to the in-domain test images. The Gaussian noises are sampled from an isotropic Gaussian distribution, N (0, σ2I) with σ = 0.05.
C.3 DETAILS OF COMPETITIVE SYSTEMS
We compare the performance of our models with standard DNN as baseline model (Hendrycks & Gimpel (2016)), the Bayesian framework, monti-carlo dropout (MCDP) (Gal & Ghahramani (2016)), DPNDir using the loss function proposed by Malinin & Gales (2018), non-Bayesian frameworks such as ODIN (Liang et al. (2018)) and outlier exposure (OE) by Hendrycks et al. (2019). We use the same architecture as DPNsoftmax for the competitive models. For DPNDirichlet, we could not reproduce the same performance as given in Malinin & Gales (2018) and hence use their reported results for CIFAR-10 for our comparison.
For MCDP, we use the standard DNN model with randomly dropping the nodes during test time. The predictive categorical distributions are obtained by averaging the outputs for 10 iterations.
ODIN applies the standard DNN models trained only using in-domain training examples for OOD detection. During testing phase, it perturbs the input images using FGSM adversarial attack (Goodfellow et al. (2014b))and softmax activation function by incorporating the temperature hyper-parameter (Hinton et al. (2015b)). The maximum Probability score is then applied for their uncertainty measure. They propose to use different hyper-parameters for different OOD examples. However, in practice, the source of expected OOD
examples cannot be known. Hence, for our comparisons, we always set the perturbation size to 0.002 and the temperature to 1000.
OE models are trained using the proposed loss function by Hendrycks et al. (2019). Here, we use the same training set up as applied for our DPNsoft models: CIFAR-10 classifiers are trained using CIFAR-10 training images as in-domain examples and CIFAR-100 training images as OOD examples. For CIFAR-100, the OE models are trained using CIFAR-10 training images as OOD examples.

heading: D DIFFERENTIAL ENTROPY MEASURE FOR DIRICHLET PRIOR NETWORK
text: Differential Entropy of a Dirichlet distribution can be calculated as follows (Malinin & Gales, 2018):
H[p(µ|x∗, Din)] = − ∫ SK−1 p(µ|x∗, Din) ln p(µ|x∗, Din)
= K∑ c=1 ln Γ(αc)− ln Γ(α0)− K∑ c=1 (αc − 1)(ψ(αc)− ψ(α0)) (14)
Note that, αc is a function of x∗. Γ and ψ denotes the Gamma and digamma functions respectively.

Review summaries:
This work studies the predictive uncertainty issue of deep learning models. In particular, this work focuses on the distributional uncertainty which is caused by distributional mismatch between training and test examples. The proposed method is developed based on the existing work called Dirichlet Prior Network (DPN). It aims to address the issue of DPN that its loss function is complicated and makes the optimization difficult. Instead, this paper proposes a new loss function for DPN, which consists of the commonly used cross-entropy loss term and a regularization term. Two loss functions are respectively defined over in-domain training examples and out-of-distribution (OOD) training examples. The final objective function is a weighted combination of the two loss functions. Experimental study is conducted on one synthetic dataset and two image datasets (CIFAR-10 and CIFAR-100) to demonstrate the properties of the proposed method and compare its performance with the relevant ones in the literature. The issue researched in this work is of significance because understanding the predictive uncertainty of a deep learning model has its both theoretical and practical value. The motivation, research issues and the proposed method are overall clearly presented.