Question ideas for HW5


Synapses:

Networking:


<<Note from Matt: if we are serving up different variations of questions / sets of questions to students, perhaps show them 2 of 4 of the parts of question 1>>

1. Lets design some feedforward neural networks that can do some basic operations on input features. This could mean lowering their intensity, looking for strong changes, or one of many other possibilities. One nice way to build intuition for this sort of processing is thinking of the networks as operating on images. Even though our networks will operate over only 5 pixels of image data, we can still build the same basic operations that we would for a regular image. For all of these questions, we will start with the following image as input:

q5_pave.jpg


1a. Suppose we processed the image, and it looked like this:

q5_paveBlurred.jpg

Which of the following weight matrices $$W$$ would give us a feedforward network most closely approximating this image process?
*a. $$\begin{bmatrix}0.33 &amp; 0.33 &amp; 0 &amp; 0 &amp; 0.33\\0.33 &amp; 0.33 &amp; 0.33 &amp; 0 &amp; 0\\0 &amp; 0.33 &amp; 0.33 &amp; 0.33 &amp; 0\\0 &amp; 0 &amp; 0.33 &amp; 0.33 &amp; 0.33\\0.33 &amp; 0 &amp; 0 &amp; 0.33 &amp; 0.33\end{bmatrix}$$
b. $$\begin{bmatrix}1 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\1 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\1 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 1 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 1 &amp; 0\end{bmatrix}$$
c. $$\begin{bmatrix}0.5 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\0 &amp; 0.5 &amp; 0 &amp; 0 &amp; 0\\0 &amp; 0 &amp; 0.5 &amp; 0 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 0.5 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 0 &amp; 0.5\end{bmatrix}$$
d. $$\begin{bmatrix}0.75 &amp; 0 &amp; 0 &amp; 0 &amp; -0.75\\-0.75 &amp; 0.75 &amp; 0 &amp; 0 &amp; 0\\0 &amp; -0.75 &amp; 0.75 &amp; 0 &amp; 0\\0 &amp; 0 &amp; -0.75 &amp; 0.75 &amp; 0\\0 &amp; 0 &amp; 0 &amp; -0.75 &amp; 0.75\end{bmatrix}$$


1b. Suppose we processed the image, and it looked like this:

q5_paveDarkened.jpg

Which of the following weight matrices $$W$$ would give us a feedforward network most closely approximating this image process?
a. $$\begin{bmatrix}0.33 &amp; 0.33 &amp; 0 &amp; 0 &amp; 0.33\\0.33 &amp; 0.33 &amp; 0.33 &amp; 0 &amp; 0\\0 &amp; 0.33 &amp; 0.33 &amp; 0.33 &amp; 0\\0 &amp; 0 &amp; 0.33 &amp; 0.33 &amp; 0.33\\0.33 &amp; 0 &amp; 0 &amp; 0.33 &amp; 0.33\end{bmatrix}$$
b. $$\begin{bmatrix}1 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\1 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\1 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 1 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 1 &amp; 0\end{bmatrix}$$
*c. $$\begin{bmatrix}0.5 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\0 &amp; 0.5 &amp; 0 &amp; 0 &amp; 0\\0 &amp; 0 &amp; 0.5 &amp; 0 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 0.5 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 0 &amp; 0.5\end{bmatrix}$$
d. $$\begin{bmatrix}0.75 &amp; 0 &amp; 0 &amp; 0 &amp; -0.75\\-0.75 &amp; 0.75 &amp; 0 &amp; 0 &amp; 0\\0 &amp; -0.75 &amp; 0.75 &amp; 0 &amp; 0\\0 &amp; 0 &amp; -0.75 &amp; 0.75 &amp; 0\\0 &amp; 0 &amp; 0 &amp; -0.75 &amp; 0.75\end{bmatrix}$$


1c. Suppose we processed the image, and it looked like this:

q5_paveEdges.jpg

