# Universal Differential Equations while also estimating non NN parameters

**URL:** <https://discourse.julialang.org/t/universal-differential-equations-while-also-estimating-non-nn-parameters/129075>\
**Category:** General Usage\
**Created:** [May 16, 2025, 7:30pm UTC](https://discourse.julialang.org/t/universal-differential-equations-while-also-estimating-non-nn-parameters/129075 "2025-05-16T19:30:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![donkeysaddle](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@donkeysaddle](https://discourse.julialang.org/u/donkeysaddle)\
**Post date:** [May 16, 2025, 7:30pm UTC](https://discourse.julialang.org/t/universal-differential-equations-while-also-estimating-non-nn-parameters/129075/1 "2025-05-16T19:30:34Z")

</div>

I have been using the the tutorial on [Automatically Discover Missing Physics by Embedding Machine Learning into Differential Equations](https://docs.sciml.ai/Overview/stable/showcase/missing_physics/#autocomplete) as a textbook to build my ODEs with embedded NN’s (It’s awesome). I also want to optimize the parameters for the rest of my ODE (the ones not in the NN). I am thinking I will iterate between updating the NN parameters while keeping the remaining ODE parameters fixed and then the ODE parameters while keeping the NN parameters fixed.

Is there any precedent for this? Perhaps some good examples or tips that one might offer?

Thanks,

DS

---

<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:** [May 16, 2025, 8:18pm UTC](https://discourse.julialang.org/t/universal-differential-equations-while-also-estimating-non-nn-parameters/129075/2 "2025-05-16T20:18:34Z")

</div>

> [@donkeysaddle](#):
>
> Is there any precedent for this? Perhaps some good examples or tips that one might offer?

The bottom of the tutorial does this. After fitting the UDE and doing the symbolic regression, it then does a refit on the full set of parameters.

The thing you need to be careful about is that the NN can capture “anything”, so your parameters will be biased downwards as a compensation of that. There isn’t good literature on this, but I’ve been looking to do some things with a student to showcase different regularizations as a fix for this behavior.
