# Is the choice of integrator significant for NeuralODE solving?

**URL:** <https://discourse.julialang.org/t/is-the-choice-of-integrator-significant-for-neuralode-solving/95645>\
**Category:** Modelling & Simulations\
**Tags:** diffeqflux\
**Created:** [March 7, 2023, 3:16am UTC](https://discourse.julialang.org/t/is-the-choice-of-integrator-significant-for-neuralode-solving/95645 "2023-03-07T03:16:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![srikumarks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/srikumarks/32/47447_2.png) [@srikumarks](https://discourse.julialang.org/u/srikumarks)\
**Post date:** [March 7, 2023, 3:16am UTC](https://discourse.julialang.org/t/is-the-choice-of-integrator-significant-for-neuralode-solving/95645/1 "2023-03-07T03:16:42Z")

</div>

For directly solving known ODEs, of course the choice of integrator is significant.

However, when learning a network that’s part of an ODE, it isn’t clear to me whether the integrator matters, or should matter. Does it make a significant difference? Would the trained NN embody behaviours of the integrator too or would it turn out to be somewhat independent of it? … like if trained with Tsit5 or say KahanLi8, do we already know whether we’d get NNs that can/cannot be used with the other integrator?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [March 8, 2023, 1:49pm UTC](https://discourse.julialang.org/t/is-the-choice-of-integrator-significant-for-neuralode-solving/95645/2 "2023-03-08T13:49:43Z")

</div>

> [@srikumarks](#):
>
> However, when learning a network that’s part of an ODE, it isn’t clear to me whether the integrator matters, or should matter. Does it make a significant difference?

It can. Depends on the accuracy needed and the properties needed.

> [@srikumarks](#):
>
> like if trained with Tsit5 or say KahanLi8, do we already know whether we’d get NNs that can/cannot be used with the other integrator?

If the tolerance is low enough then you can swap them out. That said, if you try and train a symplectic system with a non-symplectic integrator then you will have numerical error in the training which can effect the results.
