论文标题
根部自动分化
Automatic Differentiation in ROOT
论文作者
论文摘要
在数学和计算机代数中,自动分化(AD)是评估计算机程序指定函数的导数的一组技术。 AD利用了这样一个事实,即每个计算机程序,无论多么复杂,都执行一系列基本算术操作(加法,减法,乘法,除法等),基本功能(EXP,Log,Log,log,sin,cos等)和控制流量语句。 AD将函数的源代码作为输入,并产生派生功能的源代码。通过反复应用链条规则,可以自动计算任意顺序的衍生物,准确地计算为工作精度,并且最多可以使用比原始程序更算术操作的算法。 本文介绍了在Root(由Cring支持的)中提供的AD技术,可通过实现源代码转换并在远期模式和反向模式下实现源代码转换并采用差分划分的链条规则来产生任意C/C ++功能的衍生物。我们解释了其当前在Tformula中梯度计算的集成。我们证明了Root拟合算法的正确性和性能改善。
In mathematics and computer algebra, automatic differentiation (AD) is a set of techniques to evaluate the derivative of a function specified by a computer program. AD exploits the fact that every computer program, no matter how complicated, executes a sequence of elementary arithmetic operations (addition, subtraction, multiplication, division, etc.), elementary functions (exp, log, sin, cos, etc.) and control flow statements. AD takes source code of a function as input and produces source code of the derived function. By applying the chain rule repeatedly to these operations, derivatives of arbitrary order can be computed automatically, accurately to working precision, and using at most a small constant factor more arithmetic operations than the original program. This paper presents AD techniques available in ROOT, supported by Cling, to produce derivatives of arbitrary C/C++ functions through implementing source code transformation and employing the chain rule of differential calculus in both forward mode and reverse mode. We explain its current integration for gradient computation in TFormula. We demonstrate the correctness and performance improvements in ROOT's fitting algorithms.