Interval Neural Networks: Uncertainty Scores

We propose a fast, non-Bayesian method for producing uncertainty scores in the output of pre-trained deep neural networks (DNNs) using a data-driven interval propagating network. This interval neural network (INN) has interval valued parameters and propagates its input using interval arithmetic. The INN produces sensible lower and upper bounds encompassing the ground truth. We provide theoretical justification for the validity of these bounds. Furthermore, its asymmetric uncertainty scores offer additional, directional information beyond what Gaussian-based, symmetric variance estimation can provide. We find that noise in the data is adequately captured by the intervals produced with our method. In numerical experiments on an image reconstruction task, we demonstrate the practical utility of INNs as a proxy for the prediction error in comparison to two state-of-the-art uncertainty quantification methods. In summary, INNs produce fast, theoretically justified uncertainty scores for DNNs that are easy to interpret, come with added information and pose as improved error proxies - features that may prove useful in advancing the usability of DNNs especially in sensitive applications such as health care.


Introduction
Deep neural networks (DNNs) nowadays play a remarkable role in many computational imaging tasks such as image translation (domain mapping), super-resolution, denoising or image synthesis. Specifically, inverse problems in medical imaging, a class of problems crucial for technologies such as computed tomography (CT) or magnetic resonance imaging, are a promising field of application for DNNs, see [3] for a recent overview. Optimization and further automation in this setting can have positive impacts to increase the quality and coverage of medical care. So far, the computational prowess of DNNs comes at the cost of opacity, a situation which extinguishes their prospects of adoption in a medical setting. A growing body of work has accumulated over recent years aimed at mitigating this opacity. An important strand concerns so called uncertainty quantification (UQ), an umbrella term for methods that provide confidence scores for predictions of a variety of models including DNNs.
Existing UQ methods come with limitations regarding error correlations, a lack of directional expressiveness due to uncertainty symmetry and non-robust behavior in the face of noise. We present a novel, non-Bayesian and optimization-based UQ method called the Interval Neural Network (INN), which provides improvements in alleviating these limitations. An INN is an interval valued neural network that is trained to encompass the target values while being bound to the behavior of an underlying prediction network. As we will demonstrate, this leads to improved error correlation as well as uncertainty scores with increased expressiveness. Our method also features improved robustness to input noise and analytic coverage bounds while maintaining competitive run-time. Finally, we perform experiments on an image reconstruction task to corroborate the capacities of the INN method empirically vis-a-vis two existing, popular UQ methods for DNNs.

Related Work
Whereas a number of methods from classical statistical learning theory, such as Gaussian processes and approximations thereof [7,18,21,26], come with built-in uncertainty estimates, DNNs have been limited in this regard. A surge of efforts to treat neural networks from a variational perspective [4,25,5,16] started to change that and led to [8,13]'s now widespread Monte Carlo dropout (MCDrop) framework which we will also use in all experiments as a baseline. In MCDrop mean and variance estimates for a DNN prediction are obtained by calculating the sample mean and variance on multiple stochastic forward passes on the same input data point. The stochasticity is induced by performing dropout during inference and sampling a new realization from the dropout Bernoulli distribution at each pass. Earlier, [22] had already proposed another simple recipe for uncertainty estimates which are amicable to the DNN treatment: the number of output components of a DNN is doubled and the DNN is trained to approximate the mean and variance of a Gaussian distribution. This led to the introduction of lightweight probabilistic DNNs by [10], dubbed ProbOut, which we will use as the second baseline. Alternate, less popular approaches to UQ for neural networks are based on confidence intervals or slight variations thereof. [14] provides an overview for the interested reader. Most notably, [24] developed what they call conformal prediction. Its application is limited, though, since an exchangeability assumption on samples is made which rarely holds in a practical setting.
Despite the fact that deep learning based methods are becoming state-of-theart for solving various inverse problems, this field is still in an early stage. Most approaches in this direction focus on the empirical reconstruction performance, excluding other aspects such as uncertainty quantification. A notable exception is a recent work by [1], who made use of a Bayesian framework to also consider uncertainties in their reconstruction.

