# Native eigenvals for differentiable programming

**URL:** <https://discourse.julialang.org/t/native-eigenvals-for-differentiable-programming/27126>\
**Category:** Machine Learning\
**Created:** [August 3, 2019, 9:06am UTC](https://discourse.julialang.org/t/native-eigenvals-for-differentiable-programming/27126 "2019-08-03T09:06:09Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [May 14, 2020, 3:43am UTC](https://discourse.julialang.org/t/native-eigenvals-for-differentiable-programming/27126/21 "2020-05-14T03:43:50Z")

</div>

> [@gszep](#):
>
> is this code based the document you posted by Mike Giles?

Yes. See this incomplete PR as well

> <https://github.com/FluxML/Zygote.jl/pull/327>
>
> Works for eigenvalues but there seems to be an issue with the eigenvectors I can…'t figure out.
> 
> I'm also a bit unsure how to best test the results, the current approach of using magnitude etc. might not be ideal.
> 
> Reference: https://people.maths.ox.ac.uk/gilesm/files/NA-08-01.pdf

---

<div class="post-metadata">

**Author:** ![Sabyasachi\_Ghosh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sabyasachi_ghosh/32/18446_2.png) [@Sabyasachi\_Ghosh](https://discourse.julialang.org/u/Sabyasachi_Ghosh)\
**Post date:** [September 5, 2022, 10:19am UTC](https://discourse.julialang.org/t/native-eigenvals-for-differentiable-programming/27126/22 "2022-09-05T10:19:29Z")

</div>

Looks like the links [https://github.com/mitmath/18335/blob/master/notes/adjoint/adjoint.pdf](https://github.com/mitmath/18335/blob/master/notes/adjoint/adjoint.pdf) and [https://github.com/mitmath/18335/blob/master/notes/adjoint/eigenvalue-adjoint.pdf](https://github.com/mitmath/18335/blob/master/notes/adjoint/eigenvalue-adjoint.pdf) have gone stale. Do you happen to have latest links to the same notes? Thanks!

---

<div class="post-metadata">

**Author:** ![tomaklutfu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomaklutfu/32/2411_2.png) [@tomaklutfu](https://discourse.julialang.org/u/tomaklutfu)\
**Post date:** [September 5, 2022, 11:51am UTC](https://discourse.julialang.org/t/native-eigenvals-for-differentiable-programming/27126/23 "2022-09-05T11:51:28Z")

</div>

[This](https://github.com/mitmath/18335/blob/b6f22babc99546d11081ec49030aef62c38d8501/notes/adjoint/adjoint.pdf) and [this](https://github.com/mitmath/18335/blob/b6f22babc99546d11081ec49030aef62c38d8501/notes/adjoint/eigenvalue-adjoint.pdf) links from the repo’s history.

---

<div class="post-metadata">

**Author:** ![ThummeTo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thummeto/32/26105_2.png) [@ThummeTo](https://discourse.julialang.org/u/ThummeTo)\
**Post date:** [February 13, 2023, 3:32pm UTC](https://discourse.julialang.org/t/native-eigenvals-for-differentiable-programming/27126/24 "2023-02-13T15:32:20Z")

</div>

In case someone still needs this:

Because I couldn’t find a ready to use implementation, I implemented sensitivities based on the here discussed paper[1] for the eigen function for ChainRulesCore.jl (frule and rrule) as well as ForwardDiff.jl and put it into a package: [DifferentiableEigen.jl](https://github.com/ThummeTo/DifferentiableEigen.jl). Registration is pending…

[1] Michael B. Giles. 2008. **An extended collection of matrix derivative results for forward and reverse mode algorithmic differentiation.** [PDF](https://people.maths.ox.ac.uk/gilesm/files/NA-08-01.pdf)

[Previous page](https://discourse.julialang.org/t/native-eigenvals-for-differentiable-programming/27126.md?page=1)
