Expand description
Strongly-typed, compile-time autodifferentiation in Rust.
aegir
is an experimental autodifferentiation framework designed to
leverage the powerful type-system in Rust and avoid runtime as much as
humanly possible. The approach taken resembles that of expression
templates, as commonly used in linear-algebra libraries written in C++, and
indeed mirrors (in many ways) the concept of Iterator in std.
A key distinction of aegir
from existing autodiff frameworks is that it
does not rely on a monolithic Tensor
type that handles shape
transformations at runtime. This would be equivalent to using the ndarray
crate to handle all numerical computations and data-storage/layouts. While
this has its advantages - like simplicity and ease of use - our approach is
a strict generalisation and allows for much greater flexibility. By
incorporating both dynamic and fixed-size data structures, we also
have the advantage of the various compile-time optimisations that come from
using arrays, tuples, and scalars.
Key Features
- Built-in arithmetic, linear-algebraic, trigonometric and special operators.
- Infinitely differentiable: Jacobian, Hessian, etc…
- Decoupled/generic tensor type.
- Monadic runtime optimisation.
- Custom DSL for operator expansion.