Neuroscientists using DifferentialEquations.jl ecosystem?

Hi,

I’ve done this before as a coding exercise. You could use DiffEqFlux to get gradients of the model wrt some loss function. Or, more simply, any of the techniques here.
DiffEqParamEstim.jl is also a nice package for this.

One tip: don’t use an L2 loss on your data. A slight phase lag in a spike results in a huge L2 difference vs the nominal spike. So the loss function is badly conditioned, and optimisers converge more slowly.

A well conditioned loss for spiking models is: calculate the current you would have to inject at any point in time to make \dot{V}(t) of the parameterised model the same as that of the nominal model. IE
I_{inj}(t) = \dot{V}(t) - \dot{V}^*(t)
Then take the l2 integral of this current:
Cost = \int^T_0 I_{inj}(t)^2 \ dt
IE how hard would I have to push charge in/out of the membrane to make the model dynamics match the nominal dynamics.

Scientifically speaking, it might be useful to make your model behave like the data. However I don’t think there is any point in trying to infer biophysical parameters (e.g. conductances) by model fitting. It’s a hugely ill-coniditioned problem on these conductance based models. You give me a model and a set of parameters that fit the data. I will give you a completely (orders of magnitude) different set of parameters that also fit the data. Hence, the parameter values themselves are meaningless (although the capability of the model to fit the data may be meaningful). (This might be a bit of a generalisation)

Good luck!

4 Likes