Which of the following weight matrices $$W$$ would give us a feedforward network most closely approximating this image process?
a. $$\begin{bmatrix}0.33 &amp; 0.33 &amp; 0 &amp; 0 &amp; 0.33\\0.33 &amp; 0.33 &amp; 0.33 &amp; 0 &amp; 0\\0 &amp; 0.33 &amp; 0.33 &amp; 0.33 &amp; 0\\0 &amp; 0 &amp; 0.33 &amp; 0.33 &amp; 0.33\\0.33 &amp; 0 &amp; 0 &amp; 0.33 &amp; 0.33\end{bmatrix}$$
b. $$\begin{bmatrix}1 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\1 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\1 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 1 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 1 &amp; 0\end{bmatrix}$$
c. $$\begin{bmatrix}0.5 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\0 &amp; 0.5 &amp; 0 &amp; 0 &amp; 0\\0 &amp; 0 &amp; 0.5 &amp; 0 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 0.5 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 0 &amp; 0.5\end{bmatrix}$$
*d. $$\begin{bmatrix}0.75 &amp; 0 &amp; 0 &amp; 0 &amp; -0.75\\-0.75 &amp; 0.75 &amp; 0 &amp; 0 &amp; 0\\0 &amp; -0.75 &amp; 0.75 &amp; 0 &amp; 0\\0 &amp; 0 &amp; -0.75 &amp; 0.75 &amp; 0\\0 &amp; 0 &amp; 0 &amp; -0.75 &amp; 0.75\end{bmatrix}$$


1d. Suppose we processed the image, and it looked like this:

q5_pavePixelized.jpg

Which of the following weight matrices $$W$$ would give us a feedforward network most closely approximating this image process?
a. $$\begin{bmatrix}0.33 &amp; 0.33 &amp; 0 &amp; 0 &amp; 0.33\\0.33 &amp; 0.33 &amp; 0.33 &amp; 0 &amp; 0\\0 &amp; 0.33 &amp; 0.33 &amp; 0.33 &amp; 0\\0 &amp; 0 &amp; 0.33 &amp; 0.33 &amp; 0.33\\0.33 &amp; 0 &amp; 0 &amp; 0.33 &amp; 0.33\end{bmatrix}$$
*b. $$\begin{bmatrix}1 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\1 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\1 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 1 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 1 &amp; 0\end{bmatrix}$$
c. $$\begin{bmatrix}0.5 &amp; 0 &amp; 0 &amp; 0 &amp; 0\\0 &amp; 0.5 &amp; 0 &amp; 0 &amp; 0\\0 &amp; 0 &amp; 0.5 &amp; 0 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 0.5 &amp; 0\\0 &amp; 0 &amp; 0 &amp; 0 &amp; 0.5\end{bmatrix}$$
d. $$\begin{bmatrix}0.75 &amp; 0 &amp; 0 &amp; 0 &amp; -0.75\\-0.75 &amp; 0.75 &amp; 0 &amp; 0 &amp; 0\\0 &amp; -0.75 &amp; 0.75 &amp; 0 &amp; 0\\0 &amp; 0 &amp; -0.75 &amp; 0.75 &amp; 0\\0 &amp; 0 &amp; 0 &amp; -0.75 &amp; 0.75\end{bmatrix}$$


<<Note from Matt: can present the various options of question 2 as check boxes. The ones marked with asterisks should be checked, the rest unchecked. That will let you randomize which options you show.>>

2. In lecture 6.1 we see a process of conceptual abstraction. It takes us from the bloody details of individual neurons and their firing models, to models of whole networks. By the middle of the lecture, we have simplified away many of the interesting time dynamics of feedforward neural networks, and arrived at a simple equation:
<br><br>
$${\bf V_{ss}} = F(W{\bf u})$$
<br><br>
We have to make a number of assumptions to get to that point. Necessarily we lose some interesting information when we make those assumptions. Check all of the following details you think we have lost between the beginning of lecture 6.1 and the point where we first see this equation (roughly 10min in). Note that due to question randomization, you may need to leave all of your options checked or all unchecked (or some combination)!
*a. This model assumes static, unchanging inputs, so it does not account for the dynamics resulting from constantly changing inputs.
*b. This model shows us the outputs the system will converge to, but no longer describes the time dynamics of that convergence.
*c. This model ignores patterns in the input and output spike timings, opting instead to simply look at firing rates.
*d. This model cannot adequately represent many of the dynamics of individual cells, such as the effect of the refractory period.
*e. This model ignores the effects of synchrony and correlation between the input neurons.
f. This model ignores the firing rates of the input cells.
g. This model ignores the firing rates of the output cells.
h. Since this model does not use a detailed description of individual cells, it does not account for the strength of individual synaptic connections.
i. This model does not allow for synaptic connections where an input cell is inhibiting the firing of the output cell.
j. This model does not allow differences in firing rates between different inputs.



<<Notes from Matt: the recurrent weight matrix M will be different between the various variations of this question. I'll give you a list of the possibilities and answers below>>

3. Suppose that we had a recurrent network of 5 input nodes and 5 output nodes. Let us say that our network's weight matrix $$W$$ is:
<br><br>
$$W = \begin{bmatrix}0.6 &amp; 0.1 &amp; 0.1 &amp; 0.1 &amp; 0.1\\0.1 &amp; 0.6 &amp; 0.1 &amp; 0.1 &amp; 0.1\\0.1 &amp; 0.1 &amp; 0.6 &amp; 0.1 &amp; 0.1\\0.1 &amp; 0.1 &amp; 0.1 &amp; 0.6 &amp; 0.1\\0.1 &amp; 0.1 &amp; 0.1 &amp; 0.1 &amp; 0.6\end{bmatrix}$$
<br><br>
And suppose that we have a static input vector $${\bf u}$$:
<br><br>
$${\bf u} = \begin{bmatrix}0.6 &amp; 0.5 &amp; 0.6 &amp; 0.2 &amp; 0.1\end{bmatrix}$$:
<br><br>

Variation 1:
Finally, suppose that we have a recurrent weight matrix $$M$$:
<br><br>
$$M = \begin{bmatrix}-0.5 &amp; 0 &amp; 0.5 &amp; 0.5 &amp; 0\\0 &amp; -0.5 &amp; 0 &amp; 0.5 &amp; 0.5\\0.5 &amp; 0 &amp; -0.5 &amp; 0 &amp; 0.5\\0.5 &amp; 0.5 &amp; 0.0 &amp; -0.5 &amp; 0\\0 &amp; 0.5 &amp; 0.5 &amp; 0 &amp;
-0.5\end{bmatrix}$$
<br><br>

Which of the following is the steady state output $${\bf V_{ss}}$$ of the network?
*a. $${\bf V_{ss}} = \begin{bmatrix}0.873 &amp; 0.791 &amp; 0.864 &amp; 0.755 &amp; 0.718\end{bmatrix}$$
b. $${\bf V_{ss}} = \begin{bmatrix}0.547 &amp; 0.480 &amp; 0.543 &amp; 0.381 &amp; 0.336\end{bmatrix}$$
c. $${\bf V_{ss}} = \begin{bmatrix}0.616 &amp; 0.540 &amp; 0.609 &amp; 0.471 &amp; 0.430\end{bmatrix}$$
d. $${\bf V_{ss}} = \begin{bmatrix}1.67 &amp; 1.58 &amp; 1.66 &amp; 1.56 &amp; 1.53\end{bmatrix}$$


Variation 2:
Finally, suppose that we have a recurrent weight matrix $$M$$:
<br><br>
$$M = \begin{bmatrix}-0.25 &amp; 0 &amp; 0.25 &amp; 0.25 &amp; 0\\0 &amp; -0.25 &amp; 0 &amp; 0.25 &amp; 0.25\\0.25 &amp; 0 &amp; -0.25 &amp; 0 &amp; 0.25\\0.25 &amp; 0.25 &amp; 0.0 &amp; -0.25 &amp; 0\\0 &amp; 0.25 &amp; 0.25 &amp; 0 &amp;
-0.25\end{bmatrix}$$
<br><br>

