用概率积分替代Softmax,实现无采样高精度不确定性建模
Rethinking Approximate Gaussian Inference in Classification
- 以logit空间的高斯分布为输入,用正态累积函数替换Softmax进行预测推断
- 在ImageNet等数据集上,相比传统MC采样,不确定性估计更准确且提速3倍以上
- 适合需要高效可靠置信度评估的工业级分类任务
分类任务中,软最大(softmax)输出仅捕捉随机不确定性。为建模认知不确定性,已有近似高斯推断方法。本文统一形式化这些方法,将其视为对logit空间输出高斯分布,并通过softmax将分布前向传播得到预测。然而,此类softmax高斯积分无法解析求解,蒙特卡洛(MC)近似成本高且噪声大。为此,我们用逐元素的正态累积分布函数(normCDF)或S型函数替代softmax,实现无需采样的精确近似。该方法还可通过矩匹配将高斯前向推导近似为狄利克雷分布,彻底消除MC采样带来的运行时与内存开销。我们在ImageNet、CIFAR-100和CIFAR-10等大中小型数据集上验证了该方法,结合拉普拉斯、HET、SNGP等近似高斯推断方法,结果表明其不确定性量化性能优于传统softmax MC采样。代码已开源:https://github.com/bmucsanyi/probit。
原文摘要 · Abstract (English)
In classification tasks, softmax functions are ubiquitously used as output activations to produce predictive probabilities. Such outputs only capture aleatoric uncertainty. To capture epistemic uncertainty, approximate Gaussian inference methods have been proposed. We develop a common formalism to describe such methods, which we view as outputting Gaussian distributions over the logit space. Predictives are then obtained as the expectations of the Gaussian distributions pushed forward through the softmax. However, such softmax Gaussian integrals cannot be solved analytically, and Monte Carlo (MC) approximations can be costly and noisy. We propose to replace the softmax activation by element-wise normCDF or sigmoid, which allows for the accurate sampling-free approximation of predictives. This also enables the approximation of the Gaussian pushforwards by Dirichlet distributions with moment matching. This approach entirely eliminates the runtime and memory overhead associated with MC sampling. We evaluate it combined with several approximate Gaussian inference methods (Laplace, HET, SNGP) on large- and small-scale datasets (ImageNet, CIFAR-100, CIFAR-10), demonstrating improved uncertainty quantification capabilities compared to softmax MC sampling. Our code is available at https://github.com/bmucsanyi/probit.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。