Title: EVALUATING AND CALIBRATING UNCERTAINTY PRE-DICTION IN REGRESSION TASKS

Abstract: Predicting not only the target but also an accurate measure of uncertainty is important for many applications and in particular safety-critical ones. In this work we study the calibration of uncertainty prediction for regression tasks which often arise in real-world systems. We show that the existing definition for calibration of a regression uncertainty (Kuleshov et al., 2018) has severe limitations in distinguishing informative from non-informative uncertainty predictions. We propose a new definition that escapes this caveat and an evaluation method using a simple histogram-based approach inspired by reliability diagrams used in classification tasks. Our method clusters examples with similar uncertainty prediction and compares the prediction with the empirical uncertainty on these examples. We also propose a simple scaling-based calibration that preforms well in our experimental tests. We show results on both a synthetic, controlled problem and on the object detection bounding-box regression task using the COCO (Lin et al., 2014) and KITTI (Geiger et al., 2012) datasets.

1. INTRODUCTION:

Figure 1 : Regression with random uncertainty (independent of actual uncertainty) almost perfectly calibrated by the method proposed in (Kuleshov et al., 2018) , when the expected and observed confidence level are identical. As anything can be perfectly calibrated, this calibration definition becomes uninformative. The task is object bounding box regression, using the KITTI dataset (Geiger et al., 2012) . See details in Section 4.2.

Regression problems arise in many real-world machine learning tasks. To name just a few: Depth from a single image (Eigen et al., 2014) , Object localization and Acoustic localization (Vera-Diaz et al., 2018) . Many of these tasks are solved by deep neural networks used within decision making pipelines which require the machine learning block not only to predict the target but to also output its confidence in the prediction. For example, the commonly used Kalman-Filter tracking algorithm (Blackman, 2004) requiring variance estimation for the observed object's location estimation. In addition, we may want the system to output a final uncertainty, reflecting real-world empirical probabilities, to allow a safety-critical system such as a self-driving car agent to take appropriate actions when confidence drops. In practice, using the confidence in the localization of objects has been shown to improve the non-maximal suppression stage and consequently the overall detection performance (He et al., 2018) . Similarly, (Feng et al., 2018) describe a probabilistic 3D vehicle detector for Lidar point clouds that can model both classification and spatial uncertainty.

To provide uncertainty estimation, each prediction produced by the machine learning module during inference should be a distribution over the target domain. There are several approaches for achieving this, most common are Bayesian neural networks (Gal, 2016; Gal & Ghahramani, 2016) , ensembles (Lakshminarayanan et al., 2017) and outputting a parametric distribution directly (Nix & Weigend, 1994) . Bayesian neural networks place a probability distribution over the network parameters, which is translated to an uncertainty in the prediction, providing a technically sound approach but with overhead at inference time. In the direct approach, outputs of the network represent the parameters of the output distribution for either discrete (Niculescu-Mizil & Caruana, 2005) or continuous (Nix & Weigend, 1994) distributions. Note that the direct approach naturally captures the aleatoric uncertainty (inherent observation noise), but captures less the epistemic uncertainty (uncertainty in the model) (Kendall & Gal, 2017) . We chose as a test case for our calibration method, the direct approach for producing uncertainty: we transform the network output from a single scalar to a Gaussian distribution by taking the scalar as the mean and adding a branch that predicts the standard deviation (STD) as in (Lakshminarayanan et al., 2017) . While this is probably the simplest form, it is commonly used in practice, and our analysis is applicable to more complex distributions as well as other approaches.

Adjusting the output distributions to match the observed empirical ones via a post process is called uncertainty calibration. It was shown that modern deep networks tend to be over confident in their predictions (Guo et al., 2017) . The same study revealed that for classification, Platt Scaling (Platt, 1999) , a simple scaling of the pre-activation of the last layer, achieves well calibrated confidence estimates (Guo et al., 2017) . In this paper we show that a similar simple scaling strategy, applied to the standard deviations of the output distributions, can calibrate regression algorithms as well.

One major question is how to define calibration for regression, where the model outputs a continuous distribution over possible predictions. In recent work (Kuleshov et al., 2018) suggested a definition based on credible intervals where if we take the p percentiles of each predicted distribution the output should fall below them for exactly p percent of the data. Based on this definition the authors further suggested a calibration evaluation metric and re-calibration method. While this seems very sensible and has the advantage of considering the entire distribution, we found serious flaws in this definition. The main problem arises from averaging over the whole dataset. We show, both empirically and analytically, that one can calibrate using this evaluation metric practically any output distribution, even one which is entirely uncorrelated with the empirical uncertainty as can be seen in Fig. 1 . We elaborate on this property of the evaluation method described in (Kuleshov et al., 2018) in Section 2 and show empirical evidence in Section 4.