Research Needs
Existing UQ methods for DNNs provide confidence estimates. Low uncertainty does not necessarily imply a low prediction error. In fact, a confident prediction may be right or wrong. Furthermore, the uncertainty scores of existing UQ methods are symmetric, e.g. obtained from Gaussian predictive densities. Thus, if a practitioner sees high uncertainty scores in a reconstructed medical image, she cannot infer the direction of uncertainty: is the DNN uncertain whether the output values could [ |] [| ] [ | ] [|] [|] [ | ] [| ] [ | ] [ | ] [|] Output Max Output Min Output Uncertainty Figure 1. INN Schematic Overview. The structure of an Interval Neural Network and how it is used to compute uncertainty scores. The input (left picture) is interpreted as a point interval in the first layer. It is then propagated through the network by the interval valued weights and biases (black connections) using interval arithmetic. As the weights are constrained using the underlying network, the interval valued neurons contain the value from the original prediction (black bar inside intervals) in every layer. In the output, three images are obtained: the original prediction and the images containing the lower and upper bounds. The latter two can then be used to construct a pixel-wise uncertainty score from the interval size.
rather be higher or lower? Finally, as we demonstrate in our experiments, scores by existing UQ methods can become detached from the behavior of the underlying prediction model in the face of perturbations on the data. With our INN method we aim to alleviate these limitations and increase the utility of uncertainty scores. We achieve this by propagating intervals through the network yielding a high-dimensional box in the output space, which necessarily contains the prediction and is fitted to also encompass the target data. The INN uncertainty scores thus provide information about the prediction error, the direction of uncertainty and are more robust to noise perturbations in the input and output data than existing UQ methods. Finally, the INN method comes with the marked benefit of analytic coverage bounds that allow us to specify the proportion of targets that fall outside the predicted intervals. All of these benefits can be obtained at competitive or improved run-time vis-a-vis the existing baseline methods.
On the applied side this work is motivated by the application of deep learning for solving inverse problems in medical imaging. The most common type are linear inverse problems, which can be written as where y ∈ R n is the unknown signal of interest, A ∈ R m×n is the forward operator representing a physical measurement process, and η ∈ R m is modelling noise in the measurements. Typical examples include choosing A as the identity (denoising), a subsampled Fourier matrix (magnetic resonance imaging), or a discrete Radon transform (computed tomography). Solving the inverse problem (1) amounts to reconstructing y from its observed measurements x. Recently, data driven methods (in particular deep learning based reconstructions, trained on given sample pairs (x i , y i )) have shown the potential to outperform earlier model based regularization schemes [3]. The risks of employing deep learning for reconstruction are their lack of theoretical recovery guarantees and the susceptibility to unwanted artifacts [2,11]. In particular, for sensitive medical imaging applications, it is indispensable to obtain more information regarding the reliability of the reconstruction method in the form of uncertainty quantification.

