ad-delcont (hackage): Reverse-mode automatic differentiation using delimited continuations (shift/reset). The package exposes a small and easily extensible user interface to automatic differentiation combinators. It's also lightweight as a dependency, since it only requires base and transformers.  To use the library, import Numeric.AD.DelCont, which also contains all documentation.  Blog post : http://ocramz.github.io/haskell/automatic-differentiation/2021/07/19/ad-delcont.html  References :  F. Wang et al, Backpropagation with Continuation Callbacks : Foundations for Efficient and Expressive Differentiable Programming, NeurIPS 2018 - https://papers.nips.cc/paper/2018/file/34e157766f31db3d2099831d348a7933-Paper.pdf  F. Wang et al, Demystifying Differentiable Programming : Shift/Reset the Penultimate Backpropagator, ICFP 2019 - https://www.cs.purdue.edu/homes/rompf/papers/wang-icfp19.pdf
Keywords: bsd3|library|machine-learning|math|numeric|optimisation|optimization|adjoint|automatic-differentiation|backpropagation|gradient