Which of the following is the steady state output $${\bf V_{ss}}$$ of the network?
a. $${\bf V_{ss}} = \begin{bmatrix}0.873 &amp; 0.791 &amp; 0.864 &amp; 0.755 &amp; 0.718\end{bmatrix}$$
b. $${\bf V_{ss}} = \begin{bmatrix}0.547 &amp; 0.480 &amp; 0.543 &amp; 0.381 &amp; 0.336\end{bmatrix}$$
*c. $${\bf V_{ss}} = \begin{bmatrix}0.616 &amp; 0.540 &amp; 0.609 &amp; 0.471 &amp; 0.430\end{bmatrix}$$
d. $${\bf V_{ss}} = \begin{bmatrix}1.67 &amp; 1.58 &amp; 1.66 &amp; 1.56 &amp; 1.53\end{bmatrix}$$


Variation 3:
Finally, suppose that we have a recurrent weight matrix $$M$$:
<br><br>
$$M = \begin{bmatrix}-0.125 &amp; 0 &amp; 0.125 &amp; 0.125 &amp; 0\\0 &amp; -0.125 &amp; 0 &amp; 0.125 &amp; 0.125\\0.125 &amp; 0 &amp; -0.125 &amp; 0 &amp; 0.125\\0.125 &amp; 0.125 &amp; 0.0 &amp; -0.125 &amp; 0\\0 &amp; 0.125 &amp; 0.125 &amp; 0 &amp; -0.125\end{bmatrix}$$
<br><br>

Which of the following is the steady state output $${\bf V_{ss}}$$ of the network?
a. $${\bf V_{ss}} = \begin{bmatrix}0.873 &amp; 0.791 &amp; 0.864 &amp; 0.755 &amp; 0.718\end{bmatrix}$$
*b. $${\bf V_{ss}} = \begin{bmatrix}0.547 &amp; 0.480 &amp; 0.543 &amp; 0.381 &amp; 0.336\end{bmatrix}$$
c. $${\bf V_{ss}} = \begin{bmatrix}0.616 &amp; 0.540 &amp; 0.609 &amp; 0.471 &amp; 0.430\end{bmatrix}$$
d. $${\bf V_{ss}} = \begin{bmatrix}1.67 &amp; 1.58 &amp; 1.66 &amp; 1.56 &amp; 1.53\end{bmatrix}$$


Variation 4:
Finally, suppose that we have a recurrent weight matrix $$M$$:
<br><br>
$$M = \begin{bmatrix}-0.75 &amp; 0 &amp; 0.75 &amp; 0.75 &amp; 0\\0 &amp; -0.75 &amp; 0 &amp; 0.75 &amp; 0.75\\0.75 &amp; 0 &amp; -0.75 &amp; 0 &amp; 0.75\\0.75 &amp; 0.75 &amp; 0.0 &amp; -0.75 &amp; 0\\0 &amp; 0.75 &amp; 0.75 &amp; 0 &amp; -0.75\end{bmatrix}$$
<br><br>

Which of the following is the steady state output $${\bf V_{ss}}$$ of the network?
a. $${\bf V_{ss}} = \begin{bmatrix}0.873 &amp; 0.791 &amp; 0.864 &amp; 0.755 &amp; 0.718\end{bmatrix}$$
b. $${\bf V_{ss}} = \begin{bmatrix}0.547 &amp; 0.480 &amp; 0.543 &amp; 0.381 &amp; 0.336\end{bmatrix}$$
c. $${\bf V_{ss}} = \begin{bmatrix}0.616 &amp; 0.540 &amp; 0.609 &amp; 0.471 &amp; 0.430\end{bmatrix}$$
*d. $${\bf V_{ss}} = \begin{bmatrix}1.67 &amp; 1.58 &amp; 1.66 &amp; 1.56 &amp; 1.53\end{bmatrix}$$

<<Once again, variations noted>>
4. Suppose we have a linear feedforward network with two input nodes and two output nodes. Lets us say that we are learning our weight matrix $$W$$, and that we are using Hebbian Learning.

