# \[ANN\] NeuronBuilder.jl: A differentiable neuronal simulator

**URL:** <https://discourse.julialang.org/t/ann-neuronbuilder-jl-a-differentiable-neuronal-simulator/78743>\
**Category:** Package Announcements\
**Created:** [March 30, 2022, 1:54pm UTC](https://discourse.julialang.org/t/ann-neuronbuilder-jl-a-differentiable-neuronal-simulator/78743 "2022-03-30T13:54:08Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![AndreaRH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andrearh/32/32809_2.png) [@AndreaRH](https://discourse.julialang.org/u/AndreaRH)\
**Post date:** [April 1, 2022, 5:35pm UTC](https://discourse.julialang.org/t/ann-neuronbuilder-jl-a-differentiable-neuronal-simulator/78743/6 "2022-04-01T17:35:50Z")

</div>

Like @[**jpsamaroo**](https://discourse.julialang.org/u/jpsamaroo) said, technically, having a higher accuracy to your ode solution gives you a more accurate gradient. Here’s a relevant link about the numerics:

> [@When ForwardDiff-ing through an ODE is unstable](https://discourse.julialang.org/t/when-forwarddiff-ing-through-an-ode-is-unstable/49484/5):
>
> With the super accurate computation, it works! norm(grad) = 0.0009. slight_smile I should also note that it works with adjoint sensitivity analysis (with a normal Tsit5() solution) the numerical explosion in ForwardDiff doesn’t happen when I look at the L2 deviation of less ‘stiff’ species (i.e. Calcium, the second state, instead of voltage) I’m not sure what the lesson is to take from this. Maybe that Forward mode can potentially diverge if your error tolerances are high on a stiff system…

But for parameter estimation and MinimallyDisruptiveCurves accurate gradients might not be necessary, as long as you have a differentiable cost function that’s meaningful.

---

_[View the full topic](https://discourse.julialang.org/t/ann-neuronbuilder-jl-a-differentiable-neuronal-simulator/78743)._