We propose a new simple definition for calibration for regression, which is closer to the standard one for classification. Calibration for classification can be viewed as expecting the output for every single data point to correctly predict its error, in terms of misclassification probability. In a similar fashion, we define calibration for regression by simply replacing the misclassification probability with the mean square error. Based on this definition, we propose a new calibration evaluation metric similar to the Expected Calibration Error (ECE) (Naeini et al., 2015) , which groups examples into interval bins with similar uncertainty, and then measures the discrepancy between each bin's parameters and the parameters of the empirical distribution within the bin. An additional dispersion measure completes our set of diagnostic tools by revealing cases where the individual uncertainty outputs are uninformative as they all return similar values.

Finally, we propose a calibration method where we re-adjust the predicted uncertainty, in our case the outputted Gaussian variance, by minimizing the negative-log-likelihood (NLL) on a separate re-calibration set. We show good calibration results on a real-world dataset using a simple parametric model which scales the uncertainty by a constant factor. As opposed to (Kuleshov et al., 2018) , we show that our approach cannot calibrate predicted uncertainty that is uncorrelated with the real uncertainty, as one would expect.

To summarize, our main contributions are:

• Revealing the fundamental flaws in the current definition of calibrated regression uncertainty (Kuleshov et al., 2018) • A new proposed definition for calibrated uncertainty in regression tasks

• A simple scaling method that can reduce the calibration error similar to temperature scaling for classification (Guo et al., 2017) , evaluated on large scale real world vision datasets.

1.1 RELATED WORK While shallow neural networks are typically well-calibrated (Niculescu-Mizil & Caruana, 2005) , modern, deep networks, albeit superior in accuracy, are no-longer calibrated (Guo et al., 2017) (Hastie et al., 2001) but combines both accuracy of the model and its uncertainty estimation in one measure. Based on these measures, several calibration methods were proposed, which transform the network's confidence output to one that will produce a calibrated prediction. Non-parametric transformations include Histogram Binning (Zadrozny & Elkan, 2001) , Bayesian Binning into Quantiles (Naeini et al., 2015) and Isotonic Regression (Zadrozny & Elkan, 2001) while parametric transformations include versions of Platt Scaling (Platt, 1999) such as Matrix Scaling and Temperature Scaling (Guo et al., 2017) . In (Guo et al., 2017) it is demonstrated that the simple Temperature Scaling, consisting of a one scalingparameter model which multiplies the last layer logits, suffices to produce excellent calibration on many classification data-sets.

In comparison with classification, calibration of uncertainty prediction in regression, has received little attention so far. As already described, (Kuleshov et al., 2018) propose a practical method for evaluation and calibration based on confidence intervals and isotonic regression. The proposed method is applied in the context of Bayesian neural networks. In recent work (Phan et al., 2018) , the authors follow (Kuleshov et al., 2018) definition and method of calibration for regression, but use a standard deviation vs. MSE scatter plot, somewhat similar to our approach, as a sanity check.

2. CONFIDENCE-INTERVALS BASED CALIBRATION:

We next review the method for regression uncertainty calibration proposed in (Kuleshov et al., 2018) which is based on confidence intervals, and highlight its shortcomings. We refer to this method in short as the "interval-based" calibration method. We start by introducing basic notations for uncertainty calibration used throughout the paper.

Notations. Let X, Y ∼ P be two random variables jointly distributed according to P and X × Y their corresponding domains. A dataset {(x t , y t )} T t=1 consists of i.i.d samples of X, Y . A forecaster H : X → P(Y) outputs per example x t a distribution p t ≡ H(x t ) over the label space, where P(Y ) is the set of all distributions over Y. In classification tasks, Y is discrete and p t is a multinomial distribution, and in regression tasks in which Y is a continuous domain, p t is usually a parametric probability density function, e.g. a Gaussian. For regression, we denote by F t : Y → [0, 1] the CDF corresponding to p t .

According to (Kuleshov et al., 2018) a forecaster in a regression setting H is calibrated if:

EQUATION

.

Intuitively this means that the y t is smaller than F -1 t (p) with probability approximately p, or that the predicted CDF matches the empirical one as the dataset size goes to infinity. This is equivalent to