Variation 1:
Let us say that our input correlation matrix $$Q$$ is:
<br><br>
$$Q = \begin{bmatrix}0.2 &amp; 0.1 \\ 0.1 &amp; 0.15 \end{bmatrix}$$
<br><br>

If we allow learning to go on for a very long period of time, which of these is closest to a the final weight vector $$W$$ that we could possibly learn, given the correct parameterization?
a. $$W = \begin{bmatrix}-1.5155 &amp; -1.3051\end{bmatrix}$$
b. $$W = \begin{bmatrix}0.8944 &amp; 1.7889\end{bmatrix}$$
*c. $$W = \begin{bmatrix}-1.5764 &amp; -1.2308\end{bmatrix}$$
d. $$W = \begin{bmatrix}1.0515 &amp; 1.7013\end{bmatrix}$$


Variation 2:
Let us say that our input correlation matrix $$Q$$ is:
<br><br>
$$Q = \begin{bmatrix}0.15 &amp; 0.1 \\ 0.1 &amp; 0.12 \end{bmatrix}$$
<br><br>

If we allow learning to go on for a very long period of time, which of these is closest to a the final weight vector $$W$$ that we could possibly learn, given the correct parameterization?
*a. $$W = \begin{bmatrix}-1.5155 &amp; -1.3051\end{bmatrix}$$
b. $$W = \begin{bmatrix}0.8944 &amp; 1.7889\end{bmatrix}$$
c. $$W = \begin{bmatrix}-1.5764 &amp; -1.2308\end{bmatrix}$$
d. $$W = \begin{bmatrix}1.0515 &amp; 1.7013\end{bmatrix}$$


Variation 3:
Let us say that our input correlation matrix $$Q$$ is:
<br><br>
$$Q = \begin{bmatrix}0.2 &amp; 0.1 \\ 0.1 &amp; 0.3 \end{bmatrix}$$
<br><br>

If we allow learning to go on for a very long period of time, which of these is closest to a the final weight vector $$W$$ that we could possibly learn, given the correct parameterization?
a. $$W = \begin{bmatrix}-1.5155 &amp; -1.3051\end{bmatrix}$$
b. $$W = \begin{bmatrix}0.8944 &amp; 1.7889\end{bmatrix}$$
c. $$W = \begin{bmatrix}-1.5764 &amp; -1.2308\end{bmatrix}$$
*d. $$W = \begin{bmatrix}1.0515 &amp; 1.7013\end{bmatrix}$$


Variation 4:
Let us say that our input correlation matrix $$Q$$ is:
<br><br>
$$Q = \begin{bmatrix}0.15 &amp; 0.1 \\ 0.1 &amp; 0.3 \end{bmatrix}$$
<br><br>

If we allow learning to go on for a very long period of time, which of these is closest to a the final weight vector $$W$$ that we could possibly learn, given the correct parameterization?
a. $$W = \begin{bmatrix}-1.5155 &amp; -1.3051\end{bmatrix}$$
*b. $$W = \begin{bmatrix}0.8944 &amp; 1.7889\end{bmatrix}$$
c. $$W = \begin{bmatrix}-1.5764 &amp; -1.2308\end{bmatrix}$$
d. $$W = \begin{bmatrix}1.0515 &amp; 1.7013\end{bmatrix}$$


<<No variations on this one>>
5. What does this weight vector now tell us about the distribution of the inputs?
a. That his Hebbian learning system is engaged in long-term depression of the outputs
b. That the time constant $$\tau_{w}$$ was 2
c. That the mean of the input distributions is (0,0)
*d. None of these


6. The "learning rate" as mentioned in lecture 7.2 is used in many different contexts to denote the sensitivity of a parameter to new data during online learning. Check all of the following which are true:
a. A higher learning rate makes the parameter less influenced by noise during online estimation.
*b. A higher learning rate makes the parameter more influenced by noise during online estimation.
c. The learning rate does not make the parameter more sensitive to noise.
*d. A higher learning rate weights latter inputs more than former ones.


