BCS547
Neural Decoding
Nature of the problem
In response to a stimulus with unknown orientation , you observe a pattern of activity A. What can you say about given A?
Bayesian approach: recover P(|A) (the posterior distribution)
Estimation theory: come up with a single value estimate from A
Population Code
Tuning Curves Pattern of activity (A)
Estimation theory
-100 0 1000
20
40
60
80
100
Preferred retinal location
A2
Decoder
Trial 2
2 Encoder
-100 0 1000
20
40
60
80
100
Preferred retinal location
A1
Decoder
Trial 1
1 Encoder
Decoder
Trial 200
200 Encoder-100 0 100
0
20
40
60
80
100
Preferred retinal location
A200
`
Estimation theory
If 2 is as small as possible, the estimate is said to be efficientˆ |
If E[] , the estimate is said to be unbiasedˆ|
is a random variable. To determine the quality of this estimate we can compute its mean, E[ ], and its variance,
2.
ˆ| ˆ |
Estimation theory
• A common measure of decoding performance is the mean square error between the estimate and the true value
• This error can be decomposed as:
2ˆMSE |E
22ˆ|
2 2ˆ|
ˆMSE |E
bias
Efficient Estimators
The smallest achievable variance for an unbiased estimator is known as the Cramer-Rao bound, CR
2.
An efficient estimator is such that
In general :
2 2ˆ CR|
2 2ˆ CR|
Fisher information is defined as:
and it is equal to:
where P(A| ) is the distribution of the neuronal noise.
Fisher Information
2
1
CR
I
2
2
ln |PI E
A
Fisher Information
2
2
1 1
1
''
1
22 ' ''''
221
22 ' '
22
ln P |
P | P |!
ln P | ln ln !
ln P |
ln P |
ln P |
i ik fn n
ii i
i i i
n
i i i ii
ni i
ii i
ni i i
ii ii
i i i i
i
I E
f ea k
k
k f f k
k ff
f
kf k ff
ff
f f f fE
f
A
A
A
A
A
A
'''
1
2'
1
n
ii i
ni
i i
ff
fI
f
Fisher Information
• For one neuron with Poisson noise
• For n independent neurons :
The more neurons, the better! Small variance is good!
Large slope is good!
2f
fi
i i
I
2
2f
fi
ii
I d
Fisher Information and Tuning Curves
• Fisher information is maximum where the slope is maximum
• This is consistent with adaptation experiments
Fisher Information
• In 1D, Fisher information decreases with the width of the tuning curves
• In 2D, Fisher information does not depend on the width of the tuning curve
• In 3D and above, Fisher information increases with the width of the tuning curves.
• ATTENTION: this is true for independent gaussian noise.
Ideal observer
The discrimination threshold of an ideal observer, , is proportional to the variance of the Cramer-Rao Bound.
In other words, an efficient estimator is an ideal observer.
CR
• An ideal observer is an observer that can recover all the Fisher information in the activity (easy link between Fisher information and behavioral performance)
• If all distributions are gaussian, Fisher information is the same as Shannon information.
Estimation theory
Examples of decoders
Voting Methods
Optimal Linear Estimator
ˆ i ii
x w a
Voting Methods
Optimal Linear Estimator
1ˆ ,T
i ii
x w a C C AA AXW A W
Voting Methods
Optimal Linear Estimator
Center of Mass
ˆi i
i
ii
a xx
a
1ˆ ,T
i ii
x w a C C AA AXW A W
Center of Mass/Population Vector
• The center of mass is optimal (unbiased and efficient) iff: The tuning curves are gaussian with a zero baseline, uniformly distributed and the noise follows a Poisson distribution
• In general, the center of mass has a large bias and a large variance
Voting Methods
Optimal Linear Estimator
Center of Mass
Population Vector
ˆi i
i
ii
a
a
ˆ
ˆ ˆ( )
i ii
a
angle
P P
P
1ˆ ,T
i ii
x w a C C AA AXW A W
Population Vector
aiPi
P
Population Vector
11 112 21
1 ?
ˆ mi i
i mm
ap p
ap p
a
C C
P
AA AP P
P P W A
W W
Typically, Population vector is not the optimal linear estimator.
Population Vector
• Population vector is optimal iff: The tuning curves are cosine, uniformly distributed and the noise follows a normal distribution with fixed variance
• In most cases, the population vector is biased and has a large variance
• The variance of the population vector estimate does not reflect Fisher information
Population Vector
Population vector
Fisher Information
Population vector should NEVER be used to estimateinformation content!!!!
Population Vector
Maximum Likelihood
Maximum Likelihood
The estimate is the value of that maximizes the likelihood P(A|). Therefore, we seek such that:
ˆ arg max |
arg max log |
P
P
A
A
Maximum Likelihood
If the noise is gaussian and independent
Therefore
and the estimate is given by:
2
2ˆ arg min
2i i
i
a f
2
2| exp
2i i
i
a fP
A
2
2log |
2i i
i
a fP
A
Distance measure:Template matching
Maximum Likelihood
Gradient descent for ML
• To minimize the likelihood function with respect to , one can use a gradient descent technique in which is updated according to :
1t t t
t
L
Gaussian noise with variance proportional to the mean
If the noise is gaussian with variance proportional to the mean, the distance being minimized changes to:
2
ˆ arg min2
i i
i i
a f
f
Data point with small variance are weighted more heavily
Poisson noise
If the noise is Poisson then
And :
ii
f
i
a
i
ii
a
ef
aPP
ii
i
!
)|(|
A
!|
i
fai
a
efi
aPii
ML and template matching
Maximum likelihood is a template matching procedure BUT the metric used is not always the Euclidean distance, it depends on the noise distribution.
Bayesian approach
We want to recover P(|A). Using Bayes theorem, we have:
likelihood of
posterior distribution over prior distribution over A
prior distribution over
||
P PP
P
AA
A
Bayesian approach
What is the likelihood of P()It is the distribution of the noise… It is the same distribution we used for maximum likelihood.
Bayesian approach
• The prior P() correspond to any knowledge we may have about before we get to see any activity.
• Ex: Zhang et al.
Bayesian approach
Once we have P(), we can proceed in two different ways. We can keep this distribution for Bayesian inferences (as we would do in a Bayesian network) or we can make a decision about . For instance, we can estimate as being the value that maximizes P(). This is known as the maximum a posteriori estimate (MAP). For flat prior, ML and MAP are equivalent.
Using the prior: Zhang et al
• For a time varying variable, one can use the distribution over the previous estimate as a prior for the next one.
Prior
Nasty but independent of Xt+1
1 11
1 1
| , || ,
|
| |
|
t t t t tt t t
t t
t t t t
t t
P PP
P
P P
P
A X X X XX A X
A X
A X X X
A X
Bayesian approach
Limitations: the Bayesian approach and ML require a lot of data…
Alternative: estimate P(|A) directly using a nonlinear estimate.
Bayesian approach:logistic regression
Example: Decoding finger movements in M1. On each trial, we observe 100 cells and we want to know which one of the 5 fingers is being moved.
1 2 3 100
1 2 3 4 5
…100 input units
5 categories
P(F5|A)
A
1
0
Bayesian approach:multinomial distributions
Example: Decoding finger movements in M1. Each finger can take 3 mutually exclusive states: no movement, flexion, extension.
Probability of no movementProbability of flexionProbability of extension
Activity of the N M1 neurons
W
Digit 1 Wrist
Softmax
Digit 2 Digit 3 Digit 4 Digit 5
Decoding time varying signals
s(t)
(t)
s t t k t
s k
Decoding time varying signals
0
ˆ
exps
s t t k t
s k
Q ik
Q
Decoding time varying signals
1
1
ˆt
t n
ii
n
ii
s t t k t
k t d
k t t d
k t t
Decoding time varying signals
s(t)
(t)