EQUATION

Where F (X) represents the CDF corresponding to H(X). This notion is translated by (Kuleshov et al., 2018) to a practical evaluation and calibration methodology. A re-calibration dataset S = {(x t , y t )} T t=1 is used to compute the empirical CDF value for each predicted CDF value p ∈ F t (y t ):

P (p) = |{y t |F t (y t ) ≤ p, t = 1 . . . T }| T (3)

The calibration consists of fitting a regression function R (i.e. isotonic regression) , to the set of points {(p, P (p))} T t=1 . For diagnosis the authors suggest a calibration plot of {(p, P (p))} at equally spaced values of p.

We start by intuitively explaining the basic limitation of this methodology. From Eq. 3 P is nondecreasing and therefore isotonic regression finds a perfect fit. Therefore, the modified CDF R • F t will satisfy P (p) = p on the re-calibration set, and the new forecaster is calibrated up to sampling error. This means that perfect calibration is possible no matter what the CDF output is, even for output CDFs which are statistically independent of the actual empirical uncertainty. We note that this might be acceptable when the uncertainty prediction is degenerate, e.g. all output distributions are Gaussian with the same variance, but this is not the case here. We also note that the issue is with the calibration definition not the re-calibration, as we show with the following analytic example.

We next present a concise analytic example in which the output distribution and the ground truth distribution are independent, yet fully calibrated according to Eq. 2. Consider the case where the target has a normal distribution y t ∼ N (0, 1) and the network output H(x t ) has a Cauchy distribution with zero location parameter and random scale parameter γ t independent of x t and y t , defined as:

z t ∼ N (0, 1) (4) γ t = |z t | H(x t ) = Cauchy(0, γ t )

Following a known equality for Cauchy distributions, the CDF output of the network F t (y) = F y γt , where F is the CDF of a Cauchy distribution with zero location and 1 scale parameters. First we note that yt γt and yt zt , i.e. with and without the absolute value, have the same distribution due to symmetry. Next we recall the well known fact that the ratio of two independent normal random variables is distributed as Cauchy with zero location and 1 scale parameters (i.e. yt zt ∼ Cauchy(0, 1)). This means that probability that F t (y t ) ≡ F ( yt γt ) ≤ p is exactly p (recall that F is a Cauchy(0, 1) CDF). In other words, the prediction is perfectly calibrated according to the definition in Eq. 2, even though the scale parameter was random and independent of the distribution of y t .

While the Cauchy distribution is a bit unusual due to the lack of mean and variance, the example does not depend on it and it was chosen for simplicity of exposition. It is possible to prove the existence of a distribution whose product of two independent samples is Gaussian (Thorin, 1977) and replace the Cauchy with a Gaussian, but it is an implicit construction and not a familiar distribution.

3. OUR METHOD:

We present a new definition for calibration for regression, as well as several evaluation measures and a reliability diagram for calibration diagnosis, analogous to the ones used for classification (Guo et al., 2017) . The basic idea is that for each value of uncertainty, measured through standard deviation σ, the expected mistake, measured in mean square error (MSE), matches the predicted error σ 2 . This is similar to classification with MSE replacing the role of mis-classification error. More formally, if µ(x) and σ(x) 2 are the predicted mean and variance respectively then we consider a regressor well calibrated if:

∀σ : E x,y (µ(x) -y) 2 |σ(x) 2 = σ 2 = σ 2 .

(5)

In contrast to to (Kuleshov et al., 2018) this does not average over points with different values of σ 2 (at least in the definition, for practical measures some binning is needed), but only considers the mean and variance and not the entire distribution. We claim that this captures the desired meaning of calibration, i.e. for each individual example you can correctly predict the expected mistake.

Since we can expect each exact value of σ 2 in our dataset to appear exactly once, we evaluate eq. 3 empirically using binning, same as for classification. Formally, let σ t be the standard deviation of predicted output PDF p t and assume without loss of generality that the examples are ordered by increasing values of σ t . We also assume for notation simplicity that the number of bins, N , divides the number of examples, T . We divide the indices of the examples to N bins, {B j } N j=1 , such that:

B j = {(j -1) • T N + 1, . . . , j • T N }.

Each resulting bin therefore represents an interval in the standard deviation axis: [min t∈Bj {σ t }, max t∈Bj {σ t }]. The intervals are non-overlapping and their boundary values are increasing.

To evaluate how calibrated the forecaster is, we compare per bin j two quantities as follows. The root of the mean variance:

mV AR(j) = 1 |B j | t∈Bj σ 2 t (6)

And the empirical root mean square error:

RM SE(j) = 1 |B j | t∈Bj (y t -ŷt ) 2 (7)

where ŷt is the mean of the predicted PDF (p t )

For diagnosis, we propose a reliability diagram which plots the RM SE as function of the mV AR as shown in Figure 4 . The idea is that for a calibrated forecaster per bin the mV AR and the observed RM SE should be approximately equal, and hence the plot should be close to the identity function. Apart from this diagnosis tool which as we will show is valuable for assessing calibration, we propose additional scores for evaluation.

Expected Normalized Calibration Error (ENCE). For summarizing the error in the calibration we propose the following measure:

EQUATION

This score averages the calibration error in each bin, normalized by the bin's mean predicted variance, since for larger variance we expect naturally larger errors. This measure is analogous to the expected calibration error (ECE) used in classification.

STDs Coefficient of variation (C V ). In addition to the calibration error we would like to measure the dispersion of the predicted uncertainties. If for example the forecaster predicts a single homogeneous uncertainty measure for each example, which matches the empirical uncertainty of the predictor for the entire population, then the EN CE would be zero, but the uncertainty estimation per example would be uninformative. Therefore, we complement the EN CE measure with the Coefficient of Variation (c v ) for the predicted STDs which measures their dispersion:

EQUATION

where µ σ = 1 T T t=1 σ t . Ideally the c v should be high indicating a disperse uncertainty estimation over the dataset. We propose using the EN CE as the primary calibration measure and the c v as a secondary diagnostic tool.

3.1. CALIBRATION:

To understand the need for calibration, let us start by considering a trained neural network for regression, which has very low mean squared error (MSE) on the train data. We now add a separate branch that predicts uncertainty as standard deviation, which together with the original network output interpreted as the mean, defines a Gaussian distribution per example. In this case, the NLL loss on the train data can be minimized by lowering the standard deviation of the predictions, without changing the MSE on train or test data. On test data however, MSE will be naturally higher. Since the predicted STDs remain low on test examples, this will result in higher NLL and ENCE values for the test data. This type of miss-calibration is defined as over-confidence, but opposite or mixed cases can occur depending on how the model is trained.

Negative log-likelihood. N LL is a standard measure for a probabilistic model's quality (Hastie et al., 2001) . When training the network to output classification confidence or a regression distribution, it is commonly used as the objective function to minimize. It is defined as:

EQUATION

We propose using the NLL on the re-calibration set as our objective for calibration, and the reliability diagram, together with its summary measures (EN CE , c v ) for diagnosis of the calibration. In the most general setting a calibration function maps predicted PDFs to calibrated PDFs: R(Θ) : P(Y) → P(Y) where θ is the set of parameters defining the mapping.

Optimizing calibration over the re-calibration set is obtained by finding θ yielding minimal NLL:

EQUATION

To ensure the calibration generalization, the diagnosis should be made on a separate validation set. Multiple choices exist for the family of functions R belongs to. We propose using STD Scaling, (in analogy to Temperature Scaling (Guo et al., 2017) ), which essentially multiplies the STD of each predicted distribution by a constant scaling factor s. If the predicted PDF is that of a Gaussian distribution, N (µ, σ 2 ), then the re-calibrated PDF is N (µ, (s•σ) 2 ). Hence, in this case the calibration objective (Eq. 11) is:

EQUATION

)

If the original predictions are overconfident, as common in neural networks, then the calibration should set s > 1. This is analogous to Temperature Scaling in classification: a single multiplicative parameter is tuned to fix over or under-confidence of the model, and it does not modify the model's final prediction since µ t remains unchanged.

More complex calibration methods. Histogram binning and Isotonic Regression applied to the STDs can be also used as calibration methods. We chose STD scaling since: (a) it is less prone to overfit the validation set, (b) it does not enforce minimal and maximal STD values, (c) it is easy to implement and (d) empirically, it produced good calibration results.

4. EXPERIMENTAL RESULTS:

We next show empirical results of our approach on two tasks: a controlled synthetic regression problem and object detection bounding box regression. In both tasks we examine the effect of outputting trained and random uncertainty on the calibration process. In all training and optimization stages we use an SGD optimizer with learning rate 0.001 and 0.9 momentum.

4.1. SYNTHETIC REGRESSION PROBLEM:

