A component of the DiffEq ecosystem for enabling sensitivity analysis for scientific machine learning (SciML). Optimize-then-discretize, discretize-then-optimize, adjoint methods, and more for ODEs, SDEs, DDEs, DAEs, etc.
It would be nice to have a backsolve function which is like solve but has the adjoints already setup with Zygote.jl, where it runs a choice gradient calculation when Zygote is used. We can set it up so that way it uses forward-mode automatically when it makes sense, switches to adjoint sensitivity analysis in the cases that are applicable (i.e. currently ODEs), and then falls back to pure Zygote reverse-mode in the case where length(p) >> length(u0). Of course, then there can just be a mode overload or something like that so you can pass down all of the requested SensitivityAlg args to override the choice, and then we should get this setup in the DiffEqParamEstim/DiffEqBayes to make all of the gradients efficient.
It would be nice to have a
backsolve
function which is likesolve
but has the adjoints already setup with Zygote.jl, where it runs a choice gradient calculation when Zygote is used. We can set it up so that way it uses forward-mode automatically when it makes sense, switches to adjoint sensitivity analysis in the cases that are applicable (i.e. currently ODEs), and then falls back to pure Zygote reverse-mode in the case where length(p) >> length(u0). Of course, then there can just be amode
overload or something like that so you can pass down all of the requestedSensitivityAlg
args to override the choice, and then we should get this setup in the DiffEqParamEstim/DiffEqBayes to make all of the gradients efficient.