von Mises-Fisher(vMF)是一个著名的方向随机变量密度模型。最近兴起的用于高维结构化数据(如图像或文本)的深度嵌入方法,旨在提取突出的方向信息,可以使vMF模型更加流行。在本文中,我们将回顾vMF模型及其混合,提供如何在Python/PyTorch中训练模型的详细方法,重点是最大似然估计。特别是,vMF的实现通常会遇到密度归一化器中贝塞尔函数求值的臭名昭著的数值问题,特别是当维数很高时,我们使用支持任意精度的MPMath库来解决这个问题。对于混合学习,我们提供了基于小批量的大规模SGD学习,以及EM算法,这是一个完整的批量估计器。对于每种估计器/方法,我们在一些合成数据上测试我们的实现,同时我们还在更现实的图像聚类场景中演示了用例。我们的代码可在https://github.com/minyoungkim21/vmf-lib上公开获取。
英文摘要:
The von Mises-Fisher (vMF) is a well-known density model for directional random variables. The recent surge of the deep embedding methodologies for high-dimensional structured data such as images or texts, aimed at extracting salient directional information, can make the vMF model even more popular. In this article, we will review the vMF model and its mixture, provide detailed recipes of how to train the models, focusing on the maximum likelihood estimators, in Python/PyTorch. In particular, implementation of vMF typically suffers from the notorious numerical issue of the Bessel function evaluation in the density normalizer, especially when the dimensionality is high, and we address the issue using the MPMath library that supports arbitrary precision. For the mixture learning, we provide both minibatch-based large-scale SGD learning, as well as the EM algorithm which is a full batch estimator. For each estimator/methodology, we test our implementation on some synthetic data, while we also demonstrate the use case in a more realistic scenario of image clustering. Our code is publicly available in https://github.com/minyoungkim21/vmf-lib.
Variable Selection with Rigorous Uncertainty Quantification using Deep Bayesian Neural Networks: Posterior Concentration and Bernstein-von Mises Phenomenon