Python代写|Assignment代写 - Assignment
In this assignment, we will study a simple case of a SNN receiving time-dependent inputs. Problem 1: Interconnected network of neurons with non-plastic synapses The connectivity relationship between the neurons can be represented by a N × N matrix W where wi,j is the strength of connection from neuron j to neuron i. (a) Write the connectivity matrix for the following 3-neuron, 9-synapse network: Neuron 1 re￾ceives input from Neuron 3 with a strength of 100. Neuron 2 receives input from Neuron 1 with a strength of 500. Neuron 3 receives input from both Neuron 1 and neuron 2 with a strength of 300 and 200 respectively. 2 points (b) The spiking state of the neurons can be represented by a N × 1 column vector, S. At any time instant, if the k th neuron spikes, the k th entry of this column vector is 1, else it is 0. Assume that neuron 1 and 3 spiked at the same instant of time, t. For the simple case of the synaptic current kernel being a delta function, determine the product W × S and convince yourself that the resulting vector represents the current flowing into the neurons, based on the connection strengths between them. 2 points (c) Now, we will study the dynamics of LIF neurons with non-plastic syanpses connecting them to each other. In order to incorporate synaptic communication, we will require the follow￾ing modifications. We will use the LIF neuron from HW 1, but with an extra term to incorporate the synaptic current, C dV (t) dt = =gL(V (t) ) EL) + Iapp(t) + Isyn(t) (1) When V (t) ≥ VT , V (t) ← EL. Assume that the k th neuron spiked at time instants s1k , s2k , s3k , . . . snk . Then the synaptic current flowing into the j th neuron from the k th neuron at time t > snk is Isyn,j (t) = I0 nXm=1 wjk e (t smk )/τ  e (t smk )/τs (2) Hence, the post-synaptic current is generated in response to the spikes and has to be cal￾culated at every time instant based on all the previous instants of time when the pre-synaptic neuron spiked. One way to efficiently determine this spike-driven synaptic current is to main￾tain a spike kernel matrix K(t) with dimensions [N,(T/∆t)] ksyn,j (t) = I0 nXm=1 e (t smk )/τ  e (t smk )/τs (3) and then obtain the synaptic current Isyn(t) = W × K(t). Simulate two neurons connected to each other through a synapse of weight w21 = 7 and I0 = 7000 pA. The input neuron receives DC input current of magnitude 2800 pA and with varying time durations as shown below (i.e., each ON pulse has a duration of 20, 40, 60, 80 and 100 ms, with 40 ms in between each of them, and total duration of T = 500 ms). Plot all voltages and currents and explain the observed dynamics. 0 50 100 150 200 250 300 350 400 450 500 0123 Time (ms) Your code should be written for a general network of N neurons, whose connectivity is described by the matrix W, and you are only allowed to iterate over time. 16 points Problem 2: Fully connected two neuron network Now simulate the dynamics of a two-neuron network, if the neurons are connected to each other with synaptic weights w12 = w21 = 7. You should apply the waveform from problem 1, but with the first 4 ON pulses, and a total duration of T = 400 ms (i.e., input current is zero after 320 ms). Plot all voltages and currents and explain the observed dynamics. 10 points Problem 3: Persistent signal detector Using the same input excitation from problem 1, design a three-neuron circuit which acts as a persistent signal detector. You should determine the synaptic weights such that the output neuron spikes only if the pulse-width is more than 50 ms. 20 points Problem 4: Persistent signal detector with imperfect devices To implement the above design efficiently, we could use nanoscale devices whose conductance can be used to represent the weights. Using the function to translate the floating-point weights to device level weights, run the network again, and determine the response. If you are not able to get the desired network behaviour, fine-tune the software weights or modify your network design. 10 points