parallel computation of extracellularly evoked potentials

General issues of interest both for network and
individual cell parallelization.

Moderator: hines

Post Reply
sabsan

parallel computation of extracellularly evoked potentials

Post by sabsan »

Dear all,
I have a population of neurons and an extracellular current source to be simulated. Neurons are not connected each other, they are instances of the same model but use different values of the parameters. I would like to simulate the population on a cluster and periodically (e.g., once every 40 time steps) perform the following actions:
  • computing the extracellular potential globally evoked by the whole population in a given geometrical point;
    using the value of the evoked potential to update the amplitude of the extracellular current (feedback control);
    updating the extracellular potential at the cellular membranes as a consequence of the new extracellular current amplitude.
I implemented that scheme serially in NEURON and it worked well but now I would like to run it with parallel NEURON. Do you have any idea? Plese, could you give me any reference to previously published papers or tutorials? Thank you very much.
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: parallel computation of extracellularly evoked potentials

Post by ted »

There are three problems.
1. How to distribute the model cells over the hosts in your cluster.
2. How to gather all of the information that you need to compute the new extracellular field.
3. How to broadcast the new extracellular field to all of the cells.

This article
Hines, M.L. and Carnevale, N.T. Translating network models to parallel hardware in NEURON.
which was recently published in Journal of Neuroscience Methods (preprint available at http://www.neuron.yale.edu/neuron/bib/nrnpubs.html) shows how to problem 1 with a "round robin" scheme for distributing cells (like a dealer passing cards to a circle of players, one at a time).

It also suggests a way to deal with problems 2 and 3. This involves using pc.barrier to force all hosts to stop at regular intervals during the simulation, so you can collect the currents you need to calculate the new extracellular potentials, and then communicate the potentials to all the cells. You would automate this by using a custom run() procedure, a skeleton of which would look like this:

Code: Select all

proc run() {
  running_ = 1
  stdinit()
  while (t<tstop) {
    continuerun(t + bigdt) // bigdt is the interval between extracellular updates
    pc.barrier() // wait for all hosts to reach this point
    . . . get the membrane currents from your cells . . .
    pc.barrier() // wait for all hosts to reach this point
    . . . on host 0, use the information from all hosts to calculate the new extracellular potentials . . .
    pc.barrier() // wait for all hosts to get to this point
    . . . communicate the new extracellular potentials to the cells on all hosts . . .
  }
}
The question I have is, what's the best way to get the membrane current info to host 0 from all the other hosts, and then how to get the extracellular field info from host 0 to all the other hosts.
hines
Site Admin
Posts: 1687
Joined: Wed May 18, 2005 3:32 pm

Re: parallel computation of extracellularly evoked potentials

Post by hines »

ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: parallel computation of extracellularly evoked potentials

Post by ted »

The more I think about this
sabsan wrote:simulate the population on a cluster and periodically (e.g., once every 40 time steps) perform the following actions:
  • computing the extracellular potential globally evoked by the whole population in a given geometrical point;
    using the value of the evoked potential to update the amplitude of the extracellular current (feedback control);
    updating the extracellular potential at the cellular membranes as a consequence of the new extracellular current amplitude.
the more I think it is likely to give seriously misleading results unless the extracellular field is updated at a rate that accurately captures the time course of the current that the axon dumps into the extracellular medium.

"How fast should that be?"

Consider this simple model:

Code: Select all

create axon
axon {
  L = 2000
  diam = 1
  Ra = 35.4 // standard HH cytoplasmic resistivity, cm, and channel densities
  cm = 1
  insert hh
  nseg = 43 // segments < 0.1*d_lambda at 100 Hz
}
celsius = 6.3
A 0.1 ms x 2 nA current pulse applied to the 0 end (intensity approximately twice spike threshold) elicits a spike that propagates with conduction velocity ~ 558 um/ms near the middle of the length of the axon. The spike generates a dipole (current sink and source) that propagates at the same velocity, and the distance between the sink and source is only 140 um. So only 140/558 ~ 0.25 ms separates the sink (extracellular negativity) and the source (extracellular positivity).

Now, if we were sampling a sine wave with frequency f, we'd discover that the sampled waveform looks pretty ratty unless the sampling rate is at least 10*f. That's 5 samples per half cycle (interval between a positive peak and an adjacent negative peak). And it's barely adequate to give passable estimates of waveform peak amplitude and time course.

What this means, is that for good, old, cold, slow squid axon, the extracellular field really must be recomputed at intervals no longer than 0.25/5 = 0.05 ms. That's the _lower_ limit for an axon with a _slow_ spike mechanism. An axon with a fast spike mechanism demands more frequent recalculation of the extracellular field.

That suggests it may be impractical to do such simulations on a cluster--execution on a real parallel supercomputer may be required.
sabsan

Re: parallel computation of extracellularly evoked potentials

Post by sabsan »

thank you very much, guys. I appreciated your kind replies. I agree with Ted about time step, but I would like to clarify that:
  • models are integrated with a fine time step (0.02 ms);
    extracellular potentials induced by each cell in a geometrical point are computed with the same time step;
    an extracellular stimulus is simulated with the same time step.
The stimulus amplitude is automatically updated through a feedback control strategy that is run once every 40 time steps. For that reason, I would like to gather data from all available cells once every 40 time steps, sum up and correspondingly determine the overall evoked potential. Since cells are not synaptically connected each other I was considering to parallelize their simulation.
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: parallel computation of extracellularly evoked potentials

Post by ted »

By all means, try the approach you propose. But it carries a burden of proof--when the time for publication arrives, thoughtful reviewers are likely to challenge the validity of results. Unless you can cite previous work by others, it will be up to you to validate it yourself by constructing test cases that probe its weaknesses.
Post Reply