Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call for ideas: how should we implement model optimization/parameter exports in NeuroML model definitions? #176

Open
llandsmeer opened this issue Oct 18, 2021 · 3 comments
Assignees
Labels
C: NeuroML2 standard Component: NeuroML 2 standard T: enhancement Type: enhancement

Comments

@llandsmeer
Copy link

llandsmeer commented Oct 18, 2021

Hi, as a computational neuroscientist I'm working on tuning neuron models to behave in desired ways and as a developer I'm currently working on building a GPU backend for EDEN the simulator. I thought it would be nice to combine both and build a API for EDEN which would make it easy too write model tuners like evolutionary algorithm's against EDEN without having to reload the entire NeuroML file each step.

So in short, a model optimization would start with loading of the entire NeuroML model. Then a loop would start where we evaluate the fitness of one or more cells, and change their parameters to tune them to the correct behaviour. That's currently very expensive in EDEN and probably all NeuroML based simulators as we have to reload the entire model each step of the loop. It would be nice if we could mark some parameters for export and/or optimization in the NeuroML file itself.

So something like this:

<iafCell id="iaf"
         leakConductance="0.2nS"
         leakReversal="-70mV"
         thresh="-55mV"
         reset="-70mV"
         C="3.2pF"
         optimizationTarget="thresh"
         optimizationMin="-60mV"
         optimizationMax="-40mV"
         />

Or maybe some definitions at the toplevel:

<optimizationTarget cell="iaf" param="thresh" min="-60mV" max="-40mV"/>

Or don't make this about optimization but just name the parameter for export,
which would make the intended application less clear but allows for more freedom (e.g. other uses).

<optimizationTarget cell="iaf" param="thresh" />

Or of course it's also a possibility to not make any of this part of neuroml
and force simulator-specific solutions. And the philosophical question whether
the optimization is part of the model specification (and should be reproducible
by other researchers) or that NeuroML models should solely be inputs and outputs
of such algorithms.

This is just a discussion starter - maybe there already exist some ideas how
to implement this maybe someone even added this a a simulator but it's not
standardized yet. Looking forward to your thoughts and ideas!

Kind regards,
Lennart Landsmeer

@llandsmeer
Copy link
Author

Could for example also be relevant for people doing research on certain parameter sweeps of their models

@sanjayankur31 sanjayankur31 added C: NeuroML2 standard Component: NeuroML 2 standard T: enhancement Type: enhancement labels Oct 18, 2021
@sanjayankur31
Copy link
Member

CC'd members of the editorial board. @pgleeson : could we add Andrew and Salvador to the org too so we can cc them too? (or do we have a team neuroml/editors or something that can be used for this?)

@pgleeson
Copy link
Member

@llandsmeer Thanks for asking. This is quite related to the model tuning capabilities of https://github.com/NeuralEnsemble/neurotune, which have been added to pyneuroml here: https://github.com/NeuroML/pyNeuroML/tree/master/pyneuroml/tune

See for example this script which has most of what you want: loading a NeuroML model; specifying the max/min in terms of NeuroML parameters; saying what the behaviour to tune against is, and specifying which simulator to use.

I'd test that out before going too much further. EDEN will be added as an execution option to pyneuroml soon (pynml MyLEMS.xml -eden) but it may be better to extend NeuroMLSimulation.py as EDENSimulator.py and work with EDEN simulations more directly. The method here could be updated to keep the NeuroML model in memory somehow, and just adjust the parameter(s) required and rerun the simulation. However, you would have to work around the generation of code for optimized execution (which might have to be regenerated every time the parameters in a channel say change).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: NeuroML2 standard Component: NeuroML 2 standard T: enhancement Type: enhancement
Projects
Status: 🆕 New
Development

No branches or pull requests

5 participants