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.
翻译:我们提出了首个用于度量学习的贝叶斯编码器。与先前工作依赖神经摊销不同,我们通过拉普拉斯逼近学习网络权重的分布。我们首先证明对比损失是有效的对数后验,从而实现了这一点。随后提出了三种确保Hessian矩阵正定性的方法。最后,我们提出了广义高斯-牛顿逼近的一种新分解。实验表明,我们的拉普拉斯度量学习器(LAM)能够估计校准良好的不确定性,可靠地检测分布外样本,并取得了最先进的预测性能。