ZigZag: Universal Sampling-free Uncertainty Estimation Through Two-Step Inference
Authors: Nikita Durasov
Nik Dorndorf
Hieu Le
Pascal Fua
Venue: Accepted by TMLR ()

Abstract: Whereas the ability of deep networks to produce useful predictions on many kinds of data has been amply demonstrated, estimating the reliability of these predictions remains challenging. Sampling approaches such as MC-Dropout and Deep Ensembles have emerged as the most popular ones for this purpose. Unfortunately, they require many forward passes at inference time, which slows them down. Sampling-free approaches can be faster but often suffer from other drawbacks, such as lower reliability of uncertainty estimates, difficulty of use, and limited applicability to different types of tasks and data.

In this work, we introduce a sampling-free approach that is generic and easy to deploy, while producing reliable uncertainty estimates on par with state-of-the-art methods at a significantly lower computational cost. It is predicated on training the network to produce the same output with and without additional information about it. At inference time, when no prior information is given, we use the network's own prediction as the additional information. We then take the distance between the predictions with and without prior information as our uncertainty measure.

We demonstrate our approach on several classification and regression tasks. We show that it delivers results on par with those of Ensembles but at a much lower computational cost.

Published in Transactions on Machine Learning Research (04/2024)
ZigZag: Universal Sampling-free Uncertainty Estimation Through Two-Step Inference
Nikita Durasov
ribitaa.dumsoosSepp...
Computer Vision Laboratory, EPFL
Nik Dorndorf
nik: mol.ddormdorf@rrtttaccee.....m.
RWTH Aochen
Hieu Le
minh.le@@pff..c
Computer Vision Laboratory, EPFL
Pascal Fua
fus
Computer Vision Laboratory, EPFL
Reviewed on OpenReview: // opwnrevee.......... net/ forum? id- QSub6yBXML
Abstract
Whereas the ability of deep networks to produce useful predictions on many kinds of data has been amply demonstrated, estimating the reliability of these predictions remains challenging. Sampling approaches such as MC-Dropout and Deep Ensembles have emerged as the most popular ones for this purpose. Unfortunately, they require many forward passes inference time, which slows them down. Sampling-free approaches can be faster but often suffer from other drawbacks, such lower reliability of uncertainty estimates, difficulty of use, and limited applicability to different lypes of tasks and data.
In this work, we introduce sampling-free approach that is generic and easy to deploy, while producing reliable uncertainty estimates on par with state-of-the-art methods at significantly lower computational cost. It is predicated on training the network to produce the same output with and without additional information about it. At inference time, when no prior information is given, we use the network's own prediction as the additional information. We then take the distance between the predictions with and without prior information our uncertainty measure.
We demonstrate our approach several classification and regression tasks. We show that it delivers results on par with those of ensembles but at much lower computational cost.
Introduction
Though the ability of modern neural networks to generate accurate predictions is now clear, assessing the trustworthiness of these predictions remains an open problem. This can be addressed by estimating the potential inaccuracy of the predictions, which then taken as an uncertainty mcasure. MC-Dropout (Gal & al., 2017) are the most widely methods used
Ghahramani] 2016) and Deep Ensembles (Lakshminarayanann to this end. MC-Dropout involves randomly zeroing network weights and assessing the effect, whereas ensembles involves training multiple networks, starting from different initial conditions. They are simple to deploy and universal. Unfortunately, they induce substantial computational and memory overheads, which makes them unsuitable for many real-world applications.
An alternative to use sampling-free methods that estimate uncertainty in one single forward pass of a single neural network, thereby avoiding computational overheads (Amersfoort et al.] [0000] Malinin & Gales 2018 Tagasovska & Lopez-Pazi 2018: Postels et al. 2019 However, deploying them may require significant

---

Published in Transactions on Machine Learning Research (04/2024)
Accurate prediction...
Erroneous prediction
Low Uncertainty
Small Distance
High Uncertainty
Large Distance
M(x, 0)
Yo
M
Yo
Emiply
Emity
Mo)
Y1
M(
Y1
Accurate reconstruction
Erroneous reconstruction
Figure ZigZaging At inference time, we make two forward passes. First, we use [x, 0] as impul to produce a prediction yo- Second, we feed [x. yol to the network and generate y1. We take llyo - -yill to be our uncertainty estimate. In essence, the second pass performs a reconstruction in much the same way an anto-encoder does and a high reconstruction error correlates with uncertainty.
modifications to the network's 's architecture (Postels et al. 2019), substantial changes to the training pro- cedures (Malinin & Gales 2018), limiting their application to very specific tasks (Amersfoort et al.) 2020: Malinin & Gales, 20188] Mukhoti et al.) 2021a),, or lessen the quality of the uncertainty estimate (Postels ct al. 2022 Ashukha et al. 2020). As result, they have not gained as much traction as MC-Dropout and ensembles.
To remedy this, we introduce ZigZag, sampling-fin free approach that is generic and easy to deploy, while producing reliable uncertainty estimates on par with sampling-base based methods, but at significantly lower computational cost. It only requires two forward passes through a single network. The first one simply predicts the output from the input data. The second one takes the initial prediction as an additional input to make second prediction. The consistency between these two predictions is indicative of uncertainty, This is because we train the network to achieve accurate predictions in the first pass and to precisely reconstruct these predictions in the second pass, assuming that the first is correct as shown in Fig (Left). Conversely, if the initial prediction is erroneous, the subsequent reconstruction is likely to fail shown in Fig (Right). We will argue that this is analogous to using the reconstruction error of regular autodecoders to tell in-distibuttion samples from
ones (Japkowicz et al. 1995 Alain &
Bengio 2014 Zhou
2022)
More specifically, given a network M, we modify its first layer accept a second argument, yielding the modified architecture M. We then train M that, for all training pairs (x,y), we have y M(x, 0) M(x, y), where 0 is vector of zeros. At inference time, first compute yo M(xx 0) and then y1 M(x, yo). We refer to this as ZigZagging, as depicted by Fig. I Finally, we take the distance between the two predictions l|yo - yy Il as our error estimate. This exploits the fact that, if yo is accurate, that is, yo R y, = MMx is likely to be close to as well because that's what the network has been trained to do. Thus llyo - Yill will be small. A contrario, if yo wrong and very different from y, foeding the pair (x, yo) to the network amounts to giving it an input that is out-of-distribution with respect the data it has been trained handle. Thus, the result is likely to be random and the distance between Yo and yı large.
Our approach is fast because it only requires performing two forward passes using single network and delivers uncertainty results comparable to those of ensembles, which are much more costly but often seen as the method that delivers the best uncertainty estimates on wide range of classification and regression problems. Furthermore, it is very easy to use in conjunction with almost any network architecture with only very minor changes. Hence, our method also aaso-ag. We demonstrate its effectiveness across a wide range of classification and regression tasks, extending to practical applications such as lift-drag regression for airfoil samples and predicting the drag coefficient of 3D car.
2 Related work
Uncertainty Estimation (UE) aims to accurately evaluate the reliability of model's predictions. Among all the hoth that can be used to do this, MC-Dropout (Gal & Ghahramani 2016) and Deep Ensembles (Lak-
2

---

