【摘要】 贝叶斯神经网络和深度集成是估计深度学习模型预测不确定性的主要方法。但由于内存和推断成本较高,它们在实时、工业规模应用中的实用性受到较大限制。这促使我们研究只需要一个深度神经网络 (DNN) 的高质量不确定性估计的原则性方法。通过将不确定性量化形式化为一个极小极大学习问题,我们首先选择距离感知(即模型正确量化测试样本与训练数据流形之间距离的能力)作为 DNN 实现的必要条件高质量(即极小极大最优)不确定性估计。然后,提出了谱归一化高斯过程 (SNGP),这是一种通过在训练期间添加权重归一化步骤并将输出层替换为高斯过程而形成的提高现代 DNN 距离感知能力的简单方法。在一系列视觉和语言理解任务以及现代架构(Wide-ResNet 和 BERT)上,SNGP 在预测、校准和分布外检测方面与深度集成具有竞争力,并且优于其他单一确定性模型方法。可在https://github.com/google/uncertainty-baselines/tree/master/baselines 获取代码。

【原 文】 Liu, J.Z. et al. (2020) ‘Simple and Principled Uncertainty Estimation with Deterministic Deep Learning via Distance Awareness’. arXiv:2006.10108

1 引言

可靠并有效地量化深度神经网络的预测不确定性对于工业规模的实际应用非常重要,其中包括自动驾驶中的对象识别 [23]、在线广告中的广告点击预测 [77] 等例子,以及对话系统中的意图理解 [85]。例如,为特定领域服务的聊天机器人( 例如气象查询 )构建的自然语言理解模型,用户对模型输入的语言可以是任何主题,而模型需要可靠且实时地理解该语句,并确定是放弃还是触发某些API 调用。

当深度分类器对远离训练分布的样本(即分布外样本)进行预测时,它们的性能可能会很差 [5][15],这激发了模型感知 测试样本训练样本 之间距离的需求。如果感知到输入数据属于分布外样本(即离训练集太远),则可以在输出的类别标签上返回一个均匀分布( 最大熵原则 ) [31]。具有合适协方差核的高斯过程具有此特性,但要将高斯过程应用于高维机器学习问题,通常需要执行某种形式的特征提取或降维。理想情况下,深度神经网络的隐表示应该能够反映数据流形中有意义的距离( 例如,两个句子之间的语义文本相似性 ),以便保留 “距离感知” 性质。但是,这对于常见的深度学习模型通常无法保证(参见 图 1)。

Figure01

图 1:高斯过程和不同深度神经网络方法在两个椭圆(上排)和两个月牙(下排)的二维分类基准上的不确定性表面。 SNGP 是唯一能够实现类似于高斯过程距离感知不确定性的深度神经网络方法。正类(橙色)和负类(蓝色)为训练数据,红色为训练期间未观测到的 OOD 数据。背景颜色表示估计的模型不确定性(颜色图例参见 图 1e图 1j)。详细信息请参阅 第 5.1 节

我们为这个问题提出了一个简单的解决方案,即为每个层(包括残差层)的权重增加 谱归一化 [55]。我们将该方法称为 谱归一化神经高斯过程(SNGP) 。我们已经证明:该方法提供了与 xxX\|\mathbf{x}−\mathbf{x}^\prime||_X 相关的 h(x)h(x)H\|h(\mathbf{x})−h(\mathbf{x}^\prime)\|_H 边界,使我们可以安全地将 h(x)h(\mathbf{x}) 传递给具备距离感知能力的高斯过程输出层。注:其中 x\mathbf{x}x\mathbf{x}^\prime 为神经网络的两个输入,h(x)h( \mathbf{x}) 为深度特征提取器(即某种形式的神经网络),X\|\cdot\|_X 是在数据流形上有意义的距离。

为了确保计算的可扩展性(即适应更大的规模),我们使用高斯过程的随机特征扩展 拉普拉斯近似 来逼近高斯过程后验,这可以在对确定性深度神经网络的训练管道(pipeline)进行最小改动的情况下,进行可扩展和封闭式的学习,并且允许我们在没有 蒙特卡洛采样 的情况下有效计算每个输入的 预测不确定性

在本文接下来的部分,我们首先将该问题视为 Minmax 学习问题( 第 2 节 ),从理论上说明 距离感知能力 对模型不确定性估计的重要性。然后,在 第 3 节 中详细介绍了谱归一化高斯过程( SNGP )方法,并在 第 5 节 中通过实验评估了它与其他单一模型方法、深度集成方法 [43]的对比性能。

式(4) 的视角,输入距离感知性质对于 校准OOD 检测 都很重要。但对于典型的深度学习模型 [34],无法保证此性质。考虑一个具有密集输出层 logitk(x)=h(x)βk\operatorname{logit}_{k}(\mathbf{x})=h(\mathbf{x})^{\top} \beta_{k} 的判别式深度分类器,其模型置信度(即最大预测概率)采用类别的 分对数(logit) 大小来表征,它由隐藏表示 h(x)h(\mathbf{x}) 和决策边界 {βk}k=1K\left\{\beta_{k}\right\}_{k=1}^{K} 之间的内积距离定义(例如,图 1 b-c图 1 g-h ) 。因此,模型不是基于它与训练数据 XIND \mathcal{X}_{\text {IND }} 的距离计算 x\mathbf{x}^{*} 的置信度,而是基于它的与决策边界的距离,即 模型不确定性 不是输入距离感知的。

2 距离感知:高质量不确定性估计的重要条件

2.1 概念和问题设置

考虑一个数据生成的分布 p(yx)p^{*}(y \mid \mathbf{x}),其中 yy \in {1,,K}\{1, \ldots, K\}KK 类的标签空间,xXRd\mathbf{x} \in \mathcal{X} \subset \mathbb{R}^{d} 是具备特定距离测度 .X\| . \|_{X} 的输入数据流形。距离测度 .X\| . \|_{X} 应当是针对 X\mathcal{X} 的几何形态量身定制的,使距离 x1x2X\| \mathbf{x}_1 -\mathbf{x}_2 \| _{X} 能够反映输入空间中的两个元素 x1,x2X\mathbf{x}_1,\mathbf{x}_2 \in \mathcal{X} 之间在语义上有意义的区别(如两个图像之间或两句话之间)。在实践中,训练数据 D={yi,xi}i=1N\mathcal{D}=\left\{y_{i}, \mathbf{x}_{i}\right\}_{i=1}^{N} 通常是从输入空间的子集 XIND X\mathcal{X}_{\text {IND }} \subset \mathcal{X} 上搜集的。因此,完整的数据生成分布 p(yx)p^{*}(y \mid \mathbf{x}) 应当是 域内 (IND) 分布 pIND (yx)=p(yx,xXIND )p_{\text {IND }} (y \mid \mathbf{x})=p^{*}\left(y \mid \mathbf{x}, \mathbf{x} \in \mathcal{X}_{\text {IND }}\right ) 以及 域外( OOD )分布 pOOD (yx)=p(yx,xXIND )p_{\text {OOD }}(y \mid \mathbf{x})=p^{*}\left(y \mid \mathbf{x}, \mathbf{x} \notin \mathcal{X}_{\text {IND }}\right) 的混合模型,由于 XIND \mathcal{X}_{\text {IND }}XIND \mathcal{X}_{\text {IND }} 构成了输入空间的完整划分且相互不重叠,所以可以利用基础概率论对其进行分解 [53][67]

p(yx)=p(y,xXIND x)+p(y,xXIND x)=p(yx,xXIND )×p(xXIND )+p(yx,xXIND )×p(xXIND )(1)\begin{aligned} p^{*}(y \mid \mathbf{x}) &={p^{*}\left(y, \mathbf{x} \in \mathcal{X}_{\text {IND }} \mid \mathbf{x}\right)} \quad {+} \quad p^{*}\left(y, \mathbf{x} \notin \mathcal{X}_{\text {IND }} \mid \mathbf{x}\right) \\ &=p^{*}\left(y \mid \mathbf{x}, \mathbf{x} \in \mathcal{X}_{\text {IND }}\right) \times p^{*}\left(\mathbf{x} \in \mathcal{X}_{\text {IND }}\right)+p^{*}\left(y \mid \mathbf{x}, \mathbf{x} \notin \mathcal{X}_{\text {IND }}\right) \times p^{*}\left(\mathbf{x} \notin \mathcal{X}_{\text {IND }}\right) \end{aligned} \tag{1}

在训练期间,模型从数据 D\mathcal{D} 中学习域内分布 p(yx,xXIND )p^{*}\left(y \mid \mathbf{x}, \mathbf{x} \in \mathcal{X}_{\text {IND }}\right) ,但模型并不知道域外分布 p(yx,xXIND )p^{*}\left(y \mid \mathbf{x}, \mathbf{x} \notin \mathcal{X} _{\text {IND }}\right)。在天气服务聊天机器人例子中,域外空间 XOOD =X/XIND \mathcal{X}_{\text {OOD }}=\mathcal{X} / \mathcal{X}_{\text {IND }} 是所有与天气查询无关的自然语言构成的空间,域外空间中的元素通常与域内标签 yk{1,,K}y_{k} \in\{1, \ldots, K\} 之间没有任何有意义的对应关系。因此,域外分布 p(yx,xXIND )p^{*}\left(y \mid \mathbf{x}, \mathbf{x} \notin \mathcal{X}_{\text {IND }}\right) 可能与域内分布 p(yx,xXIND )p^{*}\left(y \mid \mathbf{x}, \mathbf{x} \in \mathcal{X}_{\text {IND }} \right) 非常不同,我们通常期望模型只在域内样本 XIND \mathcal{X}_{\text {IND }} 上能够很好地泛化。但同时期望在测试和部署阶段,模型能够为整个输入空间 X=XINDXOOD\mathcal{X}=\mathcal{X}_{\text {IND}} \cup \mathcal{X}_{\text{OOD}} 构建预测分布 p(yx)p(y \mid \mathbf{x}),因为输入数据的范围可以来自任何地方,而不仅仅是经过策划的训练数据分布。

2.2 将不确定性估计视为 Minimax 学习问题

早期将高斯过程与深度神经网络相结合的工作通常执行 MAP 估计 [12] 或结构化变分推断 (VI) [10][82]。最近的工作 [75] 表明这些方法会导致校准不佳,该工作通过将 Monte Carlo Dropout (MC Dropout) 与随机傅里叶特征相结合提出了一个简单的修复方法,我们将其称为校准深度高斯过程 (MCD-GP)。

我们提出了 SNGP,这是一种提高单个确定性深度神经网络预测不确定性估计能力的简单方法。它对确定性深度神经网络的架构和训练/预测管道进行了最小的更改,仅向隐藏映射添加了谱归一化,并用近似高斯过程的随机特征层替换了密集输出层。我们通过对不确定性估计问题的学习理论分析在理论上激发了输入距离感知,这是 SNGP 背后的关键设计原则。我们还提出了一种封闭形式的近似方法,使高斯过程后验端到端可在线性时间内与神经网络的其余部分一起训练。在一套视觉和语言理解任务以及现代架构(ResNet 和 BERT)上,SNGP 在预测、校准和域外检测方面具有深度集成的竞争力,并且优于其他单一模型方法。

因此,可以将不确定性量化问题形式化为一个 "构建一个能够最小化整个输入空间 xX\mathbf{x} \in \mathcal{X} 上的预期风险的最优预测分布 p(yx)p(y \mid \mathbf{x}) " 的问题,即 “不确定性风险最小化” 问题:

infpPS(p,p)=infpPE(x,y)X×Y[s(p(yx),p(yx))](2)\inf _{p \in \mathcal{P}} S\left(p, p^{*}\right)=\inf _{p \in \mathcal{P}} \underset{\mathbf{(x,y)} \in \mathcal{X \times Y}}{\mathbb{E}}\left[s\left(p(y \mid \mathbf{x}), p^{*}(y \mid \mathbf{x}) \right)\right] \tag{2}

不幸的是,即使有无限数据,在整个输入空间 X\mathcal{X} 上直接最小化 式 (2) 也是不可能的。因为现实中只会从 XIND \mathcal{X}_{\text {IND }} 中收集数据,真实的 OOD 分布 p(yx,xXIND )p^{*}\left(y \mid \mathbf{x}, \mathbf {x} \notin \mathcal{X}_{\text {IND }}\right) 从未被模型学习过,因为我们没有假设 p(yx,xXIND )p^{*}\left(y \mid \mathbf{ x}, \mathbf{x} \in \mathcal{X}_{\text {IND }}\right)p(yx,xXIND )p^{*}\left(y \mid \mathbf{x}, \mathbf{x } \notin \mathcal{X}_{\text {IND }}\right) 具有相似的形式,因此也无法保证模型的泛化能力。使用仅采用域内数据训练的模型来对 OOD 数据进行预测,可能会导致任意糟糕的结果,因为自然界可以包含非常多种与训练数据非常不同的 OOD 分布 p(yx,xXIND )p^{*}\left(y\mid \mathbf{x}, \mathbf{x} \notin \mathcal{X}_{\text {IND }}\right) ,这对于安全敏感型应用来说显然是不可取的。

为此,一个更谨慎的策略是:相对于所有可能的 pPp^{*} \in \mathcal{P}^{*} ,最小化 ”最差情况的风险“,即构造一个能够最小化 最小最大不确定性风险( Minimax Uncertainty Risk)p(yx)p(y \mid x)

infpP[suppPS(p,p)](3)\inf _{p \in \mathcal{P}}\left[\sup _{p^{*} \in \mathcal{P}^{*}} S\left(p, p^{*}\right)\right] \tag{3}

在博弈论方法中,不确定性估计问题可被视为 模型自然 之间的二人博弈。模型 的目标是生成一个 minimax 策略 pp,使得相对于 自然 中的所有可能(甚至是对抗性)移动 pp^{*} ,风险 S(p,p)S\left(p, p^{*}\right) 达到最小。在 分类任务Brier 分数 的假设场景中,式 (3)minimax 问题 的解可以采用如下简单而优雅的形式:

p(yx)=p(yx,xXIND )p(xXIND )+puniform (yx,xXIND )p(xXIND )(4)p(y \mid \mathbf{x})=p\left(y \mid \mathbf{x}, \mathbf{x} \in \mathcal{X}_{\text {IND }}\right) * p^{*}\left(\mathbf{x} \in \mathcal{X}_{\text {IND }}\right)+p_{\text {uniform }}\left(y \mid \mathbf{x}, \mathbf{x} \notin \mathcal{X}_{\text {IND }}\right) * p^{*}\left(\mathbf{x} \notin \mathcal{X}_{\text {IND }}\right) \tag{4}

上式有很直观的理解:如果输入点在训练数据域中就信任模型预测;否则进行最大熵(均匀)预测。

对于不确定性估计的实践而言,式(4) 在概念上非常重要,因为它验证了 式(3) 中的不确定性估计问题存在唯一的最优解。不仅如此,式(4) 还优雅地构造了该最优解。具体来说,在 p(xXIND )p^{*}\left(\mathbf{x} \in \mathcal {X}_{\text {IND }}\right) 可以被很好地量化假设下,最优解可以被构造为 离散均匀分布 puniform p_{\text {uniform }} 和(从训练数据中学习的)域内预测分布 p(yx,xXIND )p\left(y \mid \mathbf{x}, \mathbf{x} \in \mathcal{X}_{\text {IND }}\right) 的混合。事实上,在被称为 Bregman 评分 的广泛评分规则族( 包括 Brier 评分log 评分 )中,式 (4) 可以被证明是最优的。我们在附录 B 中推导出了 式 (4)

2.3 输入距离的感知能力是必要条件

根据 式 (4),深度学习模型能够可靠估计预测不确定性的关键,在于其(显式或隐式地)量化 域内分布 p(xXIND )p\left(\mathbf{x} \in \mathcal{ X}_{\text {IND }}\right) 的能力。这要求模型对测试样本 x\mathbf{x} 和训练数据 XIND \mathcal{X}_{\text {IND }} 之间( 相对于数据流形而言有意义的)距离 X\| \cdot \|_X 具有很好的感知能力,例如,语言数据的语义文本相似性 [13]

(1)定义

定义 1(输入距离的感知)。考虑一个在域 XIND X\mathcal{X}_{\text {IND }} \subset \mathcal{X} 上训练的预测分布 p(yx)p(y \mid \mathbf{x}),其中 (X,X)\left(\mathcal{X},\|\cdot\|_{X}\right) 是一个具有适当测度 .X\|.\|_{X} 的输入数据流形。我们说预测分布 p(yx)p(y \mid \mathbf{x}) 是输入距离感知的,如果存在一个能够量化模型不确定性的 p(yx)p(y \mid \mathbf{x}) 的统计量 u(x)u(\mathbf{x}) (如熵、预测方差等),并且 u(x)u(\mathbf{x}) 能够反映 x\mathbf{x} 和训练数据之间相对于 .X\|.\|_{X} 的距离,即

u(x)=v(d(x,XIND ))u(\mathbf{x})=v\left(d\left(\mathbf{x}, \mathcal{X}_{\text {IND }}\right)\right)

其中 vv 是一个单调函数,d(x,XIND)=ExXINDxxX2d\left(\mathbf{x}, \mathcal{X}_{\mathrm{IND}}\right)=E_{\mathbf{x}^{\prime} \sim \mathcal{X}_{\mathrm{IND}}}\left\|\mathbf{x}-\mathbf{x}^{\prime}\right\|_{X}^{2}x\mathbf{x} 和训练数据域之间的距离。

能够满足距离感知特性的经典模型是 具有径向基函数 (RBF) 核的高斯过程 (GP)。它的预测分布 p(yx)=softmax(g(x))p(y \mid \mathbf{x})=\operatorname{softmax}(g(\mathbf{x})) 是高斯过程后验gGPg \sim G P 在交叉熵似然下的 softmax 变换,其预测不确定性可以表示为后验方差: u(x)=var(g(x))=1kVku\left(\mathbf{x}^{*}\right)=\operatorname{var}\left(g\left(\mathbf{x}^ {*}\right)\right)=1-\mathbf{k}^{* \top} \mathbf{V}\mathbf{k}^{*} ,其中 ki= exp(12lxxiX2)\mathbf{k}_{i}^{*}=\ exp \left(-\frac{1}{2 l}\left\|\mathbf{x}^{*}-\mathbf{x}_{i}\right\|_{X}^{2}\right)VN×N\mathbf{V}_{N \times N} 为一个由数据决定的固定矩阵。然后 u(x)u\left(\mathbf{x}^{*}\right) 随着 x\mathbf{x}^{*} 远离 X IND <!swig14>\mathcal{X}_{\text { IND }}[62] 而单调趋近于 11

这项工作提出了一种简单实用的方法来提高确定性深度学习模型的不确定性估计性能。实验结果展示了该方法在提高模型校准和 OOD 检测性能的同时保持相似水平的准确性和延迟的能力,因此说明了其在工业规模应用中的可行性。我们希望所提出的方法可以为 AI 驱动带来具体的改进,与社会相关的服务,其中不确定性具有自然重要性。样本包括医疗和政策决策、在线有毒评论管理、公平感知推荐系统等。

(2)输入距离感知的两个条件

请注意,深度学习模型 logit(x)=gh(x)\text{logit}(\mathbf{x})=g \circ h(\mathbf{x}) 通常由隐藏映射 hXHh: \mathcal{X} \rightarrow \mathcal{H} 组成。该映射将输入 x\mathbf{x} 映射到隐表示空间 h(x)Hh(\mathbf{x}) \in \mathcal{H} ,而输出层 gg 则将 h(x)h(\mathbf{x}) 映射到标签空间。如上一节所示,此公式在传统意义上不是输入距离感知的,但可以通过强加两个条件来实现距离感知:

( 1 )使输出层 gg 具备距离感知能力,即使 gg 输出一个能反映隐表示空间中距离的不确定性度量 h(x)h(x)H\left\|h(\mathbf{x})-h\left(\mathbf{x}^{\prime}\right)\right\| _{H} ,在实践中,可以将输出层设置为具有位移不变性核的高斯过程。

( 2 )使隐空间映射具备距离保持能力(定义如下),即在隐表示空间中的距离 h(x)h(x)H\left\|h(\mathbf{x})-h\left(\mathbf{x}^{\prime}\right)\right\|_{H} 相对于在数据流形中的距离 xxX\left\|\mathbf{x}-\mathbf{x}^{\prime}\right\|_{X} 有对应的意义。从数学的角度来看,这相当于要求,对于有界的正常数 0<L1<L20<L_{1}<L_{2}hh 满足 双李普希茨(bi-Lipschitz) 条件 [68]

L1×x1x2Xh(x1)h(x2)HL2×x1x2X(5)L_{1} \times \left\|\mathbf{x}_{1}-\mathbf{x}_{2}\right\|_{X} \leq\left\|h\left(\mathbf{x}_{1}\right)-h\left(\mathbf{x}_{2}\right)\right\|_{H} \leq L_{2} \times \left\|\mathbf{x}_{1}-\mathbf{x}_{2}\right\|_{X} \tag{5}

对于深度学习模型,式(5) 中的 bi-Lipschitz 条件 通常会导致模型的隐表示空间能够保持在输入数据流形 X\mathcal{X} 上有语义含义的距离,而不是类似于像素空间中的平方距离。这是因为:

  • Lipschitz 上界 h(x1)h(x2)H\left\|h\left(\mathbf{x}_{1}\right)-h\left(\mathbf{x}_{2}\right)\right\| _{H} \leq L2×x1x2XL_{2} \times \left\|\mathbf{x}_{1}-\mathbf{x}_{2}\right\|_{X} 是一个对于深度网络的对抗鲁棒性非常重要的条件,它可以防止隐表示 h(x)h(\mathbf{x}) 对像素空间中无意义的语义扰动过度敏感 [66][81][76][38][72]
  • Lipschitz 下界 h(x1)h(x2)HL1×x1x2X\left \| h \left(\mathbf{x}_{1}\right)-h\left(\mathbf{x}_{2}\right)\right \|_{H} \geq L_{1} \times \left\|\mathbf{x}_{1}-\mathbf{x}_{2}\right\|_{X} 则可以防止隐表示 h(x)h(\mathbf{x}) 对输入流形中有意义的语义变化足够敏感(即防止其保持不必要的不变性)[39][78]
  • 两者结合在一起,bi-Lipschitz 条件 本质上鼓励 hh 成为 近似等距映射(approximately isometric mapping),从而确保 隐表示 h(x)h(\mathbf{x})输入 x\mathbf{x} 的语义性质具有有意义且稳健的对应关系 。

机器学习方法通常倾向于学习一种 近似等距几何保持的映射(虽然没有明确说明)。例如,深度图像分类器努力在学习一个从 图像流形可被线性决策边界分割的隐表示空间 的映射,语句编码器旨在将句子投影到向量空间中,且其新空间中的余弦距离能够反映自然语义的相似性。最后,值得注意的是,即使在显著降维 [9][33][60][65] 之后,在神经网络中保持近似等距也是可能的。

3 SNGP:一种具备距离感知能力的深度学习方法

在本节中,我们提出了 谱归一化神经高斯过程 (SNGP),这是一种能够提高(基于残差的)现代深度神经网络(例如 ResNet、Transformer)输入距离感知能力的简单方法,其中包括 第 2.2 节 所述的 输出层距离感知隐藏层距离保持 。完整的方法总结在 算法 1算法 2 中。

3.1 距离感知输出层:采用拉普拉斯近似的神经高斯过程

为了使输出层 g:HYg: \mathcal{H} \rightarrow \mathcal{Y} 具备距离感知,SNGP 将典型前馈神经网络的密集输出层替换为一个以隐表示为条件的近似高斯过程 (GP),在该高斯过程中,某个测试输入 x\mathbf {x}^{*} 的后验方差正比于其在隐藏空间中到训练数据点的距离 L2L_{2}。具体来说,给定 NN 个训练样本 D=\mathcal{D}= {yi,xi}i=1N\left\{y_{i}, \mathbf{x}_{i}\right\}_{i=1}^{N} 和隐表示hi=h(xi)h_{i}=h\left(\mathbf{x}_{i}\right),并令基于该隐表示的条件高斯过程为 gN×1=[g(h1),,g(hN)]Tg_{N \times 1}=\left[g\left(h_{ 1}\right), \ldots, g\left(h_{N}\right)\right]^{T} 。则具有 RBF 核的高斯过程模型先验是一个多元正态分布:

gN×1N(0N×1,σ2KN×N), where Ki,j=exp(hihj22/2),g_{N \times 1} \sim \mathcal{N}\left(\mathbf{0}_{N \times 1}, \sigma^2 * \mathbf{K}_{N \times N}\right), \text { where } \mathbf{K}_{i, j}=\exp \left(-\left\|h_{i}-h_{j}\right\|_{2}^{2} / 2\right),

其中,σ2\sigma^2 并且后验分布计算为 p(gD)p(Dg)p(g)p(g \mid \mathcal{D}) \propto p(\mathcal{D} \mid g) p(g) 其中 p(g)p(g) 是 ( 6) 和 p(Dg)p(\mathcal{D} \mid g) 是分类的数据似然性(即指数交叉熵损失)。然而,为大规模分类任务计算精确的高斯过程后验在分析上既难处理又计算成本高。在这项工作中,我们提出了一种简单的高斯过程逼近策略,该策略基于随机傅立叶特征 (RFF) 的拉普拉斯逼近GP后验的扩展[62]。我们的方法产生了一个封闭形式的后验,它可以与神经网络的其余部分进行端到端的训练,并且凭经验可以提高估计后验不确定性的质量。具体来说,我们首先通过使用随机特征 [61] 对内核矩阵 K=ΦΦ\mathbf{K}=\Phi \Phi^{\top} 部署低秩近似来近似 (6) 中的 GP:

g_{N \times 1} \sim \operatorname{MVN}\left(\mathbf{0}_{N \times 1}, \Phi \Phi_{N \times N}^{\top}\right), \quad$ where $\quad \Phi_{i, D_{L} \times 1}=\sqrt{2 / D_{L}} * \cos \left(-\mathbf{W}_{L} h_{i}+\mathbf{b}_{L}\right)

其中 hi=h(xi)h_{i}=h\left(\mathbf{x}_{i}\right) 是维度 DL1D_{L-1} 的倒数第二层的隐藏表示。 Φi\Phi_{i} 是维度 DLD_{L} 的最后一层,它包含 WL,DL×DL1\mathbf{W}_{L, D_{L} \times D_{L-1}} 一个固定的权重矩阵其条目被抽样 i.i.d。从 N(0,1)N(0,1)bL,DL×1\mathbf{b}_{L, D_{L} \times 1} 一个固定的偏差项,其条目是 i.i.d 采样的。来自统一 (0,2π)(0,2 \pi)。因此,对于 kth k^{\text {th }} logit,(6)中高斯过程先验的 RFF 近似可以写成具有固定隐藏权重 W\mathbf{W} 和可学习的输出权重 βk\beta_{k}

gk(hi)=2/DLcos(WLhi+bL)βk, with prior βk,DL×1N(0,IDL×DL).g_{k}\left(h_{i}\right)=\sqrt{2 / D_{L}} * \cos \left(-\mathbf{W}_{L} h_{i}+\mathbf{b}_{L}\right)^{\top} \beta_{k}, \quad \text { with prior } \quad \beta_{k, D_{L} \times 1} \sim N\left(0, \mathbf{I}_{D_{L} \times D_{L}}\right) .

请注意,以 h为条件,β={βk}k=1Kh 为条件,\beta=\left\{\beta_{k}\right\}_{k=1}^{K} 是模型中唯一可学习的参数。因此,(8)中的 RFF 近似将无限维高斯过程减少为标准贝叶斯线性模型,可以应用许多后验近似方法(例如,期望传播(EP))[54]。在这项工作中,我们选择拉普拉斯方法是因为它简单,并且它的后验方差具有方便的封闭形式[62]。简而言之,拉普拉斯方法使用以最大后验 (MAP)(M A P) 估计 β^=argmaxβp(βD)\hat{\beta}=\operatorname{ argmax}_{\beta} p(\beta \mid \mathcal{D}),使得 p(βkD)MVN(β^kΣ^k=H^k1)p\left(\beta_{k} \mid \mathcal{D}\right) \approx M V N\left(\hat{\beta}_{k},\hat{\Sigma}_{k}=\hat{\mathbf{H}}_{k}^{-1}\right),其中 mathbfH^k,(i,j)=2βiβjlogp(βkD)βk=β^k\hat{\ mathbf{H}}_{k,(i, j)}=\left.\frac{\partial^{2}}{\partial \beta_{i} \partial \beta_{j}} \log p\left (\beta_{k} \mid \mathcal{D}\right)\right|_{\beta_{k}=\hat{\beta}_{k}}DL×DLD_{L} \times D_{ L} 在 MAP 估计中评估的对数后验似然的 Hessian 矩阵。

在 RFF 后验的线性模型公式下,后验精度矩阵(即逆协方差矩阵)采用简单的表达式 Σ^k1=I+i=1Np^i,k(1p^i,k)ΦiΦi\hat{\Sigma}_{k}^{-1}=\mathbf{I }+\sum_{i=1}^{N} \hat{p}_{i, k}\left(1-\hat{p}_{i, k}\right) \Phi_{i} \Phi_ {i}^{\top},其中 pi,kp_{i, k} 是 MAP 估计下的模型预测 softmax(g^i)β^={βk}k=1K\operatorname{softmax}\left(\hat{g}_{i}\right) \hat{\beta}=\left\{\beta_{k}\right\}_{k=1}^{K} [62] 。总而言之,在 RFF 近似下高斯过程的拉普拉斯后验是:

βkDMVN(β^k,Σ^k), where Σ^k1=I+i=1Np^i,k(1p^i,k)ΦiΦi.\beta_{k} \mid \mathcal{D} \sim \operatorname{MVN}\left(\hat{\beta}_{k}, \hat{\Sigma}_{k}\right), \quad \text { where } \quad \hat{\Sigma}_{k}^{-1}=\mathbf{I}+\sum_{i=1}^{N} \hat{p}_{i, k}\left(1-\hat{p}_{i, k}\right) \Phi_{i} \Phi_{i}^{\top} .

在小批量训练期间,后验均值 β^\hat{\beta} 通过常规随机梯度下降 (SGD) 相对于(未归一化的)log\log 后验 logp(βD)=logp(Dβ)+12β2-\log p(\beta \mid \mathcal{ D})=-\log p(\mathcal{D} \mid \beta)+\frac{1}{2}\|\beta\|^{2} 其中 logp(Dβ)-\log p(\mathcal{D } \mid \beta) 是交叉熵损失。后验精度矩阵以 Σ^k,t1=(1m)Σ^k,t11+mi=1Mp^i,k(1p^i,k)ΦiΦi\hat{\Sigma}_{k, t}^{-1}=(1-m) * \hat{\Sigma}_{k, t-1}^{- 1}+m * \sum_{i=1}^{M} \hat{p}_{i, k}\left(1-\hat{p}_{i, k}\right) \Phi_{i } \Phi_{i}^{\top} 用于大小为 MM 的 minibatch 和 mm 一个小的缩放系数。这个计算只需要在最后一个时期通过一次训练数据来执行。因此,GP 后验 (9) 可以在对确定性深度神经网络的训练管道进行最小修改的情况下以封闭形式进行可扩展地学习。值得注意的是,由于 Bernstein-von Mises (BvM) 定理和 (8) 是有限秩模型 [16,23,46,57][16,23,46,57 ]

3.2 隐映射的距离保持:谱归一化

用高斯过程替换输出层 gg 只允许模型 logit(x)=gh(x)\operatorname{logit}(\mathbf{x})=g \circ h(\mathbf{x}) 知道隐藏层的距离空间h(x1)h(x2)H\left\|h\left(\mathbf{x}_{1}\right)-h\left(\mathbf{x}_{2}\right)\right\|_{H}。确保隐藏映射 hh 保持距离也很重要,这样隐藏空间中的距离 h(x)h(x)H\left\|h(\mathbf{x})-h\left(\mathbf{x}^{\prime }\right)\right\|_{H} 与输入空间中的距离有一个有意义的对应关系 xxX\left\|\mathbf{x}-\mathbf{x}^{\prime}\right\|_ {X}。为此,我们注意到现代深度学习模型(例如 ResNets、Transformers)通常由残差块组成,即 h(x)=hL1h2h1(x)h(\mathbf{x})=h_{L-1} \circ \cdots \circ h_ {2} \circ h_{1}(\mathbf{x}) 其中 hl(x)=x+gl(x)h_{l}(\mathbf{x})=\mathbf{x}+g_{l}(\mathbf{x})。对于这样的模型,有一种简单的方法可以确保 hh 保持距离:通过限制所有非线性残差映射 {gl}l=1LLipschitz常数1\left\{g_{l}\right\}_{l=1}^{L 的 Lipschitz 常数-1} 小于 1 。我们在下面正式陈述这个结果:

命题 1(Lipschitz 有界残差块是距离保持 [4])。考虑一个隐藏映射 hXHh: \mathcal{X} \rightarrow \mathcal{H} 与剩余架构 h=hL1h2h1h=h_{L-1} \circ \ldots h_{2} \circ h_{1} 其中 hl(x)=x+gl(x).h_ {l}(\mathbf{x})=\mathbf{x}+g_{l}(\mathbf{x}) . 如果对于 0<α10<\alpha \leq 1,所有 g 都是 α\alpha -Lipschitz,即 gl(x)gl(x)HαxxX(x,x)X\left\|g_{l}(\mathbf{x})-g_{l}\left(\mathbf{x}^{\prime}\right)\right\|_{H} \leq \alpha\left\|\mathbf{x}-\mathbf{x}^{\prime}\right\|_{X} \quad \forall\left(\mathbf{x}, \mathbf{x} ^{\prime}\right) \in \mathcal{X}.然后:

L1xxXh(x)h(x)HL2xxX,L_{1} *\left\|\mathbf{x}-\mathbf{x}^{\prime}\right\|_{X} \leq\left\|h(\mathbf{x})-h\left(\mathbf{x}^{\prime}\right)\right\|_{H} \leq L_{2} *\left\|\mathbf{x}-\mathbf{x}^{\prime}\right\|_{X},

其中L1=(1α)L1L_{1}=(1-\alpha)^{L-1}L2=(1+α)L1L_{2}=(1+\alpha)^{L-1},即hh是距离保持。
证明在附录 E.1 中。残差网络在输入空间 X\mathcal{X} 和隐藏空间 H\mathcal{H} 之间构建几何保持度量变换的能力在学习理论和生成建模文献中得到了很好的证实,但是将这些结果应用于深度神经网络的不确定性估计似乎是新的 [4][6][33][65]

因此,为了确保隐藏映射 hh 保持距离,确保非线性残差块 gl(x)=σ(Wlx+bl)g_{l}(\mathbf{x})=\sigma\left(\mathbf{W }_{l} \mathbf{x}+\mathbf{b}_{l}\right) 具有小于 1 的谱范数(即最大奇异值),因为 glLip Wlx+blLipWl21\left\|g_{l} \right\|_{\text {Lip }} \leq\left\|\mathbf{W}_{l} \mathbf{x}+\mathbf{b}_{l}\right\|_{L i p } \leq\left\|\mathbf{W}_{l}\right\|_{2} \leq 1。在这项工作中,我们通过在权重矩阵 {Wl}l=1L1\left\{\mathbf{W}_{l}\right \}_{l=1}^{L-1}[6] 中推荐。简而言之,在每个训练步骤,SN 方法首先使用幂迭代估计谱范数 λ^Wl2\hat{\lambda} \approx\left\|\mathbf{W}_{l}\right\|_{2}方法 [27][55],然后将权重归一化为:

Wl={cWl/λ^ if c<λ^Wl otherwise \mathbf{W}_{l}= \begin{cases}c * \mathbf{W}_{l} / \hat{\lambda} & \text { if } c<\hat{\lambda} \\ \mathbf{W}_{l} & \text { otherwise }\end{cases}

其中 c>0c>0 是一个超参数,用于调整 Wl2\left\|\mathbf{W}_{l}\right\|_{2} 上的精确谱范数上限(因此 Wl2c)\left.\left\|\mathbf{W}_{l}\right\|_{2} \leq c\right)。这个超参数在实践中很有用,因为隐藏层中的其他正则化机制(例如 Dropout、Batch Normalization)可以重新调整原始残差映射的 Lipschitz 常数 [27]。因此,(10) 允许我们更灵活地控制神经网络权重的谱范数,因此它与手头的架构最兼容。方法总结 我们总结了算法 1-2 中的方法。如图所示,对于每个 minibatch 步骤,模型首先更新隐藏层权重 {Wl,bl}l=1L1\left\{\mathbf{W}_{l}, \mathbf{b}_{l}\right\}_{l=1 }^{L-1} 和可训练的输出权重 β={βk}k=1K\beta=\left\{\beta_{k}\right\}_{k=1}^{K} 通过 SGD,然后执行谱归一化,并且finally(如果在最后一个时期)执行精度矩阵更新(等式(9)。我们在附录 A 中讨论更多细节(例如计算复杂度)。

4 相关工作

4.1 深度分类器不确定性的单一模型方法

最近的工作研究了向基本模型添加少量额外参数或运行时成本的不确定性方法。大规模任务的最新技术是有效的集成方法 [80][22],它将一组模型置于一个模型之下,鼓励使用低秩扰动进行独立成员预测。这些方法是参数有效的,但仍需要模型的多次前向传递。 SNGP 研究了一种正交方法,该方法通过对单个模型施加适当的正则化来改进不确定性量化,因此在推断过程中只需要一次前向传递。

还存在一些其他高效的运行时单一模型方法来估计预测不确定性,通过替换损失函数 [34][51][52][69][70]、输出层 [7][73][12][49] 或计算输出层的闭合形式后验 [63][71][42]。 SNGP 在这些方法的基础上还考虑了良好的不确定性估计所必需的中间表示,并提出了一种简单的方法(谱归一化)来实现它。

最近一种名为 确定的不确定性量化 (DUQ) 的方法也调节神经网络映射,但使用双边梯度惩罚 [78]。对于残差网络,双边梯度惩罚可能是不可取的,因为施加 f=1||\nabla f|| = 1 到残差连接 f(x)=x+g(x)f(x) = x+g(x) 可以迫使 g(x)g(x) 趋向 0,从而导致恒等映射。我们在实验中与 DUQ 进行比较。

4.2 使用深度神经网络进行拉普拉斯近似和高斯过程推断

拉普拉斯近似在高斯过程和神经网络文献中有着悠久的历史 [74][18][62][50][64],最近已经探索了拉普拉斯近似深度神经网络和高斯过程之间的理论联系 [41]。与这些工作不同,SNGP 将拉普拉斯近似应用于神经高斯过程的后验,而不是浅层高斯过程或密集输出层深度神经网络。

  • 不确定性校准

SNGP 与 MCD-GP 的不同之处在于它考虑了不同的正则化方法(谱归一化),并且可以在单个前向传递中更有效地计算其后验不确定性。

我们在实验中与 MCD-GP 进行比较。附录 D 包含有关距离保持神经网络和开放集分类的进一步相关工作。

6 结论

(3) 评估包括准确性等预测指标、选择性预测和校准误差等不确定性指标、推理延迟等计算指标,以及分布内和分布外数据集下的性能。

我们在这项工作中所做的一个中心观察是,良好的表征学习对于良好的不确定性量化很重要。特别是,我们强调了 bi-Lipschitz(等式(5))作为深度神经网络的学习表示获得高质量不确定性性能的重要条件,并提出了光谱归一化作为在实践中确保这种特性的简单方法。然而,值得注意的是,还有其他表示学习技术,例如数据增强或无监督预训练,已知这些技术也可以提高网络的不确定性性能 [36][37]。分析这些方法是否以及如何有助于改善深度神经网络bi-Lipschitz 条件,以及 bi-Lipschitz 条件是否足以解释这些方法的成功,是未来工作的有趣途径。此外,我们注意到“命题 1”中的谱范数界限 α<1α < 1 仅形成了确保 bi-Lipschitz [6] 的充分条件。在实践中,我们观察到对于卷积层,最先进的性能需要更宽松的范数界限(参见第 C 节),提出了当前正则化方法在控制卷积核的谱范数方面是否足够精确的问题,或者是否有替代方案确保bi-Lipschitz准则的机制。最后,从概率学习的角度来看,SNGP 专注于学习单个高质量模型 pθ(yx)pθ(y|x) 以获得确定性表示。因此,我们希望它为(有效的)集成和贝叶斯神经网络 [22][43][80] 等方法提供互补的好处,这些方法也边缘化了表示参数。

7 更广泛的影响

为了提供不确定基线特征的示例,我们展示了 9 个任务中的 1 个可用的基线:ImageNet。图 3 显示了 8 个基线的准确性和校准误差,对分布内和分布外进行了评估。1 图 4 提供了将此类基线应用于下游任务的示例。总体而言,结果仅展示了存储库功能的一部分。我们很高兴看到新的研究已经建立在基线上。

尽管如此,我们并不声称本文中说明的改进完全解决了模型不确定性的问题。这是因为本研究中的分析和实验可能无法捕捉到现实世界用例的全部复杂性,并且总会有改进的空间。鼓励机器学习系统的设计者主动面对模型不确定性的缺点以及产生这些信心的基础模型。即使有适当的用户界面,也总是有可能误解模型输出和概率,例如选举预测等细微的应用程序,并且这些模型的用户应该接受适当的培训以考虑这些因素。

参考文献

  • [1]
  • [2] S. An, F. Boussaid, and M. Bennamoun. How Can Deep Rectifier Networks Achieve Linear Separability and Preserve Distances? In International Conference on Machine Learning, pages 514–523, June 2015. ISSN: 1938-7228 Section: Machine Learning.
  • [3] C. Anil, J. Lucas, and R. Grosse. Sorting Out Lipschitz Function Approximation. In International Conference on Machine Learning, pages 291–301, May 2019. ISSN: 1938-7228 Section: Machine Learning.
  • [4] P. Bartlett, S. Evans, and P. Long. Representing smooth functions as compositions of nearidentity functions with implications for deep network optimization. arXiv, 2018.
  • [5] P. L. Bartlett and M. H. Wegkamp. Classification with a Reject Option using a Hinge Loss. Journal of Machine Learning Research, 9(Aug):1823–1840, 2008.
  • [6] J. Behrmann, W. Grathwohl, R. T. Q. Chen, D. Duvenaud, and J.-H. Jacobsen. Invertible Residual Networks. In International Conference on Machine Learning, pages 573–582, May 2019. ISSN: 1938-7228 Section: Machine Learning.
  • [7] A. Bendale and T. E. Boult. Towards Open Set Deep Networks. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016.
  • [8] J. O. Berger. Statistical Decision Theory and Bayesian Analysis. Springer Series in Statistics. Springer-Verlag, New York, 2 edition, 1985.
  • [9] A. Blum. Random Projection, Margins, Kernels, and Feature-Selection. In C. Saunders, M. Grobelnik, S. Gunn, and J. Shawe-Taylor, editors, Subspace, Latent Structure and Feature Selection, Lecture Notes in Computer Science, pages 52–68, Berlin, Heidelberg, 2006. Springer.
  • [10] J. Bradshaw, A. G. d. G. Matthews, and Z. Ghahramani. Adversarial Examples, Uncertainty, and Transfer Testing Robustness in Gaussian Process Hybrid Deep Networks. arXiv:1707.02476 [stat], July 2017. arXiv: 1707.02476.
  • [11] J. Br ̈ ocker. Reliability, sufficiency, and the decomposition of proper scores. Quarterly Journal of the Royal Meteorological Society: A journal of the atmospheric sciences, applied meteorology and physical oceanography, 135(643):1512–1519, 2009.
  • [12] R. Calandra, J. Peters, C. E. Rasmussen, and M. P. Deisenroth. Manifold Gaussian Processes for regression. 2016 International Joint Conference on Neural Networks (IJCNN), 2016.
  • [13] D. Cer, M. Diab, E. Agirre, I. Lopez-Gazpio, and L. Specia. SemEval-2017 Task 1: Semantic Textual Similarity Multilingual and Crosslingual Focused Evaluation. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pages 1–14, Vancouver, Canada, Aug. 2017. Association for Computational Linguistics.
  • [14] A. Chernodub and D. Nowicki. Norm-preserving Orthogonal Permutation Linear Unit Activation Functions (OPLU). arXiv:1604.02313 [cs], Jan. 2017. arXiv: 1604.02313.
  • [15] C. Cortes, M. Mohri, and A. Rostamizadeh. Learning Non-Linear Combinations of Kernels. In Y. Bengio, D. Schuurmans, J. D. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 396–404. Curran Associates, Inc., 2009.
  • [16] J. Daunizeau. Semi-analytical approximations to statistical moments of sigmoid and softmax mappings of normal variables. Feb. 2017.
  • [17] G. P. Dehaene. A deterministic and computable Bernstein-von Mises theorem. ArXiv, 2019.
  • [18] J. S. Denker and Y. LeCun. Transforming Neural-Net Output Levels to Probability Distributions. In R. P. Lippmann, J. E. Moody, and D. S. Touretzky, editors, Advances in Neural Information Processing Systems 3, pages 853–859. Morgan-Kaufmann, 1991.
  • [19] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv:1810.04805 [cs], Oct. 2018. arXiv: 1810.04805.
  • [20] L. Dinh, D. Krueger, and Y. Bengio. NICE: Non-linear Independent Components Estimation. arXiv:1410.8516 [cs], Oct. 2014. arXiv: 1410.8516.
  • [21] L. Dinh, J. Sohl-Dickstein, and S. Bengio. Density estimation using Real NVP. arXiv:1605.08803 [cs, stat], May 2016. arXiv: 1605.08803.
  • [22] M. Dusenberry, G. Jerfel, Y. Wen, Y. Ma, J. Snoek, K. Heller, B. Lakshminarayanan, and D. Tran. Efficient and Scalable Bayesian Neural Nets with Rank-1 Factors. Proceedings of the International Conference on Machine Learning, 1, 2020.
  • [23] D. Feng, L. Rosenbaum, and K. Dietmayer. Towards Safe Autonomous Driving: Capture Uncertainty in the Deep Neural Network For Lidar 3D Vehicle Detection. Apr. 2018.
  • [24] D. Freedman. Wald Lecture: On the Bernstein-von Mises theorem with infinite-dimensional parameters. The Annals of Statistics, 27(4):1119–1141, Aug. 1999.
  • [25] T. Gneiting, F. Balabdaoui, and A. E. Raftery. Probabilistic forecasts, calibration and sharpness. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 69(2):243–268, Apr. 2007.
  • [26] T. Gneiting and A. E. Raftery. Strictly Proper Scoring Rules, Prediction, and Estimation. Journal of the American Statistical Association, 102(477):359–378, Mar. 2007.
  • [27] H. Gouk, E. Frank, B. Pfahringer, and M. Cree. Regularisation of Neural Networks by Enforcing Lipschitz Continuity. Apr. 2018.
  • [28] P. D. Gr ̃ AŒnwald and A. P. Dawid. Game theory, maximum entropy, minimum discrepancy and robust Bayesian decision theory. Annals of Statistics, 32(4):1367–1433, Aug. 2004. Publisher: Institute of Mathematical Statistics.
  • [29] I. Gulrajani, F. Ahmed, M. Arjovsky, V. Dumoulin, and A. Courville. Improved training of wasserstein GANs. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS’17, pages 5769–5779, Long Beach, California, USA, Dec. 2017. Curran Associates Inc.
  • [30] C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On Calibration of Modern Neural Networks. In International Conference on Machine Learning, pages 1321–1330, July 2017. ISSN: 1938-7228 Section: Machine Learning.
  • [31] D. Hafner, D. Tran, T. Lillicrap, A. Irpan, and J. Davidson. Reliable Uncertainty Estimates in Deep Neural Networks using Noise Contrastive Priors. July 2018.
  • [32] R. E. Harang and E. M. Rudd. Principled Uncertainty Estimation for Deep Neural Networks, 2018. Library Catalog: www.semanticscholar.org.
  • [33] M. Hauser and A. Ray. Principles of Riemannian Geometry in Neural Networks. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, pages 2807–2816. Curran Associates, Inc., 2017.
  • [34] M. Hein, M. Andriushchenko, and J. Bitterwolf. Why ReLU Networks Yield High-Confidence Predictions Far Away From the Training Data and How to Mitigate the Problem. pages 41–50, 2019.
  • [35] D. Hendrycks and T. Dietterich. Benchmarking Neural Network Robustness to Common Corruptions and Perturbations. Sept. 2018.
  • [36] D. Hendrycks, K. Lee, and M. Mazeika. Using Pre-Training Can Improve Model Robustness and Uncertainty. In International Conference on Machine Learning, pages 2712–2721, May 2019. ISSN: 1938-7228 Section: Machine Learning.
  • [37] D. Hendrycks*, N. Mu*, E. D. Cubuk, B. Zoph, J. Gilmer, and B. Lakshminarayanan. AugMix: A Simple Method to Improve Robustness and Uncertainty under Data Shift. In International Conference on Learning Representations, 2020.
  • [38] J.-H. Jacobsen, J. Behrmann, R. Zemel, and M. Bethge. Excessive Invariance Causes Adversarial Vulnerability. Sept. 2018.
  • [39] J.-H. Jacobsen, J. Behrmannn, N. Carlini, F. Tram ̃ Aˇ sr, and N. Papernot. Exploiting Excessive Invariance caused by Norm-Bounded Adversarial Robustness. Mar. 2019.
  • [40] r.-H. Jacobsen, A. W. M. Smeulders, and E. Oyallon. i-RevNet: Deep Invertible Networks. Feb. 2018.
  • [41] M. E. E. Khan, A. Immer, E. Abedi, and M. Korzepa. Approximate Inference Turns Deep Networks into Gaussian Processes. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d. Alch ̃ A©Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 3094–3104. Curran Associates, Inc., 2019.
  • [42] A. Kristiadi, M. Hein, and P. Hennig. Being Bayesian, Even Just a Bit, Fixes Overconfidence in ReLU Networks. arXiv:2002.10118 [cs, stat], Feb. 2020. arXiv: 2002.10118.
  • [43] B. Lakshminarayanan, A. Pritzel, and C. Blundell. Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, pages 6402–6413. Curran Associates, Inc., 2017.
  • [44] J. Landes. Probabilism, entropies and strictly proper scoring rules. International Journal of Approximate Reasoning, 63:1–21, Aug. 2015.
  • [45] S. Larson, A. Mahendran, J. J. Peper, C. Clarke, A. Lee, P. Hill, J. K. Kummerfeld, K. Leach, M. A. Laurenzano, L. Tang, and J. Mars. An Evaluation Dataset for Intent Classification and Out-of-Scope Prediction. arXiv:1909.02027 [cs], Sept. 2019. arXiv: 1909.02027.
  • [46] N. D. Lawrence and J. Q. Candela. Local Distance Preservation in the GP-LVM Through Back Constraints. Jan. 2006.
  • [47] L. LeCam. Convergence of Estimates Under Dimensionality Restrictions. The Annals of Statistics, 1(1):38–53, Jan. 1973.
  • [48] K. Lee, H. Lee, K. Lee, and J. Shin. Training Confidence-calibrated Classifiers for Detecting Out-of-Distribution Samples. In International Conference on Learning Representations, 2018.
  • [49] D. Macedo, T. I. Ren, C. Zanchettin, A. L. I. Oliveira, A. Tapp, and T. Ludermir. Isotropic Maximization Loss and Entropic Score: Fast, Accurate, Scalable, Unexposed, Turnkey, and Native Neural Networks Out-of-Distribution Detection. arXiv:1908.05569 [cs, stat], Feb. 2020. arXiv: 1908.05569.
  • [50] D. J. C. MacKay. A practical Bayesian framework for backpropagation networks. Neural Computation, 4(3):448–472, May 1992. Number: 3 Publisher: MIT Press.
  • [51] A. Malinin and M. Gales. Predictive Uncertainty Estimation via Prior Networks. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 7047–7058. Curran Associates, Inc., 2018.
  • [52] A. Malinin and M. Gales. Prior Networks for Detection of Adversarial Attacks. arXiv:1812.02575 [cs, stat], Dec. 2018. arXiv: 1812.02575.
  • [53] A. Meinke and M. Hein. Towards neural networks that provably know when they don’t know. In International Conference on Learning Representations, 2020.
  • [54] T. P. Minka. A family of algorithms for approximate bayesian inference. phd, Massachusetts Institute of Technology, USA, 2001. AAI0803033.
  • [55] T. Miyato, T. Kataoka, M. Koyama, and Y. Yoshida. Spectral Normalization for Generative Adversarial Networks. In International Conference on Learning Representations, 2018.
  • [56] Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading Digits in Natural Images with Unsupervised Feature Learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning 2011, 2011.
  • [57] J. Nixon, M. W. Dusenberry, L. Zhang, G. Jerfel, and D. Tran. Measuring calibration in deep learning. In CVPR Workshop, 2019.
  • [58] M. Panov and V. Spokoiny. Finite Sample Bernstein von Mises Theorem for Semiparametric Problems. Bayesian Analysis, 10(3):665–710, Sept. 2015.
  • [59] M. Parry, A. P. Dawid, and S. Lauritzen. Proper local scoring rules. Annals of Statistics, 40(1):561–592, Feb. 2012. Publisher: Institute of Mathematical Statistics.
  • [60] D. C. Perrault-Joncas. Metric Learning and Manifolds: Preserving the Intrinsic Geometry. 2017.
  • [61] A. Rahimi and B. Recht. Random Features for Large-Scale Kernel Machines. In J. C. Platt, D. Koller, Y. Singer, and S. T. Roweis, editors, Advances in Neural Information Processing Systems 20, pages 1177–1184. Curran Associates, Inc., 2008.
  • [62] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. University Press Group Limited, Jan. 2006. Google-Books-ID: vWtwQgAACAAJ.
  • [63] C. Riquelme, G. Tucker, and J. Snoek. Deep Bayesian Bandits Showdown: An Empirical Comparison of Bayesian Deep Networks for Thompson Sampling. In International Conference on Learning Representations, 2018.
  • [64] H. Ritter, A. Botev, and D. Barber. A Scalable Laplace Approximation for Neural Networks. In International Conference on Learning Representations, 2018.
  • [65] F. Rousseau, L. Drumetz, and R. Fablet. Residual Networks as Flows of Diffeomorphisms. Journal of Mathematical Imaging and Vision, 62(3):365–375, Apr. 2020.
  • [66] W. Ruan, X. Huang, and M. Kwiatkowska. Reachability analysis of deep neural networks with provable guarantees. In Proceedings of the 27th International Joint Conference on Artificial Intelligence, IJCAI’18, pages 2651–2659, Stockholm, Sweden, July 2018. AAAI Press.
  • [67] W. J. Scheirer, L. P. Jain, and T. E. Boult. Probability Models for Open Set Recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(11):2317–2324, Nov. 2014. Conference Name: IEEE Transactions on Pattern Analysis and Machine Intelligence.
  • [68] M. O. Searcod. Metric Spaces. Springer London, London, 2007 edition edition, Aug. 2006.
  • [69] M. Sensoy, L. Kaplan, and M. Kandemir. Evidential Deep Learning to Quantify Classification Uncertainty. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 3179–3189. Curran Associates, Inc., 2018.
  • [70] L. Shu, H. Xu, and B. Liu. DOC: Deep Open Classification of Text Documents. arXiv:1709.08716 [cs], Sept. 2017. arXiv: 1709.08716.
  • [71] J. Snoek, O. Rippel, K. Swersky, R. Kiros, N. Satish, N. Sundaram, M. M. A. Patwary, Prabhat, and R. P. Adams. Scalable Bayesian Optimization Using Deep Neural Networks. arXiv:1502.05700 [stat], Feb. 2015. arXiv: 1502.05700.
  • [72] J. Sokolic, R. Giryes, G. Sapiro, and M. R. D. Rodrigues. Robust Large Margin Deep Neural Networks. IEEE Transactions on Signal Processing, 2017.
  • [73] N. Tagasovska and D. Lopez-Paz. Single-Model Uncertainties for Deep Learning. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d. Alch ̃ A©-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 6417–6428. Curran Associates, Inc., 2019.
  • [74] L. Tierney, R. E. Kass, and J. B. Kadane. Approximate Marginal Densities of Nonlinear Functions. Biometrika, 76(3):425–433, 1989. Publisher: [Oxford University Press, Biometrika Trust].
  • [75] G.-L. Tran, E. V. Bonilla, J. Cunningham, P. Michiardi, and M. Filippone. Calibrating Deep Convolutional Gaussian Processes. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 1554–1563, Apr. 2019. ISSN: 1938-7228 Section: Machine Learning.
  • [76] Y. Tsuzuku, I. Sato, and M. Sugiyama. Lipschitz-Margin Training: Scalable Certification of Perturbation Invariance for Deep Neural Networks. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 6541–6550. Curran Associates, Inc., 2018.
  • [77] B. van Aken, J. Risch, R. Krestel, and A. Loser. Challenges for Toxic Comment Classification: An In-Depth Error Analysis. In Proceedings of the 2nd Workshop on Abusive Language Online (ALW2), pages 33–42, Brussels, Belgium, Oct. 2018. Association for Computational Linguistics.
  • [78] J. van Amersfoort, L. Smith, Y. W. Teh, and Y. Gal. Simple and Scalable Epistemic Uncertainty Estimation Using a Single Deep Deterministic Neural Network. arXiv:2003.02037 [cs, stat], Mar. 2020. arXiv: 2003.02037.
  • [79] N. Vedula, N. Lipka, P. Maneriker, and S. Parthasarathy. Towards Open Intent Discovery for Conversational Text. arXiv:1904.08524 [cs], Apr. 2019. arXiv: 1904.08524.
  • [80] Y. Wen, D. Tran, and J. Ba. BatchEnsemble: an Alternative Approach to Efficient Ensemble and Lifelong Learning. In International Conference on Learning Representations, 2020.
  • [81] T.-W. Weng, H. Zhang, P.-Y. Chen, J. Yi, D. Su, Y. Gao, C.-J. Hsieh, and L. Daniel. Evaluating the Robustness of Neural Networks: An Extreme Value Theory Approach. In International Conference on Learning Representations, 2018.
  • [82] A. G. Wilson, Z. Hu, R. Salakhutdinov, and E. P. Xing. Stochastic Variational Deep Kernel Learning. In Proceedings of the 30th International Conference on Neural Information Processing Systems, NIPS’16, pages 2594–2602, USA, 2016. Curran Associates Inc.
  • [83] M.-A. Yaghoub-Zadeh-Fard, B. Benatallah, F. Casati, M. Chai Barukh, and S. Zamanirad. User Utterance Acquisition for Training Task-Oriented Bots: A Review of Challenges, Techniques and Opportunities. IEEE Internet Computing, pages 1–1, 2020. Conference Name: IEEE Internet Computing.
  • [84] S. Zagoruyko and N. Komodakis. Wide Residual Networks. arXiv:1605.07146 [cs], June 2017. arXiv: 1605.07146.
  • [85] Y. Zheng, G. Chen, and M. Huang. Out-of-Domain Detection for Natural Language Understanding in Dialog Systems. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 28:1198–1209, 2020. Conference Name: IEEE/ACM Transactions on Audio, Speech, and Language Processing