2024/09/10 by Nicholas Krämer, Krämer, Nicholas
Computer Science · Mathematics · #FOS: Computer and information sciences #FOS: Mathematics #Iterative Methods for Nonlinear Equations #Machine Learning (cs.LG) #Mathematical Software (cs.MS) #Numerical Analysis (math.NA) #Numerical Methods and Algorithms
paper · pdf · doi:10.48550/arxiv.2409.06752
openalex publication_date 2024/09/10 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28
Automatic differentiation is everywhere, but there exists only minimal documentation of how it works in complex arithmetic beyond stating "derivatives in ℂd" ≅ "derivatives in ℝ2d" and, at best, shallow references to Wirtinger calculus. Unfortunately, the equivalence ℂd ≅ ℝ2d becomes insufficient as soon as we need to derive custom gradient rules, e.g., to avoid differentiating "through" expensive linear algebra functions or differential equation simulators. To combat such a lack of documentation, this article surveys forward- and reverse-mode automatic differentiation with complex numbers, covering topics such as Wirtinger derivatives, a modified chain rule, and different gradient conventions while explicitly avoiding holomorphicity and the Cauchy--Riemann equations (which would be far too restrictive). To be precise, we will derive, explain, and implement a complex version of Jacobian-vector and vector-Jacobian products almost entirely with linear algebra without relying on complex analysis or differential geometry. This tutorial is a call to action, for users and developers alike, to take complex values seriously when implementing custom gradient propagation rules -- the manuscript explains how.