{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## SYDE 556/750: Simulating Neurobiological Systems\n", "\n", "Accompanying Readings: Chapter 1\n", "\n", "Terry Stewart" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from IPython.display import YouTubeVideo\n", "YouTubeVideo('U_Q6Xjz9QHg', width=720, height=400, loop=1, autoplay=0, playlist='U_Q6Xjz9QHg')" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "\n", " \n", " " ], "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "" ] } ], "prompt_number": 1 }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Overall Goal\n", "\n", "- Building simulated brains\n", "- Why?\n", " - To figure out how brains work\n", " - To apply this knowledge to building systems" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Administration\n", "\n", "- Course website: [http://compneuro.uwaterloo.ca/research/syde-750.html](http://compneuro.uwaterloo.ca/research/syde-750.html)\n", "- Contact information\n", " - Terry Stewart: tcstewar@uwaterloo.ca\n", " - Course times: 11:00-12:30 DWE 3519\n", " - Office hours: 2 hours after each lecture" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Coursework\n", "\n", " - Four assignments (60%)\n", " - 20%, 20%, 10%, 10%\n", " - Two weeks for each assignment, except last one (one week)\n", " - Everyone writes their own code, generates their own graphs, writes their own answers\n", " - But it helps to get together to discuss things\n", " \n", " - Final project\n", " - Make a novel model of some neural system\n", " - For 556 students, this can be just an extension of something seen in class\n", " - For 750 students, this must be more of a research project\n", " - [ideas](http://compneuro.uwaterloo.ca/research/syde-750/syde-556-possible-projects.html)" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Schedule\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
WeekReadingMondayWednesdayAssignments
Jan 6, 8Chpt 1IntroductionNeurons
Jan 13, 15Chpt 2,4Neural Coding#1 posted
Jan 20, 22Chpt 4Neural Models
Jan 27, 29Chpt 5,6Feedforward Transformations#1 due (29th at dawn); #2 posted
Feb 3, 5Chpt 6,3Nonlinear Transformations
Feb 10, 12Chpt 7Analysis of Representations#2 due (14th at dawn)
Feb 17, 19*Reading Week*#3 posted
Feb 24, 26Chpt 8Dynamics and Neural Control
Mar 3, 5Chpt 8Dynamics and Neural Control#3 due (5th at dawn)
Mar 10, 12Chpt 9Inference and Learning#4 posted
Mar 17, 19#4 due (19th at dawn)
Mar 24, 26Project Presentations
Mar 31, Apr 2Project Presentations
\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# My Background\n", "\n", "- Undergrad: Systems (Waterloo)\n", " - option in Cognitive Science\n", "- Masters of Philosophy in Computer Science and AI (Sussex)\n", " - experimental psychology on robots\n", "- PhD in Cognitive Science (Carleton)\n", " - philosophy of computational modelling" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Research Theme\n", "\n", "- How does the mind work?\n", "- Most complex and most interesting system humanity has ever studied\n", " - Why study anything else?\n", "- How should we go about studying it?\n", " - What techniques/tools?\n", " - How do we know if we're making progress?\n", " - How do we deal with the complexity?" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Standard Approach\n", "\n", "- Psychology \n", " - Measure people's performance in lots of situations \n", " - Describe processes that might explain observations \n", " - Example: memory \n", " " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "- Problems\n", " - Hard to get quantitative predictions\n", " - Compare to Aristotelian gravity\n", " - \"All bodies move toward their natural place\"" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Cognitive Modelling\n", "\n", "\n", "\n", "- Let's build it \n", " - Specify theory in enough detail that this is possible\n", " - Tends to get complex, so need computer simulation\n", "- Do for psychology what Newton did for physics\n", " - Note that Newton got lucky that gravity turned out to be analytically tractable\n", " - If he had a computer, he wouldn't have had to invent calculus" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Cognitive Models\n", "\n", "- Lots of different models \n", " - e.g. Conditioning (Rescorla-Wagner model) " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "# Cognitive Architectures\n", "\n", "- Don't want to make a whole new model for each situation\n", " - Hard to generalize\n", " - Lots of parameters\n", " - Can fit anything\n", "- Identify basic components used across tasks\n", " - Adds constraints\n", " - Imposes a high-level organizational theory" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## ACT-R\n", "\n", "- Most widely used cognitive architecture \n", " - [http://act-r.psy.cmu.edu/](http://act-r.psy.cmu.edu/)\n", " - Remembering lists\n", " - Driving a car\n", " - Dialing a phone\n", " - Mental arithmetic\n", " - Parsing a sentence\n", " - Military training\n", " - etc etc\n", "- Each components has equations\n", " - Memory activation: $A_i = ln( \\sum t_j^{-d})+\\beta_i$\n", " - Including timing\n", " - Recall time: $T = F e^{-fA_i}$" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Problems\n", "\n", "- Disconnected from neuroscience\n", " - Trying to map components of the model to brain areas\n", " - When a component is active, maybe neurons in that area are more active?\n", "- No \"bridging laws\"\n", " - Like having rules of chemistry that never mention that it's all built out of atoms and electrons\n", "- No constraints on the equations\n", " - Just anything that can be written down\n", " - Many possibilities; hard to figure out what matches human data best\n", "- Maybe that's okay\n", " - Do we understand the brain enough to make this connection and constrain theories?\n", " - When understanding a word processor, do we worry about transistors?" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# The Brain\n", "\n", "- 2 kg (2% of body weight)\n", "- 20 Watts (25% of power consumption)\n", "- Area: 4 sheets of paper\n", "- Neurons: 100 billion (150,000 per $mm^2$)" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from IPython.display import YouTubeVideo\n", "YouTubeVideo('jHxyP-nUhUY', width=500, height=400, autoplay=0, start=60)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "\n", " \n", " " ], "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "" ] } ], "prompt_number": 1 }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Brain structures\n", "\n", "- Lots of visually obvious structure\n", "- Lots of greek and latin names to remember\n", " - frontal cortex, thalamus, amygdala, hypothalamus, substantia nigra, etc etc\n", "\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## A Neuron\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "# Neurons in the brain\n", "\n", "- 100 billion\n", "- 100's or 1000's of visually distinct types\n", "- Axon length: from $10^{-4}$ to $5$ m\n", "- Each neuron: 500-200,000 inputs and outputs\n", " - 72km of axons\n", "- Communication: 100's of different neurotransmitters" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Neuron communication: Synapses\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## What it really looks like\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## What it really really looks like" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from IPython.display import YouTubeVideo\n", "YouTubeVideo('F37kuXObIBU', width=720, height=500, start=8*60+35)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "\n", " \n", " " ], "metadata": {}, "output_type": "pyout", "prompt_number": 20, "text": [ "" ] } ], "prompt_number": 20 }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Considering the brain\n", "\n", "- lesion studies\n", "- what are the effects of damaging different parts of the brain?\n", " - occipital cortex: blindness (call it visual cortex)\n", " - inferior frontal gyrus: can't speak (Broca's area)\n", " - posterior superior temporal gyrus: can't understand speech (Wernicke's area)\n", " - fusiform gyrus: can't recognize faces (and other complex objects)\n", " - prefrontal cortex: moral judgement???\n", " - aperceptive visual agnosia\n", " - etc, etc, etc\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## fMRI\n", "\n", "- Functional Magnetic Resonance Imaging \n", "- Measure blood oxygenation levels in the brain\n", " - show the difference between two tasks\n", " - averaged over ~100 trials\n", "- Measured while performing tasks\n", " - ~4 second between scans\n", " - some attempts at going faster, but blood vessels don't change much faster than this\n", "- Shows where energy is being used in the brain\n", " - equivalent to figuring out how a CPU works by measuring temperature\n", " - a bit more fine-grained than lesion studies\n", "- [Neurosynth](http://neurosynth.org/)" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## EEG\n", "\n", "- Electrical activity at the scalp\n", "- High time resolution\n", "- Large-scale communication between areas\n", "\n", " \n", "\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Single cell recording\n", "\n", "\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Local Field Potential\n", "\n", "- Place electrodes into the brain, record from it\n", " - not necessarily right at a neuron\n", "- Multielectrode recordings\n", "- Post-processing: \"Spike sorting\" \n", "\n", " " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Rat place cells\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Calcium Imaging\n", "\n", "- In a fish embryo\n", "\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Calcium imaging\n", "\n", "- In a stalking fish\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Optogenetics\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# What do we know?\n", "\n", "- lots of details\n", " - Data: \"The proportion of type A neurons in area X is Y\" \n", " - Conclusion: \"Therefore, the proportion of type A neurons in area X is Y\".\n", "- hard to get a big picture\n", " - over-generalizing from data \n", " \n", "- \"data-rich and theory-poor\"\n", " - need some way to connect these details\n", " - need a unifying theory" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Levels of description\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Computational Neuroscience\n", "\n", "- what I cannot create, I do not understand \n", "- build a computer simulation\n", " - do to neuroscience what Newton did to physics\n", " - too complex to be analytically tractable, so use computer simulation\n", "- Can we use this to connect the levels?" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Single neuron simulation\n", "\n", "- Hodgkin & Huxley, 1952\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Single neuron simulation\n", "\n", "- Hodgkin & Huxley, 1952\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Single neuron simulation\n", "\n", "\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Millions of neurons" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from IPython.display import YouTubeVideo\n", "YouTubeVideo('_UFOSHZ22q4', width=600, height=400, start=60)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "\n", " \n", " " ], "metadata": {}, "output_type": "pyout", "prompt_number": 9, "text": [ "" ] } ], "prompt_number": 9 }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Billions of neurons\n", "\n", "- Simplify the neuron model\n", " - $C {dV \\over dt} = I - {V \\over R}$\n", " \n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from IPython.display import YouTubeVideo\n", "YouTubeVideo('WmChhExovzY', width=600, height=400)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "\n", " \n", " " ], "metadata": {}, "output_type": "pyout", "prompt_number": 13, "text": [ "" ] } ], "prompt_number": 13 }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## The controversy\n", "\n", "- what level of detail for the neurons? how should they be connected?\n", "- IBM SyNAPSE project\n", " - billions of neurons, but very simple models\n", " - randomly connected\n", " - 2009: \"Cat\"-scale brain (1 billion neurons)\n", " - 2012: \"Human\"-scale brain (100 billion neurons)\n", " - Called a [\"hoax and PR stunt\"](http://spectrum.ieee.org/tech-talk/semiconductors/devices/blue-brain-project-leader-angry-about-cat-brain) by: \n", "- Blue Brain\n", " - much more detailed neurons\n", " - randomly connected\n", "- how much detail is enough?\n", " - how could we know?" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "- The real test: connecting to *behaviour*\n", " - How can we build models that actually do something?\n", " - How should we connect realistic neurons so they work together?" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# The Neural Engineering Framework\n", "\n", "- Our attempt\n", " - probably wrong, but got to start somewhere\n", "- Three principles\n", " - Representation\n", " - Transformation\n", " - Dynamics\n", "- Building behaviour out of detailed low-level components" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Representation\n", "\n", "- How do neurons represent information?\n", "- What is the mapping between a value to be stored and the activity of a group of neurons?\n", "- What sorts of values can be stored?\n", "- Examples:\n", " - Line detection in retina\n", " - Place cells\n", "- Claim: every group of neurons should be thought of as representing something\n", " - each neuron has some preferred value\n", " - neurons fire more strongly the closer the value is to that preferred value\n", " - values are *vectors*\n", " " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Transformation\n", "\n", "- Connections compute functions on those vectors\n", "- Activity of one group of neurons causes another group to fire\n", " - One group may represent $x$, connected to annother group representing $y$\n", " - Whatever firing pattern we get in $y$ due to $x$ is a function $y = f(x)$\n", "- Can find what class of functions are well approximated this way\n", "- Puts limits on the algorithms we can implement with neurons" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Dynamics\n", "\n", "- Recurrent connections (feedback)\n", "- Turns out to allow us to compute functions of this form:\n", " - ${dx \\over dt} = f(x, u)$\n", " - where $x$ is what the neurons represent, and $u$ is the input neurons\n", "- Great for implementing all of control theory\n", "- Also memory! (${dx \\over dt} = u$)" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Examples\n", "\n", "- This approach gives us a neural compiler\n", "- Given an algorithm, you can solve for the connections between neurons that will approximate that algorithm\n", " - Works for a wide variety of neuron models\n", " - Number of neurons affects accuracy\n", " - Neuron properties influence timing\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Vision: character recognition\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Simple reactions: Braitenburg vehicle\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Problem solving: Tower of Hanoi\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Spaun: digit recognition\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Spaun: copy drawing\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "# Spaun: addition by counting\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Spaun: pattern completion\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Benefits\n", "\n", "- No one else can do this\n", "- New ways to test theories (neurological constraints)\n", "- Suggests different types of algorithms\n", "- Potential medical applications\n", "- New ways of understanding the mind and who we are\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Homework\n", "\n", "- Get the textbook\n", " - Eliasmith and Anderson (2003). Neural Engineering: Representation, Computation and Dynamics in Neurobiological Systems. MIT Press.\n", "- Read chapter 1" ] } ], "metadata": {} } ] }