$24
Instructions:
Prepare a report (including your answers/plots) to be uploaded on Moodle.
The report should be typeset (for lengthy derivations, the solution can be scanned and embedded into the report).
Show all the steps of your work clearly.
Unclear presentation of results will be penalized heavily.
No partial credits to unjusti ed answers.
Use Matlab or Python for computations.
Return all Matlab/Python code that you wrote in a single le.
Code should be commented, code for di erent HW questions should be clearly sepa-rated.
The code le should NOT return an error during runtime.
If the code returns an error at any point, the remaining part of your code will not be evaluated (i.e., 0 points).
Question Points Your Score
Q1 20
Q2 30
Q3 20
Q4 30
TOTAL 100
Question 1. [20 points]
The subthreshold membrane-potential dynamics for the leaky integrate-and- re neuron is determined by:
dv
= v + RI(t)
m dt
(1)
The resting potential is assumed to be zero. Spikes are emitted when the voltage reaches a threshold . After each spike emission, the potential is reset to 0. Answer the questions below. Be careful when picking the temporal step size in all parts, rough discretizations may lead to incorrect conclusions.
Find the analytical solution of v(t) in Eq. 1 (assuming subthreshold activity), for a DC input current I(t) = Io and an initial value of v(0 ) = 0.
Con rm your answer to part a by numerically solving Eq. 1 for m = 10 msec, R = 1 k , Io = 2 mA. For this purpose, discretize the di erential equation for the membrane potential with a su ciently small temporal step size. Plot the solution v(t) for t 2 [0 100] msec.
Numerically solve Eq. 1 for m = 10 msec, R = 1 k , Io = 2 mA, and = 1 V. (Remember
to set the potential to 0 after each spike emission.) Plot the solution v(t) for t 2 [0 100] msec.
Compute and sketch the ring rate of the neuron characterized in part c as a function of the input current Io, where Io 2 [2 10] mA.
Simulate the solution to Eq. 1 for m = 10 msec, R = 1 k , and = 1 V. Assume that Io = 2 mA + n(t), where n(t) is a stationary Gaussian process with mean of 0 and std of 4 mA. Simulate the a ect of this noise on the ring rate curve plotted in part d
Question 2. [30 points]
The responses of a cat LGN cell to two-dimensional visual images are contained in the le c2p3.mat, data are described in Kara et al., Neuron 30:803-817 (2000). In the le, counts is a vector containing the number of spikes in each 15.6 ms bin, and stim contains the 32767, 16x16 images that were presented at the corresponding times. Speci cally, stim(x,y,t) is the stimulus presented at the coordinate (x,y) at time step t. Answer the questions below. (Note that stim is provided in integer format.)
Calculate the STA images for each of the 10 time steps before each spike and show them all. For display, use imagesc with a grayscale colormap and identical display windowing for all STA images. Based on the STA derived lter, describe what type of spatio-temporal stimulus this LGN cell is selective for.
Describe the changes in STA images across time. Sum the STA images over one of the spatial dimensions. You should obtain a matrix of 16 pixels by 10 time steps as a result of this process. Show this matrix (using imagesc). Based on the computed matrix, describe the temporal selectivity of the LGN cell. Is the matrix space-time separable?
Project the stimulus onto the STA image at a single time step prior to the spike. Obtain the projection for each time sample by computing the Frobenius inner product between the stimulus image and the STA image. Create a histogram from all stimulus projections, and another histogram from stimulus projections at time bins where a non-zero spike count was observed. Use identical binning for the two histograms, and normalize each histogram to a maximum of 1. Compare the histograms with a bar plot. Comment on whether STA signi cantly discriminates spike-eliciting stimuli.
Question 3. [20 points] You are asked to characterize the response properties of 2 neurons whose functions are unknown. You conduct experiments, where you can measure neural responses (i.e., average ring rate) to an external stimulus. The compiled matlab functions that can be used to nd the responses are unknownNeuron1.p and unknownNeuron2.p, respectively. During each experimental trial you can record response samples elicited by a stimulus vector of length N = 50 (column vector). Answer the questions below. Include plots of measured responses.
Assume the stimulus vector is an impulse in the rst row of the column vector. Measure each neuron's responses to this stimulus. Check whether the impulse response is time-invariant by comparing the responses to impulses at any other row (assume circular time-invariance at the boundaries). Check whether the response to a sum of these impulses (at di erent locations in the stimulus vector) is equal to the sum of their individual responses.
Write a function that constructs the response pro le of the rst neuron as a function of stimulus temporal frequency. Assume that the stimulus vectors are cosines with unity amplitude and zero phase. Plot the response magnitude as a function of temporal frequencies in the range [0 10 ] =N. What is the optimal stimulus for this neuron?
Write a function that constructs the response pro le of the second neuron to stimulus intensity. Assume that each stimulus vector used in the experiment is constant across time (i.e., all elements must be the same). Plot the response magnitude as a function of stimulus intensity in the range [0 20]. Does this neuron respond linearly to stimulus intensity? What is the optimal stimulus for this neuron?
Modify the functions in part b and part c, such that the stimulus intensity during each trial is corrupted by additive noise, n(t), due to spontaneous input signals from a population of neurons connected to the dentrites of the two neurons of interest. Assume that n(t) is a stationary Gaussian process (0 mean, std). Measure the responses to each stimulus vector during 100 separate trials. When constructing the response pro les, plot the mean response and show the error bars (i.e., specifying the 68% con dence interval). Show your results for = 1, = 2:5, and = 5. Are your conclusions about the optimal stimulus the same for all noise levels?
Question 4. [30 points] Answer the questions below. Include plots whenever applicable.
Construct an on-center di erence-of-gaussians (DOG) center-surround receptive eld
centered at 0:
1
2
2
2
1
2
2
2
D(x; y) =
e (x
+y
)=2 c
e (x
+y
)=2 s
(1)
2 2
2 2
c
s
Sample this receptive eld as a 21x21 matrix, with a central Gaussian width of c = 2 pixels and a surround Gaussian width of s = 4 pixels. Display the generated receptive eld.
Neurons in lateral geniculate nuclei (LGN) have DOG receptive elds. Suppose that there is a separate LGN neuron with a receptive eld centered on each pixel in the image. Compute the responses of each neuron to the image given in hw2_image.bmp. Place the neural responses topographically according to the centers of their receptive elds, and display the neural activity as an image (using imagesc). (Note: Be careful not to introduce artifacts at the image boundary.)
Build an edge detector by thresholding the neural activity image (i.e., setting all values above a certain threshold to 1 and the remainder to 0.) Tune the parameters of the DOG receptive elds and the threshold to optimize the edge detector's performance.
Construct a Gabor receptive eld on the same 21x21 pixel grid:
D(~x) = exp
~k( ) ~x
=2 l2
~k?( ) ~x
=2 w2
cos 2
?
+ !
(2)
2
2
~
k
( )
~x
~
~
~
Here, k( ) is a unit vector with the orientation , k?( ) is a unit vector orthogonal to k( ), and , l, w, and are parameters the comprise the Gabor lter. Start with assumption that = =2, l = w = 3 pixels, = 6 pixels, and = 0. Display the generated receptive eld.
Simple cells in V1 have Gabor receptive elds. Suppose that there is a separate V1 neuron with a receptive eld centered on each pixel in the image. Compute the responses of each neuron to the image given in hw2_image.bmp. Place the neural responses topographically according to the centers of their receptive elds, and display the neural activity as an image (using imagesc). What is the function of this Gabor lter?
Construct 4 Gabors with = 0; =6; =3; =2. Compute combined neural responses to the image hw2_image.bmp, by summing the outputs of the individual receptive elds (for di erent ). Does the edge detection performance look better in this case? What can you do with these 4 Gabors to further improve the performance?