7. In lectures 7.2 and 7.3 we see multiple algorithms which use a two step process for parameter estimation. EM is one such algorithm, consisting of the E and M steps. In each step we are iteratively updating our estimates of particular sets of parameters. Why do we need to alternate between the two steps? And what justifies this approach? Hint: you may want to Google EM.
a. We don't actually need the alternating steps - we could get away with optimizing one set of values at a time, and doing it only once; we alternate because it is simple to program the alternation as a loop. This is justified by the fact that these algorithms will always arrive at the globally best solution.
b. We need the alternating steps because the two sets of parameters are mutually dependent on each other, necessitating that they be optimized together. This is justified by the fact that these algorithms will always arrive at the globally best solution.
c. We need the alternating steps because the two sets of parameters are mutually dependent on each other, necessitating that they be optimized together. This is justified by the fact that these algorithms will always move towards a better solution.
d. We don't actually need the alternating steps - we could get away with optimizing one set of values at a time, and doing it only once; we alternate because it is simple to program the alternation as a loop. This is justified by the fact that these algorithms will always move towards a better solution.


PROGRAMMING QUESTION SET #1 (ALPHA SYNAPSE)
1.
The next three questions utilize the following MATLAB code to model an integrate-and-fire neuron receiving input spikes through an alpha synapse: alpha_neuron.m
<br />
<br />


The parameter “$$t_{peak}$$” controls when the alpha function peaks after an input spike occurs (and hence how long the effects of an input spike linger on in the postsynaptic neuron). “$$t_{peak}$$” for excitatory synapses in the brain may vary from 0.5 ms (AMPA or non-NMDA) to 40 ms (NMDA synapse).
<br />
<br />

Vary the value of $$t_{peak}$$ from 0.5 ms to 10 ms in steps of 0.5 ms and observe how this influences the output of the neuron for the fixed input spike train used in this code. Plot the output spike count as a function of $$t_{peak}$$ for the given input spike train.
<br />
<br />

Which of the following answers best describes the relationship between the value of $$t_{peak}$$
and the firing rate of the neuron?
+- The neuron's firing rate increases sublinearly as a function of the value of $$t_{peak}$$.
- The neuron's firing rate increases linearly as a function of the value of $$t_{peak}$$.
- The neuron's firing rate increases superlinearly as a function of the value of $$t_{peak}$$.
- The neuron's firing rate decreases sublinearly as a function of the value of $$t_{peak}$$.
- The neuron's firing rate decreases linearly as a function of the value of $$t_{peak}$$.
- The neuron's firing rate decreases superlinearly as a function of the value of $$t_{peak}$$.
- The neuron's firing rate decreases sublinearly as a function of the value of $$t_{peak}$$.


2.
Which of the following explanations best explains how the value of $$t_{peak}$$ influences the firing rate of the neuron?
+- Increasing the value of $$t_{peak}$$ decreases the decay rate of the synaptic conductance, allowing more charge to flow per spike and increasing the extent of the summation between the increases in synaptic conductance caused by spikes.
- Increasing the value of $$t_{peak}$$ increases the decay rate of the synaptic conductance, allowing less charge to flow per spike and decreasing the extent of the summation between the increases in synaptic conductances caused by spikes.
- Increasing the value of $$t_{peak}$$ decreases the decay rate of the neuron's voltage, increasing the extent of the summation between the neuron's voltage response to spikes (temporal summation).
- Increasing the value of $$t_{peak}$$ increases the decay rate of the neuron's voltage, decreasing the extent of the summation between the neuron's voltage response to spikes (temporal summation).


REMOVED 3.b FROM 528


3.
How would you turn this synapse into an inhibitory synapse?
+- Changing the value of $$E_{syn}$$ to be less than that of $$E_{leak}$$.
- Changing the value of $$E_{syn}$$ to be less than 0.
- Changing the value of $$E_{syn}$$ to be greater than 0.
- Changing the value of $$E_{syn}$$ to be less than that of $$V_{th}$$.




PROGRAMMING QUESTION SET #2 (OJA'S RULE)
1.
In the next three questions, we'll implement Oja's Hebb rule for a single neuron and explore some of its properties.
<br />
<br />

