Automatic differentiation, also known as backpropagation, AD, autodiff, or algorithmic differentiation, is a popular technique for computing derivatives of computer programs accurately and efficiently. Sometimes, however, the derivatives computed by AD could be interpreted as incorrect. These pitfalls occur systematically across tools and approaches. In this paper we broadly categorize problematic usages of AD and illustrate each category with examples such as chaos, time-averaged oscillations, discretizations, fixed-point loops, lookup tables, and linear solvers. We also review debugging techniques and their effectiveness in these situations. With this article we hope to help readers avoid unexpected behavior, detect problems more easily when they occur, and have more realistic expectations from AD tools.
翻译:自动微分,也称为反向传播、AD、autodiff或算法微分,是一种精确高效计算计算机程序导数的流行技术。然而,有时AD计算的导数可能被误解为不正确。这些陷阱系统性地存在于各类工具和方法中。本文对AD的问题性使用进行广泛分类,并通过混沌、时间平均振荡、离散化、不动点循环、查找表和线性求解器等示例说明每一类别。我们还回顾了调试技术及其在这些情况下的有效性。希望本文能帮助读者避免意外行为,在问题出现时更易检测,并对AD工具建立更现实的期望。