user: text: Write a concise one-sentence TLDR summary of the scientific paper content below.

Title: Being Bayesian, Even Just a Bit, Fixes Overconfidence in ReLU Networks

Paper content:
The point estimates of ReLU classification networks, arguably the most widely used neural network architecture, have recently been shown to have arbitrarily high confidence far away from the training data.
This architecture is thus not robust, e.g., against out-of-distribution data.
Approximate Bayesian posteriors on the weight space have been empirically demonstrated to improve predictive uncertainty in deep learning.
The theoretical analysis of such Bayesian approximations is limited, including for ReLU classification networks.
We present an analysis of approximate Gaussian posterior distributions on the weights of ReLU networks.
We show that even a simplistic (thus cheap), non-Bayesian Gaussian distribution fixes the asymptotic overconfidence issue.
Furthermore, when a Bayesian method, even if a simple one, is employed to obtain the Gaussian, the confidence becomes better calibrated.
This theoretical result motivates a range of Laplace approximations along a fidelity-cost trade-off.
We validate these findings empirically via experiments using common deep ReLU networks.
As neural networks have been successfully applied in ever more domains, including safety-critical ones, the robustness of their predictions and the calibration of their predictive uncertainty have moved into focus, subsumed under the notion of AI safety (Amodei et al., 2016) .
A principal goal of uncertainty calibration is that learning machines (and neural networks in particular) should assign low confidence to test cases not explained well by the training data or prior information (Gal, 2016) .
The most obvious such instance are test points that lie "far away" from the training data.
Many methods to achieve this goal have been proposed, both Bayesian (Gal & Ghahramani, 2016; Blundell et al., 2015; Louizos & Welling, 2017) and non-Bayesian (Lakshminarayanan et al., 2017; Liang et al., 2018; Hein et al., 2019) .
ReLU networks are currently among the most widely used neural architectures.
This class comprises any network that can be written as a composition of linear layers (including fully-connected, convolutional, and residual layers) and a ReLU activation function.
But while ReLU networks often achieve high accuracy, the uncertainty of their predictions has been shown to be miscalibrated (Guo et al., 2017) .
Indeed, Hein et al. (2019) demonstrated that ReLU networks are always overconfident "far away from the data": scaling a training point x (a vector in a Euclidean input space) with a scalar δ yields predictions of arbitrarily high confidence in the limit δ → ∞.
This means ReLU networks are susceptible to adversarial or out-of-distribution (OOD) examples.
Bayesian methods have long been known empirically to improve predictive uncertainty calibration.
MacKay (1992) demonstrated empirically that the predictive uncertainty of Bayesian neural networks will naturally be high in regions not covered by training data.
Results like this raise the hope that the overconfidence problem of ReLU networks, too, might be mitigated by the use of Bayesian methods.
This paper offers a theoretical analysis of the binary classification case of ReLU networks with logistic output layer.
We show that equipping such networks with virtually any Gaussian probability distribution (i.e. regardless of whether it is motivated in a Bayesian fashion or not) mitigates the aforementioned theoretical problem, so that predictive confidence far away from the training data approaches a known constant, bounded away from one, whose value is controlled by the covariance (cf. Figure 1) .
At the same time, this treatment does not change the decision boundary of the trained network, so it has no negative effect on the predictive performance.
Figure 1: Binary classification on a toy dataset using a MAP estimate
(a) and various Gaussian approximations over the weights, sorted by their complexity of inverting the precision matrix.
These approximations are carried out only at the last layer of the network and d denotes the number of hidden units at that layer.
The shade of color represents the confidence of the prediction (darker shade means higher confidence).
The decision boundary is in thick black.
Even an arbitrary (i.e. nonBayesian) isotropic
(b) or diagonal
(c) covariance makes the confidence bounded away from one.
Using the data in a more Bayesian fashion (d) calibrates the uncertainty further, in particular in regions close to the data.
A central aspect of our result is that asymptotic overconfidence can be mitigated with an essentially arbitrary Gaussian distribution on the weight space, including one of simple diagonal or even scalar covariance, and one whose covariance need not even depend on the training data.
Achieving calibration at finite distances from the training data requires increasing levels of fidelity towards full Bayesian inference, for which our results also give some quantification.
Our results thus answer a question about "how Bayesian" one needs to be to achieve certain levels of calibration.
This is valuable because even approximate Bayesian treatments of deep learning, such as through Laplace approximations, can have high computational cost.
We empirically validate our results through a simple Laplace approximation to only the last layer of deep ReLU architectures, and find that this cheap procedure is already competitive to recently proposed non-Bayesian methods specifically constructed to overcome the overconfidence problem of ReLU networks.
We also show that this cheap Bayesian approach yields good performance in the multi-class classification setting, indicating that our analysis may carry over to this case.
Section 2 begins with a rigorous problem statement and assumptions, then develops the main theoretical results.
We discuss related work in Section 3, while empirical results are in Section 4.
We have shown that even an extremely approximate and virtually non-Bayesian probabilistic Gaussian treatment mitigates the most extreme aspects of overconfidence in ReLU networks.
Our analytical results bound the confidence of the Bayesian prediction of linear classifiers and ReLU networks far away from the training data away from one.
This motivates a spectrum of approximations, from ad-hoc isotropic to "full Bayesian" Laplace approximations.
In the Laplace approximation case, the bound asymptotically converges to a constant whose value can be controlled via the prior.
We validated our results experimentally by constructing a simple Laplace method that can still capture the properties we have shown, specifically by only approximating the last-layer's posterior distribution.
In contrast to other approximations, this method is cheap and simple to implement, yet already yields competitive performance compared to the more expensive, recently proposed non-Bayesian method for combating the overconfidence problem.
While more elaborate Laplace approximations can improve fidelity the further, our results provide virtually any ReLU network with a simple and computationally lightweight way to mitigate overconfidence.
1/2 = 0.
Notice, the denominator of the l.h.s. is positive.
Thus, it follows that µ f must be 0, implying that σ(µ f ) = 0.5.
Lemma A.2.
Let x ∈ R n be a vector and A ∈ R n×n be an SPD matrix.
If λ min (A) is the minimum eigenvalue of A, then x T Ax ≥ λ min x 2 .
Proof.
Since A is SPD, it admits an eigendecomposition A = QΛQ T and Λ = Λ 1 2 Λ 1 2 makes sense.
Therefore, by keeping in mind that Q T x is a vector in R n , we have
where the last equality is obtained as Q T x 2 = x T Q T Qx and noting that Q is an orthogonal matrix.
Proposition A.3.
Let f : R n → R be a binary linear classifier defined by f (x) := w T x and p(w|D) := N (w|µ, Σ) be the distribution over w.
Then for any x ∈ R n ,
Furthermore, if x ∈ R n then as δ > 0 goes to infinity
Proof.
The first result follows directly from Lemma A.2 and by noting that the denominator of eq. (4) is positive since Σ is symmetric positive-definite (SPD) by definition.
For the second result, let x ∈ R n be arbitrary.
By computation and again since the denominator of eq. (4) is positive, we have
We would like to inspect the asymptotic behavior of z(δx) with respect to δ.
First, for the sake of completeness, we can compute that lim δ→0 |z(δx)| = 0.
This reflects the case when δx goes to the decision boundary.
Now, for the case when δ → ∞, we can see that
since 1/δ 2 → 0 as δ → ∞.
Therefore, using Lemma A.2 and Cauchy-Schwarz inequality, we have
thus the proof is complete.
Under review as a conference paper at ICLR 2020
Lemma A.4 (Hein et al. (2019)).
Let {Q i } R l=1 be the set of linear regions associated to the ReLU network φ : R n → R n .
For any x ∈ R n there exists α ∈ R with α > 0 and t ∈ {1, . . . , R} such that δx ∈ Q t for all β ≥ α.
Furthermore, the restriction of φ to Q t can be written as an affine function.
Theorem A.5.
Let f : R d → R be a binary linear classifier defined by f • φ(x) := w T φ(x) where φ : R n → R d is a ReLU network and let p(w|D) := N (w|µ, Σ) be the distribution over w.
Then for any x ∈ R n ,
where V ∈ R d×n and a ∈ R d are some matrix and vector that depend on x.
Furthermore, as δ > 0 goes to infinity such that x ∈ Q and φ| Q (x) := Vx + a.
Applying eq. (4) to φ| Q (x) and following the proof of Proposition 2.3 yield
thus the first result is obtained.
, such that for any δ ≥ α, we have that δx ∈ R and the restriction φ| R can be written as Ux + c.
Therefore, for any such δ,
Now, notice that as δ → ∞, 1/δ 2 and 1/δ goes to zero.
So, in the limit, we have that
Again, following the proof of Proposition 2.3 (i.e. using Cauchy-Schwarz and Lemma A.2), we can upper-bound this limit with
which concludes the proof.
Corollary A.6 (λ min (Σ) from a desired upper confidence bound on ReLU networks).
Let f • φ, with φ : R n → R d and f : R d → R, be a ReLU network defined by f • φ(x) := w T φ(x) and N (w|µ, Σ) be the distribution over w where the mean µ is fixed and Σ is any SPD matrix.
Then: (i) For any > 0 there exists Σ such that for any x ∈ R n far away from the training data, we have that |z • φ(x)| ≤ .
(ii) For any 0.5 < p < 1 there exists Σ such that for any x ∈ R n far away from the training data, we have that σ(|z • φ(x)|) ≤ p.
Proof.
We begin with (i).
Let > 0 and δ = 8 π µ 2 .
Pick any Σ SPD with λ min (Σ) = δ.
Then, by eq. (12) of Theorem 2.4 and our choice of λ min (Σ), for any z ∈ R n , asymptotically we have that
which is the desired result.
For
(ii), let 0.5 < p < 1 be arbitrary.
Observe that the inverse logistic function is given by σ −1 (x) := log x/(1 − x) for 0 < x < 1 and it is positive for 0.5 < x < 1.
Therefore by setting in (i) with
2 and verify that for any x ∈ R n this gives |z(x)| ≤ σ −1 (p).
Thus, for any x ∈ R n far away from the training data, since σ is monotonic, we have that
and the proof is complete.
. Let p(w|D) := N (w|µ, Σ) be the posterior over w, obtained via a Laplace approximation with prior N (w|0, σ 2 0 I). Suppose H is the Hessian w.r.t. w at µ of the negative log-likelihood of the model. Then
(ii) For each i = 1, . . . , d, the ith eigenvalue λ i (Σ) of Σ is a non-decreasing function of σ Proof.
The negative log-likelihood of Bernoulli distribution is given by
Now, observing that σ (x) = σ(x)(1 − σ(x)) for all x ∈ R, we can compute
T .

assistant: text: We argue theoretically that by simply assuming the weights of a ReLU network to be Gaussian distributed (without even a Bayesian formalism) could fix this issue; for a more calibrated uncertainty, a simple Bayesian method could already be sufficient.