Differentiable Bayesian Neural Network Inference for Data Streams
Authors: Namuk Park
Taekyu Lee
Songkuk Kim
Venue:  (2020)
Keywords: Bayesian neural network
approximate predictive inference
data stream
histogram

Abstract: While deep neural networks (NNs) do not provide the confidence of its prediction, Bayesian neural network (BNN) can estimate the uncertainty of the  prediction. However, BNNs have not been widely used in practice due to the computational cost of predictive inference. This prohibitive computational cost is a hindrance especially when processing stream data with low-latency. To address this problem, we propose a novel model which approximate BNNs for data streams. Instead of generating separate prediction for each data sample independently, this model estimates the increments of prediction for a new data sample from the previous predictions. The computational cost of this model is almost the same as that of non-Bayesian deep NNs. Experiments including semantic segmentation on real-world data show that this model performs significantly faster than BNNs, estimating uncertainty comparable to the results of BNNs.


Under review as a conference paper at ICLR 2020
DIFFERENTIABLE BAYESIAN NEURAL NETWORK INFERENCE FOR DATA STREAMS
Anonymous authors Paper under double-blind review
ABSTRACT
While deep neural networks (NNs) do not provide the confidence of its prediction, Bayesian neural network (BNN) can estimate the uncertainty of the prediction. However, BNNs have not been widely used in practice due to the computational cost of predictive inference. This prohibitive computational cost is a hindrance especially when processing stream data with low-latency. To address this problem, we propose a novel model which approximate BNNs for data streams, Instead of generating separate prediction for each data sample independently. this model estimates the increments of prediction for a new data sample from the previous predictions. The computational cost of this model is almost the same that of non- Bayesian deep NNs. Experiments including semantic segmentation on real-world data show that this model performs significantly faster than BNNs, estimating uncertainty comparable to the results of BNNs.
INTRODUCTION
While deterministic neural networks (DNNs) surpass human capability in some area in terms of prediction accuracy (He et al. 2015 Silver et al. 2016 Ardila et al. 2019), it could not estimate trustworthy uncertainty of prediction. Since the prediction can not be perfect and the misprediction might result in fatal consequences in areas such as medical analysis and autonomous vehicles control, estimating uncertainty as well as predictions will be crucial for the safer application of machine learning based systems.
Bayesian neural network (BNN), neural network (NN) that uses probability distributions as weights, estimates not only predictive results but also uncertainties. This allows computer systems to make better decisions by combining uncertainty with prediction. Moreover, BNN can achieve high per- formance in variety of fields, e.g. image recognition (Kendall al. [015 Kendall & Gal 2017). language modeling (Fortunato et al. (2017), reinforcement learning (Kahn et al. 2017] Osband et al. 2018). meta-learning (Yoon et al. 2018 Finn et al. 2018), and multi-task learning (Kendall et al.
2018
by exploiting uncertainty.
Although BNNs have these theoretical advantages, they have not been used practical tool. The predictive inference speed has detained BNNs from wide applications. BNN executes NN inference for dozens of samples from weight distributions. Since sampling and multiple NN executions are difficult to be parallelized, the inference execution takes an order of magnitude more time. Particularly, this is significant barrier for processing data streams with low-latency.
Most time-varying data streams change continuously, and so do the predictions of BNNs. Thus, we estimate prediction by calculating the increments between two consecutive results, instead of calculating the separate prediction for each input data. This is equivalent to calculating the differentiation of the BNN's prediction for arbitrary data, because the difference of prediction for the new data is the line integration of the gradient of prediction over the new data.
In this work, we propose a differentiable BNN (DBNN) inference with respect to an input data. The prediction of the DBNN is given by a Monte Carlo (MC) estimator for distributions of data streams and weights. We speed up the inference by approximating the distribution using histogram and calculating the gradient for this MC estimator. We show that the time complexity of this model is nearly the same as that of deep DNNs. We evaluate DBNN with semantic segmentation using road scene video sequences and the results show that DBNN has almost degradation in computational

---

Under review as a conference paper at ICLR 2020
performance compared to deep DNNs. The uncertainty predicted by DBNN is comparable to that of BNN in various situations.
The main contributions of this work follows.
We propose online codevector histogram that estimates the probability of a high-dimensional data stream. Then, we show that this histogram can be used to obtain the MC gradient estimation.
We propose differentiable Bayesian neural network inference with respect to input data as approximation of Bayesian neural network inference for data streams. DBNN uses the online codevector histogram to approximate probabilities. This model is nonparametric and applied trained BNN without significant modifications.
We theoretically and empirically show that the computational performance of DBNN is almost the same as that of deep DNNs.
BACKGROUND AND RELATED WORK
BNNs are state-of-the-art method to estimate predictive uncertainty while DNNs based approaches have been developed recently (Lakshminarayanan et al. 2017, Guo et al. 2017). BNNs with proba- bility distributions as weights produce probabilistic results. To make prediction, BNNs sample from the weight probabilities and performs DNN for each sample. In this section, we describe the details and challenges of BNNs inference process.
2.1 BAYESIAN NEURAL NETWORK INFERENCE
Suppose that p( (w) is posterior probability of NN weights w and p(ylær, w) is the BNN model for input data æ. Then, the inference result of BNN is predictive distribution:
ply|..) / ply x., (wpwwwpppee w))(w))wwwww
(I)
where v, is observed input data vector and y is output vector. For simplicity, BNNs are usually modeled to have probability distribution with the mean of the prediction of DNN, e.g. in Heráandez
Lobato & Adams 20155; Gal & Ghahramani (2016):
p(ylax, w² = N NN (),
where NN(-) is prediction of DNN and T is given parameter. ( can be approximated using MC estimator:
p(ylar.) ~ Nw. a0.
Σ Epvvla,, w.)
where w. p(w) and No. is the number of samples. The expected value of the obtained predictive distribution is the predictive result of BNN and the variance is the predictive uncertainty. The process of calculating the equation consists of steps: sampling weights from p(w), e.g. using Markov chain Monte Carlo (MCMC) (Neal et al.) 2011 [Hoffman & Gelman 2014), and executing the DNN for each weight sample. Since roal-world data large and practical NNs are deep, the repetitive computation of NNs is difficult to be fully parallelized due to various problems, such as memory limitations of the GPU (Kendall & Gal, 2017). and the iterative computation of DNNs results in the decrease of computation speed. MCMCs are slow and, despite recent achievements (Tran et al. 2018). is challenging achieve linearly scaling performance for multi-GPU MCMC. addition, difficult to check for the convergence of MCMCs. To mitigate these problems, we approximate the difference in the prediction for one new data as one NN caleulation, and sample the weights from the posterior before testing.
Several sampling- free BNNs, e.g. Hernández-Lobato & Adams (0015); Wang et al. (0016); Hwang al. 2018); 8): Wu et al. (2018), have been proposed recently. The sampling-free BNNs predict results with only one forward pass. These methods, however, have limitations. First, sampling free BNNs necessitate specific types of weight-distribttion with parameters such Gaussian distribution exponential family instead of using MC estimator to approximate (T). When a posterior has multi- modality skew, they can give inaccurate approximations. Second, many cases, sampling-free
2

---

Under review as a conference paper at ICLR 2020
BNN uses method other than variational inference to obtain posterior because evidence lower bound (ELBO) is not amenable. These constraints make difficult to apply sampling- free BNNs to deep NNs. Therefore, we mainly consider sampling based BNN for comparison in this paper.
2.2 BAYESIAN NEURAL NETWORK GRADIENT ESTIMATION
is standard to use a gradient of MC estimator to optimize the loss function of BNN, e.g. ELBO.
Several direct and indirect methods are used obtain the MC gradient estimation: reparametrization
trick (Kingma& & Welling 2013: Blundell et al. 2013: Fortunato et al.) (0177) score function (Kleijnen
Rubinstein 1996 Williams 1992] (992]Glymm) 1990p. dropout (Gal & Ghahramani 2016 McClure &
Kriegeskorte, 2016). batch normalization [Teye et al. 2018). expectation propagation Hernández
Lobato & Adams| 2013), and smooth transformation for samples (Liu Wang 2016 Burda et al.
2015 Maddison et al.) 2017 Naesseth et al. 2017 Le et al. 2017 van den Oord et al. 2017).
However, it is not appropriate to use these techniques to calculate a gradient of MC estimator L = Ep( [x=] for arbitrary functions f()) when a data stream is non- non-stationary and p(ær), the distribution of the data stream, is time-variant. For example, the reparameterization trick, one of the most widely used methods for MC gradient estimation, separates the probability p(æ) into deterministic function h(-) and an invariant probability p(e). i... x = hie) and 0xp(c) = 0. Then, the is expectation over the invariant distribution, i.e., f Ep(e) [f)]. and the approximated L becomes differentiable, i... Cz = Epte) [0=f(=)] To use this technique, we need to adapt h(-) to the non-stationary data stream. If fn(-) is modeled in an NN, we may need continuously train this NN on the data stream; this lcads to a decrease in computational performance. To alleviate this problem, we use histogram to estimate probability with nearest neighbor search, instead of using an NN-based generative model. In addition, the histogram is linear of disjoint bins that is analytically useful while simplifying calculations.
3 ONLINE CODEVECTOR HISTOGRAM
Vector quantization was introduced in Gersho (1982, Gray (1984) in order to compress a probability distribution to a dozens of samples called codevectors. Kotani et al. (2002) showed that the histogram of codevectors codevectors -orrettoos--oodeeettrtrrssss augmented with counts can effectively represent the features of
face image dataset. Xu et al. (2012); Frezza-Buet] ()014); Ghesmoune et al. (2016) have proposed algorithms that changes codevectors depending the data stream. We introduce online codevector histogram (OCH) to estimate the probability distribution of non-stationary data stream as well as dataset. OCH is probabilistic algorithm that changes not only codevectors but their counts and calculates the difference in distribution as the data stream changes, at low computational cost. OCH can add new codevector and delete old ones, while counting the matches of each codevector for the past data stream. OCH maps the input vector to the codevector using nearest neighbor search. It is a nigh-dimensional histogram where the Voronoi diagram is the boundary and codevector represents the corresponding bin. DBNN uses OCH to approximate the probability distributions of input and output vector data streams.
Algorithm shows how OCH operates in three steps. (a) Given a new input vector, OCH finds the nearest codevector and increases its count. Then, divides the corresponding bin by inserting the input vector as new codevector with probability proportional to the count. (b) OCH decrease all counts by the same rate to reduce the contribution of old data. (c) To keep the number of codevectors small, OCH deletes codevectors with probability in inverse proportion to its counts.
OCH takes three hyperparameters: K, X, and Φb K the number of codevectors kept in OCH on average. X determines how fast OCH depreciates old counts with the rate of 7. o with counts of each bin regulates the probability of adding and deleting codevectors.
Nearest neighbor search is the most computationally intensive step in alg. To lower the computa- 2.
tional complexity, we use locality sensitvvee hashing with stable distribution, 7t = [a--2.+ b)/ul for a vector and scalars b and w. It requires up to log K hashes for precise search. The upper bound of the computational complexity is (dim(x) log K). This is faster than continuous training of NN-based generative models for the data stream changing over time.
3

---

Under review as a conference paper at ICLR 2020
Algorithm 1: Update OCH
input :input vector æ., count of imput vector n,,, OCH = {(,, n:)} where c; codevector and
n, is its count, hyperparameters K, A, and
output :updated OCH
C2 Search the nearest codevector æ,, in OCH
Yi - Tı, + ni, where nu is count of C;
Bernoulli - ã + Φ)) where a(-) is sigmoid, N E; R4, = n,/N, and म = 1/K
if p = 1 then
OCH + OCH U {(e., (1 -) ni)} where 7 = e-/NN
Yh; 4- T4
forall (c,, E OCH do
L M2 7
forall (c) OCH do
q Bernuulli (t nr + σ) Rt)
q- then
L OCH + OCH {(cx, nz)}
12
Meanwhile, OCH approximates probability distribution p(x) as:
p(x) Σ ग. V<rl,,
where = E, n4. n; = n,/N, and V(zee) is the bin or neighborhood of e with (((cc)dx 1. The right-hand-siie side of 4 clearly differentiable with respect TJ, while set of random samples from p(x) is not differentiable. Given new input data, OCH changes only one count of the nearest codevector. Therefore, if n, < N, the difference of OCH for new input vector is approximately:
6p(x)= ~ Σ (T.((e))
(5)
= aV((cc)
(6)
where c, the nearest codevector to the input vector, a 6n/N, and on the difference of the count of C., When OCH creates new codevector, ôn is n. Here, we used the fact that codevectors are invariant for input data, so (a (c;) also invariant. This property useful when the linear
operator g(-) is applied to p(æ). By definition of linear operator, g(p(x)) E, (x))))))) then its difference is 6g(p(z)) = Σ, (x,g(V(())c.) = ag(V(x)c.))
DIFFERENTIABLE BAYESIAN NEURAL NETWORK INFERENCE
When a data stream = f..., x. is given, where each subsequent data sample changes continuously, the prediction of NN for S also changes continuously. i.c., p(y) p(y) + 8p(y), because a NN (with continuous activation) a homeomorphism. We show that 5p(y) is approximately proportional the prediction of NN augmented with OCH to the input and output for the recent data z, Figure shows the structure DBNN, where DNN is augmented with OCHs as distribution estimator units of input and output stream. DBNN calculates predictive uncertainty well the predictive result using the weighted ensemble of output codevectors.
4.1 DIFFERENTIATION OF BAYESIAN NEURAL NETWORK INFERENCE AS DIFFERENCE OF PREDICTION
It is challenging to calculate the difference of (1) for new data v. from S. The differentiation of p(y) x., w) with respect to æ. is analytically intractable, because the samples from the proba- discrete, although p(x[S) varies continuously. In other words,
bility of the data stream p(æ () Oz x w) = p(y) x. w) w0,,. 8(x xx) dx where 5(-) is the delta function, and the delta func- tion is not differentiable. To address this issue, DBNN smoothens the delta function of the data
4

---

Under review as a conference paper at ICLR 2020
DNN
OCH,
predictive result
data
NN weighte
predictions
mesa
imput data
uncertainty
variance
Figure 1: DBNN Inference. OCHs are added to the DNN to estimate the probabilities of input and output vector streams. Given a new data, OCHz adjusts the weight (arrows) of the nearest codevector of OCHz representing the input vector stream. DBNN adjusts weights of the codevectors of the OCHy representing the predictive distribution based on the results of the inner DNN. DBNN derives predictive result and uncertainty from the weighted ensemble of the codevectors of OCHy.
sample 8(x x.) to the probability of the data stream p(z|S) as follows:
p(y)S)= = / ply x. w ())p
f p(u pl))=)p(z\s)dz
(8)
where z (ar, w) and P(=[S)= p(x)S)p(w)). p(x]S)) is separately learned with respect the data stream S by another model and is called data uncertainty. p(w) is the posterior distribution obtained from BNN training and called model uncertainty. DBNN inference decouples data (stream) from the model. Instead, it joins the probability of data and the probability of the NN weights. When the most recent data sample considered instead the data stream, i.c., p(x(S) ō(x x.), DBNN inference is reduced to BNN inference as mentioned before.
To calculate we use OCH and represent p(z[S), and call OCHz:
ply Σ Tt pluci))(2)c))d>>
(9)
where T, is weight of codevector c; and proportional to the count of the codevector. V(z[c;) is neighborhood of c. Then, S)) can be approximated by changing the weight of the codevector nearest v. as:
óp(y)S) ~ Eon, dā, / ((ylx))(s))))dd
(10)
za / / p(ulz)V(z(c.)))
(11)
according to the (6). This means that [(y))))((((c) dz is invariant with respect to the change of S, i... 6[. [ p(y <>) c, cz) O. since histogram only changes its counts, not the codevectors. We
approximate V(= (.) as delta-function distribution at c., i.e., V(2lc,) = 5(2 -.,):
5p(y(S) ap(ylc_)
(12)
is safe to assume that p(ylc,) is dominantly distributed near NN(c.), ie., plylc,) ~ V (N(Nc)) because the expected value of should be equal to NN(c.):
5p(y(S) (V())NN(c..)
(13)
where NN(c.) is prediction of DNN for This result is equal to the changes of OCH when update OCH for data, as (6) expresses. In conclusion, the difference of the DBNN prediction contributes only to the neighborhood of the DNN prediction for the codevector in OCHz approximately. Thus, given the OCHy representing SSy p(y S) + 5p(z)S) can be approximated by updating the OCHy for the prediction of DNN.
5

---

Under review as a conference paper at ICLR 2020
Algorithm 2: DBNN Inference
input :input data vector æ., deterministic neural network NN(-). posterior distribution OCHw. distribution of input vector OCHz, distribution of output vector OCHy, cache table T initialized to empty set
output: :updated distribution of input vector OCHz, updated distribution of output vector OCHy
w. ~ OCHW
2, w.)
OCHz < Update OCHz for 2,
new codevector c; exists in OCHz then
y NN(c))
T yi)
C+ + Search the nearest neighbor codevector to a, in OCHz
y. s -(c))
OCHy Update OCHy for y. with count a
4.2 IMPLEMENTATION OF DIFFERENTIABLE BAYESIAN NEURAL NETWORK INFERENCE
DBNN is composed of three stages and Algorithm| 2 describes the DBNN inference process in detail as follows: (a) First, to estimate the probability of the input data stream, the algorithm updates OCHz for z. = (x., w. where C, is an input data and w. a random sample from given approximated posterior distribution OCHz which represents the given p(w). OCHw consists of weights sampled from trained p(#r) (w) using MCMC. OCHz and OCHy are initialized to empty sets. (b) Second, OCHz generated new codevector in OCHz, DBNN generates the prediction for the codevector using DNN and keeps the prediction in cache table. As a result, the cache table contains the results of DNN corresponding to all codevectors in OCHz. (c) Third, DBNN finds the nearest neighbor codevector to x, in OCHz, looks up the corresponding prediction in the cache table and update OCHy for the prediction for the codevector. In conclusion, OCHz approximating p(=(S) consists of recent data and weights from posterior. OCHy approximating SS consists of recent predictions.
DBNN calculates the difference of prediction for a new data sample from the previous predictions. In the process, it executes DNN once if necessary, which is computationally expensive, in contrast to BNNs' repetitive execution DNNs. Furthermore, DBNN sometimes does not execute DNN, but only updates OCHz and OCHy for the input and output vectors, by updating the counts and estimates prediction and uncertainty based on cached results. The dominant part the computational cost of updating OCHz is the inner product of given input vector, i.e., Given z = (x, w) and a = (ag, a1), a z = ag x + a1 w holds. The codevector samples w from OCHw fixed and finite, and DBNN caches all a: on a1 w is minuscule, when updating OCHz- In conclusion, the upper bound of the computational complexity of DBNN inference is (dim((z) log Kz NN(.) dim(y) log Ky) where (NN(()) is computational complexity of NN and K and KY are hyperparameters K of OCHz and OCHy, respectively. Modern deep NN performs vector operations dozens of times, if not hundreds, so the computation time of OCH is very small compared to DNN execution.
for nearest neighbor search.
Therefore, the average computational cost
DBNN uses the flexible parametric probability estimator OCH represent the distributions of input and output vector streams. Unlike the most BNNs that depend on parameterized model described in (2. DBNN does not depend on the specific model. OCH represents both continuous and discrete vector spaces, and so does DBNN. If DNN and posterior are given, we can easily convert them to DBNN without significant modifications: just add OCH to the input and output DNN to estimate the probability of the input and output vector streams.
5 EXPERIMENTS
Although DBNN uses assumptions that seem reasonable, it is necessary to measure empirical performances to show that this assumption works for real-world problems. This section evaluates the performance of DBNN in three set of experiments. The first experiment visualizes the characteristics of DBNN by performing simple linear regression on synthetic data. The second experiment classifies various real-worke multivariate datasets using shallow and narrow NNs. This experiment shows the

---

Under review as a conference paper at ICLR 2020
1.0
&
&
L0
9.6
0.2
0,2
0.2
20
00
(a) DNN
(b) MU
(c) DU
(d) DBNN
(c) = 0.3
(f) 0.03
Figure 2: Simple linear regression on synthetic dataset. In figs. 2a to 2d the top is the approximated
input probability p(z, wo) and the bottom is the approximated output probability with data p(z, y) at t t= with v = 0.3. In these figures, fig. 2a and fig. 2b are samples from the distribution, and fig. [2c] and fig. 24 are distributions approximated by OCHz and OCHy. The sizes of the circles represents the importance weights each codevector. Figures to 2f are the expected values and standard deviations of y depending the timestamp for different The black dotted lines represent true values. The error is 90% confidence interval.
difference between computational and predictive performance of BNN and DBNN under various conditions when converting BNN to DBNN using small NN. The third experiment performs semantic segmentation on real-world video sequences. This experiment compares the performances of DBNN with other baselines when using deep and wide modern NNs in practical situation.
We use the following four methods as baselines:
DNN. Let Softmax(y' ) be probability of NN where y is DNN logits. It is easy to implement, but it differs from the actual classification probability when the NN is deepened, broadened, and regularized well (Guo et al.) (017)..
Model Uncertainty (MU), BNN is referred to as MU in this section since it introduces model uncertainty to NN. MU have calculate (3) to predict the result. It is difficult to analytically determine the number of samples that the prediction converges. Instead. in section 5.1 and section 5.2 we experimentally set the number of samples from posterior to 30 so that the accuracy and the negative log- fog-likelihood (NLL) converge. In section 5.3] MU containing MC dropout (Gal & Ghahramani 2016) layers predicts results with 30 forward passes. Appendix E shows the performance of the MU for different numbers of forward passes.
Data Uncertainty (DU). DU a method that assigns only data uncertainty to DNN by adding OCHs to input and output of trained DNN. In other words, it one weight instead of weight distribution in the DBNN, i.., ( with p(w) = 5(w w.). This method shows the effect of OCH prediction when it is applied to the NN. Also, it shows that DNNs modified using OCH can achieve higher uncertainty than vanilla DNNs in semantic segmentation experiment.
DBNN. DBNN takes both data uncertainty and model uncertainty. DBNN adds OCH the input and output of trained BNN. In section ann and section 5.2 the approximated posterior distribution of this method OCHw consists of 30 samples from the BNN's posterior.
5.1 SIMPLE LINEAR REGRESSION
neural network with a linear activation function is a linear regression model y = wpx + wi- The posterior is given by p(w))= (110,, 0.02²) and p(w1) N (0.0, 0.2²). The distribution of time-varying input data streams is given by p(zlt) = 5(z - ot) where is integer timestamp from t = 100. is 0.3 and 0.03. The top of figs. 2a to 2d are approximated distributions of input and weight samples p(r, Wo) and bottom are approximated distributions of output samples with data p(x; y) /. O. wi is omitted from in these figures, but it behaves like wip
7

---

Under review as a conference paper at ICLR 2020
Table Predictive performance of MU and DBNN for classification on multivariate datasets.
RMSE
RMSE-90
NLL
Cov-90
Dataset
MU
DBNN
MU
DBNN
MU
DBNN
MU
DBNN
Localization
0.228
0.212
0.118
0.085
1.252
1.084
13.1
3.11
EMG 0.260
0.249
0.204
0.203
0.955
0.935
10.8
9.91
Occupancy 0.134
0.152
0.071
0.076
0.071
0.081
90.1
90.1
To predict result, DNN uses point-cstimated weight and data z = 0, which is the data at f = 0. MU uses weight distribution, instead of point-estimated weight, and data 0. DU uses point-estimated weight, which is the same as DNN. However, since DU contains OCHs, it uses not only the most recent data (æ: 0 at t 0) but also past data (æ < 0 when distribution of y. DBNN predicts the distribution of y using both weight distribution and data from the past to now. DBNN without distribution of is equivalent to MU, and DBNN without distribution of w is equivalent to DU.
0). As result, DU predicts the
The figs. 2e to 2 show expected value and standard deviation of DBNN prediction on time. First, as shown in top of fig. 2c. the result of DBNN lags behind since DBNN smoothens its prediction with respect time Second, unlike MU uses dozens of samples, DBNN uses small number of samples, so the error is relatively large. Third, as shown in bottom of fig. 2el the DBNN prediction under-confident because DBNN considers not only MU but also DU. Fourth, as shown in the comparison of fig. [Zeland fig. 2 DBNN converges to BNN and DU converges to DNN as the input data stream changes more slowly.
5.2 CLASSIFICATION ON MULTIVARIATE DATASETS
classification experiment designed to compare computational and predictive performance changes when converting BNNs to DBNNs using shallow and narrow NNs in various situations. In this experiment, we use three time-series real-world datasets with input dimensions between 4 and Localization and EMG dataset have relatively large number of classes, eleven and eight respectively while Occupancy dataset has only two classes. The NNs consist of 2 fully-connectoe hidden layers with 50 units. The distributions of weights are optimized using variational inference. See appendix A for more information about experimental settings and datasets.
Computational Performance. Execution times for one batch of MU and DBNN are 26. 26.7+:10.6m 10.6ms and 19.5 10.0ms, respectively. MU parallelizes execution by using a batch size of 30. This result shows that DBNN is 37% faster than MU even though MU is parallelized and DBNN uses additional OCHs. DBNN improves the computational performance of DBNN by sampling the weights from the posterior before testing. As NN gets deeper and larger, the execution time of the DBNN will be reduced compared to the MU, because the larger the NN, the greater the burden of sampling weights
Predictive Performance. As shown in Table we compared MU and DBNN in terms of the root- mean qquare error (RMSE), RMSE for predictive results with confidence above 90% (RMSE-90), negative log-likelihood (NLL), and the percentage of predictive results with confidence above 90% (Cov-90) the MU and DBNN for three datasets. DBNN more accurate than MU and predicts uncertainty better than MU on Localization and EMG datasets. DBNN predicts less accurately than MU on Occupancy dataset with comparable uncertainties. The confidence of DBNN is always less than or equal to that of MU. Overall, DBNN provides predictive performance comparable to BNN on various datasets.
'The delay of the expected value of y over time does mean that the regression result is biased. DBNN estimates the correct value average since is also delayed just as y delayed.
Execcuiinn times of MU and DBNN with 10 fully colle-connected hidden layer NN are 98.9+20. Ims and 49.0++23.66 2m,6,, respectively. In this case, DBNN is 2.02 faster than MU. See appendix B for more information about the relationship between NN depth and execution time.
8

---

Under review as a conference paper at ICLR 2020
Table 2: Computational and predictive performance with semantic segmentation for each method.
Method
Thr (fps)
Acc
Acc-90
Unc-90
loU
IoU-90
NLLL
Cov-90
DNN
6.14
85.8
89.1
30.4
58.5
62.5
1.22
93.1
MU
0.189
86.4
93.0
60.1
61.0
69.9
0.728
84.2
DU
5.33
85.4
91.5
51.3
57.3
63.3
0.980
86.0
DBNN
5.22
85.8
92.3
63.0
58.9
68.6
0.826
80.4
5.3 SEMANTIC SEGMENTATION
Semantic segmentation experiment shows the computational and predictive performance of DBNN with modern deep NN in practical situation. We use Cam Vid dataset (Brostow et al. 2009) consisting of 30 frame-per-secone second (fps) video sequences of real-world day and dusk road scenes. We use the U-Net (Ronneherger et al. 2015) as the backbone architecture. Bayesian U-Net, similar to Kendall ct al. (2015), contains MC dropout (Gal & Ghahramani 2016) layers. For more information about experimental settings, appendix
Computational Performance. The throughput (Thr) column of table 2 shows the number of video frames processed by each model per second. This table shows that DNN takes 162 12ms on average to process one frame. comparison, DBNN takes 191= on average to process one frame, which is only 17% higher than DNN. According to the difference between the execution time of DNN and DU, the average execution time of one OCH is 14ms, which is only 7% the total. Besides, due to GPU memory limitations, the batch size of MU is limited to 1. Thus, the MU predicts results for 30 batches of size 1. In conclusion, the execution time of MU is 5291 169ms,,mm, which is 32 x higher than that of DNN, and 27x higher than that of DBNN. Moreover, DBNN can increase throughput at the expense of accuracy by adjusting a hyperparameter. See appendix for more information.
Predictive Performance. The Acc to Cov-90 columns of the table show the quantitative com- parison the predictive performance for each method. We measure global pixel accuracy (Acc), mean intersection over unit (IoU), and negative log-likelihood (NLL). At the same time, we se- lected only those pixels with confidence greater than 90% and measure the accuracy (Acc-90), i.c. p( o'accurate/ confident), and IoU (IoU-90). We also measure the probability that the pixel is not 90% confident pixel when prediction is incorrect (Unc-90), i.e., (nntucooiiienntnnnccuaaeee percentage of pixels with 90% confidence (Cov-90).
and the
According to this table, the accuracies of DU and DBNN are 0.46% and 0.69% lower than that of DNN and MU, respectively. For pixels with ninety-percent higher confidence, DNN, MU, DU, and DBNN predicts with 3.8% 7.6%, 7.1 %, and 7.5% higher accuracy, respectively, compared to the accuracy for all pixels. MU, DU and DBNN improves the accuracy more than DNN for confident pixels, which means that MU and DBNN estimates high uncertainty for misclassified region. IoUs for certain pixels increase by 6.8%, 14%, 10%, 16%, respectively, compared the IoUs for all pixels, which shows the same trend as in accuracy.
As shown in this results, DNN the most improper way distinguish uncertain pixels because has the least performance improvement compared to other methods for pixels with high confidence. On the other hand, MU has the highest performance improvement compared to DNN when considering all pixels, and it also has the highett performance for certain pixels. DBNN has improved performance for certain pixels, similar to MU. The predictive performance of DU for all pixels is similar to the predictive performance of DNN, but for certain pixels, the performance is much better than that of DNN. See appendix D for more information on semantic segmentation experiment. With a small number of forward passes, BNN performance. To achieve equivalent performance to DBNN in uncertainty measures, MU requires 10 forward passes. See appendix B for more details.
reduce computational overhead at the expense of predictive

---

Under review as a conference paper at ICLR 2020
6 CONCLUSION
We present a differentiable BNN (DBNN) inference with respect to input data, which is novel approximation BNN inference, to improve the computational performance of BNN inference for data streams. The derivative of DBNN predictive inference with respect to input data derives the increment of prediction when one data is newly given from the data stream. However, the inference of vanilla BNN cannot be differentiated with respect to data. To address this issue, DBNN introduce a new term that is the probability of data streams the BNN inference. Then, it approximate its prediction with histogram for nigh-dimensional vector streams. Consequently, the DBNN inference exccutes DNN only once to calculate the prediction changed by a new data from data streams. This results in order of magnitude times improvement in computational performance compared deep BNN. Experiments with semantic segmentation using real-world datasets show that the computational performance of DBNN is almost the same as that of DNN, and uncertainty is comparable to that of BNN.
REFERENCES
Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning heterogeneous distributed systems. arXiv preprint arXiv: arXiv:1603.04467 2016.
Diego Ardila, Atilla P Kiraly. Sujecth Bharadwaj, Bokyung Choi, Joshua Reicher, Lily Peng, Daniel Tse, Mozziyar Etemadi, Wenxing Ye, Greg Corrado, David P Naidich, and Shravya Shetty. End- to-end lung cancer screening with miree-dimensional deep learning on low-dose chest computed tomography. Nature Medicine, 2019.
Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight Uncertainty in Neural Networks. arXiv.org. May 2015.
Gabriel J Brostow, Julien Fauqueur, and Roberto Cipolla. Semantic object classes in video: high-definition ground truth database. Pattern Recognition Letters, 30(2):88 97, 2009.
Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance weighted autoencoders. arXiv preprint arXiv: arXiv:1509.000 1509.005/9 19,0099900 2015.
Luis Candanedo and Véronique Feldheim. Accurate occupancy detection of an office room from light, temperature, humidity and co2 measurements using statistical learning models. Energy and Buildings, 112:28-39, 2016.
Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3213-3223, 2016.
Morris H DeGroot and Stephen E Fienberg. The comparison and evaluation of forecasters. Journal of the Royal Statistical Sociery: Series (TThe Statistician). 32(1-2):12-22, 1983.
Chelsea Finn, Kelvin Xu, and Sergey Levine. Probabilistic model-agnostic meta-learning. In Advances in Neural Information Processing Systems, pp. 9516-9527, 2018.
Meire Fortunato, Charles Blundell, and Oriol Vinyals. Bayesian recurrent neural networks. arXiv preprint wxXiv:1704.027990 2017.
Hervé Frezza-Buet, Online computing of non-stationary distributions velocity fields by an accuracy controlled growing neural gas. Neural Networks, 60:203-221, 2014.
Yarin Gal and Zoubin Ghahramani. Dropout as a Bayesian Approximation - Reeresenting Model Uncertainty in Deep Learning. ICML, 2016.
Allen Gersho. On the structure of vector quantizers. IEEE Transactions on Information Theory, 28 (2):157-166, 1982.
10

---

Under review as a conference paper at ICLR 2020
Mohammed Ghesmoune, Mustapha Lebbah, and Hanene Azzag. new growing neural gas for clustering data streams. Neural Networks, 78:36-50, 2016.
Peter W Glynn. Likelihood ratio gradient estimation for stochastic systems. Communications of the ACM, 33(10):75-84, 1990.
Gray. Vector quantization. IEEE ASSP Magazine, 1(2):4 1984.
Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In Proceedings of the 34th International Conference on Machine Learning- Dearning-Volume 70, pp. 1321-1330. JMLR. org, 2017.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In The IEEE International Conference on Computer Vision (ICCV), December 2015.
José Miguel Hernández-Lobal and Ryan P Adams. Probabilistic Backpropagation for Scalable Learning of Bayesian Neural Networks. NIPS, stat.ML, 2015.
Matthew D Hoffman and Andrew Gelman. The no-u-turn sampler: adaptively setting path lengths in hamiltonian monte carlo. Journal of Machine Learning Research, 15()):1593-162, 2014.
Seong Jae Hwang. Ronak Mehta, Hyunwoo Kim, and Vikas Singh. Sampling- free uncertainty estimation in gated recurrent units with exponential families. arXiv preprint
2018.
Gregory Kahn, Adam Villaflor, Vitchyr Pong, Picter Abbeel, and Sergey Levine, Uncertainty-aware reinforcement learning for collision avoidance. arXiv preprint 170.v: 182, 2017.
Boštjan Kaluža, Violeta Mirchevska, Erik Dovgan, Mitja Luštrek, and Matjaž Gams, An agent- based approach to care in independent living. In International joint conference on ambient intelligence, pp. 177-186. Springer, 2010.
Alex Kendall and Yarin Gal. What uncertainties we need bayesian deep learning for computer vision? In Advances in neural information processing systems, pp. 5574-5584, 2017.
Alex Kendall, Vijay Badrinarayanan, and Roberto Cipolla. Bayesian segnet: Model uncertainty in deep convolutional encoder-decoder architectures for scene understanding. arXiv preprint arXiv: 1.06600 2015.
Alex Kendall, Yarin Gal, and Roberto Cipolla. Multi-task learning using uncertainty to weigh losses for scene geometry and semantics. In Proceedings of the IEEE Conference on Computer Vision and Puttern Recognition, pp. 7482-7491, 2018.
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114 2013.
Jack PC Kleijnen and Reuven Y Rubinstein. Optimization and sensitivity analysis of computer simulation models by the score function method. European Journal of Operational Research, 88 (3):413 427, 1996.
Koji Kotani, Chen Qiu, and Tadahiro Ohmi. Face recognition using vector quantization histogram method. In Proceedings. International Conference Image Processing, volume 2, pp. II-II. IEEE, 2002.
Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In Advances in Neural Information Processing Systems, pp. 6402-6413, 2017.
Tuan Anh Le, Maximilian Igl, Tom Rainforth, Tom Jin, and Frank Wood. Auto-encoding sequential monte carlo. arXiv preprint arXiv:1705 10306, 2017.
Qiang Liu and Dilin Wang. Stein variational gradient descent: A general purpose bayesian inference algorithm. In Advances In Neural Information Processing Systems, pp. 2378-2386 2016.
11

---

Under review as a conference paper at ICLR 2020
Sergey Lobov, Nadia Krilova, Innokentiy Kastalskiy, Victor Kazantsev, and Valeri Makarov. Latent factors limiting the performance of semg-interfaces. Sensors, 18(4):1122, 2018.
Chris J Maddison, John Lawson, George Tucker, Nicolas Heess, Mohammad Norouzi, Andriy Mnih, Amaud Doucet, and Yee Teh. Filtering variational objectives. In Advances in Neural Information Processing Systems, pp. 6573-6583, 2017.
Patrick McClure and Nikolaus Kriegeskorte. Representing inferential uncertainty in deep neural networks through sampling. 2016.
Mahdi Pakdaman Naeini, Gregory Cooper, and Milos Hauskrecht. Obtaining well calibrated prob- abilities using bayesian binning. In Twenty-Ninth AAAI Conference on Artificial Intelligence. 2015.
Christian A Naesseth, Scott W Linderman, Rajesh Ranganath, and David M Blei. Variational sequential monte carlo. arXiv preprint arXiv: 1ttp//7555111444 140, 2017.
Radford M Neal et al. Meme using hamiltonian dynamics. Handbook of markov chain monte carlo, 2(11):2, 2011.
Alexandru Niculescu-Mizze and Rich Caruana. Predicting good probabilities with supervised learning, In Proceedings of the 22nd international conference on Machine learning, pp. 625 632. ACM, 2005.
Ian Osband, John Aslanides, and Albin Cassirer. Randomized prior functions for deep reinforcement learning. In Advances in Neural Information Processing Systems, pp. 8617-8629, 2018.
Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer- assisted intervention, pp. 234-241. Springer, 2015.
David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwisser, loannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484, 2016.
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recogmition. arXiv preprint arXiv:1409.1556 2014.
Mattias Teye, Hossein Azizpour, and Kevin Smith. Bayesian uncertainty estimation for batch normalized deep networks. arXiv preprint /80.006500 2018
Dustin Tran, Matthew W Hoffman, Dave Moore, Christopher Suter, Srinivas Vasudevan, and Alexey Radul. Simple, distributed, and accelerated probabilistic programming. In Advances in Neural Information Processing Systems, pp. 7598-7609 2018.
Aaron van den Oord, Oriol Vinyals, et al. Neural discrete representation learning. In Advances in Neural Information Processing Systems, pp. 6306-63155 2017.
Hao Wang, SHI Xingjian, and Dit-Yan Yeung. Natural-parameter networks: A class of probabilistic neural networks. In Advances in Neural Information Processing Systems, pp. 118-126, 2016.
Yeming Wen, Paul Vicol, Jimmy Ba, Dustin Tran, and Roger Grosse. Flipout: Efficient pseudo- independent weight perturbations on mini-batches. arXiv preprins
2018.
Ronald J Williams. Simple statistical frloient algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229-255 1992.
Anqi Wu, Sebastian Nowozin, Edward Meeds, Richard Turner, José Miguel Hernández-Lobato, and Alexander I. Gaunt. Deterministic variational inference for robust bayesian neural networks. 2018.
Ye Xu, Furao Shen, and Jinxi Zhao. An incremental learning vector quantization algorithm for pattern classification. Neural Computing and Applications, 21(6): 2012.
Jaesik Yoon, Taesup Kim, Ousmane Dia, Sungwoong Kim, Yoshua Bengio, and Sungjin Ahn. Bayesian agnel-agi meta-learning. In Advances in Neural Information Processing Systems, pp. 7332-7342, 2018.
12

---

Under review as a conference paper at ICLR 2020
Table 3: Input dimensionalities (dim (z)), output dimensionalities (dim (y)), and number of training
sets (N) of dataset used in the experiments.
Dataset
dim (x)
dim
NV
Localization
4
11
148373
Occupaney
2
8143
EMG
8
8
3793345
Cam Vid
720x960x3
720x960x32
421
CityScape
512x1024x3
512x 1024x35
2975
A EXPERIMENTAL SETUP AND DATASETS
We conduct all the experiments with the Intel Xeon W-2123 Processor, 32GB memorv, and a single GeForce RTX 2080 Ti. NN models are implemented in TensorFlow (Abadi et al. 2016
Classification on Multivariate Datasets. In section 5.2 we train BNNs with Adam with constant learning rate 0.001 using ELBO loss. We set the batch size to 30. The BNN consist of 2 fully- connected layers with 50 units using Flipout estimator (Wen et al. (018). We set hyperparameters K, X, and o to 10, 1.3, and 1.0, respectively, in all OCHs of DBNN; this is the same configuration in the semantic segmentation experiment.
We use the following time-sequential real-world dataset for classification in section 5.2; Localization Data for Person Activity Dataset (Kaluža et al.) 2010), Occupancy Detection Dataset (Candanedo & Feldheim 2016), and EMG Data for Gestures Dataset (Lobov et al., (2018). there are no distinction between the test and the training set, NNs use 90% of the dataset for training and the rest for testing. NNs test the datasets time-sequential order. See table for more information about datasets.
Semantic Segmentation. In section 5.3 and appendix D
NNs are trained using categorical cross- entropy loss, with RMSprop with a constant learning rate of 0.0001 and discounting factor of 0.995. Batch size limited to because of memory limitations. In these experiments, we use U-Net (Ronneberger et al. (015)) based on VGG-16 (Simonyan & Zisserman (014). Bayesian U-Net, similar to Kendall al. (2015), contains MC dropout (Gal & Ghahramani 2016) layers behind the layers that receives the smallest imput vector sizes. The overhead of dropout layers are negligible and DBNN always uses a new dropout every time it predicts a result. To optimize the predictive performances, set hyperparameters K, X, and (() to 10, 1.3, and 1.0, respectively, in all OCHs of DU and DBNN. See appendix
C for the change in NLL with hyperparameters. To improve computational performance, OCHy executes nearest neighbor search for arg max of y with respect to the classes.
We use CamVid dataset (Brostow et al. 2009) and CityScape dataset (Cordts et al. 2016) in the semantic segmentation experiments. We feed sequential images DBNN and DU before evaluation since DU and DBNN use multiple previous images. For the Cam Vid dataset, we resized images to 720x960 pixel bilinearly from 460 pixels. Since some test sets do not have previous sequences, we use only 70 of 168 test sets in the Cam Vid dataset. For CityScape dataset, we use validation set, which was not used during training, as test set because only the video sequence corresponding to the validation set has been disclosed. See table 3 for more information about datasets.
B COMPUTATIONAL PERFORMANCE FOR NEURAL NETWORK DEPTH
Figure Jishows a trend that the execution time of MU and DBNN increases as hidden layers get deeper without changing the input and output dimensions. In this case, as in section [..2 NN consists of 50 units of fully-connected hidden layers, with input and output dimensions of 4 and 11, respectively. MU and DBNN use batches of size 30 and 1, respectively, but execution time is the same even MU uses batch size of 1. According to this figure, when the number of hidden layers is O. the execution time of DBNN is 15.116.7mm 7ms, which is 4.6ms slower than MU. This because DBNN uses two additional OCHs compared to MU. However, unlike MU, DBNN does not sample the weight in the
Code available http://aamooymaass......cccccoco
13

---

Under review as a conference paper at ICLR 2020
Execution time (ms)
100
MB
PANN
75
50
5
10
Hidden layer
Figure 3: Prediction execution time of MU and DBNN for the number of hidden layers. The execution times increase linearly as the layer increases. If the number of hidden layers is O, DBNN is slower than MU, but as the number of hidden layers increases, DBNN is faster than MU. The increase rates of execution times of MU and DBNN are 8.6ms/layer and 3. 3.5ms/layer, respectively.
1.2
1.2
12
1.1
1.0
0.9
0.9
0.9
0.9
0.8
0.8
0.7
0.7
0.2
0.4
0.6
0.8
1.0
10
12
o(
Throughput (pss)
Figure 4: NLLs of DBNN for hyperparameters K, X, and (Ø), and the NLL for throughput (from left). all figures, the NLLs of DNN and BNN are represented as blue and green dashdot horizontal lines, respectively. In the fourth figure, the throughput of DNN is represented as blue vertical dashdot line. The error is 80% confidence interval.
posterior when it predicts the result. Therefore, the increase of execution time of DBNN per layer is lower than that of MU. As result, the execution time of the MU increases by 8.6ms while that of DBNN increases by 3.5ms when one layer is added. When the number of hidden layers is 10, the execution time of MU and DBNN 98.9++20.1 ms and 49.0+:23. 23.6ms, respectively-DDNN 2.02x faster than MU.
C PREDICTIVE PERFORMANCE FOR HYPERPARAMETERS
DBNN has three hyperparameters; K, X, and (Φ)) in the input and output OCHs. The first third figures in fig. 4 shows how NI.I changes over the variuos hyperparameters of the output OCH in semantic segmentation. As shown in this figure, as K increases, NLL decreases, and the NLL stagnates when K goes over 15. The lower the X, the lower the NLL, until 0.7. The higher the (Ø). the lower the NLL. The effect of hyperparameters of the input OCH the similar trend as that the output OCH.
With high and and low DBNN maintains more codevectors recent frames in video sequence and obtains more accurate model uncertainty using more codevectors. As a result, at high K and low DBNN exhibits lower NLLL. When K and get lower than a certain point (A = 0.7 this example), however, the data uncertainty too high to estimate results. NLL is minimized when model uncertainty and data uncertainty are balanced, On the other hand, (Ø) is low, DBNN mostly adjusts the weights of codevectors and occasionally adds new codevectors. This results in the DBNN becoming inaccurate, but the calculation is faster.
Accuracy Throughput Trade-off. If (d) is less than 1.0, DBNN occasionally adds new code- vector to the input OCH and executes NN, at the rate of ( on average. Since NN occupies the most of the execution time of DBNN, throughput decreases when ( decreases. The fourth figure in fig. 4 shows the changes in throughput and NLL as (0) changes. According to this figure, DBNN increase throughput up I 12fps when it achieves same NI.I DNN. In this case, DBNN is 2x
14

---

Under review as a conference paper at ICLR 2020
Table Computational and predictive performance with semantic segmentation on the CityScape dataset.
Method
Thr (fps)
Acc
Acc-90
Unc-90
IoU
IoU-90
NLL
Cov-90
DNN
7.09
89.3
93.8
55.3
61.3
72.6
0.569
89.7
MU
0.236
89.2
95.9
74.8
61.5
79.3
0.382
84.2
DU
5.88
87.5
94.3
67.5
56.9
69.8
0.567
82.8
DBNN
5.89
87.2
95.4
76.8
56.4
72.0
0.452
78.2
faster than DNN. Conversely, DBNN can update batch of or more sizes instead of one. In this case, throughput of DBNN decreases but NLL increases (not shown in this figure).
D EXTENDED INFORMATIONS OF SEMANTIC SEGMENTATION EXPERIMENT
shows the performance with semantic segmentation on the Cim dataset. This section shows the performance on the CityScape dataset, another real-world road scene video sequence. Furthermore, we analyze the predictive performances of DNN, MU, DU, and DBNN in more detail.
Section 5.3
Predictive Performance of Models for Datasets. Table 4 shows the computational and predic- tive performance of various methods on the CityScape dataset. We measure the followings as in section 5.3) throughput (Thr), global pixel accuracy (Acc), accuracy for 90% certain pixels (Acc-90), the probability that the pixel is not 90% certain pixel when prediction is incorrect (Unc-90), mean intersection over unit (IoU), IoU for 90% certain pixels (IoU-90), negative lig-liieldhood (NLL), and the ratio of 90% certain pixels (Cov-90).
Table implies the followings: First, The computational performance of DNN and DBNN relatively comparable, and that of DBNN is significantly higher than that of MU. Second, the predictive performances of DU and DBNN for all pixels is lower than that of DNN and BNN, respectively. Third, predictive performances for certain pixels and other measures for uncertainties of MU and DBNN are comparable. These results are consistent with the result of section 5.3
Extended Analysis of Confidence and Accuracy. Figure 5 shows confidence histograms (Guo ct al., 2017) and reliability diagrams (DeGroot & Fienberg 1983 Niculeseu- & Caruana 2005
Nacini al., 2015; Guo et al.) 2017) of U-Net on the Cam Vid dataset. A confidence histogram shows proportion of samples for confidence as a histogram. The reliability diagram is a histogram of
accuracy for confidence. We also measure the Expected Calibration Error (ECE) (Naeini et al. 2015
Guo et al. 2017). which is defined as follows for the reliability diagram:
[Bdl M
ECE- = Σ
acce BB) - -conf( B,)l
(14)
where |B, is the number of samples in bin B,, M - -. Bel, acc( (B;) B:) is mean accuracy of samples B,, and conf( mean confidence of samples in B,. ECE stands for the difference between confidence and accuracy. ECEs of DNN, MU, DU, and DBNN are 7.43%, 4.27%, 5.86%, and 5.13%, respectively.
As shown in fig. 5a DNN is overconfident and miscalibrated; its confidence is generally high and there is significant discrepancy between confidence and accuracy. On the other hand, MU is under- confident and well-calibrated. DBNN is more under-confident than MU, and the confidence of DBNN calibrated relatively comparable to that of MU. Also, DU calibrates the confidence of DNN. In conclusion, the confidence of DBNN is well-calibrated, whild the confidence of the DNN is relatively unreliabl. These are consistent with the results of the predictive performance.
Qualitative Results. Figure Gssoos the qualitative comparison of the predictions for each method. According to this figure, DNN is overeonfident, i.c., confidence is generally high, and uncertainty mostly distributed at the boundaries the classified chunks. Even when DNN generates wrong prediction, the confidence level is very high. The uncertainty of MU is distributed on the boundaries
15

---

Under review as a conference paper at ICLR 2020
Prequenry (%)
Prequency (%6
(%)
Frequency
50
100
25
25
Confidence (%)
Confidence (%)
Confidence (%6
Confidence (%)
100
Accuracy (%)
80-
Accuracy (%)
Accuracy (%6
(%6)
60-
40-
40
40
20
30
0
25
50
75
100
25
50
75
100
0
25
20
75
100
25
50
75
100
Confidence (%)
Confidence (%)
Confidence (%)
Confidence (%)
(a) DNN
(b) MU
(c) DU
(d) DBNN
Figure 5: Confidence histograms and reliability diagrams U-Net on the Cam Vid dataset. The top is the confidence histogram and the bottom is the the reliability histogram. The black dotted lines the reliability diagram show the accuracy we expect for each confidence. There large gap between confidence and accuracy in the reliability diagram of the DNN, which means that it is poorly calibrated. On the other hand, MU relatively well-calibrated.
(a) Input image
(b) Ground truth
(0) DNN
MU
(e) DU
( DBNN
Figure 6: Qualitative results on the CamVid dataset for each method. In figs. 6c to the first row the predictive result and the second row is the predictive confidence. whiter background corresponds to higher confidence.
16

---

Under review as a conference paper at ICLR 2020
Table Computational and predictive performance of U-Net with semantic segmentation for each method and number of forward passes (Ny) on Cam Vid dataset.
Method
Ng
Thr (fps)
Acc
Acc-90
Une-90 90
IoU
IoU-90
NLL
Cov-90
6.06
85.8
89.9
40.1
59.8
65.4
1.00
90.0
2
2.97
86.1
91.3
50.7
60.3
67.6
0.892
87.0
5
1.16
86.3
92.0
56.6
60.7
68.9
0.827
84.9
MU
10
0,580
86.4
92.4
59.5
60.9
69.6
0.768
84.3
30
0.189
86.4
93.0
60.1
61.0
69.9
0.728
84.2
50
0.115
86.4
93.0
60.3
61.0
70.1
0.721
84.2
DBNN 1.0
5.22
85.8
92.3
63.0
58.9
68.6
0.826
80.4
as in the case of the DNN, but is also distributed in the misclassified areas. The uncertainty of DU differs from that of DNN. First, DU is under-confident compared DNN. Second, although DU does not identify all of the misclassifications compared to MU, it sometimes estimates high uncertainty in the misclassified areas. The uncertainty of DBNN is similar the MU we expected.
PERFORMANCE OF BNN FOR NUMBER OF FORWARD PASSES
BNNs, i.e. MUs, in section 5.3 and appendix contain MC dropout Gal & Ghahramani 2016 layers and require multiple forward passes to predict result. Table shows the computational and predictive performance the Bayesian U-Net for the number of forward passes on the Cam Vid dataset.
According to table the predictive performance of MU improves up to 30 forward passes. However, there is little difference between the predictive performance for 30 forward passes and for 50 forward passes. MU requires at least forward passes to get the best predictive performance, so we execute 30 predictive inference in section 5.3 and appendix D
Meanwhile, to achieve the same uncertainty measures as DBNN, MU requires 10 forward passes. In particular, Unc-90 of DBNN has always outperformed that of MU. For the improvement rate from Acc and loU to Acc-90 and loU-90, the uncertainty of DBNN the same as that of MU with 30 forward passes.
17


Reviews:
[{"review_id": "SyeZuXesFr", "reviewer": "AnonReviewer1", "summary": "", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "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": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "Summary of the Paper:\n  \nThis paper describes a method for training Bayesian neural networks in the context of stream data. The method proposed is based on using a quantization approach with some techniques to estimate the change in probability distributions. The proposed approach is compared on some tasks, including real and synthetic datasets.\n\nDetailed comments:\n\nThe paper needs to improve the writing. For example, the sentence \"it has been unable to estimate the uncertainty of the predictions until recently\" sounds awkward.\n\nThe authors have to better explain the features and challenges of stream data.\n\nThe paper is unclear. There are several steps of the proposed method that are not well described.\n\nHow is the posterior distribution of the weights computed?\n\nThe notation x_0 and x_1 for the test point and the NN weights is confusing.\n\nFigure 2 is not clear.\n\nThe description of the baselines the authors compare with is not clear.\n\nWhat do you mean by degenerated in section 5.1.?\n\nThe paper is missing a related work section describing state of the art methods to address stream data.\n\nIt seems the real experiments of section 5.1. only consider one baseline MU. I believe this is insufficient.\n\nIn table 2 the benefits of the proposed approach are not very significant.\n\nThe experiments are missing error bars. It is not possible to extract conclusions of significance without them.\n\nMy overall impression is that the paper needs to better explain the approach followed and improve the notation to facilitate the reading. I believe that this paper needs for work and is not yet suitable for acceptance.\n", "extra_scores": {"experience_assessment": "I have read many papers in this area.", "review_assessment:_checking_correctness_of_derivations_and_theory": "I did not assess the derivations or theory.", "review_assessment:_checking_correctness_of_experiments": "I did not assess the experiments.", "review_assessment:_thoroughness_in_paper_reading": "I made a quick assessment of this paper."}, "extra_text": {}}, {"review_id": "Hkg457uTtS", "reviewer": "AnonReviewer2", "summary": "", "questions": "", "limitations": "", "rating": 8, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "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": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "The paper proposes a differentiable Bayesian neural network. Traditional BNN can model the model uncertainty and data uncertainty via adding a prior to the weight and assuming a Gaussian likelihood for the output y. However, it's slow in practice since evaluating the loss function of BNN involves multiple runs over the entire network. Also when the input data is non-stationary, the output function can not be differentiated with respect to the input data. The paper proposes to use an online code vector histogram (OCH) method attached to the input and output of a classical DNN. Input OCH captures the distribution of both input data and network weights, and the output OCH captures the distribution of the predictions. Since these OCHs are differentiable, the proposed DBNN model can be used for streaming input data with time-variant distributions. \n\nI think the idea is interesting and novel. It explores a different way of modeling distributions with DNN. Instead of adding priors, DBNN relies on histograms, which is usually used to describe distributions for discrete observed input data. So the paper is well-motivated. \n\n1. The paper needs more literature review in the area of data streaming. Papers, such as [1], have proposed to use a vector quantization process that can be applied online to a stream of inputs. This paper introduces the vector quantization but doesn't mention the use of it in streaming data in related work, which kind of blurs the contribution a bit. Moreover, it would be helpful for readers to learn about useful techniques for streaming data from this paper. \n\n[1] Hervé Frezza-Buet. Online computing of non-stationary distributions velocity fields by an accuracy controlled growing neural gas\n\n2. I think the paper might need a bit more explanation about codevector, since it's not a very well-acknowledged concept in this field. The main issue for me to understand it is how to get these codevectors. When DBNN deals with streaming data and starts from no input, is the set of codevector empty at the beginning? The input data points are accumulated as codevectors? I hope the authors could clarify this process a bit more. \n\n3. Given the insufficient understanding of codevector, figure 2 is a bit hard to read. 1) (a)-(d) are figures for x0 at t=0, which is not time-variant. 2) what are these codevectors picked. 3) It seems that the codevectors are out of the regime of the distribution of y. But according to algorithm 2, y_*<-T(c_*), would that be a problem? I think (a)-(d) are informative but not straightforward to read. The authors need to put more text to explain these figures, since this simulated example can help readers to understand what is codevector and how it helps for uncertainty estimation. \n\nOverall I think the paper is well-written. The idea is novel and practical in the scenario of DNN. I would vote for accept. \n\n", "extra_scores": {"experience_assessment": "I have published one or two papers in this area.", "review_assessment:_thoroughness_in_paper_reading": "I read the paper at least twice and used my best judgement in assessing the paper.", "review_assessment:_checking_correctness_of_experiments": "I assessed the sensibility of the experiments.", "review_assessment:_checking_correctness_of_derivations_and_theory": "I assessed the sensibility of the derivations and theory."}, "extra_text": {}}, {"review_id": "HJeDxzgnKS", "reviewer": "AnonReviewer3", "summary": "", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "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": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "This paper proposed differentiable Bayesian neural networks (DBNN) to speed up inference in an online setting. The idea is to combine online vector quantization with Bayesian neural networks (BNN), so that only incremental computation is needed for a new data point.\n\nIt seems the idea of online codevector histogram, or online vector histogram, is not new, which is not surprising since the original codevector histogram work is from decades ago (1982). A quick search shows several related work in this domain, e.g., ‘An Online Incremental Learning Vector Quantization’. It would be better if the authors could clarify the differences if they want to claim the contribution.\n\nOne of my major concerns is the fairness in terms of comparison to BNN approaches. For example, in Table 2, BNN (shown as MU) is significantly slower than DU/DBNN and DNN. The authors mentioned that this is because MU predicts results for 10 batches of size 3, and therefore 30 times slower. Since DU and DBNN also uses MC-dropout, why is this not an issue for DU/DBNN. Such large overhead is also inconsistent with the description in Section 5.3, saying that the ‘overhead of sampling weights is negligible’. Could the authors elaborate on this?\n\nA related problem for clarification: it is mentioned before Section 5.1 that 30 samples are drawn from the BNN’s posterior. Do you mean 30 feedforward passes of MC-dropout, as done in the MC-dropout paper? Also, the authors should have made it clear that they are using MC-dropout as a BNN.\n\nIn the introduction, the authors motivate the proposed DBNN by saying that BNN needs dozens of samples from weight distributions and therefore is rather inefficient. However, there are a lot of modern BNN that are both sampling-free and differentiable. For example, natural-parameter networks (NPN) parameterize both the weight and neuron distributions using natural parameters. Even the earlier work, probabilistic BP (PBP), as cited in the current paper, also counts as sampling-free. The claim of ‘being differentiable’ without acknowledging prior work is rather misleading.\n\nThe point above is also related to the MU baseline in Table 2. The issue of needing 30 passes can be readily resolved if modern BNN such as NPN (or PBP), which takes only one pass, is used.\n\nThe organization could be improved to make the paper more readable. It would be better if the problem setting of online inference is introduced at the beginning, followed by the overview of DBNN and then the OCH details. Otherwise, it is not clear what the focus of DBNN is, until Section 4.\n\nMinor:\n\nIt might be better to denote the weight as ‘w’ rather than ‘x’, to avoid confusion.\n", "extra_scores": {"experience_assessment": "I have published in this field for several years.", "review_assessment:_checking_correctness_of_derivations_and_theory": "I assessed the sensibility of the derivations and theory.", "review_assessment:_checking_correctness_of_experiments": "I carefully checked the experiments.", "review_assessment:_thoroughness_in_paper_reading": "I read the paper thoroughly."}, "extra_text": {}}]

Author rebuttal:

Meta-review: The main contribution is a Bayesian neural net algorithm which saves computation at test time using a vector quantization approximation. The reviewers are on the fence about the paper. I find the exposition somewhat hard to follow. In terms of evaluation, they demonstrate similar performance to various BNN architectures which require Monte Carlo sampling. But there have been lots of BNN algorithms that don't require sampling (e.g. PBP, Bayesian dark knowledge, MacKay's delta approximation), so it seems important to compare to these. I think there may be promising ideas here, but the paper needs a bit more work before it is to be published at a venue such as ICLR.

Decision: Reject