Aleatoric Uncertainty for Errors-in-Variables Models in Deep Regression

A Bayesian treatment of deep learning allows for the computation of uncertainties associated with the predictions of deep neural networks. We show how the concept of Errors-in-Variables can be used in Bayesian deep regression to also account for the uncertainty associated with the input of the employed neural network. The presented approach thereby exploits a relevant, but generally overlooked, source of uncertainty and yields a decomposition of the predictive uncertainty into an aleatoric and epistemic part that is more complete and, in many cases, more consistent from a statistical perspective. We discuss the approach along various simulated and real examples and observe that using an Errors-in-Variables model leads to an increase in the uncertainty while preserving the prediction performance of models without Errors-in-Variables. For examples with known regression function we observe that this ground truth is substantially better covered by the Errors-in-Variables model, indicating that the presented approach leads to a more reliable uncertainty estimation.


Introduction
In recent years deep neural networks have proven to be a useful and powerful tool in various tasks, ranging from medical applications [19,20], over : Illustration of the Errors-in-Variables (EiV) approach presented in this work and the method without EiV (non-EiV).The EiV model introduces an additional uncertainty to the input of the network that is aleatoric and, in contrast to the one linked with y, in many cases more coherent with the classical statistical view on uncertainty, cf.Section 1.The network illustration was created using [22].language processing [31,15] to computer vision [42,16], robotics [34,27,24] and autonomous driving [9,13].In many applications, especially those in which reliability and safety are crucial [30,25,39], it is valuable, if not indispensable, to know the uncertainty behind a prediction of a neural network.This work focuses on the uncertainty evaluation for neural networks that are trained for regression tasks [6,16,21,28,36,26].Regression problems arise in a variety of areas [20,12,23,29] and are typically given by a model f θ , parametrized by θ, that links input data x to outputs y : where ε y ∼ N (0, σ 2 y ) is some normally distributed noise1 that disturbs the true label (i.e., value of the regression function) f θ (x) corresponding to x.
In deep regression f θ is a neural network with parameters θ.Training this neural network means to infer a value for θ from pairs (x, y) contained in a training set D. Uncertainties for predictions of a trained neural network are usually categorized using two different terms.Epistemic uncertainty arises from the uncertainty about the trained model, that is about θ in the notation of (1).In a Bayesian approach, as in this work, this uncertainty is described by the posterior π(θ|D), which is the distribution of θ conditional on the data D [2,6,17].This type of uncertainty vanishes as the number of observations tends to infinity, as follows for instance from the Bernsteinvon Mises theorem.Aleatoric uncertainty, on the other hand, describes an uncertainty that is inherent to the data and cannot be reduced even with an infinite training set.In the context of regression this corresponds to a noise such as ε y in (1) and might be measured, for instance, using σ y .In deep learning, the aleatoric uncertainty expressed by σ y is often considered as important and is regarded as measuring inherent, irreducible label ambiguity [3,10,14,16].However, such a point of view no longer applies in those regression problems where the goal is to predict the regression function f θ (x * ) at some (observed) x * .In this case only the epistemic uncertainty about the network's parameter θ remains which, in principle, could become arbitrarily small as the training set grows.However, in most cases x * = ζ * + ε x contains some noise ε x as well, and one is actually interested in the value of f θ (ζ * ).The uncertainty caused by the fact that x * , and not ζ * , is observed then constitutes an aleatoric part of the uncertainty for the prediction of f θ (ζ * ) that is not covered by σ y nor by the uncertainty of θ.
We here attempt to provide a more consistent view on these issues and, we argue, a more accurate depiction.In many cases, it is a too crude assumption to presume that, while y is deranged by noise, x is not.Standard estimation procedures such as maximum likelihood or nonlinear least-squares become biased for a regression model of the form (1) when x is observed with noise [5].Furthermore, a separate quantification of the aleatoric part of the uncertainty due to the noise of the input is not possible in a model like (1), since the variance σ 2 y accounts for noise in the output.Following the idea of Errorsin-Variables (EiV), a quite classical concept in statistics [5], we resolve these issues by changing (1) to where ζ denotes the true, but unknown, input value.Besides allowing for noisy input data, model (2) allows the aleatoric uncertainty to be treated in a manner that is more coherent from a statistical perspective.Throughout this work we will refer to (2) as the EiV model and to (1) as the non-EiV model.An illustration of both approaches is given by Figure 1.
The uncertainty that arises in the EiV model for ζ given x is an aleatoric uncertainty that must be taken into account whenever predicting f θ (ζ).It explains why there can be an uncertainty of the prediction even if there is no remaining epistemic uncertainty, without forcing this role on the output noise.
We will approach (2) from a Bayesian point of view, which is a consistent way of describing uncertainty but one that involves the challenge of sampling from a high dimensional posterior on θ.To overcome this obstacle, we build on the idea to use variational inference, as e.g. in [2,6,7,17].The main contributions of this work can be summarized as follows: • We show how variational inference for Bayesian neural networks can be combined with the concept of an uncertain input to construct a scalable Errors-in-Variables model for Bayesian deep learning.
• We show that for cases where the input is indeed uncertain, the treatment via an EiV model leads to a substantially improved coverage of the ground truth.
While the presented approach is in principle agnostic with regard to the specific form of the variational distribution, the results in Section 3 below were produced with the variational distribution induced by Monte Carlo dropout [6].Studying how well other methods perform under EiV could be an interesting subject of future work.