Interval Neural Networks
Popular existing UQ frameworks for DNNs rely on placing parametric densities, most commonly a Gaussian density, over DNN parameters or predictions. Our INN method relies on bounding this distribution using intervals. This is based upon the idea of [9] for investigating the capacity of neural networks with interval weights and biases for fitting interval valued functions. Note that [17] also explored the usage of interval neural networks for robust classification although in their setting the focus is purely on representing the inputs as intervals. Our resulting INN is therefore to some extent similar to existing interval propagation models except that interval bounds are determined for all parameters of the network with the goal of providing uncertainty scores for the outputs.
For an existing DNN to be analyzed, which we will from now on call the underlying model, the INN method consists of an interval valued neural network which has the same architecture as the underlying, existing DNN. The INN is initialized with the parameters of the underlying model as point intervals. It then operates as follows: Any input vector is first regarded as interval valued with point interval components. This interval vector is then propagated through the network. As illustrated in Figure 1 the interval sizes in the resulting output are regarded as uncertainty estimates. The interval parameters are trained on the training data using the loss function in Equation (2), which we will explain in more detail below. The goal of the training procedure for the INN is to produce output intervals that contain the true labels with high probability, while remaining as tight as possible. The INN's intervals are constrained to always contain the parameters of the underlying model. This constraint not only helps with stability during training but also guarantees that the output of the underlying network is always contained in the output interval of the INN. Thus, output interval sizes serve the purpose of upper bounding the absolute error.
INNs have the following mechanisms that deviate from the customary arithmetic. The forward propagation of a component-wise interval valued input [x, x] through the INN can be expressed similarly to standard feed-forward neural networks but using interval arithmetic instead. For interval valued weight matrices W , W and bias vectors b, b the propagation through the l-th layer can be expressed using interval arithmetic by For positive values of [x, x] (l) , for example when using a non-negative activation function like ReLU, we can simplify this operation to where the maximum and minimum functions are applied component-wise. Assuming for the input layer before the first ReLU, i.e. if the components consist of point intervals, the same operation can be represented as follows to also process negative values: These formulas can then easily be used in existing deep learning frameworks to optimize the bounds of the interval parameters by means of backpropagation. As we want the output intervals to contain the target values after training, we define the interval loss to be zero if a target lies inside the interval and the squared distance to the interval boundary if it lies outside the interval. As this alone would lead to the intervals in the output expanding until they cover the whole range of target values, we additionally employ a linear penalty on the interval size. For the data consisting of inputs x i ∈ X and targets y i ∈ Y, this leads to the following INN loss. Here, Φ : X → Y, Φ : X → Y are the functions that map the input to the upper and the lower interval bounds in the output of the INN: The tightness parameter β > 0 determines how outlier-sensitive the intervals are trained. In practice, choosing β similar to the mean absolute error made by the underlying prediction network seems to be a good heuristic.

