Introduction
The following software was written to aid in the teaching of BioNB330, Introduction to Computational Neuroscience. The software is meant to clarify concepts introduced in lecture and to serve as the basis for homework assignments. The programs written are:
Using the Neural model program
This program helps the student investigate simplified, computational models of neurons. The program requires Matlab 6.1 or later to run. Download the program by right-clicking on the above program link.
The user interface is shown below. In summary, you can:
Each interactive control will be explained in following paragraphs. The mathematical basis for the model is explained on a separate page.
Input Sections
There are two inputs to the simulated neuron, each with its own controls. Each input acts as a current-input with a waveform determined by the control settings:
DC level
edit field sets a steady, unchanging current.
The default setting when the program starts is for all inputs to be zero.
You can set the DC input to amplitude 0.5 to cause spikeing when you press
Run
. This level is sufficient to cause output spikes initially.
The useful range is -1 to +1. Negative currents are inhibitory, positive are
excitatory.Noise Lvl
edit field sets the amplitude of a random current.
This can be used to simulate synaptic noise. The useful range is 0 to +1.Pulse
input allows current pulses to be applied the the
model neuron, simulating currents caused by action potentials. Pulses have
three associated edit fields:
level
sets the amplitude of the pulse. Useful range is
-1 to +1.duration
sets the time the pulse lasts. Useful range is
1 (time step) to 100 or so.space
sets the time between pulses. Useful range is 1 (time
step) to 1000 or so.Sine
input allows sinusoidally varying currents to be applied
the the model neuron, simulating currents caused by smoothly varying sensory
inputs. The sine function has two associated edit fields:
level
sets the amplutide of the wave. Useful range is -1
to +1.frequency
sets the rate at which the current changes. Useful
range is .001 (1 cycle per 1000 time steps) to 0.5 (one cycle per 2 time
steps).Output
input allows the output of the simulated neuron
to feed back to the input. The level control sets the amount of feedback.The
useful range is -1 to +1.Voltage Function Section
The Voltage Function
section sets the membrane parameters, and
also allows for measurements and monitoring the details of membrane current.
The red bar animates the current membrane voltage, while the box surrounding
it animates the threshold (if the threshold changes). There are two subthresold
membrane parameters:
Rin
edit field sets the input resistance of the neuron.
A higher Rin
implies that the applied current will cause a bigger
voltage change (since E=IR). The useful range is 0.5 to 10 or so.Voltage Reset
button will force the voltage to
resting potential.Clicking the Measure
button stops the simulation. When you click
the mouse button in the waveform display, a diamond marker is placed on the
screen. This becomes the zero-point for the measurement. As you move the mouse,
the difference between the position of the diamond and the position of the mouse
is used to calculate a voltage and a time.
Output Function Section
The Output Function
section sets the type of neuron (spiking/sigmoid)
and the threshold for output. There are also controls for displaying and reseting
the interspike interval (ISI) histogram. The neuron can be in one of two output
modes:
The threshold may be modified in various ways:
If the neuron is in spike mode, the ISI controls may be used to display an
interspike interval histogram. The Reset ISI
button clears the
spike memory.
Using the Receptive Field model program
This program helps the student investigate a simple receptive field model. The program requires Matlab 6.1 or later to run. Download the program by right-clicking on the above program link. Three sensory inputs drive one output neuron. The three inputs have user-selectable responses to a rotating line. When the line rotates through the receptive field of an input, that input generates a current. The currents are summed at the output neuron to form a response to the rotating line. The line rotates from 0 to 180 degrees, then stops.
The user interface is shown below. In summary, you can:
Each interactive control will be explained in following paragraphs.
Input Sections
There are three inputs to the simulated neuron, each with its own controls. Each input acts as a current-input with an line-angle dependent waveform determined by the control settings:
Offset
edit field sets the average current of the sinewave
input. The default setting when the program starts is for al offsets to be
0.0. The useful range is -1 to +1. A setting of zero means that the the sinewave
will be excitatory for the positive half-cycle and inhibitory for the negative
half-cycle. A setting of +1 means that the entire sinewave will be excitatory.
A setting of -1 means that the entire sinewave will be inhibitory. Negative
currents are inhibitory, positive are excitatory.Frequency
edit field sets the number of maxima in the input
response curve. A frequency of 1 corresponds to one maximally stimulating
angle of the line (per revolution) as it rotates. The useful range is 1 to
4.Phase
input sets the value of the best angle for stimulating
an input.weight
input sets the strength of the current applied to
the neuron.The initial control settings are shown in the figure above.
Voltage Function Section
The Voltage Function
section sets the membrane parameters, and
also allows for measurements and monitoring the details of membrane current.
The red bar animates the current membrane voltage, while the box surrounding
it animates the threshold (if the threshold changes). There are two subthresold
membrane parameters:
Rin
edit field sets the input resistance of the neuron.
A higher Rin
implies that the applied current will cause a bigger
voltage change (since E=IR). The useful range is 0.5 to 10 or so.Clicking the Measure
button stops the simulation. When you click
the mouse button in the waveform display, a diamond marker is placed on the
screen. This becomes the zero-point for the measurement. As you move the mouse,
the difference between the position of the diamond and the position of the mouse
is used to calculate a voltage and a time.
Output Function Section
The Output Function
section sets the type of neuron (spiking/sigmoid)
and the threshold for output. There are also controls for displaying and reseting
the interspike interval (ISI) histogram. The neuron can be in one of two output
modes:
The threshold may be modified in various ways:
If the neuron is in spike mode, the ISI controls may be used to display an
interspike interval histogram. The Reset ISI
button clears the
spike memory.
Using the Lateral Inhibition model program
This program helps the student investigate a receptive field model with coupling between cells. The program requires Matlab 6.1 or later to run. Download the program by right-clicking on the above program link. Three sensory inputs each drive one second-layer neuron. The three second-layer neurons may be cross-coupled and/or drive an output neuron. The three inputs are similar to the previous program. The second-layer neurons and output neuron have linear response to input current (above a settable threshold).
The user interface is shown below. In summary, you can:
Each interactive control will be explained in following paragraphs.
Input Sections
There are three inputs to the simulated neuron, each with its own controls. Each input acts as a current-input with an line-angle dependent waveform determined by the control settings:
Offset
edit field sets the average current of the sinewave
input. The default setting when the program starts is for al offsets to be
0.0. The useful range is -1 to +1. A setting of zero means that the the sinewave
will be excitatory for the positive half-cycle and inhibitory for the negative
half-cycle. A setting of +1 means that the entire sinewave will be excitatory.
A setting of -1 means that the entire sinewave will be inhibitory. Negative
currents are inhibitory, positive are excitatory.Frequency
edit field sets the number of maxima in the input
response curve. A frequency of 1 corresponds to one maximally stimulating
angle of the line (per revolution) as it rotates. The useful range is 1 to
4.Phase
input sets the value of the best angle for stimulating
an input.weight
input sets the strength of the current applied to
the second-layer neuron.show output
checkbox shows/surpresses this current.Cell Sections
The Cell
sections sets the membrane threshold and the cross-coupling
weights from each second-layer cell to its neighbors.
show output
checkbox shows/surpresses this voltage.Clicking the Measure
button stops the simulation. When you click
the mouse button in the waveform display, a diamond marker is placed on the
screen. This becomes the zero-point for the measurement. As you move the mouse,
the difference between the position of the diamond and the position of the mouse
is used to calculate a voltage and a time.
Output Cell Section
The Output Cell
section sets the threshold for output and the
input weights from each of the layer-two neurons. The useful ranges are as above.
Using the Two Cell model program
This program helps the student investigate two interconnected model neurons. The program requires Matlab 6.1 or later to run. Download the program by right-clicking on the above program link. There are a variety of input options to each cell, including connection to the output of the other cell.
The user interface is shown below. In summary, you can:
Each interactive control will be explained in following paragraphs.
Input Sections
There are two input sections corresponding to the two simulated neuron, each with its own controls. Each input acts as a current-input with a waveform determined by the control settings:
DC level
edit field sets a steady, unchanging current.
The default setting when the program starts is for Input 1 to have a steady
current of amplitude 0.5. This level is sufficient to cause output spikes
initially. The useful range is -1 to +1. Negative currents are inhibitory,
positive are excitatory.Noise Lvl
edit field sets the amplitude of a random current.
This can be used to simulate synaptic noise. The useful range is 0 to +1.Pulse
input allows current pulses to be applied the the
model neuron, simulating currents caused by action potentials. Pulses have
three associated edit fields:
level
sets the amplitude of the pulse. Useful range is
-1 to +1.duration
sets the time the pulse lasts. Useful range is
1 (time step) to 100 or so.space
sets the time between pulses. Useful range is 1 (time
step) to 1000 or so.Sine
input allows sinusoidally varying currents to be applied
the the model neuron, simulating currents caused by smoothly varying sensory
inputs. The sine function has two associated edit fields:
level
sets the amplutide of the wave. Useful range is -1
to +1.frequency
sets the rate at which the current changes. Useful
range is .001 (1 cycle per 1000 time steps) to 0.5 (one cycle per 2 time
steps).Cell1 or Cell2
input allows the output of the simulated
neuron to feed back to the other cell. The level control sets the amount of
feedback.The useful range is -1 to +1. The tau
controls set the
time consant of the synaptic current.Voltage Function Section
The Voltage Function
section sets the membrane parameters, and
also allows for measurements and monitoring the details of membrane current.
The red bar animates the current membrane voltage, while the box surrounding
it animates the threshold (if the threshold changes). There are two subthresold
membrane parameters:
Rin
edit field sets the input resistance of the neurons.
A higher Rin
implies that the applied current will cause a bigger
voltage change (since E=IR). The useful range is 0.5 to 10 or so.Clicking the Measure
button stops the simulation. When you click
the mouse button in the waveform display, a diamond marker is placed on the
screen. This becomes the zero-point for the measurement. As you move the mouse,
the difference between the position of the diamond and the position of the mouse
is used to calculate a voltage and a time.
Output Function Section
The Output Function
section sets the type of neuron (spiking/sigmoid)
and the threshold for output. There are also controls for displaying and reseting
the interspike interval (ISI) histogram. The neuron can be in one of two output
modes:
If the neuron is in spike mode, the ISI controls may be used to display an
interspike interval histogram. The Reset ISI
button clears the
spike memory.
Linear Association Learning
This program helps the student investigate a simple learning algorithm. The program requires Matlab 6.1 or later to run. Download the program by right-clicking on the above program link. The user can associate output patterns with input patterns by clicking on the appropriate (binary valued) boxes.
Learn
mode, clicking on input units and output units toggles
them from off (white) to on (black) and back. Once a pattern is set, the Set
Weights
button will modify the association matrix shown at the lower
right. The width of the lines connecting the inputs and outputs gives an estimate
of the connection strength. Learn
mode, clicking on the Reset Weights
button
will zero all the weights.Recall
mode, clicking on input units toggles them from off
(white) to on (black) and back. When an input pattern is set, an output is
computed and displayed. The Threshold
edit field sets the level
at which an ouput will be considered on (black).Hebbian Learning
This program helps the student investigate a Hebbian learning algorithm. The program requires Matlab 6.1 or later to run. Download the program by right-clicking on the on the above program link.
Learn
mode, the program associates the inputs of five cells
(with overlapping receptive fields, shown on the left of the image below)
with an unconditioned stimulus. The effect is to increment the weights of
of the connections between the input cells and the output cell, proportional
to the product of activiy of the input and output cells. The width of the
lines connecting the inputs and outputs gives an estimate of the connection
strength. During training, the stimulus (red line at 1700 Hz) and unconditioned
stimulus (green square) flash once for each reinforcement.Learn
mode, clicking on the Reset
button will
zero all the weights.Sweep
mode, the program sweeps throuugh all possible stimuli
and produces a curve of the output amplitude based on the learned connection
weights and an optional output threshold. The Output Threshold
edit field sets the level at which an ouput will be considered nonzero. The
color intensity of each input unit is proportional to its ouput value.Input Threshold
setting allows the learning
algorithm to ignore small inputs. There are four modes for normalizing the
weights.A slightly modified version of the program has a subtractive threshold for inputs, so that weights can become negative. There is a new control defined to set the initial weights to non-zero values.
Auto-association Learning
This program helps the student investigate a learning algorithm which allows pattern completion. The program requires Matlab 6.1 or later to run. Download the program by right-clicking on the above program link. The user can enter input patterns by clicking on the appropriate (binary valued) boxes.
Set Weights
button computes weights for an input pattern,
so that part of the input will tend to rrecall all of the pattern.Recall Pattern
button, computes an output based on the
current weights and inputs.Reset Weights
button will zero all the weights.Clear Pattern
button will zero all the input
boxes.Copyright Cornell University, Sept 2004