Existing work and structure of the article
Errors-in-Variables is a statistical concept that has existed for decades [8].In [40,41,1,38,37] the authors consider a non-Bayesian Errors-in-Variables framework for the training of neural networks, without the quantification of uncertainties.In [43,44,33] the authors use a Laplace approximation to derive uncertainties for a neural network with uncertain inputs.Their approach requires however the computation of the inverse of the Hessian of the model w.r.t.network parameters which is computationally prohibitive for most modern neural networks.The same is true for methods based on Markov Chain Monte Carlo sampling [48,46].In [45] input uncertainty is treated via a Gaussian process approximation to a neural network, which however requires, in theory, an infinite width of the network.
Many of the methods in the deep learning literature for uncertainty quantification that scale well with the number of parameters rely on variational inference [2,6,7,17,4,47].In this work, we build on the idea to use variational inference to obtain a scalable method for uncertainty quantification in deep learning, but elaborate this idea considerably by allowing for an uncertain input.
The article is structured as follows: in Section 2, we discuss the generic approach presented in this work, give a proposal for the underlying priors and discuss some details useful for implementation.In Section 3, we will discuss the results of some numerical experiments.The focus will be on simulated models with a known ground truth that allow the inferential behavior of the EiV model to be quantitatively assessed.Finally, we provide a discussion and some conclusions.

An EiV model for deep learning
Suppose we have N data points D = {(x 1 , y 1 ), . . ., (x N , y N )} ⊆ R nx × R ny that we model via with normally distributed ε x,i ∼ N (0, σ 2 x I nx×nx ), ε y,i ∼ N (0, σ 2 y I ny×ny ) and where the parameters θ ∈ R p and ζ 1 , . . ., ζ N ∈ R nx are unknown.In this work, we will, similar to [40,41], fix σ x prior to training.For the output variance σ y we will use an initial estimate, that is updated during training.The function f θ is a neural network.The ζ i ought to be considered as the true, but unknown, inputs we would like to feed to f θ .Given ζ = (ζ 1 , . . ., ζ N ), θ and σ 2 = (σ 2 x , σ 2 y ), the likelihood for the data D under (3) is y I ny×ny ).While θ will be considered as the parameters of interest, the components of ζ will be considered as nuisance parameters.Fixing a prior (cf.Section 2.1 below) we have, via Bayes' theorem, where π(D|σ2 ) = dθ π(θ)π(D|θ, σ 2 ) and, due to (4) and Bayes' theorem, x ).As we do not expect π(θ|D, σ 2 ) to be feasible, we approximate it via a variational distribution with a variational parameter φ.In variational inference, the distance in (8) is measured via the Kullback-Leibler divergence D KL (q φ (θ) π(θ|D, σ 2 )).As we argue in Appendix A, to find a φ that minimizes this divergence, we can use backpropagation on the following loss function where the minibatches {(x i 1 , y i 1 ), . . ., x I nx×nx ) are re-drawn in each optimization step.We used throughout this work M = 1 for training and M = 100 for evaluation and L = 5 for both, training and evaluation.
Note that the way θ m is sampled in (9) differs slightly from the way this is done in approaches such as [6,7,17], as θ m is identical for all inputs ζ im,l with the same m. 2 The loss function in ( 13) and ( 9) is the backbone of the EiV algorithm.To make the first term in (9) numerically stable and suitable for backpropagation, the common "logsumexp" function can be used.Before we can use (9) for training, however, we must fix the prior distributions and the variational distribution q φ .

