PSY 5038W - Introduction to Neural Networks

Fall 2016
Class #: 34494  
9:45AM-11:00AM MW
Elliott Hall N227, TCEASTBANK

Course home pages:

Instructor: Daniel Kersten,, Office: S212 Elliott Hall, Phone: 625-2589
Office hours: Mondays 11:00 to 12:00 and by appointment.

Teaching assistant: Brent Carpenter,
Office hours:
Tuesdays at 9:00 -11:00 am and by appointment

Course description. Introduction to large scale parallel distributed processing models in neural and cognitive science. Topics include: linear models, statistical pattern theory, Hebbian rules, self-organization, non-linear models, information optimization, and representation of neural information. Applications to sensory processing, perception, learning, and memory.

Prerequisites: Linear algebra, multivariate calculus.


Lecture notes (see below)



Mathematica is the primary programming environment for this course. If you wish to purchase Mathematica for Students see

Accessing Mathematica on the CLA server

For user help on using Mathematica, see:

Learning center:




Gopen, G. D., & Swan, J. A., 1990. The Science of Scientific Writing. American Scientist, 78, 550-558. (pdf)


Writing assistance

THE CENTER FOR WRITING offers free one-to-one writing assistance to undergraduate and graduate students, with appointments up to 45 minutes.
Nonnative speaker specialists are available. For more information, see

Supplementary readings

*Anderson, James. (1995) Introduction to Neural Networks, MIT Press.
***Bishop, C. M. (2006). Pattern recognition and machine learning. New York: Springer.
*Dayan, P., & Abbott, L. F. (2001). Theoretical neuroscience : computational and mathematical modeling of neural systems. Cambridge, Mass.: MIT Press.
Freeman, J. A. (1994). Simulating Neural Networks with Mathematica . Reading, MA: Addison-Wesley Publishing Company.
**Gershenfeld, N. A. (1999).
The nature of mathematical modeling. Cambridge ; New York: Cambridge University Press.
**Hertz, J., Krogh, A., &;Palmer, R. G. (1991). Introduction to the theory of neural computation (Santa Fe Institute Studies in the Sciences of Complexity ed.). Reading, MA: Addison-Wesley Publishing Company.
Koch, C., & Segev, I. (Eds.). (1998). Methods in Neuronal Modeling : From Ions to Networks (2nd ed.). Cambridge, MA: MIT Press.
***MacKay, D. J. C. (2003). Information theory, inference, and learning algorithms. Cambridge, UK ; New York: Cambridge University Press.
***Murphy, K. P. (2012). Machine Learning: a Probabilistic Perspective. MIT Press.

*Neural/Cognitive Science
**Physics/Applied Math
***Statistical/machine learning

Grade Requirements

There will be programming assignments, as well as a final project. The grade weights are:

Outline & Lecture Notes

(Under construction)

