光线追踪采样器:面向大众的神经网络贝叶斯采样
The Ray Tracing Sampler: Bayesian Sampling of Neural Networks for Everyone
AI总结:
研究基于光线追踪推导MCMC采样方法,其对随机梯度加热恢复力强且能跨似然障碍。用此方法在单消费级GPU上对多种神经网络架构输出后验分布采样,还证明多种先验采样器是广义光线追踪框架特殊情况,且提供相关代码文档。
摘要:
我们推导了一族基于马尔可夫链蒙特卡罗(MCMC)的采样方法,该方法通过在折射率\(n(x)\)是期望似然\(\mathcal{L}(x)\)的函数的介质中沿光线路径进行采样,扩展了以往关于等速采样的工作。最简单的光线追踪方法以恒定速度在参数空间中传播光线,与哈密顿蒙特卡罗(HMC)和随机梯度HMC相比,对随机梯度加热的恢复能力提高了几个数量级,并且能够跨越任何似然障碍,包括参数空间中的空洞。我们使用最简单的光线追踪方法,在单个消费级GPU上对各种不同架构的神经网络输出的后验分布进行采样,包括对15亿参数的GPT - 2架构的初步探索。我们还表明,包括传统HMC、原始微正则HMC、 metropolis、Gibbs甚至蒙特卡罗积分在内的先验采样器都是广义光线追踪框架内的特殊情况,该框架可以根据任意加权函数进行采样。提供了C、JAX和PyTorch的公共代码和文档。
英文摘要:
We derive a family of Markov Chain Monte Carlo (MCMC) sampling methods based on following ray paths in a medium where the refractive index $n(x)$ is a function of the desired likelihood $\mathcal{L}(x)$, extending past work on isokinetic sampling. The simplest ray tracing method propagates rays at constant speed through parameter space, leading to orders of magnitude higher resilience to heating for stochastic gradients as compared to both Hamiltonian Monte Carlo (HMC) and Stochastic Gradient HMC, as well as the ability to cross any likelihood barrier, including holes in parameter space. Using the simplest ray tracing method, we sample the posterior distributions of neural network outputs for a variety of different architectures, including a preliminary exploration of the 1.5 billion-parameter GPT-2 (Generative Pre-trained Transformer 2) architecture, all on a single consumer-level GPU. We also show that prior samplers including traditional HMC, the original microcanonical HMC, Metropolis, Gibbs, and even Monte Carlo integration are special cases within a generalized ray tracing framework, which can sample according to an arbitrary weighting function. Public code and documentation for C, JAX, and PyTorch are available at https://bitbucket.org/pbehroozi/ray-tracing-sampler/src
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。