Choosing π(θ), π(ζ) and q φ
Choosing π(θ) is rather standard in the literature on Bayesian neural networks and complies with choosing a regularization for θ, cf.[2].We will here use the common choice of a centered normal distribution π(θ) = N (θ|0, λ 2 θ I p×p ).For Bernoulli dropout [6] with rate p the term 1 N D KL (q φ (θ) π(θ)) in ( 9) then equals, up to a constant, The prior π(ζ), used for each individual ζ i in (5), is more specific to the EiV approach and influences (9) through the posterior π(ζ|x, σ 2 x I nx×nx ) from which we draw Monte Carlo samples for the first term.In this work we use an improper prior for ζ which leads to the posterior π(ζ|x, σ 2 x ) = N (ζ|x, σ 2 x I nx×nx ), cf.Lemma 1 in the Appendix A.3, that formalizes the variational inference applied in this work.For a proper, normally distributed π(ζ) the according posterior π(ζ|x, σ 2 x I nx×nx ) is given in the Appendix A.2.The choice of q φ is only limited by three requirements.First, we need to be able to sample from q φ .Second, we need an expression for the regularizer D KL (q φ (θ) π(θ)) -either explicitly or via Monte Carlo sampling [18].Finally, we have to be able to optimize the arising loss function L M.C. (φ) w.r.t.φ for example via the reparametrization trick [18].Merely for convenience we will restrict ourselves in this work to the popular choice of Monte Carlo dropout [6] where q φ arises from randomly dropping nodes of the network with some probability and where φ simply coincides with the network parameters.However, let us emphasize that the algorithm described in this work is by no means restricted to this particular choice but is usable for any q φ for which the conditions above apply.
The full algorithm used for training the neural networks in this work is summarized in Algorithm 1. Note, that we regularly update σ y during training to match the RMSE on the training data.

A new view on aleatoric uncertainty
Once the neural network has been trained the learned φ can be used to obtain uncertainties and predictions for a new x * .Namely, we draw x ) and θ from q φ (θ) and use the distribution of the regression curve f θ (ζ * ).To express predictions and uncertainties, we can Choose initial φ and σ y ; for j in 1, ..., n train do for minibatches Set σ y to RMSE on training data; end end then either use quantiles or moments.For the latter, we set By distinguishing between ζ * and x * the EiV model introduces a new concept of prediction, namely m in (10), that differs from the non-EiV model.The uncertainty u(x * ) in ( 10) can be split into (law of total variance) The detailed algorithm on how to compute m(x * ) and u(x * ) is shown in Algorithm 2. The "classical" treatment of epistemic and aleatoric uncertainty, which is based on the posterior predictive distribution and discussed in Section 1, can be easily combined with the above.For the posterior predictive distribution π(y * |x * , D, σ 2 ), we draw, for each sample f θ (ζ * ), labels y * from N (f θ (ζ * ), σ 2 y I ny×ny ).The variance of this distribution, also known as the Algorithm 2: Prediction and uncertainty for a trained EiV model Data: total uncertainty, can then be split into and is therefore simply augmented by an extra term σ 2 y .For σ x 0 the aleatoric part of u(x * ) in (11) vanishes, u(x * ) coincides with the epistemic uncertainty and ( 12) morphs into the conventional split of aleatoric and epistemic uncertainty.
The usage of the aleatoric part σ 2 y that appears in (12) as an uncertainty is only justified if one is really interested in the uncertainty of a noise-perturbed label y * given x * .If one is actually interested in the value of the regression function f θ (ζ * ) (EiV) or f θ (x * ) (non-EiV), it is inappropriate to take the second term in (12) into account.By introducing an additional aleatoric uncertainty in (11), the EiV model introduces an aleatoric uncertainty that is still present in such cases.In summary, the usage of the second term of (11) as an additional aleatoric uncertainty has several advantages • This aleatoric uncertainty is still available if one is interested in the prediction f θ (ζ) and will, in particular, not vanish for large training data sets.
• It exploits a source of uncertainty that is not present in the non-EiV model and thus gives a more complete description.
• As we will observe in Section 3 below, this enhanced uncertainty is necessary to achieve a sufficient coverage of the ground truth when the input to the neural network is uncertain.