Experimenting with a synthetic regression problem enables us to control the target distribution Y and to validate our method. We randomly generate T = 50, 000 input samples {x t , y t } T t=1 . We sample x t from X ∼ U nif orm[0.1, 1] and y t from Y ∼ N (x t , x 2 t ). This way, the target standard deviation of sample x t is x t . We train a fully-connected network with four layers and a ReLU activation function on the generated training set using the smooth L 1 loss function. We then add a separate branch with its own four layers to predict uncertainty.

Per example x t , The original network output is considered the mean of a Gaussian distribution (µ t ) and the additional output as its standard deviation (σ t ). For numerical stability, as suggested by (Kendall & Gal, 2017) , the network outputs log(σ 2 ). In the random uncertainty experiment, per example, the standard deviation representing the uncertainty is randomly drawn from U nif orm [1, 10] . For the predicted uncertainty experiment, the uncertainty branch is optimized using the N LL loss (Eq. 10) while the rest of the network weights are fixed. By fixing the remaining weights, the predicted mean (µ t ) remains unchanged making sure we do not calibrate using over-confident predictions. We then re-calibrate as described in Sec. 3.1 on a separate re-calibration set consisting of 6, 000 samples. As one can see in Fig. 2 the confidence interval method can almost perfectly calibrate the random independent uncertainty estimation, as the expected and observed confidence level match and we get the desired identity curve. This phenomenon is extremely undesirable for safety critical applications where falsely relying on uninformative uncertainty can lead to severe consequences. It is important to note that the perfect calibration did not arise from giving the same fixed σ for each prediction, which would be acceptable, as the isotonic regression modifies the probabilities directly and not the outputted standard deviations. In contrast you can see how our method can only marginally improve the calibration and one can clearly see, both from the ENCE value and visually from the graph, that the predictions are not calibrated. In the trained experiment, in which uncertainty is predicted by the network, we can see in Fig. 3 that the network almost perfectly learns the correct uncertainty, as expected from the problem simplicity and the high data availability. In this case both methods do not change the calibration results much. The important thing to note is that our calibration and evaluation method can easily differentiate between both cases, the random and predicted uncertainty, while they are almost exactly the same after calibrating with (Kuleshov et al., 2018) .

4.2. BOUNDING BOX REGRESSION FOR OBJECT DETECTION:

In computer vision, an object detector outputs per input image a set of bounding boxes, each commonly defined by 5 outputs: classification confidence and four positional outputs (t x , t y , t w , t h ) representing its (x,y) position, width and height. We show results on each positional output as an independent regression task using the R-FCN detector (Dai et al., 2016) . To this architecture we add an additional uncertainty branch predicting the corresponding STDs for each regression output, (σ x , σ y , σ w , σ h ). Thus, the network outputs a Gaussian distribution per regression task. For training the network weights we use the entire Common objects in context (COCO) dataset (Lin et al., 2014) . For uncertainty calibration and validation we use two separate subsets of the KITTI (Geiger et al., 2012) object detection benchmark dataset, which consists of road scenes. Training the uncertainty output on one dataset and performing calibration on a different one reduces the risk of over-fitting and increases the calibration validity. See Appendix A for further details.

We initially train the network without the additional uncertainty branch as in (Dai et al., 2016) , while the uncertainty branch weights are randomly initialized. Therefore, in this state which we refer to as untrained uncertainty, random uncertainties are assigned to each example. We then train the uncertainty branch by minimizing the N LL loss (Eq. 10) on the training set, freezing all network weights but the uncertainty head for 1K training iterations with 6 images per iteration. Freezing the rest of the network ensures that the additional uncertainty estimation does not sacrify accuracy. The result of this stage is the network with predicted uncertainty. Finally, we train the N LL loss for 1K additional training iterations on the re-calibration set, to optimize the single scaling parameter s, and obtain the calibrated uncertainty.

Figure 4 shows the resulting reliability diagrams before calibration (predicted uncertainty) and after (calibrated uncertainty) for all four positional outputs, on the validation set. As can be observed from the monotonously increasing curve before calibration, the output uncertainties are indeed correlated with the empirical ones. Additionally, since the curves are entirely above the ideal one, the predictions are over confident. Using the learned scaling factor s which varies between 1.1 and 1.2, the EN CE is significantly reduced as shown in table 1. The c v remains unchanged after calibration since it is invariant to uniform scaling of the output STDs (Eq. 9). For untrained uncertainty, Fig. 1 shows that after calibration, just as with the synthetic dataset, using the interval-based method, uncertainty is almost perfectly calibrated. In contrast, our method reveals the lack of correlation between the predictions and empirical uncertainties before/ after applying calibration (See results in Appendix A). 