(NOTE: Links to revised lecture material below will be posted on the day of the lecture.
Links to the pdfs for additional readings may require a password.
If you want to preview similar material, check out lectures from 2014

Lecture notes are in Mathematica Notebook and pdf format. You can download the Mathematica notebook files below to view with Mathematica or Wolfram CDF Player (which is free).




Additional Readings & supplementary material



Sep 7

Mathematica notebook


Mathematica screencast
Neuroscience tutorial (Clinical, Wash. U.)
Top 100 Brain Structures



Sep 12

The neuron (pdf file)| Mathematica notebook

Myelinated neuron (Wolfram Demo)
Koch & Segev, 2000 (pdf)
Meunier & Segev, 2002 (pdf)



Sep 14

Neural Models, McCulloch-Pitt (pdf file)| Mathematica notebook

Koch, C., & Segev, I. (Eds.). (1998) (pdf)



Sep 19

Generic neuron model (pdf file)| Mathematica notebook

  Exercise 1


Sep 21

Lateral inhibition (pdf file)| Mathematica notebook

Hartline (1972) (pdf)



Sep 26

Matrices (pdf file)| Mathematica notebook



Sep 28

Linear systems, learning & memory (pdf file)|
Mathematica notebook



Oct 3

Linear recall, association and memory simulations (pdf file)| Mathematica notebook


Exercise 2


Oct 5

Overview of non-linear networks, discriminative models, Perceptron, SVMs (pdf file)| , Mathematica notebook

Preview of statistical sampling (pdf) Mathematica notebook

SVMs: Jäkel et al., (2009) Jäkel et al., (2007)
Mathematica SVMs: Nilsson, Björkegren & Tegnér (2006)

Fisher's linear discriminant notes (pdf) Mathematica notebook




Oct 10

Supervised learning as regression, Widrow-Hoff, backprop (pdf file)| Mathematica notebook


XOR backpropagation demo. Mathematica notebook

Poirazi, Brannon & Mel (2003) (pdf)

Williams (1992) (pdf)



Oct 12

Hopfield networks (pdf file)| Mathematica notebook

Hopfield (1982) (pdf)
Marr & Poggio (1976) (pdf)
Hopfield (1984) (pdf)
Durstewitz et al. (2000) (pdf)

IPython demo of Hopfield

Stereo correspondence. Mathematica demo. IPython demo.



Oct 17

Boltzmann machine (pdf file)| Mathematica notebook

Sculpting the energy function, interpolation (Mathematica notebook)

Berkes, P., Orban, G., Lengyel, M., & Fiser, J. (2011). Spontaneous cortical activity reveals hallmarks of an optimal internal model of the environment. Science, 331(6013), 83. (pdf)

Exercise 3


Oct 19

Probability and neural networks
(pdf file)| Mathematica notebook

Griffiths and Yuille (2006) (pdf)
Jordan, M. I. and Bishop. C. MIT Artificial Intelligence Lab Memo 1562, March 1996. Neural networks.

Kersten, D., & Yuille, A. (2003). Bayesian models of object perception. Current Opinion in Neurobiology, 13(2), 1-9. (pdf)

Kersten D. & Yuille, A.L (2013) .Vision: Bayesian Inference and Beyond. The New Visual Neurosciences. John S. Werner and Leo M. Chalupa (Editors) MIT Press. Cambridge MA..(draft pdf)



Oct 24

Multivariate distributions, Regression, Interpolation, perceptual completion
Mathematica notebook


Bias/Variance notes



Oct 26

Graphical models
Mathematica notebook

Pattern Recognition and Machine Learning, Chapter 8: Graphical Models. Christopher M. Bishop (pdf)

Weiss Y. (pdf)
Belief propagtion tutorial by James Coughlan (pdf).
Ma, W. J. (2012). Organizing probabilistic models of perception. Trends in Cognitive Sciences, 16(10), 511–518. (pdf)



Oct 31

Belief Propagation: regression and interpolation revisited (pdf ) Mathematica notebook

(revised 10/31)


James Coughlan's BP tutorial


SAMPLE PROJECT IDEAS from previous years(pdf)
Sample abstracts from past students

For demonstration style projects, see the Wolfram Demonstration site

How To Do Research. William T. Freeman (2013), (link)

Exercise 4

Correction to Problem 4: The Appendix in Lecture 15 (not 14) goes through the example using lists.


Nov 2

Utility & probabiilty: Bayes decision theory (pdf)
Mathematica notebook


Geisler, W. S., & Kersten, D. (2002). Illusions, perception and Bayes. Nat Neurosci, 5(6), 508-510. (pdf)



Nov 7



Supervised learning: neural networks in the context of machine learning

Mathematica notebook




Nov 9

More sampling
Gibbs sampling

Mathematica notebook



Recommended pymc tutorials:

Lake, B. M., Salakhutdinov, R., & Tenenbaum, J. B. (2015). Human-level concept learning through probabilistic program induction. Science, 350(6266), 1332–1338.



Nov 14

Overview of python/ipython for scientific compution/neural networks, and Bayesian computations.

IPython notebook (using nbviewer)

Raw notebook (needs viewer or jupyter to

An older version at
Live notebook


Anaconda python installation recommended. We will use IPython, a browser-based notebook interface for python.

See here for illustrations of IPython cell types, and here for a collection of sample notebooks.

Look here for some good tips on installation, as well as the parent directory for excellent ipython-based course material on scientific computing using Monte Carlo methods.

For a quick start to scientific programming, see:

For a list of some notebooks in psychology, neuroscience, and machine learning see:

For a comphrensive coverage of scientific python see:

And for a ground-up set of tutorials on python see:

Switching from matlab to python?

Practice: 1), 2) ConvolutionDemoFor5038.ipynb, which needs Zebra_running_Ngorongoro.jpg



