Neuroscience Homework 1


1) You want to study activity patterns of populations of neurons, and use an approach like that used to study leech decision making. You are interested in activity patterns in sensory areas, and you want to use a ridiculously simple model system. Ultimately you settle on the olfactory system of the single-toed sloth, which has only 2 neurons.

Amazingly you find that these neurons can only fire a single spike, although they do so very reliably (maybe that’s why sloths are sloths you think to yourself).

  • a) How many odors can this sloth discriminate?
  • b) Sketch a diagram showing how to construct a network of neurons where each neuron is selective for one of the x odors the sloth can discriminate. Activity of those neurons should be the product of the firing rates of the inputs and the synaptic weights (vary between -1 (inhibition) and 1) with which they are connected; if that product is above some threshold the cell fires, if not it’s silent. Even with neurons that just fire a single spike, you should be able to find a set of synaptic weights where each downstream neuron fires uniquely for one of those x odors. How many layers does your network require to achieve your x different outputs?

You next stumble on a sloth with two neurons, but they fire multiple spikes, with some trial to trial variability. You will do some simple coding in Python (or Matlab if you wish) to understand this sloth.

Python is a powerful and flexible programming language, created by Guido van Rossum and named after the Monty Python comedy troupe. The core Python language is supplemented by various add-on "packages" that provide advanced functionality. We will be making extensive use of three packages here: Numpy, Scipy, and Matplotlib. The "modules" provided by these packages turn Python into a powerful scientific computing environment. Numpy provides access to things such as matrix operations and linear algebra. Scipy provides mathematical operations such as integration and also statistical tools. Matplotlib provides an environment for producing elegant plots.

To start off, let's import the Numpy package and the Matplotlib package (for plotting). Use the standard abbreviations 'np' and 'plt'.

In [1]:
# insert code here
  • c) Draw 2000 random numbers from a normal (Gaussian) distribution, with mean 6 and standard deviation 1, and plot a histogram of the data with 20 bins.
In [2]:
# insert code here

Back to the sloth. You record the spiking rates (mean ± SD) of his two neurons to 100 presentations of two different odors, Eucalyptus and Fig: $$ \begin{array}{c|c|c|} & \rm{Eucalyptus} & \rm{Fig} \\ \rm{Neuron 1} & 100 ± 10 & 80 ± 10 \\ \rm{Neuron 2} & 60 ± 10 & 40 ± 10 \\ \end{array} $$ Create four vectors representing the responses of these neurons for 100 trials. For Neuron1+Eucalyptus you should end up with a variable that’s 100 points long, where the mean of those points is 100 and the SD is 10.

In [3]:
# insert code here

Plot the data. One convenient way is to represent the data as boxplots.

In [4]:
# insert code here
  • d) Plot histograms of the Neuron 1 data, both eucalyptus and fig, on the same graph. Do the same for neuron 2.
In [5]:
# insert code here

If the sloth chooses odors based on the activity of one neuron at a time, and he discriminates odors using a thresholding mechanism, where should he place that threshold to most accurately discriminate for Neuron1 & Neuron2? Justify your answer by determining how often the sloth will mis-identify eucalyptus smell as fig (& vice versa) with different thresholds.

  • e) Plot the frequency of mis-identifications a function of threshold for Neuron1 & Neuron2. Plot results using 5 different thresholds, including the one you think is 'optimal'.
In [6]:
# insert code here
  • f) How often would he mis-identify the two odors theoretically at the optimum threshold, given that the neurons show Gaussian variability in their firing? (Hint: we can use the stats.norm.cdf function from Scipy to calculate the cumulative density of a Gaussian distribution. We will have to first load the special "stats" subpackage from SciPy)
In [7]:
# insert code here
  • g) Plot the 2D response vector i.e. where both neurons contribute to the choice.
In [8]:
# insert code here
  • h) How often will the sloth mis-identify the odors under these circumstances?

For this question think in terms of distance between individual points (i.e. individual trials) and the mean response. Use Pythagoras’ theorem to measure that distance for each point and see which mean response it is close to.

In [9]:
# insert code here
  • i) Give an intuitive explanation for why discrimination accuracy is higher in the 2D situation.