72
Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it? I. What is spike sorting, neurophysiological origin of the recorded signal and short history of the field. Christophe Pouzat Mathématiques Appliquées à Paris 5 (MAP5) Université Paris-Descartes and CNRS UMR 8145 [email protected]

Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Embed Size (px)

Citation preview

Page 1: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Spike sorting: What is it? Why do weneed it? Where does it come from? How

is it done? How to interpret it?I. What is spike sorting, neurophysiologicalorigin of the recorded signal and short

history of the field.

Christophe PouzatMathématiques Appliquées à Paris 5 (MAP5)

Université Paris-Descartes and CNRS UMR 8145

[email protected]

Tuesday November 25, 2014

Page 2: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Where are we ?

Ensemble recordings

What is spike sorting?

What do we measure?

A short history of spike sorting

Page 3: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Why do we want to record from many neurons?

Neurophysiologists are trying to record many neurons at oncewith single neuron resolution because:

I They can collect more data per experiment.I They have reasons to think that neuronal information

processing might involve synchronization among neurons,an hypothesis dubbed binding by synchronization in thefield.

Page 4: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Ensemble recordings: multi-electrode array (MEA)

Left, the brain and the recording probe with 16 electrodes(bright spots). Width of one probe shank: 80 µm. Right, 1sec of raw data from 4 electrodes. The local extrema are theaction potentials. The insect shown on the figure is a locust,Schistocerca americana. Source: Pouzat, Mazor and Laurent.

Page 5: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

What a Schistocerca americana looks like?

"Schistocerca americana headshot" by Rob Ireton - http://www.flickr.com/photos/24483890@N00/7182552776/.Licensed under Creative Commons.

Page 6: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Voltage sensitive dyes

Fig. 2 of Homma et al (2009) Phil Trans R Soc B 364:2453.

Page 7: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Ensemble recordings: voltage-sensitive dyes (VSD)

Imaging of the pedal ganglion of Tritonia by Frost et al(2010), Chap. 5 of Membrane Potential Imaging in theNervous System, edited by M. Canepari and D. Zevecic.

Page 8: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

What a Tritonia looks like?

"Tritonia festiva" by Daniel Hershman from Federal Way, US -edmonds4. Licensed under Creative Commons Attribution 2.0via Wikimedia Commons.

Page 9: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Ensemble recordings: calcium concentrationimaging

Embryonic mouse brainstem-spinal chord preparation. Fig. 10of Homma et al (2010) Phil Trans R Soc B 364:2453.

Page 10: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Where are we ?

Ensemble recordings

What is spike sorting?

What do we measure?

A short history of spike sorting

Page 11: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Why are tetrodes used?

The last 200 ms of the locust figure. With the upper recordingsite only it would be difficult to properly classify the two firstlarge spikes (**). With the lower site only it would be difficultto properly classify the two spikes labeled by ##.

Page 12: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

What do we want?

I Find the number of neurons contributing to the data.I Find the value of a set of parameters characterizing the

signal generated by each neuron (e.g., the spike waveformof each neuron on each recording site).

I Acknowledging the classification ambiguity which canarise from waveform similarity and/or signal corruptiondue to noise, the probability for each neuron to havegenerated each event (spike) in the data set.

I A method as automatic as possible.

Page 13: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

A similar problem (1)

I Think of a room with many people seating and talking toeach other using a language we do not know.

I Assume that microphones were placed in the room andthat their recordings are given to us.

I Our task is to isolate the discourse of each person.

Page 14: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

A similar problem (2)

With apologies to Brueghel (original, without microphones, inVienna, Kunsthistorisches Museum).

Page 15: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

A similar problem (3)

To fulfill our task we could make use of the following features:I Some people have a low pitch voice while other have a

high pitch one.I Some people speak loudly while other do not.I One person can be close to one microphone and far from

another such that its talk is simultaneously recorded bythe two with different amplitudes.

I Some people speak all the time while other just utter acomment here and there, that is, the discourse statisticschanges from person to person.

Page 16: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

VSD does not eliminate the sorting problem (1)

VSD recording from Aplysia’s abdominal ganglion, Fig. 1 ofZecevic et al (1989) J Neurosci 9:3681.

Page 17: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Aplysia

