Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend and fix AD tests #183

Merged
merged 2 commits into from Jun 11, 2020
Merged

Extend and fix AD tests #183

merged 2 commits into from Jun 11, 2020

Conversation

devmotion
Copy link
Member

This PR extends the AD tests. It shows that on the considered problem finite differencing and forward AD yield (roughly) the same gradients, Jacobians, and Hessians if the delay length is not parameterized and the solution is continuous at the initial time point. This is actually somewhat reasonable and expected since in both cases the forward sensitivity equations have jump discontinuities at the time points with C1-discontinuities in the original DDE system since the location of these C1-discontinuities depends on the parameters (see, e.g., https://epubs.siam.org/doi/abs/10.1137/100814949).

Copy link
Member

@ChrisRackauckas ChrisRackauckas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This explains a ton, thanks

@ChrisRackauckas
Copy link
Member

@Vaibhavdixit02

@devmotion
Copy link
Member Author

We should really add the forward + adjoint sensitivity implementation to DiffEqSensitivity. Actually in my master thesis I used SymPy and a ridiculous amount of metaprogramming (I feel terrible about it nowadays 😄) to implement the forward sensitivity equations somewhat efficiently (IIRC), it would just be so much nicer to have a general implementation.

@devmotion
Copy link
Member Author

BTW I could start working on an implementation, I'm just not familiar with the package and its design yet, so I might need some general advice or guidance in the beginning (or at least some time for studying the code base).

@ChrisRackauckas
Copy link
Member

Yes, open an issue? https://github.com/SciML/DiffEqSensitivity.jl I've been meaning to get to add an issue for it. We just did SDEs (https://frankschae.github.io/post/gsoc2020-high-weak-order-solvers-sde-adjoints/), so DDEs are next.

Is there a paper on adjoint methods for DDEs?

@devmotion
Copy link
Member Author

devmotion commented Jun 11, 2020

I would assume that it's possible to make use of the existing implementations for ODEs?

Regarding the adjoints, some references were mentioned in one of the papers I studied. I'll look it up.

@ChrisRackauckas
Copy link
Member

It probably just needs callbacks for the discontinuities.

@devmotion devmotion merged commit f108381 into master Jun 11, 2020
@ChrisRackauckas ChrisRackauckas deleted the ad_extension branch June 11, 2020 23:24
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.

None yet

2 participants