Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Modeling and Computational Neuroscience using Python

Similar presentations

Presentation on theme: "Introduction to Modeling and Computational Neuroscience using Python"— Presentation transcript:

1 Introduction to Modeling and Computational Neuroscience using Python
Randy Heiland Research Scientist Indiana University I wonder why. I wonder why. I wonder why I wonder. I wonder why I wonder why I wonder why I wonder! * * Surely You're Joking, Mr. Feynman! (Adventures of a Curious Character), Richard Feynman.

2 Overview Computational Science:
Experiments, Models, Simulations, Analyses Modeling Neuroscience Python programming Questions? (+ short survey)

3 Experiment Analysis Model Simulation u’ = f(u,v) v’ = g(u,v) Mental
e-07, e-05, e-08, e e-06, e-09, e-08, e-06, e-08, e-09, e-06, e-07, e-06, e+00, e-06, e-08, , e-06, e-08, e-06, e-06, e-09, e-08, e+00, e-08, e-07, e-05, e-09, e-06, [ e-07, e-08, e-08, e-08, e+00, e-09, 512 electrode chip Courtesy A.Litke Experiment Mental u’ = f(u,v) v’ = g(u,v) Analysis Model Mathematical Computational Science is a cycle of these 4 areas. An experiment may precede or follow a model. Regarding models, we’re mostly interested in mathematical models. Simulations: computer programs to solve models Analysis: interpretation/verification of simulation data Experiments: physical/chemical/bio/astro or even “thought” experiment (Einstein) Alan Litke’s 512-electrode chip for retina neurons Mental models: Heliocentric model of earth/sun (vs. geocentric) Analysis: we now have more data than we have computers or people’s time to analyze – and it’s growing fast! (e.g. medical devices; social n/w data; astronomy; etc etc) Step 1: … Step 2: … Simulation  Patterns, Structures, Causality… Procedural Courtesy of Indiana University

4 Modeling Using math to approximate some process (or data)
(physical, biological, chemical, social, …) Typically ignore some parameters for a more “reasonable” model (e.g., for your F=ma lab, you ignored friction) “ all models are wrong, but some are useful” Prof. Emer. George E. P. Box, Statistics, UW-Madison

5 Simulation Execution of a model in a computer program
Several computer languages: C/C++, Java, etc. Higher level languages: MATLAB, Python, etc. Solving some models may require the use of parallel computing. Possibly discuss HPC, dist’d computing, cloud computing (e.g. Amazon), GPUs, etc.

6 Python language Easy to use Interpreted Powerful
>>> (52*55)/3.0 >>> from math import * >>> cos(pi) -1.0 Easy to use Interpreted Powerful Free (“open source”); runs on all computers Used in many computational science tools

7 Simple model in Python Average monthly temperature
in Indiana (from  A function as a model lowTemp=[19,22,30,41,52,61,65,63,55,43,34,23] plot(lowTemp,'o') # ‘o’  circular points time = arange(0, 12, 0.1) F = 22*sin(pi/6 * (time-pi)) + 42 plot(time,F) (Note that Python is “0-based indexing”)

8 Neuroscience Goal: understand relationship between neural structures and functions Help solve important problems Vision Memory Auditory Ponder/explain interesting topics Consciousness; self-awareness Altruism Why? – “Seen and hear”, 1999. (image of brain) Altruism: behavior by an animal/entity that is not beneficial to or may be harmful to itself but that benefits others of its species.

9 Concepts & Terminology
A neuron is a nerve cell. It contains a soma, dendrites, and axon. Soma (Combination of biology, chemistry, and physics) Microscopic image Illustrative image

10 Yes, it’s quite complex Soma Scanning Electron Microscope image SEM image: cutaway of (mouse) nerve ending and its synaptic vesicles (

11 The scale of a model Models can be at different scales: molecular, cellular, multi-cellular, tissue, organ, organism, … A single neuron model is on a different space and time (“spatiotemporal”) scale than a brain region or whole brain model.

12 Larger number of neurons  complex signaling and networks
Rich-Club Organization of the Human Connectome The Journal of Neuroscience, 2 November 2011, 31(44): Martijn P. van den Heuvel and Olaf Sporns. Rich-Club Organization of the Human Connectome. M.P. van den Heuvel and O. Sporns. J. Neuroscience, 2 Nov 2011. 100 billion neurons in human brain (Thanks to Journal of Neuroscience and authors for permission to use this image)

13 “… it is intolerable that we do not have this information [connectional map] for the human brain. Without it there is little hope of understanding how our brains work…” (Crick 1993) 1962 Nobel Prize for Physiology or Medicine Q: who knows who Francis Crick was? Hint: James Watson, Maurice Wilkins, Rosalind Franklin Francis Crick,

14 Vision: conversion of light to electrical signals
Rubin’s vase: Danish psychologist Edgar Rubin, Visual perception; brain can only maintain one image (vase or face) at a time. Vase or Face? A Neural Correlate of Shape-Selective Grouping Processes in the Human Brain. Journal of Cognitive Neuroscience, Aug 2001, pg

15 Memory One of the main hypotheses in neuroscience is that memories are encoded in the strengths of synapses between neurons Plasticity – the ability to change as a result of experience Soma Mathematical Foundations of Neuroscience, Ermentrout and Terman, p. 168. How is it that we can remember events from many years ago, but not what happened at 2:37 yesterday? E.g. my Grandmother’s backrubs.

16 Overwhelmed yet? Let’s begin by modeling a single neuron How? Why?
An electrical circuit is a good starting model Why? Because it is an (chemo)electrical circuit

17 From your past homework
The nervous system of the human body contains axons whose membranes act as small capacitors. A membrane is capable of storing 1.2 x 10-9 C of charge across a potential difference of 0.07 V before discharging nerve impulses through the body. What is the capacitance of one of these axon membranes?  neuron spike

18 Single neuron simulation
Shows how ions are responsible for potential difference. Problem with these sims, they don’t show the math. - play the simulation to see V flip/spike

19 Simplified model of a neuron
RC circuit (Resistance-Capacitance) Ion transports act as a resistor. Cell membrane acts as a capacitor.

20 Leaky integrate-and-fire (LIF) model (#1)
Where variables refer to membrane’s: V = potential R = resistance I = current if t > t_rest; otherwise = 0 Note: for those who haven’t taken Calculus (yet), dV/dt is a derivative (not division) This equation is a differential equation It can be solved numerically Leaky integrate is from the RC-circuit model; Fire is the delta function

21 LIF in Python But it’s not very realistic… # initialize all variables
for i, t in enumerate(time): # loop over desired time if t > t_rest: V[i] = V[i-1] + (-V[i-1] + I*R) / tau * dt if V[i] >= V_threshold: V[i] = V[i] + V_spike t_rest = t + tau_ref plot(time,V) Numerical integration via forward Euler method. (Rf. But it’s not very realistic…

22 Hodgkin-Huxley model (#2)
1952 (Nobel Prize 1963) Giant squid  measure voltages  Circuit model - complete with Python sim. The Hodgkin-Huxley model for neural dynamics is one of the most successful models in computational neuroscience. Based on voltage-clamp experiments on the squid giant axon, the model incorporates voltage-sensitive ion channels into the circuit model of the membrane to describe the generation and propagation of action potentials Electrical circuit model A more complicated differential equation - has both linear and nonlinear components

23 What about modeling LOTS of neurons
To model a brain, we want to model a network of neurons Need models of both the spiking behavior and the synapse (transmission between neurons) In the human brain, each neuron is connected to several thousand other neurons.

24 Izhikevich model (#3) m=membrane potential; u=membrane recovery
if v >= 30 mV then v = c u = u + d m=membrane potential; u=membrane recovery Captures multiple types of spiking behavior Computationally fast enough to do many neurons

25 Izhikevich model (cont’d)
(plus many more) Izhikevich E.M. (2003)  Simple Model of Spiking Neurons. IEEE Transactions on Neural Networks, 14:

26 Analysis After you have a model and have run a simulation of the model, you need to analyze the resulting data. Similarly, data from an experiment needs to be analyzed. Transfer Entropy is just one such analysis technique (next slide) The Fourth Paradigm: Data-Intensive Scientific Discovery (2009)

27 Visualization of analysis results
Transfer Entropy (TE) measures the effect that one neuron’s spiking has on another neuron. max min Part of much larger TE matrix Graph displays of TE (with different thresholds)

28 DIY neuroscience experiments
(SpikerBox: $50-$100) output input Cockroach leg (it grows back) Cockroach leg

29 Sampling of Research[ers]
John Beggs, Physics, Indiana U. - experimental research (“brains in a dish”) and analysis of experimental and simulated data Susan Amara, Neurobiology, U. of Pittsburgh, past President of Society for Neuroscience. - molecular & cellular biology of transporters Olaf Sporns, Psychological and Brain Sciences, Indiana U. - computational cognitive neuroscience; neural networks; coined “Connectome” Nancy Kopell, Mathematics, Boston U. Co-Director of Center for Biodynamics - develops models for and analysis of networks of neurons, esp. rhythms and oscillations. (Joy Hirsch) Crick & James Watson famously discovered structure of DNA… led to an entire generation of research. Nancy Ko-PELL (studied under S. Smale at UC-Berkeley)

30 Some related textbooks

31 Summary Modeling uses math to approximate reality
Modeling occurs at multiple scales Neuroscience: understand relationship between neural structures and functions Python lets you experiment with computational neuroscience (for free)

32 IU might be of interest to you
Dept of Physics Biophysics, Biocomplexity School of Informatics and Computing Complex systems, computer science, data mining Dept of Pyschological and Brain Sciences Learning, computational models of … Biology, Chemistry, …

33 Thanks! Be curious. Be creative. Be nice to your neurons.
Questions & short survey

34 Further reading/References
Vase or Face? A Neural Correlate of Shape-Selective Grouping Processes in the Human Brain. Journal of Cognitive Neuroscience, Aug 2001, pg - From Eye to Sight, Alan Litke Craddock TJA , Tuszynski JA , Hameroff S (2012) Cytoskeletal Signaling: Is Memory Encoded in Microtubule Lattices by CaMKII Phosphorylation? PLoS Comput Biol 8(3): e doi: /journal.pcbi

35 Analysis  publications
Simple model of spiking neurons. IEEE Transactions on Neural Networks (2003) 14: Complex network measures of brain connectivity: uses and interpretations. Neuroimage Sep;52(3): Extending Transfer Entropy Improves Identification of Effective Connectivity in a Spiking Cortical Network Model

36 Self-awareness Awareness of one’s own ability to think (humans, apes, dolphins, …) 1970 “mirror test” for chimpanzees Difficult to test I wonder why. I wonder why. I wonder why I wonder. I wonder why I wonder why I wonder why I wonder! * Prefrontal cortex

37 Effects of meditation experience on functional connectivity of distributed brain networks. Feb 2012.
“Participants with more meditation experience exhibited increased connectivity within attentional networks…”

38 Nerve cells are formed during fetal life and for a short time after birth. Unlike most cells, which have a fairly short lifespan, neurons in the brain live a long time. These cells can live for up to 100 years or longer. To stay healthy, living neurons must constantly maintain and repair themselves. Groups of neurons in the brain have special jobs. For example, some are involved with thinking, learning, and memory. Others are responsible for receiving information from the sensory organs (such as the eyes and ears) or the skin. Still others communicate with muscles, stimulating them into action.

39 Definitions (for this talk)
Model: math equation(s) to describe a process (physics,chemistry,biology,…) Simulation: computer program to solve the model Analysis: interpretation/verification of data from the simulation (or experiment) - Might be an algorithm instead of eqns (Stephen Wolfram) - Maybe not a computer; might be analog, e.g. an electrical circuit

40 Is it possible to use more of our brain?
Barry Gordon, professor of neurology and cognitive science at the Johns Hopkins University School of Medicine, replies Scientific American| Saturday, March 3, 2012 | 2 Yes! Though perhaps not how you might imagine. You can't put more of your brain to work. Your whole brain is working all the time, even when you think you're just being lazy. What you can do is make it work more productively. There are two proved strategies to make your neural systems more efficient. The first strategy is to focus, which is hard to do. It is quite difficult to force your brain to stay on task and to shut off extraneous thoughts. Yet by concentrating, your brain can muster the neural tools it needs to tackle a complex problem. In fact, intense focus may be one reason why so-called savants become so extraordinary at performing extensive calculations or remembering a slew of facts. The second approach is optimization. The human brain is far from an ideal "thinking machine." Our mental processes are slow, and the accuracy of our memory is far from perfect. Our intrinsic limitations are compounded by the simple mental blunders we make; these unhelpful tendencies, however, are correctable. For instance, you can become a better problem solver by looking beyond your personal biases and blind spots to consider alternative solutions. The more you learn to recognize and seek a variety of answers, the better your brain will be at finding optimal solutions. Some proof that focus and optimization can improve the brain's performance comes from research on video gamers. Neuroscientists at the University of Rochester have shown that even novice gamers can improve cognitive skills such as perception and attention by playing action video games. These games can strengthen players' mental acuity because they require intense concentration and ruthless self-correction (otherwise, your friends shoot you!). Sometimes, however, you may think better when you're not trying so hard. (You have to consider all the alternatives.) Periods of artistic and scientific creativity—when people often tackle the biggest, most open-ended problems—usually require letting your brain meander, percolate, chill. It may not feel like you are using more of your brain when you unleash it in this way, but one virtue of the human brain is that it often does its best work when it does not seem to be working at all.

41 1-min lesson in Diff. Eq. Geometric interpretation
Show sin(x), tangent/deriv  cos(x) d/dt F(x) = cos(x)

42 This confocal micrograph shows specialized cells named Purkinje cells (red) that are found in a part of the brain called the cerebellum. They send out vast numbers of branches that make connections with other cells in the cerebellum. This part of the brain co-ordinates your voluntary movements and keeps you oriented in space. It also plays a part in learning physical skills - like riding a bike or playing the piano.

Download ppt "Introduction to Modeling and Computational Neuroscience using Python"

Similar presentations

Ads by Google