Qualities of Interval Neural Networks
INNs come with certain features that go beyond what other methods for UQ can provide. These features comprise theoretically justified coverage bounds, adaptive behavior under noise as well as directional information in the uncertainty score.
In order to demonstrate these qualities, we devised an illustrative toy task as follows. Note that we also provide additional, quantitative experiments on real-life CT data in Section 6. The toy experiment (1DDeconv) is based on a simple use case of an ill-conditioned inverse problem, which is inspired by a one-dimensional deconvolution task. We choose A = D SD ∈ R 512×512 , where D ∈ R 512×512 is a discrete cosine transform and S ∈ R 512×512 is a diagonal matrix with exponentially decaying values. We consider discretizations of piecewise constant functions with random jump positions and heights as the signal distribution in R 512 . The blurred measurements x ∈ R 512 corresponding to each signal sample y are simulated by computing x = Ay + η as in (1)   for good illustration of the different INN characteristics. The prediction DNN for the 1DDeconv task, called DeconvNet, consists of a convolutional neural network (CNN) trained to directly map x to y. It consists of 10 convolutional layers and three dropout layers, one with dropout probability 0.2 and the other two with probability 0.5. The number of channels increases through the first 7 layers to 256 and decreases back to 1 in the successive layers. No pooling is employed and the data size of each channel is held to be the same as the input size throughout the network. The prediction DNN was trained for 100 epochs using Adam [15] with a learning rate of 10 −3 and batch size 256. The interval parameters of the INN were then trained for another 100 epochs with a learning rate of 10 −5 and β = 2 × 10 −3 . For the MCDrop comparison, 64 samples were used to estimate mean and variance and for the ProbOut comparison, the ProbOut loss was also optimized for 100 epochs using the Adam optimizer with a learning rate of 10 −4 .
Let us now turn to the illustration of the INN's qualities in this setting. First, the INN loss is directly tied to the target data, which enables us to bound the portion of the targets that are contained in the intervals of a given model and data set. This is not possible with the popular Gaussian-based UQ methods. In the case of the 1DDeconv task the portion of ground truth values that lie inside the intervals is 89%. What is more, these coverage bounds can be theoretically justified. They are an innate quality of the INN approach that follows from its loss function. Assuming the loss in Equation (2) is optimized during training to yield an INN for which the expected gradient with respect to the data distribution is zero, we can make the following estimates using the Markov Inequality: Let the training data be represented by the random variable (x * , y * ) being distributed on X × Y according to the training data distribution. Then, for any λ > 0, we obtain i.e. for any input and target sampled form the distribution of training samples, the probability of the target lying inside the predicted interval, which is enlarged by λβ, is at least 1 − 1 λ . As β is usually very small, this ensures a fast decay of the probability of a target value lying beyond the interval bounds. Of course, this estimate only holds for the training distribution so the training set has to be chosen to sufficiently represent the true data distribution. An example of the interval consistently containing the target values can be observed in Figure 2.
Second, in many tasks, unpredictable variables, e.g. noise in the data, pose an upper bound to the performance of a model. Due to the INN loss function, the output intervals will be able to capture this noise using the interval bias parameters in the last layer. Therefore, our method will indicate uncertainty even if the underlying network predicts the mean in the data very consistently. This effect is visible in the right column of Figure 2 for the 1DDeconv task with independent Gaussian noise (σ = 0.05) added to the inputs and targets. Note how the MCDrop approach is not able to capture these deviations in the output as the network is trained to steadily predict the mean. Furthermore, in Figure 3 one can follow how the average interval size increases with increasing noise levels.
Third, as both interval bounds are optimized using the penalty term for interval size, the ground truth is generally distributed symmetrically inside the interval. Therefore, if the prediction from the underlying network lies closer to one boundary of the output interval, one can infer that the probability of the ground truth lying on Figure 3. Noise Behavior. Relationship of the mean uncertainty magnitude and additive Gaussian noise on the 1DDeconv task. The standard deviation of the additive Gaussian noise for the input and target data is displayed on the x-axis. The mean uncertainty magnitude, which is measured in interval size for INN (in black) and standard deviation for MCDrop (in blue) and ProbOut (in green) meaned over the test data, is displayed on the y-axis.
the other side of the interval is higher. A quantitative assessment of this capability on the 1DDeconv task can be found in the top graph of Figure 4. The directional information contained in INN uncertainty scores leads to direction accuracy that is 12 to 25 percentage points above chance. This is in contrast to symmetric uncertainty score approaches like MCDrop and ProbOut. Beyond these defining features of the INN method, practical considerations to take note of include run time and stability during training. Given an underlying DNN that requires K operations for a single forward pass the following costs are incurred for obtaining uncertainty scores. INNs require 2 × K operations. MCDrop uses T × K operations where T is the number of times the dropout distribution is sampled and [8] use T = 10 as a rule of thumb. ProbOut needs C + K operations, where C is the number of operations required to compute the final output layer of the DNN. Assuming a modestly sized DNN with K C we can see that INNs are situated between the very efficient ProbOut and the more expensive MCDrop. With respect to stability during training we note that for very deep INNs, issues can arise due to the possibility of exponential growth of the intervals. This can be dealt with by choosing a small learning rate in such a situation or only training the interval parameters in the last several layers.