5. CONCLUSIONS:

Calibration, and more generally uncertainty prediction, are critical parts of machine learning especially in safety-critial applications. In this work we exposed serious flaws in the current approach to define and evaluate calibration for regression problem. We also proposed an alternative approach and showed that even a very simple re-calibration method can lead to significant improvement in real-world applications. Our proposed method for calibration effectively takes into consideration the first two moments when comparing the output and real distributions. An interesting direction for future research would be extending our method to handle more complex distributions using, for example, higher-order moments.

A BOUNDING BOX REGRESSION FOR OBJECT DETECTION: ADDITIONAL

DETAILS AND RESULTS:

In this section we provide additional details on the network architecture and datasets used for bounding box prediction as well as additional results using random predictions. As our base architecture we use the R-FCN detector (Dai et al., 2016) with a ResNet-101 backbone (He et al., 2016) . The R-FCN regression branch outputs per region candidate a 4-d vector that parametrizes the bounding box as t b = (t x , t y , t w , t h ) following the accepted parametrization in (Girshick, 2015) . We use these outputs in our experiments as four seperate regression outputs. To this architecture we add an uncertainty branch, identical in structure to the regression branch, that outputs a 4-d vector (u 1 , u 2 , u 3 , u 4 ) ≡ (log(σ 2 x ).log(σ 2 y ), log(σ 2 w ), log(σ 2 h )), each representing the log variance of the Gaussian distributions of the corresponding output. As before, the original regression output represents the Gaussian mean (i.e. µ x = t x ).

For training the network weights we use the entire Common objects in context (COCO) dataset (Lin et al., 2014) . As stated previously we use a two-stage training approach. We first train the original R-FCN network, and then freeze all weights and train only the additional uncertainty prediction branch. In this way we train uncertainty prediction without sacrificing the network's accuracy. Note however that our method completely holds if the entire network is trained at once (e.g. if confidence estimation importance is such that accuracy may be marginally sacrified). For uncertainty calibration we use the KITTI (Geiger et al., 2012) object detection benchmark dataset, which consists of road scenes. We divide the KITTI dataset into a re-calibration set used for training the calibration parameters (∼ 6K images), and a validation set (∼ 1.5K images, 37K object instances). The classes in the KITTI dataset represent a small subset of the classes in the COCO dataset, and therefore we reduce our model training on COCO to the 9 relevant classes (e.g. car, person) and map them accordingly to the KITTI classes.

Figure 5 shows the reliability diagrams for the four bounding box regression outputs with untrained uncertainty before and after we apply our calibration method. As with the synthetic dataset, the graphs immediately reveal the disconnect between the random values and the empirical uncertainties. In all the cases the calibration results in a highly non-calibrated uncertainty according to our metrics. 

:



Figures and Tables:

Figure 2: Reliability diagrams for the synthetic regression problem with random uncertainty estimation. Reliability diagram using our method before (a) and after (b) calibration. (c) Before and after calibration based on the confidence intervals method(Kuleshov et al., 2018).

Figure 4: Reliability diagrams for bounding box regression on the KITTI validation set before and after calibration. Each plot compares the empirical RM SE and the root mean variance (mV AR) in each bin. Grey dashed line indicates the ideal calibration line. See Sec. 4.2 for details.

Evaluation of uncertainty calibration for the bounding box regression tasks on the KITTI validation dataset.

Table content: <table><tr><td/><td colspan="4">Before calibration After calibration</td></tr><tr><td/><td>EN CE</td><td>C v</td><td>EN CE</td><td>C v</td></tr><tr><td>t x</td><td>17.2%</td><td>0.38</td><td>8.3%</td><td>0.38</td></tr><tr><td>t y</td><td>25.0%</td><td>0.31</td><td>4.7%</td><td>0.31</td></tr><tr><td>t w</td><td>24.7%</td><td>0.36</td><td>8.4%</td><td>0.36</td></tr><tr><td>t h</td><td>12.5%</td><td>0.25</td><td>5.7%</td><td>0.25</td></tr></table>

Reliability diagrams for bounding box regression with untrained uncertainty estimation for the bounding box regression outputs (t x , t y , t w , t h ). Top row: before calibration, bottom row: after calibration.