Source: Wikipedia, Licensed under Creative CommonsAttribution-Share Alike 3.0 via Wikimedia Commons.

Page 18: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

VSD does not eliminate the sorting problem (2)

Fig. 2 of Zecevic et al (1989).

Page 19: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Calcium signals have slow kinetics!

Fig. 4 of Canepari et al (2010), Chap. 4 of of MembranePotential Imaging in the Nervous System, edited by M.Canepari and D. Zevecic.

Page 20: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Spike sorting also matters for neurologists

Neurologist perform daily electromyographic (EMG) recordingsmonitoring muscle fibers action potentials.

Page 21: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Where are we ?

Ensemble recordings

What is spike sorting?

What do we measure?

A short history of spike sorting

Page 22: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Membrane potential: intracellular and extracellularionic concentrations

Fig. 4-13 of Randall et al (1997) Eckert Animal Physiology WH Freeman and Company.

Page 23: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Different concentrations and selective permeabilitygenerate membrane potential

Fig. 3.2 of Plonsey and Barr (2007) Bioelectricity. A quantitativeApproach. Springer.The equilibrium potential (when a single ion is membranepermeable, here ion P) is given by the Nernst equation:

V eqm = Φi − Φe =

−RTZpF

ln(

[Cp]i[Cp]e

).

Page 24: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Nernst equilibrium potential

Tables 3.1 and 3.3 of Plonsey and Barr (2007).We get for the potassium ion in the squid:−25.8× ln 397/20 = −78 mV.

Page 25: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

A Model of a membrane "patch"

Fig. 3.3 of Plonsey and Barr (2007).

Page 26: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

What makes (most) neurons "special"?

If we depolarize neurons "enough", an "active response" ofaction potential is generated. Fig. 5-16 of Randall et al(1997).

Page 27: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Conductance changes are responsible for the actionpotential

Fig. 5.16 of Plonsey and Barr (2007).

Page 28: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

The action potential propagates!

VSD recording from the giant metacerebral neuron of Helixaspersa. Fig. 2 of Antic et al (2000) J Physiol 527:55.

Page 29: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

The giant metacerebral neuron of Helix aspersa

Fig. 1 of Antic et al (2000).

Page 30: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Helix aspersa

"Snail1web". Licensed under Public domain via WikimediaCommons.

Page 31: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Currents associated with a non-uniform membranepotential

When the membrane potential, Vm, is spatially non-uniformaxial, Ii [A], and trans-membrane, im [A/L], currents arenecessarily present:

Ii = −πa2σi∂Vm/∂x

andim = πa2σi∂

2Vm/∂x2 ,

where a is the axon / neurite diameter, the neurite is assumedto "seat" on the x axis, an axial current is positive if it goes inthe increasing x direction and a trans-mambrane current ispositive if it goes from inside to outside and σi is theintracellular conductance per centimeter [S/L]. See forinstance Plonsey and Barr (2007) Chap. 6 and 8.

Page 32: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Currents associated with a propagating AP

Fig. 8.3 of Plonsey and Barr (2007).

Page 33: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Extracellular potential associated with a currentsource (1)

For a point current source of intensity I0 in a medium ofconductivity per unit length σe , the extracellular potential(with respect to a reference at infinity) depends only on thedistance, r , to the source and is given by:

Φe =1

4πσeI0r.

For a fiber "seating" on the x axis we get at a point (x ′, y ′, z ′)the potential:

Φe(x ′, y ′, z ′) =1

4πσe

∫L

im(x)√(x − x ′)2 + y ′2 + z ′2

dx .

Page 34: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Extracellular potential associated with a currentsource (2)

Part of Fig. 8.5 of Plonsey and Barr (2007).Using our previous expression for im we get:

Φe(x ′, y ′, z ′) =a2σi4σe

∫L

∂2Vm(x)

∂x2

dx√(x − x ′)2 + y ′2 + z ′2

.

Notice the dependence on the fiber cross-section.

Page 35: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Observed extracellular potential

Fig. 16 of Fatt (1957) J Neurophys 20:27. Recordings fromCats motoneurons.

Page 36: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Computed extracellular potential

Left, Fig. 8 of Santiago Ramón y Cajal (1899), middle andright Fig. 2.4 and 2.5 of Holt PhD thesis (Caltech, 1999).

Page 37: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

