Quantitative Methods in Neuroscience (neu 366M) Homework 6 Due

Quantitative Methods in Neuroscience
(neu 366M)
Homework 6
Due: Tuesday October 21, by the beginning of class
In this assignment, we’ll attempt to discover the unknown filter that a neuron applies to
its inputs, from the known input stimulus and the measured neural response.
1) Recovering filters with the Wiener-Hopf equations.
From the class website, download the Matlab script file generateWHdata.m. This
file generates a white-noise input variable x, a filter h, and outputs xfilt and spks.
The output xfilt is obtained by simply filtering x by h, whereas spks is a spike train
generated from xfilt. You may think of xfilt as the sub-threshold voltage response of
a cell to input x.
a. From the Wiener-Hopf equations, we know that
Cxy = C xx h
where C xx is the autocorrelation, re-written as a Toeplitz matrix, and Cxy , h are
vectors. For our previous work with the pseudoinverse, we know therefore that
we can recover an estimate hinf of the filter h from the Wiener-Hopf equations
by
hinf = (C xx )−1 Cxy
(1)
where I’m using −1 to refer to the pseudoinverse. Let us use these insights to try
to estimate the neural filter h from the input x and the (subthreshold) neural
response y = xfilt. The filter is 200 time-steps long and causal, so M1 = 0 and
M2 = 199. Recall that the correlation xcorr of a vector of length N with itself
has length 2N − 1, and that the zero time-lag term is the N th term. Retain the
appropriate terms of the autocorrelation, then use the command Toeplitz to convert these terms into a correlation matrix C xx of appropriate size. Compute the
cross-correlation vector Cxy , also keeping only the appropriate terms. Normalize
both correlation vectors by dividing by their lengths. Finally, use the \ command
in Matlab (the backslash corresponds to the pseudoinverse operation in Matlab)
to obtain hinf, through hinf = Cxx \Cxy .
b. Evaluating the quality of the estimated filter hinf: Plot h (the ‘true’ filter) and
hinf (the WH estimate of the filter) on the same plot: they should be in excellent
agreement. Next, try to extract hinf by doing the same as in [a.], but with y =
spks - mean(spks). That is, you are going to estimate the neural filter from its
spiking output instead of its subthreshold response. The normalization of C xy
should be by the number of spikes rather than the length of the vector. Compare
the obtained filter against h. How good is the estimate? Why is it not as good
as when y = xfilt?
c. In this portion, we’ll evaluate when the spike-triggered average (STA) provides
a good approximation to the filter estimate obtained from the WH equations.
Recall that the spike-triggered average response of a neuron to a stimulus is
simply the cross-correlation of the stimulus with the neural spike train:
STA = Cxy
Compare the mathematical expression for the STA with the WH filter estimate
of Equation (1), to first infer under what conditions on C xx is the STA expected
to produce a good approximation of the WH filter estimate?
Next, compute the STA for the input and subthreshold response from [b.], and
plot the STA together with the WH filter estimate hinf from the subthreshold
response, as in part [b.]. They should be similar! Compute C xx in Matlab, to
show that C xx does indeed look similar to what you’d expect, when the STA
approximates the WH filter estimate. The input x used so far is called ‘white
noise’: it is random from moment to moment, with no imposed continuity or
correlation over time.
d. Now set whitenoise=0 to generate a new stimulus x that is not ‘white’. It has
temporal correlations in it (look at the autocorrelation, and contrast this autocorrelation with that from when x was white). Let y = xfilt (subthreshold
response), and compute the WH estimate of the filter based on the non-white
stimulus. Compare the result with the true filter h – it should still be an excellent fit. Finally, compute the STA estimate of the filter and the WH estimate of
the filter based on the non-white stimulus. Are they similar? Using this observation, try to explain the role of the (C xx )−1 term in the Wiener-Hopf equation.