Accurate Computation of the Logarithm of Modified Bessel Functions on GPUs
Andreas Plesner, Hans Henrik Brandenborg S{\o}rensen, S{\o}ren Hauberg

TL;DR
This paper introduces two novel algorithms for accurately computing the logarithm of modified Bessel functions on GPUs, significantly improving precision and speed over existing methods, enabling advanced applications like high-dimensional neural network feature analysis.
Contribution
The paper presents robust, fast algorithms for computing the log of modified Bessel functions with machine precision accuracy, outperforming existing libraries and enabling new high-dimensional data applications.
Findings
Algorithms achieve up to 6150x speedup on GPU
Relative errors are on the order of machine precision
Successfully fit von Mises-Fisher distributions to high-dimensional data
Abstract
Bessel functions are critical in scientific computing for applications such as machine learning, protein structure modeling, and robotics. However, currently, available routines lack precision or fail for certain input ranges, such as when the order is large, and GPU-specific implementations are limited. We address the precision limitations of current numerical implementations while dramatically improving the runtime. We propose two novel algorithms for computing the logarithm of modified Bessel functions of the first and second kinds by computing intermediate values on a logarithmic scale. Our algorithms are robust and never have issues with underflows or overflows while having relative errors on the order of machine precision, even for inputs where existing libraries fail. In C++/CUDA, our algorithms have median and maximum speedups of 45x and 6150x for GPU and 17x and 3403x for…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