The stretch receptor of Homarus americanus (1)

The preparation, Fig. 1 A of Eyzaguirre and Kuffler (1955a) JGen Phys 39:87.

Page 38: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

The stretch receptor of Homarus americanus (2)

Fig. 1 B of Eyzaguirre and Kuffler (1955a).

Page 39: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Homarus americanus

"Yellow-lobster". Licensed under Creative CommonsAttribution-Share Alike 3.0 via Wikimedia Commons.

Page 40: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Mismatch between somatic and axonal AP?

Fig. 13 of Eyzaguirre and Kuffler (1955b) J Gen Phys 39:121.

Page 41: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

This is not an invertebrate peculiarity (1)

Fig. 7 of Sakmann and Stuart (2009) in Single-ChannelRecording, edited by B Sakmann and E Neher, Springer

Page 42: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

This is not an invertebrate peculiarity (2)

Fig. 5 of Williams and Stuart (1999) J Physiol 521:467.

Page 43: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

No more than a HH model is required

Fig. 5 of Cooley and Dodge (1966) Biophys J 6:583.

Page 44: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

A note on slice recording (1)

Fig. 1 of Sakmann and Stuart (2009)

Page 45: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

A note on slice recording (2)

Fig. 2 of Aitken et al (1995) J Neurosci Methods 59:139.

Page 46: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

What happens when the diameter increases?

Numerical model, Fig. 10 of Goldstein and Rall (1974)Biophys J 14:731.

Page 47: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Reflected AP can happen!

Fig. 5 of Antic et al (2000).

Page 48: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Where are we ?

Ensemble recordings

What is spike sorting?

What do we measure?

A short history of spike sorting

Page 49: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Sorting by eye

As soon as the "the all-or-nothing response of sensory nervefibres" was established by Adrian and Forbes (1922),neurophysiologists started doing sorting by eye using the spikeamplitude as a feature. Fig. 4 of Hartline and Graham (1932)J Cell Comp Physiol 1:277. Limulus polyphemus recording.

Page 50: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

What a Limulus polyphemus looks like?

"Limulus polyphemus (aq.)" by Hans Hillewaert - Own work.Licensed under Creative Commons Attribution-Share Alike 4.0via Wikimedia Commons.

Page 51: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Automatic window discriminator (1963)

Fig. 4 of Poggio and Mountcastle (1963) J Neurophys26:775. In vivo recordings from monkeys thalamic neurons.

Page 52: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Template matching (1964)

Fig. 1 of Gerstein and Clark (1964) Science 143:1325. Dorsalcochlear nucleus recordings from anesthetized cats.

Page 53: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Dimension reduction and cluster membership(1965)

Fig. 1-3 of Simon (1965) Electroenceph clin Neurophysiol18:192.

Page 54: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Superposition resolution (1972)

Fig. 3 of Prochazka et al (1972) Electroenceph clinNeurophysiol 32:95.

Page 55: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Multi-channel linear filter: principle (1)

Page 56: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Multi-channel linear filter: principle (2)You can reconstruct the figure with the following waveforms:

I Neuron 1: electrode 1 (-1,2,1,0,0,0,0,0,0) and electrode 2(0,0,0,0,0,0,-1,2,-1).

I Neuron 2: electrode 1 (-1,2,1,0,0,0,0,0,0) and electrode 2(0,0,0,-1,2,-1,0,0,0).

And the following filters:

I Neuron 1: electrode 1 (-1/2,1,1/2,0,0,0,0,0,0) and electrode 2(0,0,0,0,0,0,-1/2,1,-1/2).

I Neuron 2: electrode 1 (-1/2,1,1/2,0,0,0,0,0,0) and electrode 2(0,0,0,-1/2,1,-1/2,0,0,0).

Given signals E1(t) and E2(t) on electrode 1 and 2, the output offilter 1 (responding to Neuron 1) is:

F1(t) = −E1(t−1)/2+E1(t)−E1(t+1)/2−E2(t+5)/2+E2(t+6)−E2(t+7)/2 .

Page 57: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Multi-channel linear filter (1975)

Fig. 2 of Roberts and Hartline (1975) Brain Res 94:141.

Page 58: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Waveform changes during bursts (1973)

Fig. 2 of Calvin (1972) Electroenceph clin Neurophysiol 34:94.

