# Discovery of mechanistic terms from UODE vs using the UODE

**URL:** <https://discourse.julialang.org/t/discovery-of-mechanistic-terms-from-uode-vs-using-the-uode/101940>\
**Category:** Machine Learning\
**Tags:** question\
**Created:** [July 22, 2023, 7:44pm UTC](https://discourse.julialang.org/t/discovery-of-mechanistic-terms-from-uode-vs-using-the-uode/101940 "2023-07-22T19:44:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsh19](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gsh19/32/49350_2.png) [@gsh19](https://discourse.julialang.org/u/gsh19)\
**Post date:** [July 22, 2023, 7:44pm UTC](https://discourse.julialang.org/t/discovery-of-mechanistic-terms-from-uode-vs-using-the-uode/101940/1 "2023-07-22T19:44:07Z")

</div>

Hi everyone,

Going through the [missing physics example](https://docs.sciml.ai/Overview/stable/showcase/missing_physics/), there is a section on symbolic regression via sparse regression. I understand that this has the advantage of more clearly exposing the relationship between the system variables. My question is the following: does this offer any other benefit in terms of inference speed if such a model were to be used in a setting where given the state of the system, its future is to be predicted? Is there a compromise on prediction quality as the symbolic regression form is derived from the UODE?

---

<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:** [August 6, 2023, 8:49am UTC](https://discourse.julialang.org/t/discovery-of-mechanistic-terms-from-uode-vs-using-the-uode/101940/2 "2023-08-06T08:49:34Z")

</div>

> [@gsh19](#):
>
> y question is the following: does this offer any other benefit in terms of inference speed if such a model were to be used in a setting where given the state of the system, its future is to be predicted?

Yes, inference speed increases because you get a simpler calculation.

> [@gsh19](#):
>
> Is there a compromise on prediction quality as the symbolic regression form is derived from the UODE?

We generally see that sparsification improves extrapolation.

---

<div class="post-metadata">

**Author:** ![gsh19](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gsh19/32/49350_2.png) [@gsh19](https://discourse.julialang.org/u/gsh19)\
**Post date:** [August 8, 2023, 12:52pm UTC](https://discourse.julialang.org/t/discovery-of-mechanistic-terms-from-uode-vs-using-the-uode/101940/3 "2023-08-08T12:52:57Z")

</div>

> [@ChrisRackauckas](#):
>
> Yes, inference speed increases because you get a simpler calculation.

Could you elaborate a bit more on this please? I was of the impression that the forward pass through the neural network part of the UDE would be fairly quick.

> [@ChrisRackauckas](#):
>
> We generally see that sparsification improves extrapolation.

Interesting. This sounds to me somewhat similar to the effect that regularization methods like drop-out and L1 achieve.

---

<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:** [August 8, 2023, 1:28pm UTC](https://discourse.julialang.org/t/discovery-of-mechanistic-terms-from-uode-vs-using-the-uode/101940/4 "2023-08-08T13:28:09Z")

</div>

> [@gsh19](#):
>
> Could you elaborate a bit more on this please? I was of the impression that the forward pass through the neural network part of the UDE would be fairly quick.

Neural networks are slow. They do a matrix multiplication. That’s O(n^3) flops. Writing down a polynomial or trig function etc. is a lot faster. I’m not sure there’s much more too it than that. NNs are slow, that’s why they are taking up so much GPU compute these days. Other things are faster running in serial on one core.

> [@gsh19](#):
>
> Interesting. This sounds to me somewhat similar to the effect that regularization methods like drop-out and L1 achieve.

Yes it’s similar.