Recall that Oja's rule is:
<br />
$$\tau_{w} \dfrac{d \textbf{w}}{dt} = v \textbf{u} - \alpha v^{2} \textbf{w}$$
<br />
<br />

We will implement the discrete time version of Oja's rule in MATLAB. To do this, first rewrite Oja's rule using discrete time rather than continuous time. Which of the following equations represents the discrete time version of Oja's rule? Let $$\eta = \dfrac{1}{\tau_{w}}$$.
-$$\Delta \textbf{w} = \Delta t (v \textbf{u} - \alpha v^{2} \textbf{w})$$
+-$$\Delta \textbf{w} = \Delta t \eta (v \textbf{u} - \alpha v^{2} \textbf{w})$$
-$$\dfrac{d \textbf{w}}{dt} = \eta (v \textbf{u} - \alpha v^{2} \textbf{w})$$
-$$\Delta \textbf{w} = \eta (v \textbf{u} - \alpha v^{2} \textbf{w})$$


2.
Now, in order to use Oja's rule, we need to translate the discrete time version into an update rule. Which of the following equations represents the discrete update for Oja's rule?
-$$\textbf{w}_{i+1} = \textbf{w}_{i} + \Delta t (v \textbf{u} - \alpha v^{2} \textbf{w})$$
+-$$\textbf{w}_{i+1} = \textbf{w}_{i} + \Delta t \eta (v \textbf{u} - \alpha v^{2} \textbf{w})$$
-$$\textbf{w}_{i+1} = \textbf{w}_{i} + \eta (v \textbf{u} - \alpha v^{2} \textbf{w})$$
-$$\textbf{w}_{i+1} = \textbf{w}_{i} + v \textbf{u} - \alpha v^{2} \textbf{w}$$


3.
In this question, we will use the update rule we just derived to implement a neuron that will learn from of two dimensional data that is given in c10p1.mat. c10p1.mat contains 100 $$(x, y)$$ data points.
<br />
<br />

Move c10p1.mat to your MATLAB or Octave directory and use the following command to load the data:
<br />
<pre>load('-ascii', 'c10p1.mat')</pre>
<br />
<br />

You may plot the data points contained in c10p1.mat using the following command:
<br />
<pre>scatter(c10p1(:,1), c10p1(:,2))</pre>
<br />
<br />

Assume our neuron receives as input the two dimensional data provided in c10p1.mat, but with the mean of the data subtracted from each data point (the mean of all $$x$$ values should be subtracted from every x value and the mean of all $$y$ values should be subtracted from every $$y$$ value). You should perform this mean centering step and then display the points again to verify that the data cloud is now centered around $$(0, 0)$$.
<br />
<br />

Implement the update rule derived in the previous question in MATLAB. Let $$\eta = 1$$, $$\alpha = 1$$, and $$\Delta t = 0.01$$. Start with a random vector as $$\textbf{w_{0}}$$. In each update iteration, feed in a data point $$\textbf{u} = (x, y)$$ from c10p1. If you've reached the last data point in c10p1, go back to the first one and repeat. Keep updating $$\textbf{w}$$ until the change in $$\textbf{w}$$, given by norm(w(t+1) - w(t)), is negligibile (i.e., below an arbitrary small positive threshold), indicating that $$\textbf{w}$$ has converged.
<br />
<br />

Run your code multiple times. You should find that $$\textbf{w}$$ converges to two very different vectors. Why does this happen?
-The input data is two dimensional and therefore there are two eigenvectors. $$\textbf{w}$$ can converge to either of these eigenvectors regardless of their corresponding eigenvalues.
-The input data has two principal eigenvectors. The eigenvalues corresponding to the two eigenvectors are equal.
+-There is only one principal eigenvector, but there are two vectors of length $$\dfrac{1}{\sqrt{\alpha}}$$ that are parallel to this eigenvector. $$\textbf{w}$$ converges to either of these two vectors.
-There is only one principal eigenvector, but there are two vectors of length $$\dfrac{1}{\sqrt{\alpha}}$$ that are perpendicular to this eigenvector. $$\textbf{w}$$ converges to either of these two vectors.