Table content: <table><tr><td/><td/><td/><td>t x</td><td/><td/><td/><td/><td/><td>t y</td><td/><td/><td/><td/><td/><td/><td>t w</td><td/><td/><td/><td/><td/><td/><td/><td>t h</td></tr><tr><td/><td>1.1</td><td/><td/><td/><td/><td>1.2</td><td/><td/><td/><td/><td/><td/><td>1</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td>1.05</td><td/><td/><td/><td/><td>1.1</td><td/><td/><td/><td/><td/><td/><td>0.95</td><td/><td/><td/><td/><td/><td/><td/><td>1.2</td><td/><td/></tr><tr><td/><td>1</td><td/><td/><td/><td/><td>1</td><td/><td/><td/><td/><td/><td/><td>0.9</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td>RMSE</td><td>0.9 0.95</td><td/><td/><td/><td>RMSE</td><td>0.8 0.9</td><td/><td/><td/><td/><td/><td>RMSE</td><td>0.85 0.8</td><td/><td/><td/><td/><td/><td/><td>RMSE</td><td>1 0.8</td><td/><td/></tr><tr><td/><td>0.85</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td>0.75</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td/><td/><td/><td/><td/><td>0.7</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td>0.8</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td>0.7</td><td/><td/><td/><td/><td/><td/><td/><td>0.6</td><td/><td/></tr><tr><td/><td>0.7 0.75</td><td>0.9</td><td colspan="3">0.92 Before Calib., ENCE=11.0%,c 0.94 0.96 v =0.03</td><td>0.5 0.6</td><td>0.94</td><td>0.96</td><td colspan="4">0.98 Before Calib., ENCE=16.0%,c 1 1.02 v =0.03</td><td>0.65</td><td>0.9</td><td colspan="6">0.91 0.92 0.93 0.94 0.95 0.96 0.97 Before Calib., ENCE=24.3%,c v =0.02</td><td>0.4</td><td>1</td><td colspan="2">1.02 1.04 1.06 1.08 1.1 1.12 ENCE=39.4%,c v =0.04</td></tr><tr><td/><td/><td/><td>mSD</td><td/><td/><td/><td/><td/><td colspan="2">mSD</td><td/><td/><td/><td/><td/><td colspan="2">mSD</td><td/><td/><td/><td/><td/><td/><td>mVAR</td></tr><tr><td/><td>1.2</td><td/><td/><td/><td/><td>1.05</td><td/><td/><td/><td/><td/><td/><td>0.84</td><td/><td/><td/><td/><td/><td/><td/><td>0.95</td><td/><td/></tr><tr><td/><td>1.15</td><td/><td/><td/><td/><td>1</td><td/><td/><td/><td/><td/><td/><td>0.82</td><td/><td/><td/><td/><td/><td/><td/><td>0.9</td><td/><td/></tr><tr><td/><td>1.1</td><td/><td/><td/><td/><td>0.95</td><td/><td/><td/><td/><td/><td/><td>0.8</td><td/><td/><td/><td/><td/><td/><td/><td>0.85</td><td/><td/></tr><tr><td/><td>1.05</td><td/><td/><td/><td/><td>0.9</td><td/><td/><td/><td/><td/><td/><td>0.78</td><td/><td/><td/><td/><td/><td/><td/><td>0.8</td><td/><td/></tr><tr><td>RMSE</td><td>0.95 1</td><td/><td/><td/><td>RMSE</td><td>0.8 0.85</td><td/><td/><td/><td/><td/><td>RMSE</td><td>0.74 0.76</td><td/><td/><td/><td/><td/><td/><td>RMSE</td><td>0.75 0.7</td><td/><td/></tr><tr><td/><td>0.9</td><td/><td/><td/><td/><td>0.75</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td>0.65</td><td/><td/></tr><tr><td/><td>0.85</td><td/><td/><td/><td/><td>0.7</td><td/><td/><td/><td/><td/><td/><td>0.72</td><td/><td/><td/><td/><td/><td/><td/><td>0.6</td><td/><td/></tr><tr><td/><td>0.8</td><td/><td/><td/><td/><td>0.65</td><td/><td/><td/><td/><td/><td/><td>0.7</td><td/><td/><td/><td/><td/><td/><td/><td>0.55</td><td/><td/></tr><tr><td/><td>0.75</td><td/><td colspan="3">After Calib., ENCE=8.6%,c v =0.03</td><td>0.6</td><td/><td/><td colspan="3">After Calib., ENCE=16.6%,c v</td><td>=0.03</td><td>0.68</td><td/><td/><td colspan="5">After Calib., ENCE=8.7%,c v =0.02</td><td>0.5</td><td/><td/><td>After Calib., ENCE=24.3%,c v =0.04</td></tr><tr><td/><td>0.7</td><td colspan="2">0.84 0.85 0.86 0.87 0.88 0.89</td><td>0.9</td><td>0.91</td><td>0.55</td><td>0.88</td><td colspan="2">0.9</td><td>0.92</td><td>0.94</td><td>0.96</td><td>0.66</td><td>0.75</td><td>0.76</td><td>0.77</td><td>0.78</td><td>0.79</td><td>0.8</td><td>0.81</td><td>0.45</td><td/><td>0.76</td><td>0.78</td><td>0.8</td><td>0.82</td><td>0.84</td></tr><tr><td/><td/><td/><td>mSD</td><td/><td/><td/><td/><td/><td colspan="2">mSD</td><td/><td/><td/><td/><td/><td colspan="2">mSD</td><td/><td/><td/><td/><td/><td/><td>mSD</td></tr><tr><td colspan="3">Figure 5:</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/></tr></table>

