Eigen-AD: Algorithmic Differentiation of the Eigen Library

Hi @philipm, in 2018 I wrote a fully test-passing complete complex number implementation for stan available here:

git clone https://github.com/stan-dev/math.git
cd math
git fetch origin pull/789/head:sometempbranchname
git checkout sometempbranchname

I describe its architecture a bit in this post (by comparing it to something someone else is working on). Here is a test showing it 2nd order minimize (Hessian * -gradient) the difference between the real and imaginary parts of the first eigenvalue of a rotation matrix. It forms the basis of another program I use at my workplace for offshore cranes.

I have an interest in automatic differentiation with Eigen, because the expression template types (with ScalarBinaryOp<...>) stored in auto expressions (which Eigen says we shouldn’t use, but I don’t listen) might possibly be walked to generate the ‘bulk’ adjoint graph update function (applied on write to a storage type like Matrix<var,...>) at compile time rather than needing to be hard coded… I’ve just never attempted it.

As requested above, I’ve sent you an email at info@stce.rwth-aachen.de from my work email address for access to the software.

Do you have any plans for mixed forward and reverse mode calculations, similar to stan’s fvar<var>?

1 Like