Published in Transactions on Machine Learning Research (04/2024)
shminarayanan et al. 2017) have emerged as two of the most popular ones, with Bayesian Networks (Makkay 1995) being a third alternative. These methods are sampling-base and require several predictions at infer- ence time, which slows them down. There is recent work on overcoming this and we discuss both kinds of approaches below.
hampling-based Approaches. MC-Dropout involves randomly zeroing out network weights and assess- ing the effect, whereas ensembles involve training multiple networks, starting from different initial conditions. The extensive survey of Ashuuha et al. (2020) concludes that Deep Ensembles tend to produce the most decorrelated models, which results in highly diversified predictions and the most reliable uncertainty esti- mates. Unfortunately, Deep Ensembles also entail the highest computation costs due to the need to train multiple net works and to run up to dozens of forward passes at inference time. MC-Dropout tends to be less reliable and also involves making several inferences at inference time. There have been recent attempts at increasing the reliability of MC-Dropout (Durasov et al.) 2021a Wen et al. 2020) but they do not address the fact that multiple inferences are required to estimate the uncertainty. Alternative sampling- based methods
such as Mi et al. (2022) rely on noise injections or input augmentations during inference in order to produce
uncertainty from the variance of generated predictions. Bayesian Networks (Blundell et al.) 2015 Graves
2011 Hernándoz-Lobato & Adams 2015 Kingma et al. 2015) also require several forward passes to com-
pute uncertainty and rarely outperform Deep Ensembles (Ashukha et al. 2020). In short, for sampling-basse methods, computation time scales linearly with the number of samples and can be prohibitively expensive for performaace-criticall applications.
Sampling-fres frre Approaches. When a rapid response is needed, for example for robotic control (Loquercio ct al. 2020) or low-latency applications (Gal 2016), there is no time to perform many forward passes during inference. Consequently, there has been much interest for sampling-free approaches that require consland time
for inference. For example, (Amersfoort et al. 2020 describes a clustering- procedure used to estimate
uncertainty for classification and semantic segmentation purposes. In (Malinin & Gales 2018 Sensoy et al.,
2018 Amini ct al., 2020 Malinin et al. 2020), uncertainty is estimated from Dirichlet and Normal-Wishar dist distributions whose parameters are predicted by the network. Unfortumately, it is not obvious how to exlend
sampling-free methods designed for specific tasks (Amersfoort et al. 2020 Mukhoti et al. 2021a Hornauer
& |Blaggianis 2022) to more generic applications. Furthermore, deploying them often requires significantly
changing the network architecture and the training procedures (Liu et al. 2020 Shhkhhovtsov & Flach 2019:
Wannenwetsch & Roth 2020). along with increased memory consumption (Wang et al., 2016: Shekhovtsov
& Flach| 2019;
Gast & Roth 2018); worse uncertainty quality (Tagasovska & Lopez- b021b or slower inference (Postels et al. 2019), which limits their appeal.
2018 Mukhoti
et al.
Regression is handled in (Postels et al., 2019: Gast & Roth 2018) using uncertainty estimation method that relies on uncortainty propagation from one layer to another. During the forward pass, not only activa- tions but also their variances are estimaled in each layer. Thus, the variance of the final predictions can be estimated in one pass but at the cost of a two-fold memory consumption and we will show that our approach performs better. Tagasovska & Lopez-Paz (2018) use both quantile regression (Furno & Vistocco 2018)) and orthonormal cerlificates detect out-of-distribution samples during inference. Though being compu- tationally efficient, this approach also can yield poor uncertainty estimates and miscalibrated predictions. SNGP (Liu et al. 2020) has been used to estimate uncertainty in a deep learning context, but this requires adding a Random Features (Rahimi & Recht 2007) and Spectral Normalization (Miyato et al. 2018 layer to every convolutional layer, which entails significant modifications of both training dynamic and network architectures. Similarly, the approaches described by Wang et al. (2016); Shekhovtsov & Flach 20119 require replacing all of the convolution layers with modified versions and doubling the number of weights, which significantly impacts memory consumption. Other types of methods such as (Zhang al. 2019) work only with specific uncertainty types, either alcatoric or epistemic (Der Kiureghian & Ditlevsen 2009 Kendall & Gal 2017). Furthermore, in some cases, they can yield significantly worse uncertainty calibration than sampling-based approaches (Postels et al. 2022). We provide more specific comparisons in the experiment section.
Reconstruction Error in Autoencoders. It has long been known that, for any sample fed as input to an autoencoder, the reconstruction error can be used to estimate the likelihood of this sample being
3

---

Published in Transactions on Machine Learning Research (04/2024)
within the model's training distribution (Japkowicz et al. 1995 as depicted by Fig 2 Given denoising
contractive autoencoder R and sample the reconstruction error [R(x) x is directly connected to the
log-probability of the data distribution Pdota (x), as initially shown by [engio et al. (2013); ; Alain & Bengio
(2014). This finding was later extended to a wider class of autoencoders (Kamyshanska & Mcmisevic 2013
and eventually to regular autoencoders trained using stochastic optimization setup (Solinas
2020
This has been successfully used for out-of-distribution detection (Zhou, 2022 Sabokrou et al. 2016) task.
Our approach is in the same spirit, except for the fact we replace the reconstruction error [R(x) x by the distance between the two ZigZag predictions.
AutoEncoder
AutoEncoder
Accurate reconstruction
Erroneous reconstruction
Figure 2: Autoencoder Reconstruction Error An auloencoder trained exclusively on cat images yields accurate reconstructions other cat images (left) and inaccurate ones dog images (right). Thus, the distance between an image and its reconstruction can be used to estimate whether that image is likely to be cat image or not.
3 Method
ZigZag is an approach to sampling-free uncertainty estimation that delivers classification and regression results on par with stato-of-the-art sampling- basod methods such as ensembles and MC-Dropout while being far less computationally demanding. network M and sample x, we first use M to make first prediction yo without any prior information. We then make second prediction y1 using Yo prior. We train the network that, if yo is correct, then should be similar to Yo. whereas it should be different if yo is inaccurate. In much the same way, an auto-encoder prediction is accurate for in-distribution samples and inaccurate for out-of-listribution ones.
relies on the dual-inference scheme depicted by Fig. | Given a
other words, the second pass performs a reconstruction of the second input argument. As in an auto- encoder, we expect the reconstruction error be low for in-distribution data and high for out-of-distee -iittribiitiitti data, thereby providing an estimation of uncertainty. More specifically, when we provide the network M(x, 0) with input y), if the label y is close to the correct answer, then the difference between M(x, 0) and M(x, y) is small because the network is trained to behave in this manner and the inpul (x,y) represents an in in-distribution data point. However, if y is not close to the correct answer, then (x,y) represents something that the network has never encountered during training: a first argument x and a second argument y that is neither nor the ground-truth, Essentially, this an -nttif-diittibuttion sample for which the network, like most networks, can be expected to produce an unpredictable output. Hence, there is no reason for M(xx 0) and M(x,y) be similar. We leverage this property quantify the model's uncertainty. In other words, there two scenarios when reconstruction fails: 1) when (x.y) is OOD because is OOD, addressing epislemic uncertainly and OOD samples, 2) when (x,y) is OOD because is OOD / errornous. In this case, the reconstruction issue is due to y, our uncertainty mcasure is high, we cover alcatoric uncertainty connected to predicted target.
3.1 Modifying the Original Architecture
Let M a network that takes as input a vector x and returns a prediction vector M(x) that should be close to target y. We modify the first layer of M to create a new architecture M that takes as input both x and vector of the same dimension as y that we can compute both M(x, 0) and M),,y), where is a vector of zeros of the same dimension y. We take M(x, 0) to be the prediction without prior information
4

---

Published in Transactions on Machine Learning Research (04/2024)
and M(x, y) one with prior information. In practice, M can be any sufficiently powerful deep architecture, such VGG (Simonyan et al. (014)), ResNet (He et al. 2016) or Transformer (Dosovitskiy et al. 2020 In all these cases, modifying the first network layer is a simple task.
d
Added weights
Modified
Original
X
W
X
X
W₂
W1
X
RelU
X
W2
Output
Output
Input
Input
d +
Figure 3: Architecture Modification. Given model with weights Wi E _dd W22 ggh1 modify its first layer W1 to accept two inputs instead of only one. The modified model consists of W1 g(d+ixxh and W2 gax1 and can process the concatenation of the original input x and additional value yu-
For simplicity, let us first consider the case where M is simple network with one hidden layer of dimension h. It takes x E IRd as input and outputs a scalar E IR. To handle a second argument y, the input dimension of the first trainable layer must become + to allow the concatenation of the original imput vector x and the additional value y. Similarly, we can add additional channels convolutional layers work with RGB images, for example by adding fourth channel that represents y. As before, we only need to modify the first convolutional layer of the network so that can process 4-dimensional inputs.
3.2 Training
the heart of our approach the training of A to yield comparable outputs, whether or not the target y is provided as input. In practice, we want M(x, 0) M(x.y) = y for all training pairs (x, To this end, given a training pair(x, we consider the loss
L(M(x,0).5) ((M((,
where is a domain-dependent loss term whose minimization ensures that the prediction made by M is close to the larget y. By minimizing this loss for all samples, we guarantee that our model can make accurate predictions when provided either with 0, that is, no prior information, or with accurate prior information the form of the full answer y.
3.3 Inference
At inference time, we compute
ý = yo = =M(x00),
(2)
y1 M(x yo) M(x,
ń Iyo -vll
(3)
where ý our final prediction and our uncertainty estimate. Yo estimated without prior information, whereas y1 computed by using Yo as the prior information. If yo is accurate, providing it as prior information should not disturb the inference because M has been trained to return the correct answer when given the correct answer as prior information. This should result in yı being similar to Yo and small û. Consequently a large is an indication that supplying Yo as the prior information has disrupted the inference mechanism and that. yo is probably inaccurate.
This can also be understood in terms of the well-known tendency of networks return arbitrary answers for samples that are out-of-distribun
(OOD) with respect the data they were trained on (Zhang al., 2021 Lakshminarayanan al. 2017 Nguyen et. al. 2015). The training scheme introduced above is such
5

---

Published in Transactions on Machine Learning Research (04/2024)
that the in-distribution training pairs are of the form (x, z), where is either 0 the ground-truth y. When is inaccurate and we use it to compute y1 = MM( Yo), are essentially feeding OOD sample to the network and the result y1 can be expected to be random, and therefore very different in general of yo. Our experiments on validation data bear this out, as shown in Fig.
0.8
Loss cly.Yo
Loss cly.
0.4
0.0
0.00
0.15
0.30
0.45
0.60
0.00
0.15
[M yol Yol
[M(x, Yol
Figure 4: True vs Estimated Error. We use MNIST (left) and CIFAR (right) validation data to plot the true prediction errors as measured by the loss being minimized against our uncertainty estimates [|M 0) M(x, M(x, 0) for individual samples. In both cases, the correlation is strong and Pearson's correlation coefficient is above 90%. The red line represents a linear fit to the data.
4 Experiments
We first introduce metrics and baselines. We then simple synthetic data to illustrate the behavior of ZigZag. Next, we turn to image datasets often used to test uncertainty-sstination algorithms. Finally, we present real-world applications. Implementation details about the basclines, metrics, training setups, and hyper-parameters could be found in the appendix.
4.1 Metrics and Baselines
We now introduce the evaluation metries we use to quantitatively compare our methods against. several baselines.
Accuracy Metric. For classification tasks, we use the standard classification accuracy, i.. the percentage of correctly classified samples in the test set.. For regression tasks, we use the standard Mean Absolute Frror (MAE) metric.
Uncertainty Metrics. As in (Postels et al. 2022 we use Relative Area Under the Lift Curve (rAULC) to quantify the quality of calibration of uncertainty measures both for classification and regression tasks. Unlike other metrics (Brier et al. 1950 Guo al. 2017), it is suitable for sampling-free approaches estimate uncertainly.
Another way to estimate how good uncertainty estimates are is to use them to detect out-of-distribution samples under the assumption that the network is more uncertain about those than about samples from the distribution used to train it. As in (Malinin & Gales 2018 Durasov el al. 2021a), given both in- and out- of of-distribution (OOD) samples, we classify high-uncertainty ones as OOD and rely on standard classification metrics, ROC and PR AUCs, to quantify the classification performance.
Time, Memory, and Simplicity. The Time and Size metrics measure how much time and memory it takes to train the network(s) to estimate uncertainty, compared to a single one that does not estimate it. The Simplicity metric assesses how easy it is modify given architccture to obtain uncortainty estimates. We denote as simple (V) if it requires changing less than 10% of layers of the original model and the training procedures do not need to be substantially modified. We also report Inference Time that represents

---

Published in Transactions on Machine Learning Research (04/2024)
how much time the model takes to compute uncertainties relative to single model inference Tesla V100 and without considering parallelization for sampling-base based approaches.
Baselines. We compare against recent sample-baeed approaches MC-Dropout (Gal & Ghahramani 2016
(MC-D), Deep Ensembles [Lakshminarayanan ct al., 2017) (DeepE), BatchEnsemble (Wen et al.
2020
BatchE) and Masksembles (Durasov et al. 2021a) (MaskE) and sample--ree ones -Single Model (Kendall
& Gall 2017) (ringit)-reddiceedd variance for regression and entropy of the predictive distribution for classification, Orthonormal Certificates (Tagasovska & Lopez-Paz, 2019) (OC). SNGP (Liu et al. 2020
(SNGP), EDL (Sensoy et al. 2018 (EDL), Variance Propagation (Postels et al.
2019 (Vrrropp). For all use five samples to estimate the uncertainty a.. inference time. This
four campling-basel approaches, number of samples has been shown to perform well for many tasks (Durasov et al. 2021a Wen et al. 2020; Malinin & Gales 2018). All of the training and implementation details are provided in the appendix. The evaluation was performed using three random seeds and averaged. For standard deviation results, please refer Sec.
4.2 Simple Synthetic Data.
We use such data to illustrate how ZigZag behaves both for classification and regression.
Classification Task. Let consider the red and blue 2D points shown in Fig. We them train MLP with 6 fully-connected layers and LeakyReLU activations to classify other points in the plane belonging either to the red or the blue class. The background color in each of the subplots depicts the uncertainty estimated by Single-Model, MC-Dropout, Deep Ensembles, and ZigZag. The first two only exhibit uncertainty along a narrow band between the two distributions. This is highly qucstionable once one is far away from the data points in the lower left and upper right corners of the range. Both ensembles and ZigZag deliver more plausible high uncertainties once far from the training points, but ZigZag does it at a lower computational cost.
-0.2
-0.2
Opeic
00.8
-0.6
(b)
-2
(a)
(b)
0.0
0.0
Yow
data
Speic
0.4
-0.4
-0.8
4.8
-0.0
-2
-2
(c)
(d)
Figure Uncertainty Estimation for Classifica- tion. The task is to classify data points drawn in the range x E [-2,3], E [- as being red or blue given the red and blue training samples from two interleaving half circles with added Gaussian noise. The background color depicts the classification uncertainty assigned by different techniques to individual grid points. Violet is low and yellow is high. (a) Single model, (b) MC- Dropout, (c) Deep Ensembles, (d) ZigZag.
Figure 6: Uncertainty Estimation for Regression. The task to regress y-axis values for r-axis data points drawn in the range E [-1,3] from third power poly- nomial with added Gaussian noise. Red colored area depicts the uncertainty assigned by different models individual points on the z-axis grid. (a) Single model, (b) MC-Dropout, (c) Deep Ensembles, (d) ZigZag.
Regression Task. Let us now consider the simple regression problem depicted by Fig. 6 x in the range [-1,3], compute values y = fz) + where the third order polynomial and o is Gaussian noise, and these pairs to train regression network. The shaded areas depict the uncertainty estimated
We draw values
7

---

Published in Transactions on Machine Learning Research (04/2024)
by Single-Model, MC-Dropout, Deep Ensembles, and ZigZag. For the points outside of the training range, the last two correctly predict very large uncertaint ies, unlike the first two. But again, ZigZug does it at a lower computational cost than Deep Ensembles.
MC-D
Deepl'
BatchE
MaskE
Single
EDL
OC
SNGP
VarProp
ZigZag
Accuracy (f)
0.981
0.990
0.989
0.989
0.980
0.975
0.980
0.984
0.986
0.982
TAULC (t)
0.932
0.958
0.941
0.929
0.712
0.955
0.851
0.813
0.731
0.961
MNIST
Size
1x
5x
1.2x
1x
1x
1x
1.3x
1x
1x
1x
Inf. Time
5x
5x
5x
5x
1x
1x
1.xx
1.7x
1.2x
2x
Time
1.3x
5x
1,4x
1.3x
1x
1x
1.1x
1.1x
1.x
1x
ROC-AUC (?)
0.953
0.984
0.965
0.963
0.773
0.947
0.934
0.951
0.812
0.982
PR-AUC (1)
0.962
0.979
0.965
0.966
0.844
0.923
0.923
0.942
0.861
0.981
Accuracy (1)
0.909
0.929
0.911
0.901
0.8901
0.912
0.892
0.905
0.895
0.928
TAULO (t)
0.889
0.911
0.884
0.889
0.884
0.596
0.583
0.742
0.715
0.897
CIFAR
Size
1x
5x
1.2x
1x
1x
1x
1x
1x
Inf. Time
5x
5x
5x
5x
1x
1x
1.1x
1.1x
1.2x
2x
Time
1.2x
5x
1.4x
1.3x
1x
1.3x
1.2x
1.2x
ROC-AUC (f)
0.854
0.915
0.877
0,900
0.825
0,864
0.851
0.900
0.831
0.901
PR-AUC (t)
0.918
0.949
0.919
0.931
0.875
0.903
0.821
0.891
0.861
0.933
Accuracy (t)
0.74
0.77
0.73
0.74
0.75
0.74
0.75
0.74
0.73
0.75
TAULC (T)
0.78
0.84
0.78
0.79
0.80
0.76
0.71
0.8
0.69
0.82
ImageNet
Size
1x
5x
1.1x
1.1x
1x
1x
1x
1x
1x
1x
Inf. Time
5x
5x
5x
5x
1x
1x
1.1x
1x
1x
Time
1x
5x
1.1x
1x
1x
1x
1x
1x
1.1x
1.3x
ROC-AUC (T)
0.52
0.56
0.53
0.52
0.51
0.52
0.52
0.53
0.50
0.54
PR-AUC (t)
0.16
0.19
0.16
0.14
0.15
0.14
0.17
0.13
0.12
0.17
Simple
X
X
X
Table 1: Classification results on MNIST (top), CIFAR (middle), and ImageNet (bottom). The best
result in each category is in bold and the second best is in bold. Most correspond to ZigZag and DeepÉ. Hence, they perform similarly but ZigZag requires far less computation and memory.
4.3 Classification Tasks.
We now compare ZigZag against the baselines on the widely used benchmark dalasets MNIST vs FMNIST, CIFAR vs SVHN, and ImageNet vs ImageNet-O. The images are very different across datasets and exhibit distinct statistics. For cach dataset pair, we use the first to train the network and to evaluate how woll calibrated the methods are the second to perform out-of-domain detection experiments. We report the results in Tab [ all three cases, Deep Ensembles and ZigZag perform similarly and outperform the other approaches. However, ZigZag does not incur the 5-fold increase in memory and time requirements that Deep Ensembles does. Even though the other sampling-fis free approaches tend to yields worse calibration than sampling-based ones Poostels et al. 2022 ZigZag does not.
MNIST vs FashionMNIST. We train the networks on MNIST (LeCun et al. 1998 and compute the accuracy and calibration metrics. We then use the uncertainty measure they produce to classify images from the test sets of MNIST and FashionMNIST (Xiao et al., (017) as being within the MNIST distribution or not to compute the OOD metrics introduced above. We use standard architecture with four convolution and pooling layers, followed by fully connected layers with ReLU activations.
CIFAR vs SVHN. We ran a similar experiment with the CIFAR10 Krizhevsky et al. 2014 and SVHN (Ntzer et al. 2011h datasets. This is challenging for OOD detection because many of the CIFAR 32* x 32 images are noisy and therefore hardly distinguishable from each other, which makes the class labels unreliable. As the training set relatively small, very large models tend to overfit the training data. We therefore use the Deep Layer Aggregation (DLA) YYu et al. (2018) network for our experiments that tends to outperform standard architectures such ResNet (He et al.] 2016) VGG (Simonyan & Zisserman,
8

---

Published in Transactions on Machine Learning Research (04/2024)
MC-D
Deepl'
BatchE
MaskE
Single
SNGP
OC
VarProp
ZigZag
MAE (J)
4.655
4.472
4.699
4.786
4.724
4.819
4.724
4.682
4.630
UTKFAСE
TAULC (1)
0.034
0.047
0.043
0.033
0.026
0.031
0.025
0.029
0.045
Size
1x
5x
1x
1x
1x
1x
1x
1x
1x
Inf. Time
5x
5x
5x
5x
1x
1x
1x
1x
2x
Time
1.1x
5x
1.3x
1.2x
1x
1.7x
1.1x
1x
1x
ROC-AUC (f)
0.688
0.755
0.732
0.653
0.564
0.694
0.658
0.662
0.773
PR-AUC (T)
0.884
0.939
0.846
0.830
0.762
0.890
0.843
0.851
0.959
MAE (1)
3.376
3.03
3.03
3.26
3. 18
3.16
3.20
3.25
3.10
TAULC (1)
0.065
0.062
0.062
0.034
0.008
0.013
0.01
0.015
0.068
AIRFOILS
Size
1x
5x
1x
1x
1x
1.05x
1x
1x
1x
Inf. TTmm
5x
1x
1.3x
1.1x
1.4x
2x
Time
1.2x
5x
1.3x
1.3x
1x
1.7x
1.1x
1.1x
1.2x
ROC-AUC (T)
0.897
0.972
0.971
0.923
0.690
0.891
0.874
0.78
0.992
PR-AUC (1)
0.744
0.955
0.942
0.793
0.681
0.767
0.748
0.76
0.987
MAE (1)
0.129
0.101
0.115
0.115
0,121
0.115
0.120
0.119
0.112
TAULC (t)
0.06
0.10
0.08
0.07
0.03
0.06
0.04
0.03
0.07
Size
1.05x
1.05x
1x
1x
1x
1x
CARS
Inf. Time
5x
5x
5x
5x
1x
1.3x
1.1x
1.2x
2x
Time
1.1x
5x
1.2x
1.3x
1x
1.2x
1x
1.1x
1.2x
ROC-AUC (T)
0.851
0.954
0.921
0.926
0.755
0.872
0.831
0.816
0.956
PR-AUC (f)
0.734
0.941
0.867
0.832
0.534
0.751
0.723
0.567
0.974
Simple
X
X
X
Table 2: Regression results on Age Prediction (top), Airfoils (middle) and Cars (bottom). As in Table the best two results in each category are shown in bold and correspond to ZigZag and DeepE, except in terms of computation time and memory requirements where ZigZag does much better.
2015) and trained it as recommended in the original paper. We sample our out-of-distribution data from the SVHN dataset that comprises images belonging to classes that are not in CIFARIO, such as road sign digits.
ImageNet vs ImageNet-O We experimented with the ImageNet dataset (Russakovsky et al. 2015) and its counterpart, ImageNet-O [Hendrycks et al. 2021). The latter is an extension of the original ImageNer dataset, which is designed to evaluate the robustness and generalization capabilities of machine learning models by providing a challenging set of images that are difficult to classify correctly. As the CIFAR vs. SVHN scenario, this sets up a challenge for Out-of- iiito---Dstributionn (OOD) detection. We use a standard 5esNet50 architecture and the training setup from (He et. al. 2016).
Influence of the Number of Samples. The five-fold increase in computation time that the sampling- based methods incur is direct consequence of ours using 5 samples. ZigZag performs two inferences, which is equivalent to using? 2 samples. Thus, in Fig 7 plot OOD classification performance number of samples used. Given only 2 and 3 samples, all sampling- based methods do worse than ZigZag. With 4 or 5, Deep Ensembles is the only one that matches or beats us. However, it then noeds at least quadruple the computational budget and memory.
function of the
4.4 Regression Tasks.
We report similar results for three very different regression tasks in Tab. 2 As for classification tasks, we use data samples significantly different from training ones for OOD evaluation. Then, after generating uncer- tainty for ID and OOD samples, we evaluate standard AUC motrics as for classification problems. The overall behavior is similar to what we observed for classification. ZigZag performs on par with Deep Ensembles and better than the others, while being much less computationally demanding than Deep Ensembles.
Age Prediction. First, we consider imago-basod age prediction from face images. To this end, we use UTKFace (Zhang et al., (017)), large-scale dataset containing tens of thousands of face images annotated with associated age information. We use network with a large ResNet- 152 backbone and five linear layers
9

---

Published in Transactions on Machine Learning Research (04/2024)
MNIST ROC-AUC
MNIST PR-AUC
1.00
1.00
0.95
0.96
ROC-AUC
PR-AUC
0.90
0.92
0.85
DeepE
MaskE
DeepE
MaskE
0.88
MC-D
ZigZag
MC-D
ZigZag
0.80
BatchE
Single
BatchE
Single
0.84
2
5
1
3
4
Samples #
Samples #
CIFAR ROC-AUC
CIFAR PR-AUC
0.92
0.94
0.90
ROC-AUC
PR-AUC
0.88
0.92
0.86
DeepE
MaskE
0.90
DeepE
MaskE
0.84
MC-D
ZigZag
MC-D
ZigZag
BatchE
Single
0.88
BatchE
Single
0.82
1
2
3
5
1
2
3
4
5
Samples
Samples #
Figure 7: OOD classification performance as function of the number of samples. The dashed line represents the performance of ZigZag, which is sampling-free.
with ReLU activations. This architecture yield good performance in terms of accuracy, outperforming the popular ordinal regression model CORAL (Cao et al. 2020) and matching other stale-of-the-art approaches such as [Berg et al. 2021). As in the classification experiments described above, we use iCartoonFace (Zheng et al. 2020p datasct as out-of-distribution data. It comprises about 400k images of cartoon and anime character faces whose pixel statistics are different from those of the UTKFace while exhibiting semantic similarity. As before, we train model the UTKFace training set and use uncertainty to distinguish UTKFace test set images from iCartoonFace ones.
Drag
Figure Airfoil Samples. Training and testing profiles (left) have reasonable level of aerodynamics, whereas out-of-distribution samples (right) include only top-notch, but rare, shapes in terms of the lift-to-drag ratio. The black arrows represent pressures while the red lines depict overall lift and drag.
Figure 9: Left: Pressure values. The car dataset comprises many regular vehicles (left) and a few streamlined ones (right), which we treat as being out-of-distribution. Red and blue denote high and low pressures respectively. Right: Pressure differences. Large differences in predicted pressure shown in red and low in blue. Ensembles (left) and ZigZag (right) yield the same pattern, with large values mostly in high-curvature
Predicting Lift-to-Drai Ratios. Our method is generic and can operate with any kind of data. To
demonstrate this, we collected dataset of 2k wing profiles such as those of Fig. g by sampling the widely used NACA parameters (Jacobs & Sherman 1937). We then ran the popular X simulator (Drela, 1989) compute the pressure distribution along each profile and estimate its lift-to-drag coefficient, a key measure of acrodynamics performance. The resulting dataset consists of wing profiles x; represented by a set of 2D nodes and the corresponding scalar lift-to-drag coefficient y; for < 2000.
10

---

Published in Transactions on Machine Learning Research (04/2024)
We took the 3% of pop-perormming shapes in terms of lift-to-drag ratio to be the ant-of-distribution samples. We took 80% of the remaining 95% our training set and the rest our test set. Hence, training and testing shapes span lift-to-drag values from O to 60, whereas everything beyond that is considered to be OOD and therefore not used for training purposes. We then trained a Graph Neural Network ( (GNN) that consists of GMM (Monti al. 2017] layers with ELU nonlinearities (Clevert et al. 2015) and skip connections (He et al. 2016) to prodict lift-to-drag Yi from profile y; for all the training set, as in (Remelli et al. 2020
Durasov al. 2021bb. See additional details in the appendix.
Predicting the Drag Coefficient of Car. We performed a similar experiment on 3D car models from a subset of the ShapeNet dataset (Chang et al.) 2015) that features car meshes that are suitable for CFD simulation. We used the same experimental protocol as for the wings except for relying on OpenFOAM (Jasak) jet al.] 2007) estimate the drag coefficients and more sophisticated network predict it from the triangulated 3D meshes representing the cars, which we also describe in the supplementary material.
MNIST
MC-D MaskE
BatchE DeepE. ZigZag
ROC-AUC
0.875
0.911
0.921
0.951
0.982
Single
MC-D
DeepE
ZigZag
PR-AUC
0.901
0.921
0.931
0.954
0.981
MAE (L)
22.9
20.3
17.9
19.2
CIFAR
MC-D
MaskF
BatchE
DeepE.
ZigZag
rAULC (t)
0.55
0.62
0.68
0.69
ROC-AUC
0.844
0.864
0.854
0.873
0.901
ROC-AUC (f)
0.64
0.74
0.83
0.84
PR-AUC
0.893
0.909
0.901
0.913
0.933
PR-AUC (t)
0.63
0.77
0.84
0.82
Table 4: Two-sample inference evaluation for sampling-basee based methods. The tables present ROC- AUC and PR-AUC scores for the MNIST and CIFAR datasets, with the highest scores in each category high- lighted. When constrained to the same computational requirements, ZigZay oulperforms the other approaches.
Table 3: Pressure Prediction. Accuracy and calibra- tion computed for individual predictions for each node of the mesh. AUC metrics are computed using averaged uncertainty of the mesh and the same data splits as for the drag prediction task.
To experiment with a higher-dimensional task, we used the same data to train a network to predict not only the drag but also a pressure value at cach vertex of a car, as shown the top of Fig. We used the same train-test split as before along with a modified version of the network we used for drag prediction in which we replaced some convolutional layers by transformer layers (Shi et al. 2020), explained in the supplementary material. As shown at the bottom of Fig. g ZigZag yields per-node uncertainties very similar to those of Deep Ensembles. The most uncertain regions are high curvature parts where pressure changes rapidly. This is reflected by the quantitive results of Tab. that, once again, show ZigZag and Deep Ensembles performing similarly.
1.0
1.0
0.8
0.8
True probability
True probability
0.6
0.6
0.4
DeepE MC-D
BatchE
0.4
DeepE MC-D MaskE
BatchE ZigZag
ZigZag
0.2
0.2
MaskE
0.8.0
0.0.0
0.2
0.4
0.6
0.8
1.0
0.2
0.4
0.6
0.8
1.0
Figure 10: Actual Predicted probability
Predicted probability
uncertainty estimate for Airfoils (left)) and Cars (right) test sets. The y curve denotes perfect calibration. ZigZag behaves like ensembles and better than the others.
The rAULC metric we have been reporting aggregates information on how well calibrated the uncertainty estimates are. To better visualize the calibration characteristics of the various methods, we provide actual calibration curves for the airfoil and aerodynamics regression tasks. In Fig. 10, plot the cumulative
11

---

Published in Transactions on Machine Learning Research (04/2024)
probability of our estimation error being between zero and its maximum value against the cumulative proba- bility of our uncertainty estimate similarly being between its minimum and maximum values, as in (Kendall & Gal 2017). An ideal result would follow the diagonal. ZigZag and Deepl' produce the results closest to that, which is consistent with the rAULC calibration results of Tab.
4.5 Ablation study
Two-sample Evaluation for Sampling-based Approaches. A major strength of our method is its inference speed: It. only requires two feed-forward passes. Here we conducted additional evaluations where we limited sampling-bass based approaches to two samples to compare how each scheme performs under the same inference cost in terms of uncertainty mcasurement. In Tab. |
we present uncertainty estimates for MNIST (Top) and CIFAR (Bottom), running all sampling- based methods with an inference cost equal ZigZag's 2x compared to Single model. Under these computational cost constraints, our method offers superior uncertainty estimates. For the ImageNet experiments, evaluated two-sample ensembbles, achieving 81% rAULC, 53% ROC-AUC, and 16% PR-AUC, metrics which are surpassed by ZigZag, as shown in Tab.
Additional Baselines. For completeness sake, we evaluated two additional baselines that can only be run on a subset of all our testing examples: Temperature Scaling (TempS) for classification (Guo et al. 2017) and using a separate model for variance prediction in regression (TwoM) (Nix Weigend 1994). As shown in Tab. temperature scaling improves calibration on the MNIST datasct, as shown by the rAULC metric, but is less good at evaluating epistemic uncertainty and detecting OOD samples. Tab. includes the TwoM baseline consisting of regression network and a separate model predicting the output variance, compared with our method in acrodynamic cases: airfoils and cars. This approach improves uncertainty metrics over a single model but does not match our method's performance, despite similar computational complexity. Further analysis can be found in Sections A.3 to A.5 the supplementary material.
Table 5: Two-Model Variance Prediction: TwoM improves uncertainty metrics over single models but
falls short of our method, with comparable computational complexity.
Airfoils MAE
Single
TwoM
DeepE
ZigZag
Cars
Single
TwoM
DeepE
ZigZag
3.18
3.20
3.03
3.10
MAE
0.121
0.122
0.101
0.112
rAULC
0.008
0.027
0.062
0.068
rAULC
0.03
0.04
0.10
0.07
Size
2x
5x
Size
1x
1x
Inf. Time
1x
2x
5x
2x
Inf. Time
1x
2x
5x
2x
Time
1x
1x
5x
1.2x
Time
1x
1x
5x
1.2
ROC-AUC
0.690
0.878
0.972
0.992
ROC-AUC
0.755
0.849
0.954
0.956
PR-AUC
0.681
0.882
0.955
0.987
PR-AUC
0.534
0.811
0.941
0.974
Accuracy (t)
rAULC (t)
Size
Inf.
Time
Time
ROC-AUC (t)
PR-AUC (t)
TempS 0.980
0.857
1x
1x
1x
0.768
0.836
ZigZog 0.982
0.961
1x
2x
1x
0.982
0.981
Table 6: Temperature Scaling Evaluation. Although temperature scaling significantly boosts the model's calibration, it does not improve and might slightly impair the model's capacity to detect OOD samples.
5 Conclusion
We have proposed approach to estimating uncertainty that only requires performing minor change in the first layer of network to accept additional argument that may be either blank or the result of that prediction. Training the network to yield the same result in both cases enables us to estimate the uncertainty in a principled way and at low computational cost. This approach is applicable to any practical architecture and requires minimal modifications. It is easy to deploy, generic, and delivers results on par with ensembles at much reduced training budget.
12

---

Published in Transactions on Machine Learning Research (04/2024)
References
Guillaume Alain and Yoshua Bengio. What regularized auto-encoders learn from the data-generating distri- bution. The Journal of Machine Learning Research, 15(1):356333553 2014.
Van Amersfoort, J. A. Smith, L. A. Teh, Y. Whye, and Y. Gal. Uncertainty Estimation Using a Single Deep Deterministic Neural Network. In International Conference on Machine Learning, pp. 9690-9700, 2020.
Alexander Amini, Wilko Schwarting, Ava Soleimany, and Daniela Rus. Deep evidential regression. Advances in Neural Information Processing Systems, 83:14927-14987, 2020.
A. Ashukha, A. Lyzhov, D. Molchanov, and D. Vetrov. Pitfalls of In-Domain Uncertainly Estimation and Ensembling in Deep Learning. International Conference on Learning Representations, 2020.
Yoshua Bengio, Li Yao, Guillaume Alain, and Pascal Vincent. Generalized denoising auto-encoders generative models. Advances in neural information processing systems, 26, 2013.
A. Berg, M. Oskarsson, and M. O'Connor. Deep Ordinal Regression with Label Diversity. In International Conference Pattern Recognition, pp. 2740-2747 2021.
C. Blundell, Cornebise, K. Kavukcuoglu, and D. Wierstra. Weight Uncertainty in Neural Network. In International Conference on Machine Learning, pp. 1613-1622, 2015.
Glenn W Brier et al. Verification of Forecasts Expressed in Terms of Probability. Monthly weather review, 78(1):1-3, 1950.
Tianle Cai, Shengjie Luo, Keyulu Xu, Di He, Tic-yan Liu, and Liwei Wang. Graphnorm: A principled approach to accelerating graph neural network training. In International Conference Machine Leurning, 2021.
W. Cao, V. Mirjalili, and S. Raschka. Rank Consistend Ordinal Regression for Neural Networks with Application to Age Estimation. Pattern Recognition, 140:325 331, 2020.
Chang, T. Funkhouser, L. G., P. Hanrahan, Q. Huang, Z. Li, S. Savarese, M. Savva, S. Song, H. Su, J. Xiao, L. Yi, and F. Yu. Shapenet: An Information-Ree Rich 3D Model Repository, In arXiv Preprint, 2015.
Kamil Ciosek, Vincent Fortuin, Ryota Tomioka, Katja Hofmann, and Richard Turner. Conservative un- certainty ostimation by fitting prior networks. In International Conference on Learning Representations, 2019.
D.-A. Clevert, T. Unterthiner, and S. Hochreiter. Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs). In arXiv Preprinl, 2015.
Armen Der Kiureghian and Ove Ditlevsen. Aleatory or epistemic? does it matter? Structural safety, 31(2): 102-112, 2009.
A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby. An Image is Worth 16x16 Words; Transformers for Image Recognition at Scale. In arXiv Preprint, 2020.
M. Drela. XFOIL: An Analysis and Design System for Low Reynolds Number Airfoils, In Conference on Low Reynolds Number Aerodynamics, pp. 1-12, 1989.
N. Durasov, T. Bagautdinov, P. Baque, and P. Fua. Masksembles for Uncertainty Estimation. In Conference on Computer Vision and Pattern Recognition, 2021a.
N. Durasov, A. Lukoyanov, J. Donier, and P. Fua. DEBOSH: Deep Bayesian Shape Optimization. In arv Preprinl, 2021b.
Marilena Furno and Domenico Vistocco. Quantile regression: estimation and simulation, Volume 2, volume 216. John Wiley & Sons, 2018.
13

---

Published in Transactions on Machine Learning Research (04/2024)
Y. Gal. Uncertainty in Deep Learning. PhD thesis, University of Cambridge, 2016.
Y. Gal and Z. Ghahramani. Dropout as Bayesian Approximation: Representing Model Uncertainty in Deep Learning. In International Conference on Machine Leurning, pp. 1050 1059, 2016.
J. Gast and Roth. Lightweight Probabilistic Deep Networks. Conference on Computer Vision and Pallern Recognilion, 2018.
Alex Graves. Practical variational inference for neural networks. Advances in Neural Information Processing Systems, 24, 2011.
C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On Calibration of Modern Neural Networks. In Interna- lional Conference on Learning Representalions, 2017.
K. He, X. Zhang, S. Ren, and J. Sun. Deep Residual Learning for Image Recognition. In Conference on Computer Vision and Pattern Recognition, pp. 770-778, 2016.
Dan Hendryeks, Kevin Zhao, Steven Basart, Jacob Steinhardt, and Dawn Song. Natural adversarial exam- 2021.
ples. In Conference on Computer Vision and Paltern Recognition, pp.
José Miguel Hernánneez-Lobato and Ryan Adams. Probabilistic Backpropagation for Scalable Learning of Bayesian Neural Networks. In International Conference on Machine Learning, pp. 1861-1869, 2015.
Julia Hornauer and Vasileios Belagiannis. Gradient-based uncertainty for monocular depth estimation. In European Conference on Computer Vision, pp. 613 630. Springer, 2022.
S. Toffe and C. Szegedy. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. In International Conference Machine Learning, 2015.
E Jacobs and Albert Sherman. Airfoil section characteristics as affected by variations of the reynolds number. Report-National Advisory Committee, for Aeronautics, 227:577-6111 1937.
Nathalie Japkowicz, Catherine Myers, Mark Gluck, et al. A novelty detection approach classification. Tn IJCAI, volume 1, pp. 518 523. Citeseer, 1995.
Hrvoje Jasak, Aleksandar Jemcov, Zeljko Tukovic, et al. OpenFOAM: A C++ Library for Complex Physics Simulations. In International workshop on coupled methods in numerical dynamics, 2007.
Hanna Kamyshanska and Roland Memisevic. On autoencoder scoring. Tn International Conference on Machine Learning, pp. 720 728. PMLR, 2013.
A. Kendall and Y. Gal. What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision?
In Advances in Neural Information Processing Systems, 2017.
D. P. Kingma and J. Ba. Adam: A Method for Stochastic Optimisation. In International Conference on Learning Representations, 2015.
Durk P Kingma, Tim Salimans, and Max Welling. Variational Dropout and the Local Parameterization Trick. Advances in Neural Information Processing Systems, 28, 2015.
Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. The CIFAR-10 Dataset. online: ltttp//wwww. cs. toronto. add/krizz/cjeee himll 55(5), 2014.
B. Lakshminarayanan, A. Pritzel, and C. Blundell. Simple and Scalable Predictive Uncertainty Estimation Using Deep Ensembles. In Advances in Neural Information Processing Systems, 2017.
Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-Bascd Learning Applicd to Document Recognition. Proceedings of the IEEE, pp. 2278 2324, 1998.
J. Liu, Z. Lin, S. Padhy, D. Tran, T. B. Weiss, and B. Takshminarayanan. Simple and Principled Uncertainty Estimation with Deterministic Deep Learning via Distance Awareness. In Advances in Neural Information Processing Systems, 2020.
14

---

Published in Transactions on Machine Learning Research (04/2024)
Antonio Loquercio, Mattia Segu, and Davide Scaramuzza, A General Framework for Uncertainty Estimation in Deep Learning. IEEE Robolies and Aulomalion Letters, 5(2):3153-311 2020.
D. J. Mackay. Bayesian Neural Networks and Density Networks. Nuclear Instruments and Methods in Physics Research Section A: Acceleralors, Speclrometers, Delectors and Associated Equipment, 354(1): 73-80, 1995.
A. Malinin and M. Gales. Predictive Uncertainty Estimation via Prior Networks. In Advances in Neural Information Processing Systems, 2018.
A. Malinin, S. Chervontsev, T. Provilkov, and M. Gales. Regression Prior Networks. In or Preprint, 2020.
Lu Mi, Hao Wang, Yonglong Tian, Hao He, and Nir N Shavit. Training- free uncertainty estimation for dense regression: Sensitivity as surrogate. In AAAT Conference on Artificial Intelligence, pp- 10042-10050, 2022.
T. Miyato, T. Kataoka, M. Koyama, and Y. Yoshida. Spectral Normalization for Generative Adversarial Networks. In International Conference Learning Representations, 2018.
F. Monti, D. Boscaini, J. Masci, E. Rodolå, J. Svoboda, and M. M. Bronstein. Geometric Deep Learning on Graphs and Manifolds Using Mixture Model CNNs. In Conference on Computer Vision and Pattern Recognition, pp. 1425-54344 2017.
J. Mukhoti, van Amersfoort, J. A. Torr, HS, and Y. Gal. Deep Deterministic Uncertainty for Semantic Segmentation. In arXiv Preprinl, 2021a.
Jishmu Mukhoti, Andreas Kirsch, Joost van Amersfoort, Philip HS Torr, and Yarin Gal. Deterministic neural networks with appropriate inductive biases capture epistemic and aleatoric uncertainty. arXiv Preprint, 2021b.
Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Ng. Reading Digits in Natural Images with Unsupervised Feature Learning. In Advances in Neural Information. Processing Systems, 2011.
Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep Neural Networks are Fasily Fooled: High Confidence Predictions for Unrecognizable Images. In Conference on Computer Vision and Pattern Recognition, pp.
427-436, 2015.
David A Nix and Andreas S Weigend. Estimating the mean and variance of the target probability distribution. In Proceedings of 1994 ieee international conference on neural networks (ICNN N94), volume 1, pp. 55 60. IEEE, 1994.
J. Postels, F. Ferroni, H. Coskun, N. Navab, and F. Tombari. Sampling- FFoe Epistemic Uncortainty Es- timation Using Approximated Variance Propagation. In Conference on Computer Vision and Pallern Recognition, pp. 2931 2931-2940, 2019.
J. Postels, M. Segu, T. Sun, L. Van Gool, F. Yu, and F. Tombari. On the Practicality of Deterministic Epistemic Uncertainty. In International Conference on Machine Learning, pp. 17870-17909, 2022.
A. Rahimi and B. Recht. Random Features for Scale-Scale Kernel Machines. In Advances in Neural Information Processing Systems, pp. 1177-1184, 2007.
F. Remelli, A. Lukoianov, S. Richter, B. Guillard, T. Bagautdinov, P. Baque, and Fua. MeshSdf: Differ- entiable Iso-Surface Extraction. In Advances in Neural Information Processing Systems, 2020.
O. Russakovsky, J. Deng, H. Su, J. Krause, S.Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bern- stein, A.C. Borg, and I. Fei-Fei. Imagenet Large Scale Visual Recognition Challenge. International Journal of Compuler Vision, 115(3):211 252, 2015.
Mohammad Sabokrou, Mahmood Fathy, and Mojtaba Hoscini. Video anomaly detection and localisation based on the sparsity and reconstruction error of auto-encoder. Electronics Letters, 52(13):1122 1124, 2016.
15

---

Published in Transactions on Machine Learning Research (04/2024)
Murat Sensoy, Lance Kaplan, and Melih Kandemir. Evidential deep learning to quantify classification uncertainty. Advances in neural information processing systems, 31, 2018.
Alexander Shekhovtsov and Boris Flach. Feed-Forward Propagation in Probabilistic Neural Networks with Categorical and Max Layers. In International Conference on Learning Representations, 2019.
Y. Shi, Z. Huang, S. Feng, H. Zhong, W. Wang, and Y. Sun. Masked Label Prediction: Unified Message Passing Model for Semi-Supervised Classification. In arXiv Preprint, 2020.
K. Simonyan and A. Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. In International Conference on Learning Representations, 2013.
K. Simonyan, A. Vedaldi, and A. Zisserman. Learning Local Feature Descriptors Using Convex Optimisation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2014.
Miguel Solinas, Clovis Galiez, Romain Cohendet, Stéphane Rousset, Marina Reyboz, and Martial Mermillod. Generalization of iterative sampling in autoencoders. In 2020 19th IEEE International Conference on Machine Learning and Applications (ICMLA), pp. 877-882. IEEE, 2020.
N. Tagasovska and D. Lopez-Paz. Frequentist Uncertainty Estimates for Deep Learning. In arxiv Preprinl, 2018.
N. Tagasovska and D. Lopez-Paz. Single-Model Uncertainties for Deep Learning. In Advances in Neural Information Processing Systems, 2019.
M. Vuk and T. Curk. ROC curve, lift chart and calibration plot. Advances in methodology and Statistics, 3 (1):89-108, 2006.
Hao Wang, Xingjian Shi, and Dit-Yat Yan Young. Natural-Parameter Networks: A Class of Probabilistic Neural Networks. Advances in Neural Informalion Processing Systems, 29, 2016.
Anne S Wannenwetsch and Stefan Roth. (probabilistic pixel-adaptive refinement networks). In Conference on Computer Vision and Pattern Recognition, pp. 11642-1165/ 2020.
Y. Wen, D. Tran, and J. Ba. Batchensemble: An Alternative Approach to Efficient Ensemble and Lifelong Learning. In International Conference on Learning Representations, 2020.
H. Xiao, K. Rasul, and R. Vollgraf. Fashion-Mnist: A Novel Image Dataset for Benchmarking Machine Learning Algorithms. In arXiv Preprint, 2017.
F. Yu, D. Wang, E. Shelhamer, and T. Darrell. Deep Layer Aggregation. In Conference on Computer Vision and Pattern Recognition, pp. 2403 2212-221, 2018.
Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding Deep Learning (still) Requires Rethinking Generalization. Communiccaiion of the ACM, 64(3):107 115, 2021.
Zhifei Zhang, Yang Song, and Hairong Qi. Age Progrossion/regressinn by Conditional Adversarial Autocn- coder. In Conference on Compuler Vision and Pallern Recognition, 2017.
Zizhao Zhang, Adriana Romero, Matthew J Muckley, Pascal Vincent, Lin Yang, and Michal Drozdzal. Reduc- ing uncertainty in undersampled mri reconstruction with active acquisition. In Conference on Computer Vision and Pattern Recognátion, pp. 2049-200 2058, 2019.
Y. Zheng, Y. Zhao, M. Ren, H. Yan, X. Lu, J. Liu, and J. Li. Cartoon Face Recognition: A Benchmark Dataset. In Proceedings of the 28th ACM international conference on multimedia, pp. 2264 2272, 2020.
Yibo Zhou. Rethinking reconstruction nutoencoder-basce out-of-distribution detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7379 7387, 2022.
16

---

Published in Transactions on Machine Learning Research (04/2024)
A
Appendices
In this appendix, we describe the calibration metrics use and provide additional details about the basclines, training selups, and hyperr-araameters used in the experimental section.
A.1 Calibration Metrics
In this section, we will describe metrics used for calibration evaluation both for classification and regression tasks. Typical calibration metrics such as Expected Calibration Error (ECE) (Guo et al. 2017) require uncertainties to be express in probabilistic form, which is not the case for many single-shot uncertainty methods. Therefore, unified calibration should be utilized that suits all of the available methods. One of such metrics is Relative Area Under the Lift Curve (rAULC) (Postels et al. 2022 which is based on the Area Under the Lift Curve (Vuk & Curk 2006).
This metric is obtained by ordering the samples according to increasing uncertainty and calculating the accuracy of all samples with an uncortainty value smaller than a particular quantile. More formally, producing uncertainty value u, for every sample our evaluation set, we also generale an array uncertainty quantiles qj [o, 1] E [I.... S], with the quantile step equal 1/S. Iterating over quantiles qj we compute the performance of our model F(q,) using only samples for which uncortainty is less than this quantile. Finally, following nolation from Postels el al. 2022 we compute the AULC metric as
j=1 F(q,) -1= Σ S
FR(g))
where FR((;)) represents performance for baseline uncertainty that corresponds to random ordering. Further, in order to compute rAULC we divide AULC with the value of AULC produced by ideal (optinal) uncertainty model that perfectly orders all of the samples in order of increasing error. Following Postels et al. (2022). we use accuracy as F(q,) for classification. Similarly, we extend AULC and rAULC to regression tasks via using as F(q,)) an inverse of Mean Absolute Error (MAE) computed for samples with uncertainties less then qj.
A.2 Training Details and Baselines
Synthetic Regression For synthetic regression experiments, we the architecture that consists of 6 linear blocks, ELU (Clevert et al. 2015) activations, BatchNorms (Toffe & Szegedy 2015) and skip- connections (He el al. 2016). We train the model for 4000 epochs using Adain (Kingma & Ba 2015) optimizer with 10 learning rate and mean squared error loss. For Single baseline, we utilize loss from (Kendall & Gal 2017) to enable uncertainty estimation. Deep Ensembles baseline uses trained single models to extract mean and variance from predictions. For MC-Dropout, we apply dropout with 0.2 dropout rate the last 2 linear layers and sample different predictions during inference. Lastly, for ZigZag we extend the first layer of single model to take two inputs and train it the same way original model.
Synthetic Classification For synthetic classification experiments, we adopt simple feed-forward neural network that comprise of 10 lincar layers with ELU activation and skip-connections. As for regression, we apply Adam optimizer for 300 epochs and 10-2 learning rate. Deep Ensembles also consists of 5 models, MC-Dropowl drops activations from the last two layers with 0.15 drop rate, ZigZag extends the first layer of the original model so it is able to process additional inputs.
MNIST Model used for MNIST experiments consists of two convolutional layers with max polling followed by three linear layers with LeakyReLU activations. We also train this model using Adam optimizer for three epochs with 1 learning rate. MC-Dropout, BatchEnsemble and Masksembles are applied to the last two layers of the model with 0.2 drop rate for MC-Dropout and 1.5 scale factor for Masksembles. VarProp propagates variance through the last three linear layers as was described in (Postels et al., 2019). SNGP applies Random Features Raaimi & Recht, 2007) to the last layer of the model and Spectral
17

---

Published in Transactions on Machine Learning Research (04/2024)
Normalization MMyato et al. 2018 to the rest. OC extracts features after convolutional layers and train five small models that represent certificates.
CIFAR For CIFAR experiments, we use DLA Yuu et al. 2018 network and adopt original training setup: network is trained with SGD optimizer with 0.9 momentum for 20 epochs with 10 learning rate and 10 more epochs with 10-2. As before, MC-Dropout, Bnsembee and Masksembles are applied to the last three layers of the model with 0.1 drop rate and 1.5 scale factor. Features for OC are laken after convolutional part of the model.
ImageNet For ImageNet experiments, we use common ResNet50 (He et al. 2016 architecture and follow original training procedure. MC-Dropout, BatchEnsemble and Masksembles are applicd to the last five layers of the model with 0.1 drop rate, 2.0 scale factor, and each uses samples during inference. Varprop propagates variance through the last five layers of the network. OC uses features from the penultimate layer and trains five small feed-forward networks for certificates.
Age Prediction As an age predictor, we use common Resnet (He et al. 2016 backbone followed by five lincar layers with LeakyReLU activations. As before, MC-Dropout, BatchEnsemble and Masksembles are applied to the last four layers of the model with 0.1 drop rale and 1.5 scale factor. Varprop propagates variance through the last five layers of the network. OC uses features from penultimate layer and trains five small feod-forward networks for cortificates.
Airfoils Lift-to-Drag Lift-to-ragg ratio is predicted with custom model that consists of twenty five GMM (Monti et al., 2017) layers, global max pooling and five linear layers with applied ReLU activations. The model is trained for 10 epochs with Adam optimizer and 10-3 learning rate. All of the uncertainty baselines follow the same setup described for age prediction experiments.
Estimating Car Drag To predict drag associated to triangulated 3D car, we utilize similar model to airfoil experiments but with increased capacity. Instead of twenty five GMM layers, we use thirty five and also apply skip-connections with ELU activations. Final model is being trained for 100 epochs with Adam optimizer and 10-3 learning rate. All of the uncertainty methods are applied to non-graphical part of the model last five linear layers. As before, MC-Dropout uses 0.05 drop rate, Masksembles use 1.5 scale factor, SNGP applies Spectral Normalization to the last five layers and OC extract features right after max pooling layer.
For pressure prediction task, we modified original architecture and replaced GMM layers with Transformer layers (Shi et al. 2020) for more fine-grained predictions. In addition, we use GraphNorm (Cai et al. 2021 after each convolution for faster training and increase total size of the model to seventy layers. The model is being trained for 1500 epochs with Adam optimizer with 10-3 learning rate. Implemented uncertainty baselines are replicated from drag prediction experiments.
A.3 Standard deviation of results
Metric
Single
MC-D
MaskF
BatchE.
DeepE.
Zig7ag
Accuracy (1)
0.980 + 0.002
0.981 0.002
0.989 = 0.004
0.989 = 0.007
0.990 + 0.005
0.982 = 0.002
CIFAR MNIST
rAULC (t)
0.712 + 0.008
0.932 + 0.008
0.929 + 0.017
0.941 + 0.004
0.958 + 0.004
0.961 + 0.005
ROC-AUC (t)
0.773 4 0.006
0.953 0.011
0.963 + 0.006
0.965 + 0.003
0.984 4: 0.006
0.982 + 0.007
PR-AUC (t)
0.844 + 0.007
0.962 + 0.010
0.966 = 0.011
0.965 + 0.003
0.979 + 0.006
0.981 + 0.007
Accuracy (1)
0.890 + 0.004
0.909 0.001
0.901 = 0.003
0.911 = 0.003
0.929 + 0.002
0.928 0.003
TAULC (t)
0.884 + 0.005
0.889 + 0.004
0.889 + 0.004
0.884 + 0.005
0.911 + 0.002
0.897 + 0.004
ROC-AUC (t)
0.825 0.017
0.854 0.016
0.900 - 0.002
0.877 + 0.006
0.915 1 0.004
0.901 0.002
PR-AUC (t)
0.875 + 0.018
0.918 + 0.015
0.931 - 0.002
0.919 + 0.004
0.949 1 0.004
0.933 + 0.002
Table 7: Classification results on MNIST (Top) and CIFAR (Bottom) datasets. Results for training and evaluation using three different random seeds, presented averages with standard deviations included in the table.
18

---

Published in Transactions on Machine Learning Research (04/2024)
All training and evaluation were conducted using three different random seeds, with the results then averaged. We report these results in two tables below (the top one for MNIST, the bottom for CIFAR), including standard deviation values for the best-performing baselines. These results show that ZigZag and Ensembles significantly exceed the performance of other baselines in terms of statistical significance.
A.4 Split MNIST Evaluation
Single
MC-D
MaskE
BatchE
DeepE
ZigZag
Accuracy (f)
0.992
0.993
0.992
0.990
0.998
0.993
FAULC (1)
0.952
0.954
0.991
0.989
0.994
0.992
ROC-AUC (f)
0.929
0.923
0.945
0.947
0.979
0.994
PR-AUC (t)
0.923
0.918
0.945
0.947
0.977
0.991
Table Classification results on MNIST-S. The best result in each category is highlighted in bold, while the second best is in bold, with most of these results attributed to ZigZag and DeepE. This indicates that while their performance is comparable, 7ig7ag has the advantage of requiring significantly less computation and memory, The high performance of ZigZog is consistent across MNIST and MNIST-S results.
In experiments for the out-of-distribution (OOD) task in Sec 4.3 previous rescarch(Malinin & Gales 2018 Ciosck et al.) 2019 Durasov et al. 2021a). For OOD detection in MNIST experiments, using FashionMNIST, which contains images markedly different from MNIST, is a common benchmark. To enhance our evaluation with a more challenging setup, we conducted additional MNIST experiments referred to as MNIST-S using digits 0-4 as in-distribution and 5-9 as OOD. The results, presented in Tab. [ were obtained using the same architecture and training setups as the original MNIST experiments. In these experiments, both Ensembles and ZigZag demonstrated superior performance, compared to other baselines.
we employed standard setups from
A.5 AutoEncoder Baseline
there is a strong connection between our method and autoencoder models. This makes the reconstruction error of an autoencoder relevant baseline for comparison with our method. Uncertainty metrics for several datasets (MNIST, MNIST-S, CIFAR) have been included for this baseline below. For this approach, an autoencoder with a standard hourglass architecture was trained independently from the original classification model. The reconstruction error of the autoencoder used as an uncertainly measure for an imput x. While this method shows promising results in moderately easy duito--disti (OOD) detection tasks, it struggles more complex scenarios. Both in terms of uncertainty calibration and OOD detection, it underperforms, as demonstrated in Tab. g significantly lagging behind ZigZag and other baselines. The poor calibration of the reconstruction error for x arises from its exclusive focus during predictions, only estimating the likelihood of x and not the prediction y. While suitable for OOD detection, it is inadequate for calibrated uncertainty predictions. Additionally, image reconstruction is more computationally intensive than classification, substantially adding to the computational burden of the approach. Therefore, the autoencoder was not decmed a viable bascline in other experiments, due to these calibration, computational, and aleatoric uncertainty issues.
As discussed in Sections 2 and g
Accuracy (f)
IAULC (1)
Size
Inf.
Time
Time
ROC-AUC (t)
PR-AUC (t)
MNIST
0.98
0.35
1.5x
3x
2x
0.94
0.96
MNIST-S
0.99
0.46
1.5x
3x
2x
0.60
0.56
CIFAR
0.89
0.26
2x
4x
2x
0.38
0.66
Table 9: Autoencoder reconstruction error baseline. The table shows results for autoencoder baseline on MNIST, MNIST-S, and CIFAR datasets. Its limited calibration accuracy stems from focusing only on x and not y. Though somewhat effective for OOD detection, it's more computationally costly than ZigZag due to the complexity of image reconstruction.
19


Reviews:
[{"review_id": "JLxOcYIVee", "reviewer": "Reviewer_9k95", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Overall, the paper seems well written and is clear.\n\nStrengths:\n\n- The writing and experiments are clearly presented. Overall, this paper is quite readable.\n\n- The method seems to work about as well as ensembles with five samples, with a pretty clear set of benchmarks.\n\n- thank you for the clear description of inference time and the tradeoffs therein.\n\nWeaknesses:\n\n- A priori, I am a bit theoretically concerned about passing the true response, y, as input into the loss function. This seems like it would make training unstable as the model would learn to rely on the response to predict the response. \n\n- For a method that claims \"minimal changes\", adding in a response -> input embedding layer and then two forwards passes is somewhat non-trivial, although I agree less than many other approaches. Two forwards passes in the training procedure is also a non-trivial training slowdown (if i remember correctly forwards passes are 3x faster than backwards so you add about 25% into the total training cost).  \n\n- The updated loss function may further require additional hyperparameter sweeping to adjust the weight of the secondary loss also increasing complexity.\n\n- There seems unlikely to be further reliability guarantees other than practicality. With Bayesian approaches, you get some amount of guarantee under much more strenuous conditions, while held-out set approaches like temperature scaling and conformal prediction also have some semblance of guarantees.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "No", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "This paper proposes Zig-Zag, a sampling free approach to estimate uncertainty in neural networks. Experiments are performed on a variety of vision-related classification and regression tasks (MNIST, CIFAR, Imagenet, some image regression tasks, and a shapeNet based task).\n\nZig-Zag's representation of uncertainty is the distance between an augmented model that takes the estimated response, yhat, as input and the same model which takes a vector of zeros as input. Training is done by giving the model the true response, y as input and minimizing that as part of the loss.", "claims_and_evidence_yn": "No", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "Some clarifications would be helpful:\n\n- [high] Is \"single\" model from Kendall and Gal a standard model trained with their uncertainty based loss functions (Eq 12 for classification and Eq 8 in regression?\n\n- [medium / high] A missing baseline to me is basically the same approach as Kendall and Gal but training the variance model separately. That is for regression, training a model to predict the mean, and then another model to predict the variance (original reference, [Nix & Weigend 1994](https://ieeexplore.ieee.org/document/374138). This baseline also has two forwards passes of costs.  \n\n- Another baseline, which could unlock some interesting fine-tuning based experiments with large models actually, is to train your loss function separately as well. Then, you could have the base model producing its own prediction yhat and using that as input. Architectures would not need to be the same either.\n\n- [medium / high] A final missing baseline that is single pass is [temperature scaling](https://arxiv.org/abs/1706.04599), which uses a validation set to readjust the probabilities. It has the advantage of being single-pass at test time, and needs only a limited amount of training data to fix the calibration issues.\n\n\n\n- [high] to make my point more clear above, I am a bit concerned that the trained model would be too prone to overfitting. One can see this in the linear regression setting where $\\hat X = cat(X, y)$. Then, a trivial solution (and what becomes the MSE minimizing solution) is to set \\beta_y = 1 and then the other predictors from X equal to zero. Only a two stage approach like your inference method would tend to get around this issue. I could see that the approach works because the model doesn't seem to have enough capacity for some reason but the theoretical underpinning here is still the same.\n\n      - It would be nice to look at the code to see what's going on under the hood here.\n\n\n- [high] How is the \"variance\" / \"standard deviation\" estimated in regression? I see it for classification (where a normalized score is fine), but it's not immediately clear to me how one gets from ||M(x, 0) - M(x, \\hat y)|| to \\hat \\sigma(x) in Figure 6 for example. This actually seems critical for the success / failure of the whole approach.\n\n*Presentation Comments*\n\n[medium] show Figure 7 for Imagenet. I'm curious to know if 2-3 samples of ensembles are highly performant there as well.\n\n[low] Label the axes for Figure 10. The caption does a good job but this is a presentation issue. Also, maybe make the dots there larger too.\n\n[medium] blue / black shading seems somewhat inconsistent especially in Table 3. I'd suggest instead using bold for best only and italics for second best throughout.\n\n[low] use alpha shading less than 1 in Figure 4 so that most of the points can be seen.\n\n[low] end of section 4.3: \"However, it then needs at least double...\" Actually it needs quadruple the memory for the forwards pass ;) Would also suggest writing out 4 or 5 and 2 and 3 there.\n\n[low] Don't capitalize ensembles throughout.\n\nSection 2: not bayesian networks, but Bayesian neural networks.\n\nWeller & jebara 2014 reference is clearly mis-cited.", "broader_impact_concerns": "n/a", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "IJ7Wlf1DVY", "reviewer": "Reviewer_3uZz", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "**Strengths** \n- ZigZag is a sampling free approach to measure uncertainty\n- ZigZag is also task agnostic and can be applied to regression, classification and other tasks.\n- It has a constant inference cost to measure the uncertainty, i.e., 2x the cost of a single forward pass of the network\n\n**Weaknesses**\n- ZigZag requires retraining the network and modifying the architecture to enable constant inference cost of uncertainty estimate. This is a non-trivial step and most practictioners would avoid due to the added complexity.\n- Schemes such as Deep Ensembles also enable trading off inference cost for the levels of uncertainty estimate, i.e., higher inference cost would result in better uncertainty estimate. ZigZag lacks this ability.\n- It is unclear why approaches such as Mask Ensembles have similar inference cost as the Deep Ensembles. \n- ZigZag cannot utilize parallelization which Deep Ensembles can leverage (inference of the models in the ensembles can be done in parallel). ZigZag requires sequential dependence on the previous forward pass.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "This work proposes ZigZag, a sampling free approach that is task agnostic and estimates the uncertainty with two inference steps. The method works by \n\n- first modifying the given model M(x) to accept additional input of the same size as the prediction y, i.e., $\\hat{M}(x,y)$\n\n- during inference, it does two forward passes through this modified model, $y_0 =  \\hat{M}(x,0)$, followed by $y_1 = \\hat{M}(x,y_0)$\n\n- finally, it estimates the uncertainty as the error $\\| y_0 - y_1 \\|$. Low distance between $y_0$ and $y_1$ corresponds to lower uncertainty.\n\n\n\tThe network is trained to minimize $L(\\hat{M}(x,0), y) + L(\\hat{M}(x,y), y)$ such that the above inference procedure becomes valid as first component is traditional inference and the second one is knowing a prediction, does the outcome change. In this step, $L$ measures the loss between predicted and actual label $y$.\n\t\nThis work provides various experiments on benchmark datasets to compare the proposed scheme to various baselines in the literature.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "- In Fig.5 (c,d), what does the strength of the green and yellow color denote? For instance, in figure (c), there's presence of both yellow and greeen shade, does it have any significance? Also, one would expect the Deep Ensembles to have better uncertainty (but with higher computational cost) compared to ZigZag. It is unclear in this figure. \t\n\n- For the regression and classification task in Sec.4.2, can you provide an estimate of how much is the computational cost difference between Deep Ensembles and ZigZag. Also, this section does not report the performance of newer approaches such as MaskEnsembles, SNCP, etc. \n\n- Can you report the uncertainty estimate of the Deep Ensemble for the same budget as ZigZag (i.e. 2x instead of 5x in the Table 1)? This should represent the fact that under same inference cost, which of the two schemes yield better uncertainty measure.\n\n- Have you used other distance measures instead of || y0 - y1 || to measure the uncertainty?\n\n- Why is the inference cost of the Masked Ensembles similar as the Deep Ensembles?\n\n- Can you provide a better understanding of the training procedure? Why minimize the sum of the two terms? Why not trade-off the two terms with some hyder-parameter that weighs the second component differently?\n\n- Can you do a third pass over the network to improve the uncertainty estimate?\n\n- Inference cost of the Deep Ensemble is proportional to the number of models in the ensemble. But, if the system allows for parallel computation, this cost can be reduced to a single forward pass. In contrast, ZigZag has sequential dependence of the previous pass as a result, this cost (2x) is rigid and cannot be improved if the system has parallelization in-built.", "broader_impact_concerns": "N/A", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "Pb32X7rics", "reviewer": "Reviewer_t2aE", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths:\n- simple and general method applicable to different problem setups\n- interesting datasets and applications in experiments beyond the standard image datasets ( including engineering problems such as airfoil and car shape optimisation)\n- the experimental results look promising\n\nWeaknesses:\n\nMethod:\n- lack of method analysis - since the main contribution of the paper is a new method proposal, I would expect more analysis on the intuition such as, why should we expect this to work, what type of uncertainty does the method address - epistemic or aleatoric? Is the uncertainty related to the input data/features only ($\\mathbf{x}$) or some uncertainty from the labels will be picked up?\n- I believe your method is also sensitive to noise in the data, something that the authors should discuss more.\n- What happens in the case when the error is already making prediction errors on some of the training examples, how does that affect ZigZag's behavior?\n\nExperiments\n- there is no standard error or deviation for the presented results, how many times were the experiments repeated? It is essential to know if the difference in performance is within margin of error with the rest of the methods\n- the calibration results signal a need for improvement, seems like ZigZag is better than baselines but far from calibrated (close to the diagonal line)\n- Why is the autoencoder as the most obvious baseline due to the similarity to ZigZags approach not included in experiments?\n- In the image experiments, it is common to evaluate OOD performance in a more difficult setup , when the train and OOD split is from the same dataset but different classes (ex. MNIST 0-4 in distribution and 5-9 test, or OOD distribution)\n\nMinor:\n- Fig 2 is unnecessary", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The paper proposes ZigZag, a simple method for estimating out of distribution uncertainty, which by its generic formulation is applicable to different tasks (classification, regression) and different network architectures (dense nets, convolutional, graph nns). The experiments show that ZigZag has an advantage in terms of quality of uncertainty estimates over standard baselines such as Ensembles and Dropout, and additionally it is more resource efficient, requiring less memory and time at inference time.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "Please see my notes above. I believe this is an interesting idea but there is lot that can be improved in the method presentation and analysis to make this a full ML method submission.", "broader_impact_concerns": "No ethical concerns.", "additional_comments": "", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Meta-review: Reviewers found the paper to be generally clearly written, and to provide an interesting and effective alternative to techniques such as deep ensembles. While there were a number of requests for discussion and comparison to other techniques, these were adequately provided by the authors in the discussion period.

Following the author response, all three reviewers were in favour of acceptance. The AE upholds this consensus. We do however request that the authors incorporate in their manuscript some of the important points that arose in the discussion period.

**Requested changes**:
- add the discussion on the intuition behind the method, posted in the response to Reviewer t2aE
- include the new experimental results from the author response, including:
    - temperature scaling method
    - separate variance model
    - deep ensembles with 2x instead of 5x budget in Table 1
    - auto-encoder baseline
    - standard deviations of results
- (optional) consider moving Figure 1 to the top of page 2
Decision: Accept (poster)