Peer review (iclr2020):
This paper focuses on the calibration for the regression problem. First, it investigates the shortcomings of a recently proposed calibration metric [1] for regression, and show theoretically where this metric can be fooled. Later, it introduces new metrics for measuring the calibration in regression problem which are instantiated from similar idea as the ECE calibration metric [2] used for classification problem. The paper defines the uncertainty as the mean square error and like the ECE idea, it divides the samples into different uncertainty bins and for each bin, it calculates RMSE of network output uncertainty. The RMSE versus variance of estimated uncertainty is depicted as the reliability diagram. To summarize the calibration error as the numbers, the paper proposes two other metrics as ENCE and CV that explain the overall calibration error for the network and calibration error for each sample, respectively. It also shows the effectiveness of the metrics, on the synthetic data where the calibration metric proposed in [1] can be fooled VS. more informative metrics like proposed reliability diagram with RMSE and mVAR. The other experiment is conducted on object detection problem where the uncertainty of bounding box positional outputs is considered as the calibration for the regression problem. Pros: 1- Investigating theoretically the shortcoming of the calibration metric for regression is interesting 2- Proposing the new metrics specifically designed for regression in novel, however it needs more accurate investigation. Cons: The paper is not well-written and the experiments and discussions are not support the ideas, more specifically I can mention several concerns: 1- Motivation: The flaw of the previously proposed calibration metric is not explained clearly. The paper only discusses in which scenario, the metric cannot work properly considering. However, the considered assumption (for instance the output of uncertainty estimation from the network has uniform distribution) can never happen in real scenario. Then the importance of redefining of calibration method is not clear. 2- Accuracy of Proposed Method: The measure proposed for calibration (Eq. 8) should be shown it will converge to the definition of calibration proposed in Eq.5, which is missing in the paper. 3- Lack of Clarity in some Parts: The paper introduces the new architecture for adding the uncertainty output to the regression network. But this new architecture is not explained clearly. I suggest the authors add more details about this part. 4- Justification: The paper trains the uncertainty part of the network with NLL loss function and later fine-tunes the output with temperature scaling method. But this calibration method is not related to the proposed metric which is claimed it has better calibration clarity. Then the importance of using the new metric to define the calibration is not clear. 5- Experiments: The experiment setup needs more accuracy. The paper should investigate the shortcomings of the previous metric in the same setting as the new proposed metric. In experiment Sec. 4.1, the settings for obtaining the output of the network uncertainty is different then comparing the results are not fare. The experiments for real scenario is not wide enough. It just shows that the parameters get calibrated. However we expect to see more results about the CV metric and its importance to define. Overall, I think this paper should be rejected as 1) the novelty of proposed metrics are not enough. 2) the motivation and justification of why the proposed metrics is better than previous metrics is not clear. 3) the experiments are not supporting the idea. References: [1] Kuleshov, Volodymyr, Nathan Fenner, and Stefano Ermon. *Accurate Uncertainties for Deep Learning Using Calibrated Regression.* International Conference on Machine Learning. 2018. [2] Naeini, Mahdi Pakdaman, Gregory Cooper, and Milos Hauskrecht. *Obtaining well calibrated probabilities using bayesian binning.* Twenty-Ninth AAAI Conference on Artificial Intelligence. 2015.