diffrax icon indicating copy to clipboard operation
diffrax copied to clipboard

ODE Solver with Constraints?

Open ameya98 opened this issue 2 years ago • 2 comments

Hi, I was wondering if Diffrax supported adding a norm constraint at the boundary: $$|y(1)| = \text{constant}$$ for the neural ODE: $$\frac{dy}{dt} = f(t, y), \ y(0) = x$$

Any thoughts on how I would implement this?

ameya98 avatar Jun 14 '23 15:06 ameya98

So numerically speaking, the initial value problem already uniquely specifies the value of y(1).

Are you asking a modelling question, i.e. how you might train f such that this condition is true? If so I would suggest just making it a term in your loss function.

patrick-kidger avatar Jun 15 '23 16:06 patrick-kidger

Ah, yes I want to learn $f$ so that this constraint is satisfied. Are you aware of any better techniques? Because there are no guarantees when simply adding a penalty term in my loss.

ameya98 avatar Jun 15 '23 18:06 ameya98