Uncertainties as Error Proxies
We showcased the mechanics behind the INN method and highlighted its unique capabilities regarding coverage bounds, noise behavior and directional information. In the following experiment, the INN method for UQ is subjected to real-life data in direct comparison to two other, popular UQ methods, namely MCDrop and ProbOut. As MCDrop and ProbOut do not offer the above capabilities of INNs the comparison is done with respect to an important use-case of UQ that allows for direct comparison: error correlation. Our Error Correlation (EC) experiment assesses how well uncertainty scores correspond to the prediction error of the model. The left y-axis (in red) displays the direction accuracy which is the mean agreement between the interval directions and the actual position of the target relative to the prediction. Finally, the right y-axis (in blue) displays the proportion of pixels that are considered at a given threshold and accuracy evaluation. Results are shown for the 1DDeconv task (top graph) and the CT task (bottom graph). CT results are means and standard deviations across the four experimental runs. 6.1. Data. As we outlined in the introduction, transparency-enhancing tools can play an important role in making the prowess of DNNs more viable in sensitive application settings such as medical imaging workflows. Hence, the Error Correlation experiment is performed on real-life CT data. Recently proposed deep learning reconstruction methods have shown promising results, effectively mitigating reconstruction artifacts caused by the ill-posedness of Equation (1). Besides a few exceptions, most approaches assist the neural network by incorporating knowledge of the forward model A, see [3] for an overview. In the Error Correlation experiment, we focus on an ad-hoc technique, which first computes a classical solution via the filtered backprojection algorithm (FBP) [20]. Depending on the degree of ill-posedness the FBP image is degraded by artifacts and missing edge information. The image is subsequently post-processed by a DNN in order to remove streaking artifacts and filling in the "invisible" edges [12,6]. We wish to emphasize that the result y of such a post-processing of the FBP is generally not consistent with the measurements (i.e. x = A y). Hence, it does also not correspond to the desired image y, making further information about the uncertainty of the network prediction much desirable. For our study of limited angle CT we consider a data set consisting of 512 × 512 human CT scans from the AAPM Low Dose CT Grand Challenge 1 data [19]. It contains 2580 images from 10 patients in total. Eight of these ten patients were used for training (2036 samples), one for validation (214 samples) and one for testing (330 samples). The Radon transform and subsequent FBP were computed with a missing wedge of thirty degrees in the sinogram.

Neural Network Architectures and Training Procedures. For the Error
Correlation experiment the prediction DNN underlying all UQ methods is a U-Net as in [23]. We added dropout with drop probability 0.7 after each down-sampling and up-sampling layer. It was trained for 400 epochs using Adam [15] with a learning rate of 7.5 · 10 −5 and mini-batches of size 12. The INN parameters were trained for 15 epochs using Adam with learning rate 10 −6 with β = 10 −4 and mini-batches of size 6. We limited the interval training to the last twelve layers. For ProbOut we use the same U-Net architecture with an additional output channel for the uncertainty scores. It was initialized using the trained underlying U-Net and further trained for 400 epochs using Adam with learning rate 10 −7 and mini-batches of size 12. We used 128 forward passes to determine the mean and variance for MCDrop.

Experiment.
We repeat the training four times for each UQ method and evaluate their effectiveness as an error proxy. The performance weighted correlation coefficient (PWCC) of the uncertainty scores of each UQ method and the absolute prediction errors are compared. Performance weighted means the correlation coefficient is weighted by the mean squared error. This is necessary to discourage rewards for poor prediction models with high uncertainties everywhere. Not doing so would entail high correspondence between the uncertainty scores and prediction errors of prediction models that perform very poorly, which is not desirable. The final scores are computed as the mean correlation for all elements of the test set for all of the four training runs. The interval size (INN) and standard deviation (MCDrop and ProbOut) in the output are used as uncertainty scores. For a datapoint (x i , y i ) and a corresponding uncertainty map u i , the performance weighted correlation coefficient (PWCC) is thus computed as follows: 6.4. Results. In Table 1 the results for the error correlation experiment are documented. Each method for the delivery of uncertainty scores was evaluated on the errors of the prediction model on the test data. An example from this experiment can be seen in Figure 5. First, we can observe the relatively poor prediction accuracy of the ProbOut method compared to the underlying networks for the MCDrop and   local intensity variations. In addition, we can again observe the INNs performance with respect to coverage and directional information. A total 76 ± 6% of test targets in the CT data are contained in the produced intervals. In the bottom graph of Figure 4 the directional accuracy of the INN becomes more pronounced from 57% up to 72% as the interval direction threshold grows.

Conclusion
We introduced a novel, non-Bayesian method based on interval propagation for computing upper and lower bounds and subsequent uncertainty maps for pre-trained neural networks. We presented the advantages of this method and compared it to two other existing methods. We analyzed these methods on a CT reconstruction data set with regard to their correspondence with the absolute error and the sufficiency of their explanations. We found that interval neural networks not only gave the most consistent results, but also grant additional insights concerning coverage of the intervals, noise behaviour and directional information for the ground truth.

Appendices
This supplement to the paper Interval Neural Networks: Uncertainty Scores contains the following four addenda: a derivation of the formal coverage bound argument from the main paper (Appendix A), a Bayesian treatment of INNs for an additional perspective (Appendix B) and, finally, three more randomly sampled results from the experiments on the 1D Deconvolution (Appendix C) and Computed Tomography Reconstruction (Appendix D) data sets to facilitate a broader qualitative assessment.

A. INN Coverage Bound
For both data sets in the main paper the proportion of ground truth values that lie inside the intervals were documented. Furthermore, it was argued that this type of coverage bound can be theoretically justified using the Markov Inequality. In the following this argument from the main paper is formally derived.
For some data distribution X, Y and a tightness parameter β the following loss is used: Assuming that this loss is optimized during training yields and analogously Using the Markov Inequality with h 1 (ζ) := max(ζ − Φ(x), 0) and h 2 (ζ) := max(ζ + Φ(x), 0), we obtain that for the marginalized distribution the following holds true: Hence, with A = Label is inside interval bounds plus λβ we conclude that We can furthermore bound the probability that for a given data point x the label y has a probability of more than α to be outside the interval bounds: In words, for λ > 0 and α > 0 the probability mass of all samples x, for which the corresponding label y has the probability of at least 1 − α to be inside the interval, is at least 1 − 1 λα .

B. INNs and the Bayesian View
As described in Section 2 on related work, popular UQ approaches for neural networks have their roots in a Bayesian treatment of the learning problem. In a nutshell, this involves modelling the unknown data distribution (X, Y ) on X × Y via a neural network Φ W : X → Y, where W is now also a random variable and represents the collection of all network parameters. More precisely, one assumes that p(Y |X, W ) follows a simple distribution depending on X and W through Φ W (X). A typical choice is a Gaussian distribution Y |X, W ∼ N (Φ W (X), τ −2 I) with mean Φ W (X) and some fixed precision τ . The network training requires the estimation of and some prior assumption p(W ) on the network parameters. Inference for a new input x requires the estimation of the posterior The evidence, that is the denominator in (3), is typically intractable. Variational Bayesian methods try to approximate p(W |X, Y ) by another distribution q θ (W ) from a family of distributions q θ parametrized by θ. Minimizing the KL-divergence between p(W |X, Y ) and q θ (W ) is equivalent to maximizing the evidence lower bound (ELBO) Training the network in this variational setting entails finding the optimal parameter choice θ * maximizing (5), and inference can be approximated by In light of this tradition, we want to briefly demonstrate how our Interval Neural Networks can also be viewed within the framework of variational Bayesian networks.
For an L-layer neural network with weight matrices W (l) and bias vectors b (l) , our interval network approach introduces upper and lower bound parameters θ = . But instead of precisely parametrizing the approximating distribution by θ, we allow q θ to be any distribution of weights and biases supported within the specified intervals. We now want to analyze the ELBO in (5) and the approximate posterior in (6) in this situation.
Recall that, given the interval bounds θ, the range of possible values of Φ W (x) for a fixed input x and W distributed according to q θ (W ) is denoted as [Φ(x), Φ(x)]. Further, for any target y we denote the choice of weights achieving the best and worst approximation within this range as During inference, the approximate posterior in (6) can then be estimated from the bounds A schematic visualization of these bounds can be seen in fig. 6. Even though the true posterior can lie anywhere between the bounds, we observe a fast decay of the probability of the target y lying far outside the predicted interval [Φ(x), Φ(x)]. This is line with the findings derived via the Markov bound in Appendix A.