$30.00
Description
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 separated.

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
The subthreshold membranepotential dynamics for the leaky integrateand 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) = I_{o} 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 , I_{o} = 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 , I_{o} = 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 I_{o}, where I_{o} 2 [2 10] mA.

Simulate the solution to Eq. 1 for _{m} = 10 msec, R = 1 k , and = 1 V. Assume that I_{o} = 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
The responses of a cat LGN cell to twodimensional visual images are contained in the le c2p3.mat, data are described in Kara et al., Neuron 30:803817 (2000). In the le, counts is a vector containing the number of spikes in each 15.6 ms bin, and stim contains the 32767, 16×16 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 spatiotemporal 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 spacetime 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 nonzero 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 spikeeliciting 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 timeinvariant by comparing the responses to impulses at any other row (assume circular timeinvariance 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 oncenter di erenceofgaussians (DOG) centersurround 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 21×21 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 21×21 pixel grid:

D(~x) = exp
^{~}k( ) ~x
=2 _{l}^{2}
^{~}k_{?}( ) ~x
=2 _{w}^{2}
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?