Experiments
In this section, we compare the performance of EiV models with corresponding non-EiV models on various data sets.To this end we use • 4 simulated data sets with known ground truth g : ζ → g(ζ).For illustration purposes all of the chosen problems are one-dimensional in in-and output.We study three polynomial problems: a linear, a quadratic and a cubic model [11,21].We will refer to these data sets as linear, quadratic and cubic in the following.In addition we study a sinusoidal problem, as in [2], to which we will refer as sine.In contrast to [11,21,2] we used noisy modifications of the input variables for training as in (2).Details on the problems can be found in Appendix B.
• 9 real data sets, with an unknown ground truth, that were used before, e.g. in [11,6,21].All real data sets were normalized to have mean 0 and standard deviation 1 in each feature and label dimension.
For all data sets we trained fully connected neural networks with 4 hidden layers and dropout layers after each hidden layer.The detailed architecture is sketched in the Appendix C. We used two different loss functions: the standard MC dropout loss function from [6] and the EiV modification we proposed in Section 2. For each loss function and each data set, we trained 10 different neural networks using 10 different random seeds 4 .For both approaches, EiV and non-EiV, we used the same training hyperparameters such as epoch number and learning rate.These parameters differ between data sets and are listed in Table 2 in the appendix.In particular, we used different values of σ x , once more listed in Table 2.For the simulated data set we used the same value than the one that was used for generating the data.For all real data sets we used σ x = 0.05, except for the "naval propulsion" data set where we found that that this choice leads to an intolerably high root mean squared error (RMSE), so that we chose σ x = 0.025 instead.For further details on the training we refer to Section C in the appendix.
Figure 2a   Figure 2a shows a pattern which we observe for all data sets studied in this work: the predictions of both models are similar, but the uncertainties differ markedly.Moreover, the ground truth (black line) is substantially better covered by the uncertainties of the EiV model.To get better insight in these observations, Figure 2b shows a cut-out of Figure 2a together with a single choice of ζ (vertical dotted black line) and the corresponding draw x ∼ p(x|ζ, σ 2 x ) (vertical dashed gray line) used for the prediction.The x ), for all simulated data sets in this work: linear (gray), quadratic (orange), cubic (green) and sine (purple).The dotted black line marks the diagonal.two horizontal lines show the values of g(ζ) (black dotted) and g(x) (gray dashed).Apparently the prediction of both, the EiV and non-EiV model, is considerably closer to g(x) than to g(ζ) .The epistemic, i.e. parameter, uncertainty of the non-EiV model is not large enough to account for the deviation g(ζ)−g(x) and does therefore not cover the ground truth g(ζ).Through π(ζ|x) = N (ζ|x, σ 2 x I nx×nx ) (cf.Section 2.1) the EiV model accounts for the uncertainty about ζ and thereby yields an uncertainty u(x) that covers the ground truth g(ζ).
Figure 3 shows that this sort of behavior is systematic.For each simulated data set, linear (gray), quadratic (orange), cubic (green) and sine (purple), and their corresponding ground truth function g we drew 200 test ζ and corresponding x ∼ p(x|ζ, σ 2 x ) and computed the deviation of the prediction of the EiV (marker +) and the non-EiV model (marker ×) from g(ζ) (x-axis) and g(x) (y-axis) 5 .For all considered data sets, most of the points are located below the diagonal (dashed black line).In other words, for the majority of pairs (x, ζ) the prediction of both models, EiV and non-EiV, is closer to g(x)  for three simulated data sets, together with their uncertainties (times 1.96) depicted by the red (EiV) and blue (non-EiV) area.The used data sets are the quadratic (left), cubic (middle) and sine (right) data set, described in Section 3. The corresponding ground truth is given by the black solid line.than to g(ζ).As g(x) usually differs from the ground truth g(ζ) this leads to an error.
We already saw in Figure 2 that for the linear data set this error is not sufficiently covered by the non-EiV model but is well covered by the EiV approach.Figure 4 shows that this is also true for the other simulated data sets considered in this work.We observe, once more, that the predictions of both models are quite similar whereas the uncertainty is substantially increased for the EiV model.The ground truth g : ζ → g(ζ) for all three data sets (black solid line) is substantially better covered by the EiV model.We will give full range coverages for all four simulated data sets in Figure 6 below and observe that they match well the theoretical expectation.
Figure 5 shows the performance of the EiV and non-EiV model for all data sets considered in this work, including the 9 real data sets mentioned above.Figure 5a shows the root-mean-squared-error6 (RMSE) of the EiV models (red) and non-EiV models (blue).Again, all results were averaged over 10 training runs.The corresponding standard errors (of the mean) are marked by the small bars surrounding the markers.We observe, with the only exception of the naval data set, an almost identical RMSE for both models.This is in consistence with the observation from Figure 2 and 4 where the predictions of both models, and thus the RMSE, are pretty similar.Figure 5b  shows the coverage of the labels y within the test set by the total uncertainty (times 1.96) of both models.The vertical dashed line shows 0.95, which is the value one would expect for a normal distribution.Both models, EiV and non-EiV, show similar coverages which are close to this optimal value.When looking at the coverage by u as in (10) (for EiV) and the epistemic uncertainty (for non-EiV) we see, however, a substantial difference between both models.As in Figure 2 and 4, we observe a substantially increased coverage through introducing Errors-in-Variables.While this backs our proposed new view on the impact of aleatoric input uncertainty -explaining some of the error via an aleatoric input uncertainty and less by the aleatoric output uncertainty -Figure 6a does not allow for a judgment which of the two models is the better description of "reality", as we have no access to an optimal coverage value as in Figure 5b.
To allow for such a judgment we have to restrict ourselves, once more, to those cases where we have access to the ground truth g : ζ → g(ζ), in other words to the simulated data sets.Figure 6a shows the coverage of the ground truth, that is the values g(ζ), for the test points of the 4 simulated data sets, that are covered by (an interval around the estimate of width) 1.96 times the epistemic uncertainty (for non-EiV, in blue) or u (for EiV, in red).The optimal value of 0.95 is indicated by the dashed, black line.The coverage of the ground truth for various intervals, determined by q as described in Section 3. EiV coverages are depicted by solid lines, whereas the non-EiV coverages are depicted by dashed lines.In theory, the coverages should coincide with q, shown by the black, dotted diagonal.
In addition, we plotted the coverage of a Bayesian regression model (black) with an noninformative prior and a regression function based on the g used for generating the data [36], cf.Appendix B.1 for details.Results were, once more, averaged over 10 training runs with standard errors plotted by the bars next to the markers.We observe that for all 4 data sets, the EiV approach yields a coverage of the ground truth that is far closer to the optimal value of 0.95 than the coverage achieved by the non-EiV model and the Bayesian regression model based on g.The insufficient coverage of the latter reveals that the low coverage of the non-EiV model is not based on a model misfit but really on an underestimated uncertainty: for both, the non-EiV model and the g based model, the estimated uncertainty is not sufficient to cover the error that arises from the fact that we can only use x and not ζ as an input.
One might argue that the better coverage of the EiV model could not root in a better description of "reality" by the EiV model but solely in the fact that the additional aleatoric input uncertainty simply raises the coverage closer to the maximal coverage of 1.0 and that 0.95 is close to the latter.Figure 6b shows that this is not the case.For various values of q between 0 and 1 we computed the corresponding multiple of the epistemic uncertainty (for non-EiV) and u (for EiV) that should, in theory, lead to a coverage of q.On the ordinate we plotted the actual coverage of the two methods for the 4 simulated data sets.The results for the EiV method (solid lines) and the non-EiV methods (dashed) were averaged over the 10 training runs.The shaded area depicts the corresponding standard error.For all values of q we observe that the EiV model is substantially closer to the theoretical value of q, depicted by the diagonal (dotted, black).This indicates that the uncertainty of the EiV model describes the error of its prediction far more reliable.
Let us summarize our observations: • EiV and non-EiV yield comparable predictions and thus show a comparable RMSE for both, simulated and real, data sets.The coverage of noisy labels through the total uncertainty is also comparable for both models and close to the optimal value.
• Using EiV leads to an increased coverage of both, the ground truth and noisy labels, when not including the aleatoric output uncertainty.
• This indicates that EiV relies less on the aleatoric output uncertainty to explain its error.This is achieved by introducing an aleatoric input uncertainty.
• In cases where we have access to the ground truth the increase in coverage of the ground truth by the EiV model matches substantially better the theoretical expectation and is thus a more reliable description of the problem.

Discussion and outlook
This article studies the effect of using an EiV model in Bayesian deep learning.As a posterior distribution for the true (but usually unknown) input ζ we derive in Section 2 the posterior distribution π(ζ|x) = N (ζ|x, σ 2 x I nx×nx ) which, loosely speaking, takes the observed x as an estimate for ζ but equips it with an uncertainty.In [40,41] the authors used a non-Bayesian Errors-in-Variables approach and constructed a guess on ζ via updating it through backpropagation.They observe that this reduces the bias of the estimated network parameters, at least if repeated measurements of x for each ζ are available (which is rarely the case for most deep learning applications).Translating such an approach to a Bayesian approach, as in this work, would complicate the presented framework, raise the computational burden and, as argued in [40], raise the need for additional precautions, such as early stopping, to prevent the EiV approach from overfitting.However, such a study could be an exciting outlook for future work on Bayesian EiV in deep learning.
For the experiments in Section 3 we fixed, similar as in [40,41], σ x prior to training.In those cases where one has access to several x for a fixed ζ the value of σ x can be estimated from the data.In all other cases σ x has to be estimated from prior knowledge or by a reasonable guess.We observed that learning σ x during training via (9) leads to overfitting, that is the learned σ x is pushed towards 0 during training.A compromise that takes prior knowledge into account but still allows for an adaption of σ x during training could be a modification of the presented approach that is based on Bayesian hierarchical modeling.We will leave such considerations to future work.
To keep the setup simple we restricted ourselves to variational inference based on Bernoulli dropout as in [6,16] and to regression tasks.Analyzing how different approaches perform under Errors-in-Variables would be a natural follow-up study to this article.The same is true for an enhancement of the distributions involved in (2), which could, for instance, involve an anisotropic or heteroscedastic adaptation or the usage of a learnable pushforward mapping.
Finally, while we studied in this work both, real and simulated data, only the simulated cases allow us to evaluate the quality of the uncertainty u in a conclusive manner.The difficulty of assessing uncertainties without access to a ground truth is a well-known problem [14,36], whose solution is well beyond the scope of this article.A future work that would deepen the understanding of the performance for data without a ground truth could involve a study, again on simulated data, about the sensitivity of the EiV uncertainty quantification to deviations between the model assumptions in (3) and the generation of the data, e.g. with respect to σ x or normally distributed noise.

