AStupidBear / SpikingNeuralNetworks.jl

Julia Spiking Neural Network Simulator
Other
37 stars 16 forks source link

Add Adexp model Use case. #26

Open russelljjarvis opened 3 years ago

russelljjarvis commented 3 years ago

I believe the adaptive exponential model is often better able to fit to accommodation or adaptation of real neuron firing patterns.

If you see below you can see optimized Izhikevich versus adaptive exponential models trying to match an empirical voltage trace from Allen Cell Types (allen specimen id 325479788). Note the plots below come from python/seaborn.

real_trace

below the trace from specimen id 325479788 will appear orange against optimized models.

AdExp model fit:

use_case

Izhikevich model fit

IZHI_correction

Here is a notebook demonstrating the Adexp model in NB form: notebook

russelljjarvis commented 3 years ago

Note not sure if the units of the voltage trace are mV or just volts. If its volts I may need to recalibrate by applying units to the parameters and or the output voltage. In the python examples units are mV

jpsamaroo commented 3 years ago

They should be mV; I don't know of a neuron model that resets to -75V :wink:

This is quite cool! I know this might be asking a lot, but would you know how to convert this sort of comparison into a robust test that we can run as part of the testsets? I would love to have behavioral verification of models done automatically by the package.

In any case, let's leave this issue open until we find a way to incorporate this sort of information into this repository somehow.

russelljjarvis commented 3 years ago

AOK, well this unit mV issue should be easy for me to fix in the next week or so.

"This is quite cool! I know this might be asking a lot, but would you know how to convert this sort of comparison into a robust test that we can run as part of the testsets? I would love to have behavioral verification of models done automatically by the package."

In principle yes, this was mostly what my PhD involved but in python.

the allensdk for python means that a continuous integration script can download membrane potential traces as needed to do this sort of data driven testing. I am doubtfull that the same API exists for julia. I have used PyCall to do various things, but the interface dates rapidly and also it causes bad julia execution slow downs.

One could easily store some of these experimental files in julias equivalent of a pickle and do some testing that way, but its not a graceful solution.

russelljjarvis commented 3 years ago

Also the Izhikevich model can perform realistic adaptation patterns against ramp current injections but it struggles a bit with square pulses. Nonetheless, it's a problem when realistic behaviour is desirable.