Stan数学库:C++中的反向模式自动微分
The Stan Math Library: Reverse-Mode Automatic Differentiation in C++
摘要:
随着优化和统计推断中的计算挑战变得越来越困难,利用导数的算法变得越来越重要。然而,使这些算法如此强大的衍生物的实现是一个巨大的用户负担,这些算法的实用性关键取决于完全消除实现负担的自动微分等工具。Stan Math Library是一个C++反向模式的自动微分库,它被设计成可用的、广泛的和可扩展的、高效的、可扩展的、稳定的、可移植的和可再发行的,以促进这些算法的构建和利用。可用性是通过一个简单的直接接口和一个干净抽象的功能接口来实现的。广泛的内置库包括矩阵运算,线性代数,微分方程求解和最常见的概率函数的函数。可扩展性源于一个简单的面向对象的表达式框架,允许用户轻松地创建自定义函数。通过自定义存储管理、子表达式缓存、基于特征的元编程和表达式模板的组合来实现效率。复合函数的偏导数被惰性地评估以提高可伸缩性。通过在代数表达式中注意算术精度并在可能的情况下提供稳定的复合函数来实现稳定性。对于可移植性,该库是标准兼容的C++(03),并已在Windows,Mac OS X和Linux的所有主要编译器上进行了测试。
英文摘要:
As computational challenges in optimization and statistical inference grow ever harder, algorithms that utilize derivatives are becoming increasingly more important. The implementation of the derivatives that make these algorithms so powerful, however, is a substantial user burden and the practicality of these algorithms depends critically on tools like automatic differentiation that remove the implementation burden entirely. The Stan Math Library is a C++, reverse-mode automatic differentiation library designed to be usable, extensive and extensible, efficient, scalable, stable, portable, and redistributable in order to facilitate the construction and utilization of such algorithms. Usability is achieved through a simple direct interface and a cleanly abstracted functional interface. The extensive built-in library includes functions for matrix operations, linear algebra, differential equation solving, and most common probability functions. Extensibility derives from a straightforward object-oriented framework for expressions, allowing users to easily create custom functions. Efficiency is achieved through a combination of custom memory management, subexpression caching, traits-based metaprogramming, and expression templates. Partial derivatives for compound functions are evaluated lazily for improved scalability. Stability is achieved by taking care with arithmetic precision in algebraic expressions and providing stable, compound functions where possible. For portability, the library is standards-compliant C++ (03) and has been tested for all major compilers for Windows, Mac OS X, and Linux.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。