Skip to content

Conversation

@DhairyaLGandhi
Copy link
Member

@DhairyaLGandhi DhairyaLGandhi commented Apr 3, 2025

Needs SciML/SciMLBase.jl#979 and potentially a change in DifEqBase to pass sensealg in the kwargs in https://github.com/SciML/DiffEqBase.jl/blob/0874ff4ef8df2c74c843ce534e64ab3cdd40efb4/src/solve.jl#L1126

Currently UDEs fail to converge with reverse mode. This is due to dropped gradients for the parameters while solving the adjoint problem. We also definitely need to reduce the number of places where the assumptions SciML adjoints makes differs from the underlying AD. An example is returning the Vector{Vector{Float64}} as the gradient for a sol object instead of the Tangent or NamedTuple (like in Zygote) for the struct we are calculating gradients for.

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

Base automatically changed from dg/initprob to master April 24, 2025 22:58
@ChrisRackauckas
Copy link
Member

Conflicts

@DhairyaLGandhi
Copy link
Member Author

Can largely be closed since the inittype and the parameter gradient accumulation was covered in #1168 (and improved upon).

Only change of note here is the removal of the literal_getproperty, and the way back is called, which can be factored in separately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants