Homework #2: Prey Selection in Frog

Andrew H. Fagg

This is a programming exercise. It is due at 5 pm on Thursday, October 25th.

When a hungry frog is presented with a fly, he will snap at (and eat) the fly. When presented with multiple flies or stimuli that look like flys, the frog is faced with the problem of selecting one of the discrete objects before initiating a snap. As it turns out, frogs are also quiet good at taking into account the ``flyness'' of the stimuli in making the target selection (Ingle, 1968).

Didday (1970, 1976) suggested a winner-take-all circuit that selected one target from many. Amari and Arbib (1977) proposed a a biologically-inspired, distributed model of this circuit (figure 1). We assume a one-dimensional retina which delivers a value for each retinal position that corresponds to the ``flyness'' of a stimulus at that position (with a zero corresponding to no fly). This retinal input (I) is fed to a selection layer (L) which has the same dimensionality as the retina. These selection cells drive both a global inhibitor (S) and a motor output (M) that determines the direction of tongue snap.

Figure 1: Model of frog prey selection.
\epsfig{file=arch.eps, width = 4in}\par\end{center}

The dynamics of these cells are defined as follows:

$\displaystyle \tau_L \frac{d L^{net}_i} {d t}$ = - Lneti + Ii + Li - S  
Li = $\displaystyle \left\{ \begin{array}{ll}
1 & \mbox{if~} L^{net}_i > thresh_L \\
0 & \mbox{otherwise}
$\displaystyle \tau_S \frac{d S^{net}}{d t}$ = $\displaystyle -S^{net} +
S = $\displaystyle \left\{ \begin{array}{ll}
S^{net} - thresh_S & \mbox{if~} S^{net} > thresh_S \\
0 & \mbox{otherwise}
$\displaystyle \tau_M \frac{d M}{d t}$ = -M + T  
T = $\displaystyle \left\{ \begin{array}{ll}
\frac{\sum^N_{i=1}{L_i * X_i}}{\sum^N_{...
... &
\mbox{if~} \sum^N_{i=1}{L_i} > 0 \\
0 & \mbox{otherwise}

I is the vector of retinal inputs; Linet and Li are the membrane potential and activation level of the i'th selection cell; Snet and S are the membrane potential and activation level of the inhibitor neuron; M is the motor output (indicating direction of snap); and Xi expresses the direction of snap given a selected stimulus at the i'th retinal location.

Note that once the global inhibitor is activated (by one or more of the selection units), it generates an inhibitory signal that suppresses the activation of all of the selection cells.

An experimental trial is conducted as follows:

Assume the following parameters:

$\displaystyle N \mbox{(number of retinal/selection units)}$ = 21  
timestep = $\displaystyle 10\;ms$  
$\displaystyle \tau_L$ = $\displaystyle 300\;msec$  
$\displaystyle \tau_S$ = $\displaystyle 300\;msec$  
$\displaystyle \tau_M$ = $\displaystyle 300\;msec$  
threshS = 0.1  
threshL = 0.5  
Xi = i-1 - (N-1)/2  

Model Behavior

Assume a stimulus at location 4 and ``flyness'' of 1 (i.e. I4 = 1).

Question 1.1: How long before our ``frog'' snaps? Show the evolution of the relevant state variables in a figure (i.e. L, Lnet, and M).

Answer: Approximately $2.3\;sec$. In the figure, the cyan solid and dashed lines correspond to Lnet4 and L4, respectively; the red line is Lneti for $i \ne 4$; and M is shown in blue (note that it is scaled by a factor of 10 for display purposes, and converges to a real value of -7).

\epsfig{file=code/q1.eps, width = 4in}

Question 1.2: Explain the occurrence of the peak in Lnet4 - i.e. why does the level drop after the peak?

Answer: This is due to the growing inhibition of the S unit.

Question 1.3: If the flyness is only 0.55, how long before the snap occurs? Explain the difference?

Answer: About $3\;sec$. Because the input level is lower, L unit 4 does not charge as quickly, which results in the delay in establishing an equilibrium.

\epsfig{file=code/q2.eps, width = 4in}

Assume a stimulus of 1 at position 8 and a stimulus of 0.6 at position 17.

Question 1.4: Where does the frog snap and when?

Answer: The frog snaps in the direction corresponding to M = -3, at about $2.3\;sec$. In the figure, the thin, blue solid/dashed lines correspond to Lnet8 and L8; the red line shows Lnet17.

\epsfig{file=code/q3.eps, width = 4in}

Assume that these stimuli are swapped.

Question 1.5: where does the frog snap and when?

Answer: About $2.3\;sec$. At the position corresponding to M = 6.

\epsfig{file=code/q4.eps, width = 4in}

Suppose there is a stimulus of 1 at 17 and one of 0.8 at 8.

Question 1.6: Where and when does the frog snap?

Answer: At about $3\;sec$. M = 6.

\epsfig{file=code/q5.eps, width = 4in}

Suppose there is a stimulus of 1 at 17 and one of 0.95 at 8.

Question 1.7: Where and when does the frog snap?

Answer: At about $3\;sec$. M = 6.

\epsfig{file=code/q6.eps, width = 4in}

Suppose there is a stimulus of 1 at 17 and one of 0.96 at 8.

Question 1.8: Where and when does the frog snap? Describe the time-course of the relevant selection unit state variables.

Answer: At about $4.5\;sec$; M = 6. Selection units 8 and 17 turn on at almost the same time. This causes the inhibitory unit to achieve a high level of activation, which in turn results in both units turning off. Once the inhibitory signal has resided, these units again return to an on state. Shortly thereafter, unit 8 turns off again (reducing the input to the inhibitory unit). Before unit 17 has an opportunity to turn off, the activation of the inhibitory unit drops to a level such that unit 17 can sustain its activation level.

\epsfig{file=code/q7.eps, width = 4in}

Suppose there is a stimulus of 1 at 17 and one of 0.999 at 8.

Question 1.9: Where and when does the frog snap?

Answer: At about $5\;sec$. M = 1.3. This is known as the average fly.

\epsfig{file=code/q8.eps, width = 4in}


Suppose a fly of flyness level 0.8 appears at retinal position 13, and then a second fly of level 1.0 appears $1\;sec$ later at position 2.

Question 2.1: When and where does the frog snap? Explain.

Answer: The frog still snaps at approximately $2.3\;sec$ at location M = 2. Even though the second stimulus has a higher level of input, it is not able to overcome the inhibition due to the first stimulus.

\epsfig{file=code/q21.eps, width = 4in}

Question 2.2: What is the longest delay at which the second stimulus can be presented such that it wins the competition? When does the frog snap?

Answer: About $220\;ms$. The frog snaps at about $3\;sec$.

\epsfig{file=code/q22.eps, width = 4in}

Return to a presentation delay of $1\;sec$.

Question 2.3: How high would the second stimulus have to be before it wins the competition? When does the frog snap in this case?

Answer: About 1.45. The frog snaps at about $4\;sec$.

\epsfig{file=code/q23.eps, width = 4in}

Avoiding Deadlock

As you have observed, there are stimulus conditions under which the frog circuit cannot make a snap decision before he is forced to snap - even though there are suitable stimuli at which to snap.

Question 3.1 (2 pts): Suggest and implement a simple, distributed mechanism that reduces the probability of our frog choosing the average fly. Be convincing in your demonstration that your fix works well; it does not have to work correctly every time (just often enough for our frog not to starve).

One Answer: Add a slowly changing noise process to each selection unit. In my implementation, each L unit receives an additional random input. At every time step, with probability 0.03, the entire vector of injected noise is changed. The random noise for each unit is drawn from a uniform distribution in the range [-M .. M].

The following figure shows the time course of the relevant variables when M = 0.2. The green and yellow lines show Lnet* of the two competing units; and the motor output is shown by the heavy blue line.

\epsfig{file=code/q30a_4_time.epsc, width = 4in}

A histogram showing the outcome over 50 trials is shown in the following figure. In this case, one of the two targets is always chosen.

\epsfig{file=code/q30a_4.epsc, width = 4in}

When M = 0.1, some trials end with either both targets selected (in which case, the average fly is snapped at) or neither target is selected (we assume that no snap occurs).

\epsfig{file=code/q30a_2.epsc, width = 4in}

When M = 0.05, many trials end with the frog not snapping at a valid target.

\epsfig{file=code/q30a_1.epsc, width = 4in}

About this document ...

Homework #2: Prey Selection in Frog

This document was generated using the LaTeX2HTML translator Version 98.1p1 release (March 2nd, 1998)

Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based Learning Unit, University of Leeds.

The command line arguments were:
latex2html -no_navigation -split 0 -t CMPSCI/NSB 691C: HW2 -dir html -no_reuse -tmp /tmp hw2.tex.

The translation was initiated by Andrew H. Fagg on 2001-10-30

Andrew H. Fagg