NEU 314: Mathematical Tools for Neuroscience
Instructor: Sam Nastase
Princeton Neuroscience Institute
Fall, 2022
NEU 314: Mathematical Tools for Neuroscience
Instructor: Sam Nastase*
Princeton Neuroscience Institute
Fall, 2022
* many slides adapted from Jonathan Pillow’s NEU 314 materials!
Who we are
Instructor: Sam Nastase (snastase@princeton.edu)
Office hours: Tuesday 3pm and by appointment (PNI 238E)
AIs:
Rober Boshra (rboshra@princeton.edu)
Zaid Zada (zzada@princeton.edu)
Wayan Gauthey (wgauthey@princeton.edu)
David Allen (da9769@princeton.edu)
Course description
This course introduces students to the mathematical tools at the core of computational neuroscience research. The course aims to familiarize students with topics in linear algebra, statistics, and machine learning, with a heavy emphasis on applications to neurobiology. Lectures on each topic will develop the relevant mathematical background with links to foundational applications in the field. Coursework will focus primarily on problem sets requiring the implementation of models and analyses in Python. The course will equip students with a practical proficiency in various computational methods, including programming skills in data analysis and visualization that are increasingly important to scientific inquiry in general, and neuroscience in particular.
Course website: https://snastase.github.io/teaching/neu314
Prerequisites
Working knowledge of high-school mathematics is required.
Experience with programming is helpful but not required. Python will be introduced in the early lab sessions.
Course format
Two ~1.5-hour lectures per week:
Tuesdays and Thursdays, 1:30–2:50 pm, Jadwin A06
One 3-hour computer labs per week:
B01: Tu, 7:30–10:20 pm, PNI A02, David Allen
B02: W, 1:30–4:20 pm, PNI A02, Wayan Gauthey
B03: F, 1:30–4:20 pm, PNI A02, Zaid Zada
B04: Th, 7:30–10:20 pm, PNI A02, Rober Boshra
Typically one homework assignment every other week comprising programming and math exercises.
Each Thursday lecture will begin with a short quiz.
Students will complete a take-home final exam at the end of the term.
Grading
Homework: 60%
Quizzes: 10%
Participation: 10%
Take-home final exam: 20%
Homework
Homework problem sets will consist primarily of Python programming exercises, as well as some pencil-and-paper math problems.
The goal of these assignments is to put mathematical concepts from class into practice. Writing computer programs to test or implement mathematical concepts provides a deeper form of understanding. These programming exercises will serve as prototypes for data analysis problems in real-world neuroscience research.
All homework assignments will be submitted as Jupyter Notebooks using Google Colab. Use LaTeX/Markdown within the notebook to answer pencil-and-paper math problems. Each homework assignment will be counted equally, so the homework grade will be the average over all assignments.
Quizzes
Thursday lectures will begin with a 5-minute quiz on previous material. The quizzes should be easy for students who have followed recent lectures and completed previous homework assignments.
The goal of these quizzes is to ensure that students have an active grasp of key concepts, without assistance from AIs or fellow students.
The three lowest quiz scores will be dropped when determining grades. No make-up quizzes will be permitted; students who miss a lecture can count the missed quiz among their three lowest scores.
Labs
The primary focus of labs will be to work on the homework problem sets. The AI will begin each lab with a brief overview and field any questions about lecture material. The AI may provide some warm-up problems, but otherwise you’ll be free to work on the homework problem sets individually or in collaboration with other students.
There will be no write-ups or additional assignments associated with labs, but attendance is mandatory: this is your chance to get to know fellow students and get one-on-one help from your AI. Attendance will be taken at lab sessions and count toward your participation grade.
Participation
Participation in class, lab sessions, and online on Ed is
strongly encouraged. Remember that if you have a question, other people probably have the same question!
Collaboration and academic integrity
You are strongly encouraged to work together on problem sets, but the work you submit should be uniquely your own, by your own hand. Transparency and “showing your work” are core pillars of ethical scientific research. Students should understand every step of their code such that they could implement it again without help.
Python
All homework problem sets will require programming in Python, and learning basic scientific computing in Python will be one of the core goals of early lab sessions. We’ll use Jupyter Notebooks in Google Colab, which allows you to edit code in the browser and run it on the cloud.
For more information, see the “Welcome to Colaboratory” notebook: https://colab.research.google.com/notebooks/intro.ipynb
Python
If you want to run Python locally, work with your AI to set up a dedicated conda environment for this class.
# download and install miniconda on Linux (or Windows Subsystem for Linux)
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
source ~/.bashrc
# create a conda environment and install python software
conda create -n neu314
conda install python numpy scipy matplotlib jupyter
# download and install miniconda on MacOSX
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh
source ~/.bash_profile
What is computational neuroscience?
Sensory transduction
Motor reflexes
Autonomic regulation
Multimodal perception
Saliency and attention
Complex motor behavior
Memory
Language production/comprehension
Social cognition
What is computational neuroscience?
What is computational neuroscience?
Hodgkin & Huxley, 1952
What is computational neuroscience?
“When an axon of cell A is near enough to excite cell B and repeatedly or persistently takes part in firing it, some growth process or metabolic change takes place in one or both cells such that A's efficiency, as one of the cells firing B, is increased.”
Hebb, 1949
What is computational neuroscience?
“When an axon of cell A is near enough to excite cell B and repeatedly or persistently takes part in firing it, some growth process or metabolic change takes place in one or both cells such that A's efficiency, as one of the cells firing B, is increased.”
Hebb, 1949
What is computational neuroscience?
“Sensory relays recode sensory messages so that their redundancy is reduced but comparatively little information is lost.”
Attneave, 1954
Barlow, 1961
What is computational neuroscience?
Hubel & Wiesel, 1959, 1962, 1968
What is computational neuroscience?
Hubel & Wiesel, 1959, 1962, 1968
What is computational neuroscience?
Hubel & Wiesel, 1959, 1962, 1968
What is computational neuroscience?
Riesenhuber & Poggio, 1999
Felleman & Van Essen, 1991
Marr, 1982
What is computational neuroscience?
“But somewhere underneath, something was going wrong. The initial discoveries of the 1950s and 1960s were not being followed by equally dramatic discoveries in the 1970s. None of the new studies succeeded in elucidating the function of the visual cortex.”
“The key observation is that neurophysiology and psychophysics have as their business to describe the behavior of cells or of subjects but not to explain such behavior. What are the visual areas of the cerebral cortex actually doing? What are the problems in doing it that need explaining, and at what level of description should such explanations be sought?”
Computational theory | Representation and algorithm | Hardware implementation |
What is the goal of the computation, why is it appropriate, and what is the logic of the strategy by which it can be carried out? | How can this computational theory be implemented? In particular, what is the representation for the input and output and what is the algorithm for the transformation? | How can the representation and algorithm be realized physically? |
Figure 1–4. The three levels at which any machine carrying out an information- processing task must be understood. |
Marr, 1982
What is computational neuroscience?
Computational theory | Representation and algorithm | Hardware implementation |
What is the goal of the computation, why is it appropriate, and what is the logic of the strategy by which it can be carried out? | How can this computational theory be implemented? In particular, was is the representation for the input and output and what is the algorithm for the transformation? | How can the representation and algorithm be realized physically? |
Figure 1–4. The three levels at which any machine carrying out an information- processing task must be understood. |
Marr, 1982
“Vision is therefore, first and foremost, an information-processing task, but we cannot think of it just as a process. For if we are capable of knowing what is where in the world, our brains must somehow be capable of representing this information—in all its profusion of color and form, beauty, motion and detail.”
What is computational neuroscience?
Marr, 1982
Computational theory | Representation and algorithm | Hardware implementation |
What is the goal of the computation, why is it appropriate, and what is the logic of the strategy by which it can be carried out? | How can this computational theory be implemented? In particular, was is the representation for the input and output and what is the algorithm for the transformation? | How can the representation and algorithm be realized physically? |
Figure 1–4. The three levels at which any machine carrying out an information- processing task must be understood. |
Marr, 1982
“Vision is therefore, first and foremost, an information-processing task, but we cannot think of it just as a process. For if we are capable of knowing what is where in the world, our brains must somehow be capable of representing this information—in all its profusion of color and form, beauty, motion and detail.”
What is computational neuroscience?
Computational theory | Representation and algorithm | Hardware implementation |
What is the goal of the computation, why is it appropriate, and what is the logic of the strategy by which it can be carried out? | How can this computational theory be implemented? In particular, was is the representation for the input and output and what is the algorithm for the transformation? | How can the representation and algorithm be realized physically? |
Figure 1–4. The three levels at which any machine carrying out an information- processing task must be understood. |
Marr, 1982
“Vision is therefore, first and foremost, an information-processing task, but we cannot think of it just as a process. For if we are capable of knowing what is where in the world, our brains must somehow be capable of representing this information—in all its profusion of color and form, beauty, motion and detail.”
What is computational neuroscience?
Marr, 1982
Computational theory | Representation and algorithm | Hardware implementation |
What is the goal of the computation, why is it appropriate, and what is the logic of the strategy by which it can be carried out? | How can this computational theory be implemented? In particular, was is the representation for the input and output and what is the algorithm for the transformation? | How can the representation and algorithm be realized physically? |
Figure 1–4. The three levels at which any machine carrying out an information- processing task must be understood. |
Marr, 1982
“Vision is therefore, first and foremost, an information-processing task, but we cannot think of it just as a process. For if we are capable of knowing what is where in the world, our brains must somehow be capable of representing this information—in all its profusion of color and form, beauty, motion and detail.”
What is computational neuroscience?
Marr, 1982
Marr, 1982
What is computational neuroscience?
Ecological psychology
“The affordances of the environment are what it offers the animal, what it provides or furnishes, either for good or ill… The perceiving of an affordance is not a process of perceiving a value-free physical object to which meaning is somehow added in a way that no one has been able to agree upon; it is a process of perceiving a value-rich ecological object. Any substance, any surface, any layout has some affordance for benefit or injury to someone. Physics may be value-free, but ecology is not.”
Gibson, 1979
Control theory
“Why do we and other animals have brains? Now you may reason that we have one to perceive the world or to think, and that’s completely wrong. We have a brain for one reason and one reason only, and that’s to produce adaptable and complex movements.”
Wolpert, 2011
Marr, 1982
“Computational neuroscience is an approach to understanding the information content of neural signals by modeling the nervous system at many different scales, including the biophysical, the circuit, and the systems levels.”
What? “Descriptive models summarize large amounts of experimental data compactly yet accurately, thereby characterizing what neurons and neural circuits do.”
How? “Mechanistic models address the question of how nervous systems operate on the basis of known anatomy, physiology, and circuitry.”
Why? “Interpretive models use computational and information-theoretic principles to explore the behavioral and cognitive significance of various aspects of nervous system function.”
What is computational neuroscience?
Sejnowski & Poggio
Dayan & Abbott, 2001
Marr, 1982
“What is being modeled by a computer [the brain] is itself a kind of computer, albeit one quite unlike the serial, digital machines on which computer science cut its teeth. That is, nervous systems and probably parts of nervous systems are themselves naturally evolved computers
—organically constituted, analog in representation, and parallel in their processing architecture.”
What is computational neuroscience?
Patricia Churchland
Churchland & Sejnowski, 1992
Marr, 1982
“What is being modeled by a computer [the brain] is itself a kind of computer, albeit one quite unlike the serial, digital machines on which computer science cut its teeth. That is, nervous systems and probably parts of nervous systems are themselves naturally evolved computers
—organically constituted, analog in representation, and parallel in their processing architecture.”
What is computational neuroscience?
Patricia Churchland
Churchland & Sejnowski, 1992
Marr, 1982
“What is being modeled by a computer [the brain] is itself a kind of computer, albeit one quite unlike the serial, digital machines on which computer science cut its teeth. That is, nervous systems and probably parts of nervous systems are themselves naturally evolved computers
—organically constituted, analog in representation, and parallel in their processing architecture.”
What is computational neuroscience?
Patricia Churchland
Churchland & Sejnowski, 1992
Jonas & Kording, 2017
What is computational neuroscience?
Our working definition…
Computational neuroscience is the enterprise of quantitatively modeling neural activity—the information content and algorithmic operations of the nervous system—given an organism’s sensory input, behavioral output, internal states, and relationship to its environment.
What is computational neuroscience?
Our working definition…
Computational neuroscience is the enterprise of quantitatively modeling neural activity—the information content and algorithmic operations of the nervous system—given an organism’s sensory input, behavioral output, internal states, and relationship to its environment.
We can learn something about the scope and geography of computational neuroscience by exploring some of the intersecting dialectics that drive the field…
Symbolic vs. connectionist computing
Symbolic vs. connectionist computing
Chomsky, 1957, 1965
Fodor, 1975, 1983
Baddeley & Hitch, 1974
Symbolic vs. connectionist computing
Rumelhart, McClelland, & PDP Group, 1987
Symbolic vs. connectionist computing
Krizhevsky et al., 2012
Symbolic vs. connectionist computing
Symbolic vs. connectionist computing
Vaswani et al., 2017
Symbolic vs. connectionist computing
McClelland et al., 2010
Griffiths et al., 2010
Nativism vs. learning
Nativism vs. learning
Spelke et al., 1992
Pinker et al., 1994
Elman et al., 1996
Hasson et al., 2020
Localized vs. distributed processing
Localized vs. distributed processing
Kanwisher et al., 1997, 2010
Localized vs. distributed processing
Haxby et al., 2001
Georgopoulos et al., 1986
Hinton et al., 1986
Georgopoulos et al., 1986
Mikolov et al., 2013
Explanation vs. prediction
Explanation vs. prediction
Breiman, 2001
Shmueli, 2010
Yarkoni & Westfall, 2017
Varoquaux & Poldrack, 2019
Encoding vs. decoding
Encoding vs. decoding
encoding
predicting brain activity from external stimuli or behavior
decoding
predicting external stimuli or behavior from brain activity
Experimental control vs. ecological validity
Experimental control vs. ecological validity
“We can rightfully claim to understand only 10% to 20% of how V1 actually operates under normal conditions.”
Olshausen & Field, 1999
Experimental control vs. ecological validity
“Ecological validity”—coined by Egon Brunswik in 1947
Egon Brunswik
Experimental control vs. ecological validity
“Ecological validity”—coined by Egon Brunswik in 1947
…to mean something else (¬_¬)
Egon Brunswik
Representative design
Ecological generalizability demands a “representative sampling of situations” where “situational instances in an ecology are analogous to individuals in a population.”
Experimental control vs. ecological validity
Jolly & Chang, 2019
Yarkoni, 2020
Nastase et al., 2020
What is computational neuroscience?
Our working definition…
Computational neuroscience is the enterprise of quantitatively modeling neural activity—the information content and algorithmic operations of the nervous system—given an organism’s sensory input, behavioral output, internal states, and relationship to its environment.
Applications of computational neuroscience
Neural prosthesis
If we can build robust models of neural information processing in particular parts of the nervous system, we can (in theory) replace them with artificial prosthetics!
Applications of computational neuroscience
Neural prosthesis
If we can build robust models of neural information processing in particular parts of the nervous system, we can (in theory) replace them with artificial prosthetics!
Cochlear implant
2008
2012
The future of computational neuroscience
Tungsten electrode
Utah array
The future of computational neuroscience
Neuropixels probe
The future of computational neuroscience
Stevenson & Kording, 2011
The future of computational neuroscience
Stevenson & Kording, 2011
It’s an exciting time to study computational neuroscience:
We’re getting incredible data!
Computers are getting extremely fast!
Mathematical advances are yielding deeper insights into neural information processing!