TyXe:基于Pyro的贝叶斯神经网络
TyXe: Pyro-based Bayesian neural nets for Pytorch
摘要:
我们介绍Typhoon,一个建立在Pytorch和Pyro之上的贝叶斯神经网络库。我们的主要设计原则是干净地分离架构,先验,推理和可能性规范,允许灵活的工作流程,用户可以快速地将这些组件组合起来。与现有的包相比,Typhoon不实现任何层类,而是依赖于通用Pytorch代码中定义的架构。然后,Typhoon为规范先验、变分指导、推理技术和层选择提供模块化选择,以用于指定架构的贝叶斯处理。减少方差的采样技巧,如局部重新参数化或flipout,作为效果处理程序实现,可以独立于其他规范应用。我们展示了Typhoon的易用性,可以从各种库中探索流行模型的贝叶斯版本:使用纯Pytorch神经网络的玩具回归;使用Torchvision ResNets的大规模图像分类;基于DGL的图形神经网络;以及基于Pytorch 3D构建的神经辐射场。最后,我们提供了方便的变分持续学习的抽象。在所有情况下,从确定性到贝叶斯神经网络的变化都对现有代码进行了最小的修改,为广泛的研究人员和实践者提供了实际的不确定性估计技术。该库可在https://github.com/TyXe-BDL/TyXe上查阅。
英文摘要:
We introduce TyXe, a Bayesian neural network library built on top of Pytorch and Pyro. Our leading design principle is to cleanly separate architecture, prior, inference and likelihood specification, allowing for a flexible workflow where users can quickly iterate over combinations of these components. In contrast to existing packages TyXe does not implement any layer classes, and instead relies on architectures defined in generic Pytorch code. TyXe then provides modular choices for canonical priors, variational guides, inference techniques, and layer selections for a Bayesian treatment of the specified architecture. Sampling tricks for variance reduction, such as local reparameterization or flipout, are implemented as effect handlers, which can be applied independently of other specifications. We showcase the ease of use of TyXe to explore Bayesian versions of popular models from various libraries: toy regression with a pure Pytorch neural network; large-scale image classification with torchvision ResNets; graph neural networks based on DGL; and Neural Radiance Fields built on top of Pytorch3D. Finally, we provide convenient abstractions for variational continual learning. In all cases the change from a deterministic to a Bayesian neural network comes with minimal modifications to existing code, offering a broad range of researchers and practitioners alike practical access to uncertainty estimation techniques. The library is available at https://github.com/TyXe-BDL/TyXe.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。