Nov 16

Lect_21_PyMC (raw IPython notebook) or Jupyter nbviewer

PyMC2 sprinkler (raw)
Jupyter viewer

PyMC3 Gaussian mixtures (raw)
Jupyter viewer

PyMC3 spike rate transitions (raw)
Jupyter viewer

Scikit-learn gaussian mixtures (raw)
Jupyter viewer


Carrandini, Heeger, Movshon (1996)(pdf)

Supplement (pdf file)| Mathematica notebook

Kersten D. & Yuille, A.L. (2014) Inferential Models of the Visual Cortical Hierarchy. The New Cognitive Neurosciences, 5th Edition.(draft pdf)

Fang, F., Boyaci, H., & Kersten, D. (2009). Border ownership selectivity in human early visual cortex and its modulation by attention. J Neurosci, 29(2), 460-465.

Exercise 5 (11/11/16)

Revised to correct Question 5


Nov 21

Architectures: Overview of visual hierarchy: Lect_22a_VisualArchitecture(Keynote pdf)



Contrast normalization notes

Final project title & paragraph outline due (2%)


Nov 23

Neural networks for self-organization

AdaptMaps(pdf)| Mathematica notebook


Oja's rule and PCA: Sanger (2003) (pdf)

Simoncelli, E. P., & Olshausen, B. A. (2001). Natural image statistics and neural representation. Annu Rev Neurosci, 24, 1193-1216.(pdf)
Supplement: ContingentAdaptation.nb




Nov 28

Efficient coding. Mathematica notebook (pdf)


Neural population codes(Mathematica notebook) (pdf)

Probabilistic neural representations, Poisson-like codes, and the neural integration of information. Keynote presentation


Knill & Pouget (2004) (pdf)
Pouget et al. (2006) (pdf)

Ernst, M. O., & Banks, M. S. (2002). Humans integrate visual and haptic information in a statistically optimal fashion. Nature, 415(6870), 429-433. (pdf)

Ma, W. J. (2012). Organizing probabilistic models of perception. Trends in Cognitive Sciences, 16(10), 511–518. (pdf)

Quiroga, R. Q., Reddy, L., Kreiman, G., Koch, C., & Fried, I. (2005).(pdf)



Nov 30

Scientific writing and presentations (pdf)
(Mathematica notebook)

Gopen & Swan, 1990 (pdf)

Denis Pelli's advice for scientific writing



Dec 5

Clustering, EM, segmentation
Mathematica notebook (pdf)

Expectation Maximization: Weiss Y. (pdf)

Kirchner, H., & Thorpe, S. J. (2006). Ultra-rapid object detection with saccadic eye movements: Visual processing speed revisited. Vision Research, 46(11), 1762–1776. doi:10.1016/j.visres.2005.10.002 (pdf)

Ullman, S., Vidal-Naquet, M., & Sali, E. (2002). Visual features of intermediate complexity and their use in classification. Nat Neurosci, 5(7), 682-687. (pdf)

Hegde, J., Bart, E., & Kersten, D. (2008). Fragment-Based Learning of Visual Object Categories. Curr Biol. 18, 597-601

Serre, T., Oliva, A., & Poggio, T. (2007). A feedforward architecture accounts for rapid categorization. Proc Natl Acad Sci U S A, 104(15), 6424-6429.

Exercise 6

(~32 Mbytes)


Dec 7

Bidirectional hierarchical models

keynote presentation (pdf)


Hong, H., Yamins, D. L. K., Majaj, N. J., & DiCarlo, J. J. (2016). Explicit information for category-orthogonal object properties increases along the ventral stream. Nature Neuroscience, 1–18.

Bullier, J. (2001). Integrated model of visual processing. Brain Res Brain Res Rev, 36(2-3), 96-107. (pdf)

Epshtein, B., Lifshitz, I., & Ullman, S. (2008). Image interpretation by a single bottom-up top-down cycle. Proceedings of the National Academy of Sciences of the United States of America, 105(38), 14298. (pdf)

Fang, F., Boyaci, H., Kersten, D., & Murray, S. O. (2008). Attention-dependent representation of a size illusion in human V1. Curr Biol, 18(21), 1707-1712 (pdf)

Yuille, A., & Kersten, D. (2006). Vision as Bayesian inference: analysis by synthesis? Trends Cogn Sci, 10(7), 301-308. (pdf)