Page 59: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

McNaughton, O’Keefe and Barnes solution (1983)

Part of the Introduction and Fig. 1 of McNaughton et al(1983) J Neurosci Methods 8:391.

Page 60: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

McNaughton, O’Keefe and Barnes solution (1983)

Fig. 2 and 3 of McNaughton et al (1983)

Page 61: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

McNaughton, O’Keefe and Barnes solution (1983)

Fig. 5 of McNaughton et al (1983)

Page 62: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Sampling jitter (1984)

Fig. 1 of McGill and Dorfman (1984) IEEE Trans Biomed Eng31:462. EMG recordings.

Page 63: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Sampling jitter correction

Fig. 4 of Pouzat et al (2002) J Neurosci Methods 122:43.

Page 64: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Sophisticated visualization tools (late 80s early90s)

A scatter plot matrix obtained with GGobi (www.ggobi.org).

Page 65: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Automatic clustering: K-means (1)

Hastie et al (2009) The Elements of Statistical Learning.Springer. p 510.

Page 66: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Automatic clustering: K-means (2)

Fig. 14.6 of Hastie et al (2009).

Page 67: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Gaussian Mixture Model (GMM)GMM can be viewed as "refined" and "softer" version of theK-means. Here an individual observation is assumed to arisefrom the following procedure, with K components in themixture:1. Draw the mixture component j ∈ {1, . . . ,K} with

probabilities {π1, . . . , πK} (∑K

i=1 πi = 1).2. Given j , draw the observation Y ∈ Rp from a

(multivariate) Gaussian distribution with pdf:

φµj ,Σj(y) =

1(2π)p/2|Σj |1/2

exp(−12

(y − µj)TΣ−1

j (y − µj)

).

The N observation are assumed to be drawn independently anidentically.The pdf of y ∈ Rp can then be written as:

pY (y) =K∑j=1

πjφµj ,Σj(y) .

Page 68: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

GMM inference: Expectation-Maximization (1)Let us consider a simple case in dimension 1 with twocomponents. We have:

I Y1 ∼ N (µ1, σ21)

I Y2 ∼ N (µ2, σ22)

I Y = (1− Z )Y1 + ZY2

where Z ∈ {0, 1} with Pr(Z = 1) = π. The density of Y isthen:

pY (y) = (1− π)φµ1,σ1(y) + πφµ2,σ2(y)

and the (log-)likelihood, when an IID sampe of size N hasbeen observed, is:

l(π, µ1, σ1, µ2, σ2) =N∑i=1

ln [(1− π)φµ1,σ1(yi) + πφµ2,σ2(yi)] .

Page 69: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

GMM inference: Expectation-Maximization (2)

The Expectation-Maximization (EM) algorithm for GMM"augments" the data, doing "as if" the component of originhad been observed, that is as if (Y ,Z ) instead of simply Ywas known. The complete log-likelihood is then:

l0(π, µ1, σ1, µ2, σ2) =∑N

i=1(1− zi ) lnφµ1,σ1(yi ) + zi lnφµ2,σ2(yi )+∑Ni=1(1− zi ) ln(1− π) + zi ln(π) .

Since the zi are not known, the EM proceeds in a iterativefashion, by substituting their expected values:

γi = E(Zi |π, µ1, σ1, µ2, σ2) = Pr(Zi = 1|π, µ1, σ1, µ2, σ2) ,

also called the responsibility of the second component forobservation i .

Page 70: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

GMM inference: Expectation-Maximization (3)

Hastie et al (2009) p 275.

Page 71: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

Automatic choice of KThe number of components can be automatically chosen byminimizing a penalized likelihood with Akaike’s InformationCriterion (AIC):

K = argmink−2l(θ̂k) + 2d(k) ,

where θ̂k stands for maximum likelihood estimator of the setof model parameters and d(k) stands for the dimension(number of parameters) of the model.Schwarz’s Bayesian Information Criterion (BIC) tends to workbetter:

K = argmink−2l(θ̂k) + ln(N)d(k) ,

where N is the sample size.See Chap. 7 of Hastie et al (2009) for more criteria anddiscussion.

Page 72: Spike sorting: What is it? Why do we need it? Where does it come from? How is it done? How to interpret it?

That’s all for today!

Thank you for listening!