A fully Bayesian treatment of complicated predictive models (such as deep neural networks) would enable rigorous uncertainty quantification and the automation of higher-level tasks including model selection. However, the intractability of sampling Bayesian posteriors over many parameters inhibits the use of Bayesian methods where they are most needed. Thermodynamic computing has emerged as a paradigm for accelerating operations used in machine learning, such as matrix inversion, and is based on the mapping of Langevin equations to the dynamics of noisy physical systems. Hence, it is natural to consider the implementation of Langevin sampling algorithms on thermodynamic devices. In this work we propose electronic analog devices that sample from Bayesian posteriors by realizing Langevin dynamics physically. Circuit designs are given for sampling the posterior of a Gaussian-Gaussian model and for Bayesian logistic regression, and are validated by simulations. It is shown, under reasonable assumptions, that the Bayesian posteriors for these models can be sampled in time scaling with $\ln(d)$, where $d$ is dimension. For the Gaussian-Gaussian model, the energy cost is shown to scale with $ d \ln(d)$. These results highlight the potential for fast, energy-efficient Bayesian inference using thermodynamic computing.
翻译:对复杂预测模型(如深度神经网络)进行完全贝叶斯处理,将能实现严格的不确定性量化,并自动化完成模型选择等更高层次任务。然而,对多参数贝叶斯后验分布进行采样的计算困难性,阻碍了贝叶斯方法在最需要其应用的场景中的使用。热力学计算作为一种加速机器学习中常用操作(如矩阵求逆)的范式已经出现,其基础是将朗之万方程映射到噪声物理系统的动力学上。因此,自然可以考虑在热力学设备上实现朗之万采样算法。在本工作中,我们提出了通过物理实现朗之万动力学来对贝叶斯后验分布进行采样的电子模拟设备。我们给出了用于高斯-高斯模型后验采样以及贝叶斯逻辑回归采样的电路设计,并通过仿真验证了其有效性。研究表明,在合理的假设下,这些模型的贝叶斯后验采样时间与 $\ln(d)$ 成比例,其中 $d$ 为维度。对于高斯-高斯模型,其能量消耗被证明与 $ d \ln(d)$ 成比例。这些结果凸显了利用热力学计算实现快速、高能效贝叶斯推断的潜力。