Rao, R. P., & Ballard, D. H. (1999). Predictive coding in the visual cortex: a functional interpretation of some extra-classical receptive-field effects. Nat Neurosci, 2(1), 79-87. (pdf)

Kalman notes (pdf)
Wolpert et al (1995) (pdf)


Complete Draft of Final Project (5%)

Due Friday December 9


Dec 12


Class presentations

Peer comments on Final Project (5%)

Due Wednesday December 14
(note change)



Dec 14

Last day
of classes


Class presentations

Drafts returned with Instructor and peer comments December 14


Dec 22

End of Semester


Submit Final Revised Draft of Project (28%)

Final Project Assignment

This course teaches you how to understand cognitive and perceptual aspects of brain processing in terms of computation. Writing a computer program encourages you to think clearly about the assumptions underlying a given theory. Getting a program to work, however, tests just one level of clear thinking. By writing about your work, you will learn to think through the broader implications of your final project, and to effectively communicate the rationale and results in words.

Your final project will involve: 1) a computer simulation and; 2) a 2000-3000 word final paper describing your simulation. For your computer project, you will do one of the following: 1) Devise a novel application for a neural network model studied in the course; 2) Write a program to simulate a model from the neural network literature ; 3) Design and program a method for solving some problem in perception, cognition or motor control. The results of your final project should be written up in the form of a short scientific paper, describing the motivation, methods, results, and interpretation. Your paper will be critiqued and returned for you to revise and resubmit in final form. You should write for an audience consisting of your class peers. You may elect to have your final paper published in the course's web-based electronic journal.

Completing the final paper involves 3 steps:

  1. Outline. You will submit a working title and paragraph outline by the deadline noted in the syllabus. These outlines will be critiqued in order to help you find an appropriate focus for your papers. (2% of grade). (Consult with the instructor or TA for ideas well ahead of time).
  2. Complete draft. You will then submit a complete draft of your paper (2000-3000 words). Papers must include the following sections: Abstract, Introduction, Methods, Results, Discussion, and Bibliography. Use citations to motivate your problem and to justify your claims. Figures should be numbered and have figure captions. Cite authors by name and date, e.g. (Marr & Poggio, 1979). Use a standard citation format, such as APA. Papers must be typed, with a page number on each page.Each paper will be reviewed with specific recommendations for improvement. (5% of grade)
  3. Peer commentary. Each student will submit a paragraph on an anonymous paired project draft (5% of grade)
  4. Final draft. You will submit a final revision for grading. (28% of grade). The final draft must be turned in by the date noted on the syllabus. Students who wish to submit their final papers to be published in the class electronic journal should turn in both paper and electronic copies of their reports.

If you choose to write your program in Mathematica, your paper and program can be combined can be formated as a Mathematica notebook. See: Books and Tutorials on Notebooks.

Your paper will be critiqued and returned for you to revise and resubmit in final form. You should write for an audience consisting of your class peers.

Some Resources:

Student Writing Support: Center for Writing, 306b Lind Hall and satellite locations (612.625.1893)
Online Writing Center:

NOTE: Plagiarism, a form of scholastic dishonesty and a disciplinaryoffense, is described by the Regents as follows: Scholasticdishonesty means plagiarizing; cheating on assignments or examinations;engaging in unauthorized collaboration on academic work; taking,acquiring, or using test materials without faculty permission; submittingfalse or incomplete records of academic achievement; acting alone or incooperation with another to falsify records or to obtain dishonestlygrades, honors, awards, or professional endorsement; or altering,forging, or misusing a University academic record; or fabricating orfalsifying of data, research procedures, or data analysis.

NOTE: Sexual Assault and higher education: Training modules and information
The Department of Psychology supports the efforts of the University of Minnesota towards prevention of sexual assault. We encourage all students to participate in the free online training that has been established for undergraduate students and graduate students. The training highlights pertinent issues regarding sexual assault, including, but not limited to: defining healthy relationships, consent, bystander intervention, and gender roles. Haven (for undergraduate students under the age of 25) and Haven Plus (for undergraduates over 25, graduate students, and professional students) is the training available at no cost to University of Minnesota students. Additionally, to learn more about how you can help reduce sexual assault at the University of Minnesota, please visit the Aurora Center.

2016 Daniel Kersten, University of Minnesota