Conclusion
In this work, we have shown how Errors-in-Variables (EiV), a classical concept from statistics, can be combined with existing Bayesian methods for uncertainty quantification in deep regression.This not only allows to treat the input of the network as equipped with an uncertainty but also provides a notion of aleatoric uncertainty that is, in many cases, more coherent with statistics.We found this method to give similar predictions to those of the non-EiV method but with an increased uncertainty.For examples with known ground truth and noisy inputs, this increased uncertainty was observed to be necessary, in order to achieve a sufficient coverage of the regression function, which indicates that using an EiV model leads to a more robust and reliable uncertainty quantification in applications where uncertain inputs are considered.
Finding the φ that minimizes π(θ|D, σ 2 )) is therefore equivalent to the following minimization problem In practice, we can use the Monte Carlo approximation (9) instead.

A.2 Informative distribution for π(ζ)
For the choice π(ζ) = N (ζ|0, λ 2 ζ I nx×nx ) we obtain, for the setup of Section 2, the following distributions via standard Bayesian calculus [35] π(ζ|x, σ 2 If we consider, for instance, images as the inputs to our neural network a natural choice for λ ζ would be such that the bulk of π(ζ) covers the pixel range.For other cases there might be no natural choice or a priori knowledge available for λ ζ and the noninformative limit λ ζ → ∞, cf.Section A.3, can be more suitable.

A.3 Variational inference for λ ζ → ∞
In this section we describe how to use the noninformative prior that arises from the setup in Section A.2 for λ ζ → ∞.In this limit the marginal π(x i |σ 2 x ) as in ( 15) is obviously improper.The following lemma shows that this is not really problem and summarizes the actual algorithm used in Section 3 of this work.

B Details on training data B.1 Simulated data
The following table lists the simulated data sets used for the experiments in Section 3.They were constructed, in analogy to (2), via a ground truth function g and where ε x ∼ N (0, σ 2 x I nx×nx ), ε y ∼ N (0, σ 2 y I ny×ny ) and where the ζ are uniformly drawn from a certain range, cf.In figure 6a we also presented results of a Bayesian regression based on functions similar to the g listed in Table 1.In detail, we used g(x) = K i=0 a i x i with K = 1(for linear), K = 2 (for quadratic), K = 3 (for cubic) and g(x) = a 0 x + a 1 sin(2πx) + a 2 sin(4πx) (for sine).From g we constructed the statistical model p(y|x, a 1 , a 2 , . ..) = N (g(x), σ 2 y ), with the according σ y from table 1, and used it together with the noninformative prior π(a 1 , a 2 , . ..) ∝ 1 to obtain the posterior predictive distribution for y given an input x and the training data.Estimate and uncertainty are then taken to be the mean and standard deviation of the posterior predictive distribution.

B.2 Real data
The real data sets used in this work are all freely available and rather standard in the literature about uncertainty quantification in deep learning.We refer to [11,21,6].Similarly to the simulated data from Section B.1, we split for each of the 10 training runs the data randomly into a training set (80% of the data points) and a test set (20% of the data points).In contrast to [11,21,6] we used the California housing data set [32] instead of the Boston housing data set.

C Network and training details
Throughout this work we used fully connected neural networks of the architecture sketched in Figure 7.The precise architecture depends on two hyperparameters: the number of neurons h in a hidden layer and the dropout rate p.Both are specified, together with details on the training, in Table 2 below.For all data sets and both approaches, EiV and non-EiV, we used an Adam optimizer and a L 2 regularization of h is the number of neurons in a hidden layer and p the dropout rate (cf. Figure 7), l.r. is the learning rate, batch the batch size, epochs the epoch number, σ x the according parameter for the EiV approach, init.σ y the used value for σ y prior to updating and n update σy the number of epochs between two σ y updates (cf.Algorithm 1).

Figure 1
Figure1: Illustration of the Errors-in-Variables (EiV) approach presented in this work and the method without EiV (non-EiV).The EiV model introduces an additional uncertainty to the input of the network that is aleatoric and, in contrast to the one linked with y, in many cases more coherent with the classical statistical view on uncertainty, cf.Section 1.The network illustration was created using[22].

Figure 2 :
Figure 2: Prediction of the EiV model (red solid line) and non-EiV model (blue solid line) for the linear data set (cf. Section 3) together with their uncertainties (shaded areas) times 1.96.The ground truth g : ζ → ζ underlying the data set is depicted by the black solid line.The right hand side shows a cut-out of the left hand side, together with an example of a ζ (black dotted vertical line) and the corresponding x ∼ p(x|ζ, σ 2 x ) (gray dashed vertical line) used for the evaluation of the two models.The corresponding values g(ζ) and g(x) are marked by the two horizontal lines.

Figure 4 :
Figure 4: Prediction of the EiV model (red) and the non-EiV model (blue)for three simulated data sets, together with their uncertainties (times 1.96) depicted by the red (EiV) and blue (non-EiV) area.The used data sets are the quadratic (left), cubic (middle) and sine (right) data set, described in Section 3. The corresponding ground truth is given by the black solid line.

Figure 5 :
Figure 5: The RMSE (left) and the coverage of the labels y by the total uncertainty times 1.96 (middle) and the epistemic uncertainty (non-EiV) or u (EiV) times 1.96 (right) for all data sets used in this work.Results from the non-EiV model are shown in blue, results from the EiV model are shown in red.The dashed line in the middle plot depicts 0.95.The shown results were averaged over 10 different training runs.The bars surrounding the markers depict the standard errors from these 10 runs.
Coverage of the ground truth for various uncertainty intervals

Figure 6 :
Figure 6: Left: The coverage of the ground truth by 1.96 • u for a EiV model (red) or 1.96 times the epistemic uncertainty for a non-EiV model (blue) and a linear Bayesian regression model (black) for the simulated data sets used in this work.Right:The coverage of the ground truth for various intervals, determined by q as described in Section 3. EiV coverages are depicted by solid lines, whereas the non-EiV coverages are depicted by dashed lines.In theory, the coverages should coincide with q, shown by the black, dotted diagonal.

Table 1 :
Table 1 below.As explained in Section 3 we performed 10 different training runs for each method (EiV and non-EiV) and each data set, for which the data above was 10 times randomly split into a training set (80% of the data points) and a test set (20% of the data points).Details on the simulated data sets used in this work.

Table 2 :
Details on the network architecture, cf.Fig.7, and on the training: