We propose the first Bayesian encoder for metric learning. Rather than relying on neural amortization as done in prior works, we learn a distribution over the network weights with the Laplace Approximation. We actualize this by first proving that the contrastive loss is a valid log-posterior. We then propose three methods that ensure a positive definite Hessian. Lastly, we present a novel decomposition of the Generalized Gauss-Newton approximation. Empirically, we show that our Laplacian Metric Learner (LAM) estimates well-calibrated uncertainties, reliably detects out-of-distribution examples, and yields state-of-the-art predictive performance.
翻译:我们提出首个用于度量学习的贝叶斯编码器。不同于现有工作中依赖神经摊销的方法,我们通过拉普拉斯近似学习网络权重的分布。具体实现上,我们首先证明对比损失是一个有效的对数后验,随后提出三种确保海森矩阵正定的方法,最后给出广义高斯-牛顿近似的一种新颖分解。实验表明,我们的拉普拉斯度量学习器(LAM)能够估计校准良好的不确定性,可靠检测分布外样本,并取得最优的预测性能。